diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2014-03-14 15:25:25 +1300 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2014-03-14 15:25:25 +1300 |
commit | 194f45759b934e13553c8d8115e19fa32dad1c39 (patch) | |
tree | d33febd54cb06d365d9469a101a609c10050d255 /tests | |
parent | 0bdadacab0c214c7832b74f86a3ca1ceb63db755 (diff) | |
download | lightdm-194f45759b934e13553c8d8115e19fa32dad1c39.tar.gz |
Add tests to confirm we handle setup scripts missing
Diffstat (limited to 'tests')
16 files changed, 110 insertions, 15 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 50a91510..327b05c8 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -111,9 +111,12 @@ TESTS = \ test-plymouth-inactive-vt \ test-plymouth-no-seat \ test-script-hooks \ - test-script-hook-fail-display-setup \ - test-script-hook-fail-greeter-setup \ - test-script-hook-fail-session-setup \ + test-script-hook-display-setup-fail \ + test-script-hook-display-setup-missing \ + test-script-hook-greeter-setup-fail \ + test-script-hook-greeter-setup-missing \ + test-script-hook-session-setup-fail \ + test-script-hook-session-setup-missing \ test-shared-data-greeter-to-session \ test-shared-data-session-to-greeter \ test-shared-data-session-to-greeter-autologin \ @@ -435,9 +438,12 @@ EXTRA_DIST = \ scripts/shared-data-session-to-greeter.conf \ scripts/shared-data-session-to-greeter-autologin.conf \ scripts/script-hooks.conf \ - scripts/script-hook-fail-display-setup.conf \ - scripts/script-hook-fail-greeter-setup.conf \ - scripts/script-hook-fail-session-setup.conf \ + scripts/script-hook-display-setup-fail.conf \ + scripts/script-hook-display-setup-missing.conf \ + scripts/script-hook-greeter-setup-fail.conf \ + scripts/script-hook-greeter-setup-missing.conf \ + scripts/script-hook-session-setup-fail.conf \ + scripts/script-hook-session-setup-missing.conf \ scripts/session-stdout.conf \ scripts/session-stderr.conf \ scripts/session-stderr-multi-write.conf \ diff --git a/tests/scripts/script-hook-fail-display-setup.conf b/tests/scripts/script-hook-display-setup-fail.conf index c0bde124..903f82af 100644 --- a/tests/scripts/script-hook-fail-display-setup.conf +++ b/tests/scripts/script-hook-display-setup-fail.conf @@ -1,5 +1,5 @@ # -# Check LightDM stops the display if the display setup script returns an error +# Check LightDM stops if the display setup script returns an error # [SeatDefaults] diff --git a/tests/scripts/script-hook-display-setup-missing.conf b/tests/scripts/script-hook-display-setup-missing.conf new file mode 100644 index 00000000..06ebd06e --- /dev/null +++ b/tests/scripts/script-hook-display-setup-missing.conf @@ -0,0 +1,24 @@ +# +# Check LightDM stops if the display setup script is missing +# + +[SeatDefaults] +display-setup-script=test-script-hook-INVALID + +#?*START-DAEMON +#?RUNNER DAEMON-START + +# One X server should start by default +#?XSERVER-0 START VT=7 SEAT=seat0 + +# Daemon connects when X server is ready +#?*XSERVER-0 INDICATE-READY +#?XSERVER-0 INDICATE-READY +#?XSERVER-0 ACCEPT-CONNECT + +# Setup script fails + +#?XSERVER-0 TERMINATE SIGNAL=15 + +# Cleanup +#?RUNNER DAEMON-EXIT STATUS=1 diff --git a/tests/scripts/script-hook-fail-greeter-setup.conf b/tests/scripts/script-hook-greeter-setup-fail.conf index c1b2bd31..1c377028 100644 --- a/tests/scripts/script-hook-fail-greeter-setup.conf +++ b/tests/scripts/script-hook-greeter-setup-fail.conf @@ -1,5 +1,5 @@ # -# Check LightDM stops the display if the display setup script returns an error +# Check LightDM stops if the greeter setup script returns an error # [SeatDefaults] diff --git a/tests/scripts/script-hook-greeter-setup-missing.conf b/tests/scripts/script-hook-greeter-setup-missing.conf new file mode 100644 index 00000000..939ff35d --- /dev/null +++ b/tests/scripts/script-hook-greeter-setup-missing.conf @@ -0,0 +1,24 @@ +# +# Check LightDM stops if the greeter setup script is missing +# + +[SeatDefaults] +greeter-setup-script=test-script-hook-INVALID + +#?*START-DAEMON +#?RUNNER DAEMON-START + +# One X server should start by default +#?XSERVER-0 START VT=7 SEAT=seat0 + +# Daemon connects when X server is ready +#?*XSERVER-0 INDICATE-READY +#?XSERVER-0 INDICATE-READY +#?XSERVER-0 ACCEPT-CONNECT + +# Setup script fails + +#?XSERVER-0 TERMINATE SIGNAL=15 + +# Cleanup +#?RUNNER DAEMON-EXIT STATUS=1 diff --git a/tests/scripts/script-hook-fail-session-setup.conf b/tests/scripts/script-hook-session-setup-fail.conf index 8bd99740..9e3922f4 100644 --- a/tests/scripts/script-hook-fail-session-setup.conf +++ b/tests/scripts/script-hook-session-setup-fail.conf @@ -1,5 +1,5 @@ # -# Check LightDM stops returns to the greeter if the session setup script fails +# Check LightDM returns to the greeter if the session setup script fails # [SeatDefaults] diff --git a/tests/scripts/script-hook-session-setup-missing.conf b/tests/scripts/script-hook-session-setup-missing.conf new file mode 100644 index 00000000..c6550004 --- /dev/null +++ b/tests/scripts/script-hook-session-setup-missing.conf @@ -0,0 +1,35 @@ +# +# Check LightDM returns to the greeter if the session setup script is missing +# + +[SeatDefaults] +session-setup-script=test-script-hook-INVALID +autologin-user=have-password1 +user-session=default + +#?*START-DAEMON +#?RUNNER DAEMON-START + +# One X server should start by default +#?XSERVER-0 START VT=7 SEAT=seat0 + +# Daemon connects when X server is ready +#?*XSERVER-0 INDICATE-READY +#?XSERVER-0 INDICATE-READY +#?XSERVER-0 ACCEPT-CONNECT + +# Setup script fails + +# Greeter starts +#?GREETER-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter +#?XSERVER-0 ACCEPT-CONNECT +#?GREETER-X-0 CONNECT-XSERVER +#?GREETER-X-0 CONNECT-TO-DAEMON +#?GREETER-X-0 CONNECTED-TO-DAEMON +#?GREETER-X-0 SELECT-USER-HINT USERNAME=have-password1 + +# Cleanup +#?*STOP-DAEMON +#?GREETER-X-0 TERMINATE SIGNAL=15 +#?XSERVER-0 TERMINATE SIGNAL=15 +#?RUNNER DAEMON-EXIT STATUS=0 diff --git a/tests/test-script-hook-display-setup-fail b/tests/test-script-hook-display-setup-fail new file mode 100755 index 00000000..593f95e1 --- /dev/null +++ b/tests/test-script-hook-display-setup-fail @@ -0,0 +1,2 @@ +#!/bin/sh +./src/dbus-env ./src/test-runner script-hook-display-setup-fail test-gobject-greeter diff --git a/tests/test-script-hook-display-setup-missing b/tests/test-script-hook-display-setup-missing new file mode 100755 index 00000000..1cf8b845 --- /dev/null +++ b/tests/test-script-hook-display-setup-missing @@ -0,0 +1,2 @@ +#!/bin/sh +./src/dbus-env ./src/test-runner script-hook-display-setup-missing test-gobject-greeter diff --git a/tests/test-script-hook-fail-display-setup b/tests/test-script-hook-fail-display-setup deleted file mode 100755 index fb55141c..00000000 --- a/tests/test-script-hook-fail-display-setup +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -./src/dbus-env ./src/test-runner script-hook-fail-display-setup test-gobject-greeter diff --git a/tests/test-script-hook-fail-greeter-setup b/tests/test-script-hook-fail-greeter-setup deleted file mode 100755 index e26c8d3a..00000000 --- a/tests/test-script-hook-fail-greeter-setup +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -./src/dbus-env ./src/test-runner script-hook-fail-greeter-setup test-gobject-greeter diff --git a/tests/test-script-hook-fail-session-setup b/tests/test-script-hook-fail-session-setup deleted file mode 100755 index a3c010c5..00000000 --- a/tests/test-script-hook-fail-session-setup +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -./src/dbus-env ./src/test-runner script-hook-fail-session-setup test-gobject-greeter diff --git a/tests/test-script-hook-greeter-setup-fail b/tests/test-script-hook-greeter-setup-fail new file mode 100755 index 00000000..1f38eeab --- /dev/null +++ b/tests/test-script-hook-greeter-setup-fail @@ -0,0 +1,2 @@ +#!/bin/sh +./src/dbus-env ./src/test-runner script-hook-greeter-setup-fail test-gobject-greeter diff --git a/tests/test-script-hook-greeter-setup-missing b/tests/test-script-hook-greeter-setup-missing new file mode 100755 index 00000000..0fc87d4c --- /dev/null +++ b/tests/test-script-hook-greeter-setup-missing @@ -0,0 +1,2 @@ +#!/bin/sh +./src/dbus-env ./src/test-runner script-hook-greeter-setup-missing test-gobject-greeter diff --git a/tests/test-script-hook-session-setup-fail b/tests/test-script-hook-session-setup-fail new file mode 100755 index 00000000..a3093718 --- /dev/null +++ b/tests/test-script-hook-session-setup-fail @@ -0,0 +1,2 @@ +#!/bin/sh +./src/dbus-env ./src/test-runner script-hook-session-setup-fail test-gobject-greeter diff --git a/tests/test-script-hook-session-setup-missing b/tests/test-script-hook-session-setup-missing new file mode 100755 index 00000000..fc182954 --- /dev/null +++ b/tests/test-script-hook-session-setup-missing @@ -0,0 +1,2 @@ +#!/bin/sh +./src/dbus-env ./src/test-runner script-hook-session-setup-missing test-gobject-greeter |