diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2013-10-30 19:04:02 +0000 |
---|---|---|
committer | Tarmac <> | 2013-10-30 19:04:02 +0000 |
commit | 7e8a479af852f5b3d46c15695af6f1476e49341f (patch) | |
tree | 1038b983721dcf584df7a0f679a9cf3fe8807559 | |
parent | eb94fedde40b34df9e466bf1efa68adeb144947d (diff) | |
parent | 48f02d55647586f1875e8147ba9aedcf702fa11a (diff) | |
download | lightdm-7e8a479af852f5b3d46c15695af6f1476e49341f.tar.gz |
Fix notification of sessions being logged out. Fixes: https://bugs.launchpad.net/bugs/1245295.
Approved by PS Jenkins bot, Robert Ancell.
-rw-r--r-- | src/lightdm.c | 2 | ||||
-rw-r--r-- | tests/Makefile.am | 4 | ||||
-rw-r--r-- | tests/scripts/user-logged-in.conf | 89 | ||||
-rwxr-xr-x | tests/test-user-logged-in | 2 |
4 files changed, 95 insertions, 2 deletions
diff --git a/src/lightdm.c b/src/lightdm.c index 8e0af69e..3bf5ad77 100644 --- a/src/lightdm.c +++ b/src/lightdm.c @@ -577,7 +577,7 @@ running_user_session_cb (Seat *seat, Session *session) } static void -session_removed_cb (Session *session, Seat *seat) +session_removed_cb (Seat *seat, Session *session) { g_signal_handlers_disconnect_matched (session, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, seat); g_hash_table_remove (session_bus_entries, session); diff --git a/tests/Makefile.am b/tests/Makefile.am index 692fa00c..5c260bac 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -66,6 +66,7 @@ TESTS = \ test-user-layout \ test-user-has-messages \ test-user-session \ + test-user-logged-in \ test-users-gobject \ test-language \ test-language-no-accounts-service \ @@ -441,10 +442,11 @@ EXTRA_DIST = \ scripts/user-has-messages.conf \ scripts/user-image.conf \ scripts/user-layout.conf \ - scripts/user-session.conf \ + scripts/user-logged-in.conf \ scripts/util-path.conf \ scripts/user-renamed.conf \ scripts/user-renamed-invalid.conf \ + scripts/user-session.conf \ scripts/vnc-command.conf \ scripts/vnc-dimensions.conf \ scripts/vnc-login.conf \ diff --git a/tests/scripts/user-logged-in.conf b/tests/scripts/user-logged-in.conf new file mode 100644 index 00000000..f9511452 --- /dev/null +++ b/tests/scripts/user-logged-in.conf @@ -0,0 +1,89 @@ +# +# Check user marked as logged in +# + +[SeatDefaults] +user-session=default + +[test-greeter-config] +log-user-changes=true + +#?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 + +# 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 + +# Check not marked as logged in +#?*GREETER-X-0 LOG-USER USERNAME=prop-user FIELDS=LOGGED-IN +#?GREETER-X-0 LOG-USER USERNAME=prop-user LOGGED-IN=FALSE + +# Log into account +#?*GREETER-X-0 AUTHENTICATE USERNAME=prop-user +#?GREETER-X-0 AUTHENTICATION-COMPLETE USERNAME=prop-user AUTHENTICATED=TRUE +#?*GREETER-X-0 START-SESSION +#?GREETER-X-0 TERMINATE SIGNAL=15 + +# Session starts +#?SESSION-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 DESKTOP_SESSION=default USER=prop-user +#?XSERVER-0 ACCEPT-CONNECT +#?SESSION-X-0 CONNECT-XSERVER + +# Switch to greeter +#?*SWITCH-TO-GREETER +#?RUNNER SWITCH-TO-GREETER + +# New X server starts +#?XSERVER-1 START VT=8 + +# Daemon connects when X server is ready +#?*XSERVER-1 INDICATE-READY +#?XSERVER-1 INDICATE-READY +#?XSERVER-1 ACCEPT-CONNECT + +# Session is locked +#?LOGIN1 LOCK-SESSION + +# Greeter starts +#?GREETER-X-1 START XDG_SEAT=seat0 XDG_VTNR=8 XDG_SESSION_CLASS=greeter +#?XSERVER-1 ACCEPT-CONNECT +#?GREETER-X-1 CONNECT-XSERVER +#?GREETER-X-1 CONNECT-TO-DAEMON +#?GREETER-X-1 CONNECTED-TO-DAEMON + +# Switch to greeter +#?VT ACTIVATE VT=8 + +# Watch a user for properties changes +#?*GREETER-X-1 WATCH-USER USERNAME=prop-user +#?GREETER-X-1 WATCH-USER USERNAME=prop-user + +# Check marked as logged in +#?*GREETER-X-1 LOG-USER USERNAME=prop-user FIELDS=LOGGED-IN +#?GREETER-X-1 LOG-USER USERNAME=prop-user LOGGED-IN=TRUE + +# Logout session +#?*SESSION-X-0 LOGOUT +#?XSERVER-0 TERMINATE SIGNAL=15 + +# Check not marked as logged in +#?GREETER-X-1 USER-CHANGED USERNAME=prop-user +#?*GREETER-X-1 LOG-USER USERNAME=prop-user FIELDS=LOGGED-IN +#?GREETER-X-1 LOG-USER USERNAME=prop-user LOGGED-IN=FALSE + +# Cleanup +#?*STOP-DAEMON +#?GREETER-X-1 TERMINATE SIGNAL=15 +#?XSERVER-1 TERMINATE SIGNAL=15 +#?RUNNER DAEMON-EXIT STATUS=0 diff --git a/tests/test-user-logged-in b/tests/test-user-logged-in new file mode 100755 index 00000000..c3497a68 --- /dev/null +++ b/tests/test-user-logged-in @@ -0,0 +1,2 @@ +#!/bin/sh +./src/dbus-env ./src/test-runner user-logged-in test-gobject-greeter |