diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2013-08-25 12:40:06 +1200 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2013-08-25 12:40:06 +1200 |
commit | 68302f221fb8469fc0f03f3ac6f81509722dd5ce (patch) | |
tree | 68a6004f949cbfd8f14bf89938129a3e43bafe91 /tests/scripts | |
parent | b281bf1817c229244c7221b7485397d2bd9c5c2e (diff) | |
download | lightdm-68302f221fb8469fc0f03f3ac6f81509722dd5ce.tar.gz |
Restructure switching tests
Diffstat (limited to 'tests/scripts')
-rw-r--r-- | tests/scripts/switch-to-greeter-new-session-logout-new.conf | 85 | ||||
-rw-r--r-- | tests/scripts/switch-to-user-active.conf (renamed from tests/scripts/switch-to-user-existing-session.conf) | 14 | ||||
-rw-r--r-- | tests/scripts/switch-to-user-existing-no-password.conf (renamed from tests/scripts/switch-to-greeter-new-session-logout-old.conf) | 55 | ||||
-rw-r--r-- | tests/scripts/switch-to-user-existing.conf (renamed from tests/scripts/switch-to-user-switch-back.conf) | 36 | ||||
-rw-r--r-- | tests/scripts/switch-to-user-logout-active.conf (renamed from tests/scripts/switch-to-user-logout.conf) | 28 | ||||
-rw-r--r-- | tests/scripts/switch-to-user-logout-inactive.conf | 56 |
6 files changed, 105 insertions, 169 deletions
diff --git a/tests/scripts/switch-to-greeter-new-session-logout-new.conf b/tests/scripts/switch-to-greeter-new-session-logout-new.conf deleted file mode 100644 index eb64e6c4..00000000 --- a/tests/scripts/switch-to-greeter-new-session-logout-new.conf +++ /dev/null @@ -1,85 +0,0 @@ -# -# Use D-Bus interface to show the greeter, then start a new session and log out of it -# - -[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 USER=have-password1 -#?XSERVER-0 ACCEPT-CONNECT -#?SESSION-X-0 CONNECT-XSERVER - -# Show the 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 -#?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 - -# Login -#?*GREETER-X-1 AUTHENTICATE USERNAME=have-password2 -#?GREETER-X-1 SHOW-PROMPT TEXT="Password:" -#?*GREETER-X-1 RESPOND TEXT="password" -#?GREETER-X-1 AUTHENTICATION-COMPLETE USERNAME=have-password2 AUTHENTICATED=TRUE -#?*GREETER-X-1 START-SESSION -#?GREETER-X-1 TERMINATE SIGNAL=15 - -# New session starts -#?SESSION-X-1 START XDG_SEAT=seat0 XDG_VTNR=8 USER=have-password2 -#?XSERVER-1 ACCEPT-CONNECT -#?SESSION-X-1 CONNECT-XSERVER - -# Logout of new session -#?*SESSION-X-1 LOGOUT -#?XSERVER-1 TERMINATE SIGNAL=15 - -# X server starts -#?XSERVER-1 START VT=8 -#?*XSERVER-1 INDICATE-READY -#?XSERVER-1 INDICATE-READY -#?XSERVER-1 ACCEPT-CONNECT - -# Greeter starts -#?GREETER-X-1 START XDG_SEAT=seat0 XDG_VTNR=8 -#?XSERVER-1 ACCEPT-CONNECT -#?GREETER-X-1 CONNECT-XSERVER -#?GREETER-X-1 CONNECT-TO-DAEMON -#?GREETER-X-1 CONNECTED-TO-DAEMON - -# Cleanup -#?*STOP-DAEMON -#?SESSION-X-0 TERMINATE SIGNAL=15 -#?XSERVER-0 TERMINATE SIGNAL=15 -#?GREETER-X-1 TERMINATE SIGNAL=15 -#?XSERVER-1 TERMINATE SIGNAL=15 -#?RUNNER DAEMON-EXIT STATUS=0 diff --git a/tests/scripts/switch-to-user-existing-session.conf b/tests/scripts/switch-to-user-active.conf index 0b33dc34..1c3eb098 100644 --- a/tests/scripts/switch-to-user-existing-session.conf +++ b/tests/scripts/switch-to-user-active.conf @@ -1,9 +1,9 @@ # -# Check that switching to an existing user does nothing +# Check that switching to a user who is the active session does nothing # [SeatDefaults] -autologin-user=have-password1 +autologin-user=no-password1 user-session=default #?RUNNER DAEMON-START @@ -18,19 +18,19 @@ user-session=default #?XSERVER-0 ACCEPT-CONNECT # Session starts -#?SESSION-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 USER=have-password1 +#?SESSION-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 USER=no-password1 #?XSERVER-0 ACCEPT-CONNECT #?SESSION-X-0 CONNECT-XSERVER -# Switch to account with a password -#?*SWITCH-TO-USER USERNAME=have-password1 -#?RUNNER SWITCH-TO-USER USERNAME=have-password1 +# Switch to this user +#?*SWITCH-TO-USER USERNAME=no-password1 +#?RUNNER SWITCH-TO-USER USERNAME=no-password1 # Nothing happends #?*WAIT # Cleanup #?*STOP-DAEMON -#?XSERVER-0 TERMINATE SIGNAL=15 #?SESSION-X-0 TERMINATE SIGNAL=15 +#?XSERVER-0 TERMINATE SIGNAL=15 #?RUNNER DAEMON-EXIT STATUS=0 diff --git a/tests/scripts/switch-to-greeter-new-session-logout-old.conf b/tests/scripts/switch-to-user-existing-no-password.conf index 4ae74ec2..30556589 100644 --- a/tests/scripts/switch-to-greeter-new-session-logout-old.conf +++ b/tests/scripts/switch-to-user-existing-no-password.conf @@ -1,5 +1,5 @@ # -# Use D-Bus interface to show the greeter, then start a new session, switch to the old one and log out +# Check that switching to an existing account with no password switches straight back # [SeatDefaults] @@ -7,6 +7,7 @@ autologin-user=no-password1 user-session=default #?RUNNER DAEMON-START +#?*WAIT # X server starts #?XSERVER-0 START VT=7 @@ -21,9 +22,9 @@ user-session=default #?XSERVER-0 ACCEPT-CONNECT #?SESSION-X-0 CONNECT-XSERVER -# Show the greeter -#?*SWITCH-TO-GREETER -#?RUNNER SWITCH-TO-GREETER +# Switch to another user +#?*SWITCH-TO-USER USERNAME=no-password2 +#?RUNNER SWITCH-TO-USER USERNAME=no-password2 # New X server starts #?XSERVER-1 START VT=8 @@ -33,63 +34,33 @@ user-session=default #?XSERVER-1 INDICATE-READY #?XSERVER-1 ACCEPT-CONNECT -# Session is locked +# Old session is locked #?LOGIN1 LOCK-SESSION -# Greeter starts -#?GREETER-X-1 START XDG_SEAT=seat0 XDG_VTNR=8 -#?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 - -# Login -#?*GREETER-X-1 AUTHENTICATE USERNAME=no-password2 -#?GREETER-X-1 AUTHENTICATION-COMPLETE USERNAME=no-password2 AUTHENTICATED=TRUE -#?*GREETER-X-1 START-SESSION -#?GREETER-X-1 TERMINATE SIGNAL=15 - # New session starts #?SESSION-X-1 START XDG_SEAT=seat0 XDG_VTNR=8 USER=no-password2 #?XSERVER-1 ACCEPT-CONNECT #?SESSION-X-1 CONNECT-XSERVER -# Switch to old session +# Switch to new session +#?VT ACTIVATE VT=8 + +# Switch back to first user #?*SWITCH-TO-USER USERNAME=no-password1 #?RUNNER SWITCH-TO-USER USERNAME=no-password1 # Old session is unlocked #?LOGIN1 UNLOCK-SESSION -# Switch to old session -#?VT ACTIVATE VT=7 - # New session is locked #?LOGIN1 LOCK-SESSION -# Logout of old session -#?*SESSION-X-0 LOGOUT -#?XSERVER-0 TERMINATE SIGNAL=15 - -# X server starts -#?XSERVER-0 START VT=7 -#?*XSERVER-0 INDICATE-READY -#?XSERVER-0 INDICATE-READY -#?XSERVER-0 ACCEPT-CONNECT - -# Greeter starts -#?GREETER-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 -#?XSERVER-0 ACCEPT-CONNECT -#?GREETER-X-0 CONNECT-XSERVER -#?GREETER-X-0 CONNECT-TO-DAEMON -#?GREETER-X-0 CONNECTED-TO-DAEMON +# Switch to first session +#?VT ACTIVATE VT=7 # Cleanup #?*STOP-DAEMON -#?GREETER-X-0 TERMINATE SIGNAL=15 +#?SESSION-X-0 TERMINATE SIGNAL=15 #?XSERVER-0 TERMINATE SIGNAL=15 #?SESSION-X-1 TERMINATE SIGNAL=15 #?XSERVER-1 TERMINATE SIGNAL=15 diff --git a/tests/scripts/switch-to-user-switch-back.conf b/tests/scripts/switch-to-user-existing.conf index e1d41256..4b6c8f5a 100644 --- a/tests/scripts/switch-to-user-switch-back.conf +++ b/tests/scripts/switch-to-user-existing.conf @@ -1,5 +1,5 @@ # -# Check that switching to a user and switching back works +# Check that switching to an existing account with a password shows the greeter # [SeatDefaults] @@ -22,7 +22,7 @@ user-session=default #?XSERVER-0 ACCEPT-CONNECT #?SESSION-X-0 CONNECT-XSERVER -# Switch to another account +# Switch to another user #?*SWITCH-TO-USER USERNAME=no-password1 #?RUNNER SWITCH-TO-USER USERNAME=no-password1 @@ -37,7 +37,7 @@ user-session=default # Old session is locked #?LOGIN1 LOCK-SESSION -# Session starts +# New session starts #?SESSION-X-1 START XDG_SEAT=seat0 XDG_VTNR=8 USER=no-password1 #?XSERVER-1 ACCEPT-CONNECT #?SESSION-X-1 CONNECT-XSERVER @@ -45,11 +45,11 @@ user-session=default # Switch to new session #?VT ACTIVATE VT=8 -# Switch back to original session +# Switch back to first user #?*SWITCH-TO-USER USERNAME=have-password1 #?RUNNER SWITCH-TO-USER USERNAME=have-password1 -# New X server starts +# X server starts #?XSERVER-2 START VT=9 # Daemon connects when X server is ready @@ -57,41 +57,37 @@ user-session=default #?XSERVER-2 INDICATE-READY #?XSERVER-2 ACCEPT-CONNECT -# Old session is locked -#?LOGIN1 LOCK-SESSION - # Greeter starts #?GREETER-X-2 START XDG_SEAT=seat0 XDG_VTNR=9 #?XSERVER-2 ACCEPT-CONNECT #?GREETER-X-2 CONNECT-XSERVER #?GREETER-X-2 CONNECT-TO-DAEMON #?GREETER-X-2 CONNECTED-TO-DAEMON +#?GREETER-X-2 SELECT-USER-HINT USERNAME=have-password1 # Switch to greeter #?VT ACTIVATE VT=9 -# Requested user is automatically selected -#?GREETER-X-2 SELECT-USER-HINT USERNAME=have-password1 -#?*GREETER-X-2 AUTHENTICATE USERNAME=have-password1 -#?GREETER-X-2 SHOW-PROMPT TEXT="Password:" - -# Login as existing user +# Log into new account #?*GREETER-X-2 AUTHENTICATE USERNAME=have-password1 #?GREETER-X-2 SHOW-PROMPT TEXT="Password:" #?*GREETER-X-2 RESPOND TEXT="password" #?GREETER-X-2 AUTHENTICATION-COMPLETE USERNAME=have-password1 AUTHENTICATED=TRUE #?*GREETER-X-2 START-SESSION +#?GREETER-X-2 TERMINATE SIGNAL=15 -# Session is unlocked +# Greeter X server terminates +#?XSERVER-2 TERMINATE SIGNAL=15 + +# New session is locked +#?LOGIN1 LOCK-SESSION + +# Old session is unlocked #?LOGIN1 UNLOCK-SESSION -# Switch to session +# Switch to first session #?VT ACTIVATE VT=7 -# Greeter and X server stop -#?GREETER-X-2 TERMINATE SIGNAL=15 -#?XSERVER-2 TERMINATE SIGNAL=15 - # Cleanup #?*STOP-DAEMON #?SESSION-X-0 TERMINATE SIGNAL=15 diff --git a/tests/scripts/switch-to-user-logout.conf b/tests/scripts/switch-to-user-logout-active.conf index d6d82dcf..ded4a31f 100644 --- a/tests/scripts/switch-to-user-logout.conf +++ b/tests/scripts/switch-to-user-logout-active.conf @@ -1,9 +1,9 @@ # -# Check that logging out from a switched user returns to the greeter +# Check that switching to a user and logging out the active session starts a greeter # [SeatDefaults] -autologin-user=have-password1 +autologin-user=no-password1 user-session=default #?RUNNER DAEMON-START @@ -18,13 +18,13 @@ user-session=default #?XSERVER-0 ACCEPT-CONNECT # Session starts -#?SESSION-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 USER=have-password1 +#?SESSION-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 USER=no-password1 #?XSERVER-0 ACCEPT-CONNECT #?SESSION-X-0 CONNECT-XSERVER -# Switch to an account without a password -#?*SWITCH-TO-USER USERNAME=no-password1 -#?RUNNER SWITCH-TO-USER USERNAME=no-password1 +# Switch user +#?*SWITCH-TO-USER USERNAME=no-password2 +#?RUNNER SWITCH-TO-USER USERNAME=no-password2 # New X server starts #?XSERVER-1 START VT=8 @@ -37,21 +37,19 @@ user-session=default # Session is locked #?LOGIN1 LOCK-SESSION -# Switch to session -#?VT ACTIVATE VT=8 - -# New session starts -#?SESSION-X-1 START XDG_SEAT=seat0 XDG_VTNR=8 USER=no-password1 +# Session starts +#?SESSION-X-1 START XDG_SEAT=seat0 XDG_VTNR=8 USER=no-password2 #?XSERVER-1 ACCEPT-CONNECT #?SESSION-X-1 CONNECT-XSERVER -# Logout session -#?*SESSION-X-1 LOGOUT +# Switch to new session +#?VT ACTIVATE VT=8 -# X server stops +# Log out new session +#?*SESSION-X-1 LOGOUT #?XSERVER-1 TERMINATE SIGNAL=15 -# X server starts for greeter +# X server starts #?XSERVER-1 START VT=8 # Daemon connects when X server is ready diff --git a/tests/scripts/switch-to-user-logout-inactive.conf b/tests/scripts/switch-to-user-logout-inactive.conf new file mode 100644 index 00000000..a5016331 --- /dev/null +++ b/tests/scripts/switch-to-user-logout-inactive.conf @@ -0,0 +1,56 @@ +# +# Check that switching to a user and logging out the inactive session does nothing +# + +[SeatDefaults] +autologin-user=no-password1 +user-session=default + +#?RUNNER DAEMON-START +#?*WAIT + +# 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 USER=no-password1 +#?XSERVER-0 ACCEPT-CONNECT +#?SESSION-X-0 CONNECT-XSERVER + +# Switch user +#?*SWITCH-TO-USER USERNAME=no-password2 +#?RUNNER SWITCH-TO-USER USERNAME=no-password2 + +# 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 + +# Session starts +#?SESSION-X-1 START XDG_SEAT=seat0 XDG_VTNR=8 USER=no-password2 +#?XSERVER-1 ACCEPT-CONNECT +#?SESSION-X-1 CONNECT-XSERVER + +# Switch to new session +#?VT ACTIVATE VT=8 + +# Log out old session +#?*SESSION-X-0 LOGOUT +#?XSERVER-0 TERMINATE SIGNAL=15 + +# Cleanup +#?*STOP-DAEMON +#?SESSION-X-1 TERMINATE SIGNAL=15 +#?XSERVER-1 TERMINATE SIGNAL=15 +#?RUNNER DAEMON-EXIT STATUS=0 |