From c31bbb71b9e679140c50a13dd7c51f78050f7cae Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 30 Oct 2013 17:17:40 -0700 Subject: Fix crash if switching to greeter and it isn't installed --- tests/Makefile.am | 4 ++++ tests/scripts/autologin-invalid-greeter.conf | 30 ++++++++++++++++++++++++++++ tests/scripts/login-invalid-greeter.conf | 7 +++++++ tests/test-autologin-invalid-greeter | 2 ++ tests/test-login-invalid-greeter | 2 ++ 5 files changed, 45 insertions(+) create mode 100644 tests/scripts/autologin-invalid-greeter.conf create mode 100644 tests/scripts/login-invalid-greeter.conf create mode 100755 tests/test-autologin-invalid-greeter create mode 100755 tests/test-login-invalid-greeter (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index c121d6dd..92014235 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -22,6 +22,7 @@ TESTS = \ test-autologin-guest-in-background \ test-autologin-timeout-in-background \ test-autologin-invalid-user \ + test-autologin-invalid-greeter \ test-autologin-invalid-session \ test-crash-authenticate \ test-autologin-xserver-crash \ @@ -72,6 +73,7 @@ TESTS = \ test-language \ test-language-no-accounts-service \ test-login-crash-authenticate \ + test-login-invalid-greeter \ test-login-gobject \ test-login-gobject-manual \ test-login-gobject-manual-previous-session \ @@ -307,6 +309,7 @@ EXTRA_DIST = \ scripts/autologin-guest-logout.conf \ scripts/autologin-guest-timeout.conf \ scripts/autologin-in-background.conf \ + scripts/autologin-invalid-greeter.conf \ scripts/autologin-guest-in-background.conf \ scripts/autologin-timeout-in-background.conf \ scripts/autologin-invalid-session.conf \ @@ -362,6 +365,7 @@ EXTRA_DIST = \ scripts/login-guest-logout.conf \ scripts/login-guest-no-setup-script.conf \ scripts/login-info-prompt.conf \ + scripts/login-invalid-greeter.conf \ scripts/login-invalid-session.conf \ scripts/login-invalid-user.conf \ scripts/login-logout.conf \ diff --git a/tests/scripts/autologin-invalid-greeter.conf b/tests/scripts/autologin-invalid-greeter.conf new file mode 100644 index 00000000..31616422 --- /dev/null +++ b/tests/scripts/autologin-invalid-greeter.conf @@ -0,0 +1,30 @@ +# +# Check quits if autologin session ends and no valid greeter +# + +[SeatDefaults] +autologin-user=have-password1 +user-session=default + +#?RUNNER DAEMON-START + +# X server starts +#?XSERVER-0 START VT=7 + +# Daemon connects when X server is ready +#?*XSERVER-0 INDICATE-READY +#?XSERVER-0 INDICATE-READY +#?XSERVER-0 ACCEPT-CONNECT + +# Session starts +#?SESSION-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 DESKTOP_SESSION=default USER=have-password1 +#?XSERVER-0 ACCEPT-CONNECT +#?SESSION-X-0 CONNECT-XSERVER + +# Logout session +#?*SESSION-X-0 LOGOUT + +# X server stops +#?XSERVER-0 TERMINATE SIGNAL=15 + +#?RUNNER DAEMON-EXIT STATUS=1 diff --git a/tests/scripts/login-invalid-greeter.conf b/tests/scripts/login-invalid-greeter.conf new file mode 100644 index 00000000..8efa0ceb --- /dev/null +++ b/tests/scripts/login-invalid-greeter.conf @@ -0,0 +1,7 @@ +# +# Check fails to start if invalid greeter +# + +#?RUNNER DAEMON-START + +#?RUNNER DAEMON-EXIT STATUS=1 diff --git a/tests/test-autologin-invalid-greeter b/tests/test-autologin-invalid-greeter new file mode 100755 index 00000000..5489c7a5 --- /dev/null +++ b/tests/test-autologin-invalid-greeter @@ -0,0 +1,2 @@ +#!/bin/sh +./src/dbus-env ./src/test-runner autologin-invalid-greeter INVALID diff --git a/tests/test-login-invalid-greeter b/tests/test-login-invalid-greeter new file mode 100755 index 00000000..ad572e6e --- /dev/null +++ b/tests/test-login-invalid-greeter @@ -0,0 +1,2 @@ +#!/bin/sh +./src/dbus-env ./src/test-runner login-invalid-greeter INVALID -- cgit v1.2.1