From e64b11c5f095605def1e165ca8f5efb177a428f8 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 14 Jul 2016 15:12:25 +1200 Subject: [PATCH] Add a test to check multiple authentication in greeters works --- tests/Makefile.am | 2 + tests/scripts/multiple-authenticate.conf | 55 ++++++++++++++++++++++++ tests/test-multiple-authenticate | 2 + 3 files changed, 59 insertions(+) create mode 100644 tests/scripts/multiple-authenticate.conf create mode 100755 tests/test-multiple-authenticate diff --git a/tests/Makefile.am b/tests/Makefile.am index 41751f13..4a7f4a77 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -113,6 +113,7 @@ TESTS = \ test-login-remote-session-gobject \ test-login-session-crash \ test-login-xserver-crash \ + test-multiple-authenticate \ test-xserver-no-share \ test-home-dir-on-authenticate \ test-home-dir-on-session \ @@ -510,6 +511,7 @@ EXTRA_DIST = \ scripts/mir-session.conf \ scripts/mir-session-compositor-crash.conf \ scripts/mir-session-crash.conf \ + scripts/multiple-authenticate.conf \ scripts/multi-seat.conf \ scripts/multi-seat-change-graphical.conf \ scripts/multi-seat-change-graphical-disabled.conf \ diff --git a/tests/scripts/multiple-authenticate.conf b/tests/scripts/multiple-authenticate.conf new file mode 100644 index 00000000..2c87d8fe --- /dev/null +++ b/tests/scripts/multiple-authenticate.conf @@ -0,0 +1,55 @@ +# +# Check can do many authentications from a greeter +# + +[Seat:*] +user-session=default + +#?*START-DAEMON +#?RUNNER DAEMON-START + +# X server starts +#?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 + +# Greeter starts +#?GREETER-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter +#?LOGIN1 ACTIVATE-SESSION SESSION=c0 +#?XSERVER-0 ACCEPT-CONNECT +#?GREETER-X-0 CONNECT-XSERVER +#?GREETER-X-0 CONNECT-TO-DAEMON +#?GREETER-X-0 CONNECTED-TO-DAEMON + +# Start authentication, but switch user before it is complete +#?*GREETER-X-0 AUTHENTICATE USERNAME=have-password1 +#?GREETER-X-0 SHOW-PROMPT TEXT="Password:" + +# Authenticate and complete, but don't start session +#?*GREETER-X-0 AUTHENTICATE USERNAME=have-password2 +#?GREETER-X-0 SHOW-PROMPT TEXT="Password:" +#?*GREETER-X-0 RESPOND TEXT="password" +#?GREETER-X-0 AUTHENTICATION-COMPLETE USERNAME=have-password2 AUTHENTICATED=TRUE + +# Authenticate and login +#?*GREETER-X-0 AUTHENTICATE USERNAME=have-password3 +#?GREETER-X-0 SHOW-PROMPT TEXT="Password:" +#?*GREETER-X-0 RESPOND TEXT="password" +#?GREETER-X-0 AUTHENTICATION-COMPLETE USERNAME=have-password3 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 XDG_GREETER_DATA_DIR=.*/have-password3 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=default USER=have-password3 +#?LOGIN1 ACTIVATE-SESSION SESSION=c1 +#?XSERVER-0 ACCEPT-CONNECT +#?SESSION-X-0 CONNECT-XSERVER + +# Cleanup +#?*STOP-DAEMON +#?SESSION-X-0 TERMINATE SIGNAL=15 +#?XSERVER-0 TERMINATE SIGNAL=15 +#?RUNNER DAEMON-EXIT STATUS=0 diff --git a/tests/test-multiple-authenticate b/tests/test-multiple-authenticate new file mode 100755 index 00000000..4ea848f4 --- /dev/null +++ b/tests/test-multiple-authenticate @@ -0,0 +1,2 @@ +#!/bin/sh +./src/dbus-env ./src/test-runner multiple-authenticate test-gobject-greeter -- 2.39.2