tests/src/*_moc.cpp
tests/src/plymouth
tests/src/test-gobject-greeter
+tests/src/test-guest-account
tests/src/test-qt-greeter
tests/src/test-runner
tests/src/test-session
tests/src/test-xserver
-tests/src/test-cleanup-guest
-tests/src/test-setup-guest
test-no-config \
test-headless \
test-autologin \
- test-autologin-guest \
- test-autologin-guest-fail-setup-script \
test-autologin-invalid-user \
+ test-autologin-invalid-session \
+ test-autologin-xserver-crash \
+ test-autologin-session-crash \
test-autologin-logout \
+ test-autologin-guest \
+ test-autologin-guest-fail-setup-script \
test-login-gobject \
test-login-gobject-manual \
test-login-gobject-no-password \
test-login-gobject-wrong-password \
test-login-gobject-invalid-user \
+ test-login-gobject-invalid-session \
test-login-gobject-logout \
test-login-gobject-xserver-crash \
test-login-gobject-session-crash \
test-switch-to-user \
test-xdmcp-login
-# test-autologin-invalid-session
-# test-autologin-session-crash
# test-autologin-session-exit-error
+# test-login-gobject-session-exit-error
+# test-login-qt-session-exit-error
if COMPILE_LIBLIGHTDM_QT
TESTS += \
test-login-qt-no-password \
test-login-qt-wrong-password \
test-login-qt-invalid-user \
+ test-login-qt-invalid-session \
test-login-qt-logout \
test-login-qt-xserver-crash \
test-login-qt-session-crash \
scripts/autologin-guest.script \
scripts/autologin-guest-fail-setup-script.conf \
scripts/autologin-guest-fail-setup-script.script \
+ scripts/autologin-invalid-session.conf \
+ scripts/autologin-invalid-session.script \
scripts/autologin-invalid-user.conf \
scripts/autologin-invalid-user.script \
scripts/autologin-logout.conf \
scripts/autologin-logout.script \
+ scripts/autologin-session-crash.conf \
+ scripts/autologin-session-crash.script \
+ scripts/autologin-xserver-crash.conf \
+ scripts/autologin-xserver-crash.script \
scripts/headless.conf \
scripts/headless.script \
scripts/login.conf \
scripts/login-guest-fail-setup-script.script \
scripts/login-guest-no-setup-script.conf \
scripts/login-guest-no-setup-script.script \
+ scripts/login-invalid-session.conf \
+ scripts/login-invalid-session.script \
scripts/login-invalid-user.conf \
scripts/login-invalid-user.script \
scripts/login-logout.conf \
--- /dev/null
+[SeatDefaults]
+autologin-user=alice
+user-session=invalid
--- /dev/null
+#
+# Check can login
+#
+
+RUNNER DAEMON-START
+
+# X server starts
+XSERVER :50 START
+XSERVER :50 INDICATE-READY
+
+# LightDM connects to X server
+XSERVER :50 ACCEPT-CONNECT
+
+# (session fails to start)
+
+# Greeter starts
+GREETER START
+XSERVER :50 ACCEPT-CONNECT
+GREETER CONNECT-XSERVER :50
+GREETER CONNECT-TO-DAEMON
+GREETER CONNECTED-TO-DAEMON
+
+# Cleanup
+*STOP-DAEMON
+# Don't know what order they will terminate
+(GREETER TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15)
+(GREETER TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15)
+RUNNER DAEMON-EXIT STATUS=0
--- /dev/null
+[SeatDefaults]
+autologin-user=alice
+
+[test-session-config]
+sigsegv=true
--- /dev/null
+#
+# Check if session crashes then returned to greeter
+#
+
+RUNNER DAEMON-START
+
+# X server starts
+XSERVER :50 START
+XSERVER :50 INDICATE-READY
+
+# LightDM connects to X server
+XSERVER :50 ACCEPT-CONNECT
+
+# Session starts
+SESSION START USER=alice
+XSERVER :50 ACCEPT-CONNECT
+SESSION CONNECT-XSERVER
+
+# Session crashes
+SESSION CRASH
+
+# X server stops
+XSERVER :50 TERMINATE SIGNAL=15
+
+# X server starts
+XSERVER :50 START
+XSERVER :50 INDICATE-READY
+
+# LightDM connects to X server
+XSERVER :50 ACCEPT-CONNECT
+
+# Greeter starts
+GREETER START
+XSERVER :50 ACCEPT-CONNECT
+GREETER CONNECT-XSERVER :50
+GREETER CONNECT-TO-DAEMON
+GREETER CONNECTED-TO-DAEMON
+
+# Cleanup
+*STOP-DAEMON
+# Don't know what order they will terminate
+(GREETER TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15)
+(GREETER TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15)
+RUNNER DAEMON-EXIT STATUS=0
#
-# Check X server crashing during autologin returns to greeter
+# Check LightDM returns to the greeter if the X server crashes inside a session
#
RUNNER DAEMON-START
-# X server starts
+# XServer starts
XSERVER :50 START
XSERVER :50 INDICATE-READY
# LightDM connects to X server
XSERVER :50 ACCEPT-CONNECT
-# Default session starts
+# Session starts
SESSION START USER=alice
XSERVER :50 ACCEPT-CONNECT
SESSION CONNECT-XSERVER
SESSION CRASH-XSERVER
XSERVER :50 CRASH
-# Session terminates
+# User session is terminated
SESSION TERMINATE SIGNAL=15
# X server restarts
XSERVER :50 START
XSERVER :50 INDICATE-READY
-
-# LightDM connects to X server
XSERVER :50 ACCEPT-CONNECT
# Greeter starts
GREETER CONNECT-TO-DAEMON
GREETER CONNECTED-TO-DAEMON
-# Cleanup
*STOP-DAEMON
# Don't know what order they will terminate
(GREETER TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15)
# LightDM connects to X server
XSERVER :50 ACCEPT-CONNECT
-# Default session starts
+# Session starts
SESSION START USER=alice
XSERVER :50 ACCEPT-CONNECT
SESSION CONNECT-XSERVER
--- /dev/null
+[test-greeter-config]
+username=alice
+password=password
+session=invalid
--- /dev/null
+#
+# Check can login
+#
+
+RUNNER DAEMON-START
+
+# X server starts
+XSERVER :50 START
+XSERVER :50 INDICATE-READY
+
+# LightDM connects to X server
+XSERVER :50 ACCEPT-CONNECT
+
+# Greeter starts
+GREETER START
+XSERVER :50 ACCEPT-CONNECT
+GREETER CONNECT-XSERVER :50
+GREETER CONNECT-TO-DAEMON
+GREETER CONNECTED-TO-DAEMON
+
+# Login as alice
+GREETER AUTHENTICATE USERNAME=alice
+GREETER SHOW-PROMPT TEXT="Password:"
+GREETER RESPOND TEXT="password"
+GREETER AUTHENTICATION-COMPLETE USERNAME=alice AUTHENTICATED=TRUE
+GREETER TERMINATE SIGNAL=15
+
+# X server stops, the session is invalid
+XSERVER :50 TERMINATE SIGNAL=15
+
+# X server restarts
+XSERVER :50 START
+XSERVER :50 INDICATE-READY
+
+# LightDM connects to X server
+XSERVER :50 ACCEPT-CONNECT
+
+# Greeter starts
+GREETER START
+XSERVER :50 ACCEPT-CONNECT
+GREETER CONNECT-XSERVER :50
+GREETER CONNECT-TO-DAEMON
+GREETER CONNECTED-TO-DAEMON
+
+# Cleanup
+*STOP-DAEMON
+# Don't know what order they will terminate
+(GREETER TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15)
+(GREETER TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15)
+RUNNER DAEMON-EXIT STATUS=0
if (!lightdm_greeter_get_is_authenticated (greeter))
return;
- if (!lightdm_greeter_start_session_sync (greeter, NULL, NULL))
+ if (!lightdm_greeter_start_session_sync (greeter, g_key_file_get_string (config, "test-greeter-config", "session", NULL), NULL))
notify_status ("GREETER SESSION-FAILED");
}
if (!isAuthenticated ())
return;
- if (!startSessionSync ())
+ if (!startSessionSync (config->value ("test-greeter-config/session").toString ()))
notify_status ("GREETER SESSION-FAILED");
}
g_string_append(command_line, " --xserver-command=test-xserver");
if (greeter)
g_string_append_printf (command_line, " --greeter-session=%s", greeter);
- g_string_append (command_line, " --user-session=test-session");
g_string_append (command_line, " --session-wrapper=");
g_string_append_printf (command_line, " --passwd-file %s/passwd", temp_dir);
g_string_append_printf (command_line, " --cache-dir %s/cache", temp_dir);
--- /dev/null
+#!/bin/sh
+./src/test-runner autologin-invalid-session test-gobject-greeter
--- /dev/null
+#!/bin/sh
+./src/test-runner autologin-session-crash test-gobject-greeter
#!/bin/sh
-./src/test-runner autologin-xserver-crash
+./src/test-runner autologin-xserver-crash test-gobject-greeter
--- /dev/null
+#!/bin/sh
+./src/test-runner login-invalid-session test-gobject-greeter
--- /dev/null
+#!/bin/sh
+./src/test-runner login-invalid-session test-qt-greeter