diff options
author | Michael Terry <michael.terry@canonical.com> | 2012-08-17 12:13:57 -0400 |
---|---|---|
committer | Michael Terry <michael.terry@canonical.com> | 2012-08-17 12:13:57 -0400 |
commit | 902617f00b428cef10c524839e7d6940a03297d9 (patch) | |
tree | b9b6ad352083a4a90dcc2a8c2296ed25ecc7cf89 /tests | |
parent | 70f4fd01ce49b9032e75302c2f4d90d78046a7db (diff) | |
parent | 4fb3abf0fe3c541d9d42183bf62029731bf4b027 (diff) | |
download | lightdm-902617f00b428cef10c524839e7d6940a03297d9.tar.gz |
merge from trunk
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 4 | ||||
-rw-r--r-- | tests/scripts/change-authentication.conf | 38 | ||||
-rw-r--r-- | tests/scripts/restart-authentication.conf | 38 | ||||
-rw-r--r-- | tests/src/libsystem.c | 17 | ||||
-rwxr-xr-x | tests/test-change-authentication | 2 | ||||
-rwxr-xr-x | tests/test-restart-authentication | 2 |
6 files changed, 100 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 5fc98365..7d87c3ab 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -15,6 +15,8 @@ TESTS = \ test-autologin-session-crash \ test-autologin-password \ test-autologin-new-authtok \ + test-change-authentication \ + test-restart-authentication \ test-pam \ test-login-pam \ test-denied \ @@ -170,6 +172,7 @@ EXTRA_DIST = \ scripts/autologin-session-crash.conf \ scripts/autologin-session-error.conf \ scripts/autologin-xserver-crash.conf \ + scripts/change-authentication.conf \ scripts/console-kit.conf \ scripts/crash-authenticate.conf \ scripts/cred-error.conf \ @@ -224,6 +227,7 @@ EXTRA_DIST = \ scripts/plymouth-active-vt.conf \ scripts/plymouth-inactive-vt.conf \ scripts/plymouth-no-seat.conf \ + scripts/restart-authentication.conf \ scripts/script-hooks.conf \ scripts/script-hook-fail-display-setup.conf \ scripts/script-hook-fail-greeter-setup.conf \ diff --git a/tests/scripts/change-authentication.conf b/tests/scripts/change-authentication.conf new file mode 100644 index 00000000..d3860a19 --- /dev/null +++ b/tests/scripts/change-authentication.conf @@ -0,0 +1,38 @@ +# +# Check can change authentication +# + +[LightDM] +minimum-display-number=50 + +#?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 :50 START +#?XSERVER :50 ACCEPT-CONNECT +#?GREETER :50 CONNECT-XSERVER +#?GREETER :50 CONNECT-TO-DAEMON +#?GREETER :50 CONNECTED-TO-DAEMON + +# Start authentication +#?*GREETER :50 AUTHENTICATE USERNAME=have-password1 +#?GREETER :50 SHOW-PROMPT TEXT="Password:" + +# Change user authentication +#?*GREETER :50 AUTHENTICATE USERNAME=have-password2 +#?GREETER :50 SHOW-PROMPT TEXT="Password:" + +# Cleanup +#?*STOP-DAEMON +# Don't know what order they will terminate +#?(GREETER :50 TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15) +#?(GREETER :50 TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15) +#?RUNNER DAEMON-EXIT STATUS=0 + diff --git a/tests/scripts/restart-authentication.conf b/tests/scripts/restart-authentication.conf new file mode 100644 index 00000000..f45edc89 --- /dev/null +++ b/tests/scripts/restart-authentication.conf @@ -0,0 +1,38 @@ +# +# Check can restart authentication +# + +[LightDM] +minimum-display-number=50 + +#?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 :50 START +#?XSERVER :50 ACCEPT-CONNECT +#?GREETER :50 CONNECT-XSERVER +#?GREETER :50 CONNECT-TO-DAEMON +#?GREETER :50 CONNECTED-TO-DAEMON + +# Start authentication +#?*GREETER :50 AUTHENTICATE USERNAME=have-password1 +#?GREETER :50 SHOW-PROMPT TEXT="Password:" + +# Restart authentication +#?*GREETER :50 AUTHENTICATE USERNAME=have-password1 +#?GREETER :50 SHOW-PROMPT TEXT="Password:" + +# Cleanup +#?*STOP-DAEMON +# Don't know what order they will terminate +#?(GREETER :50 TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15) +#?(GREETER :50 TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15) +#?RUNNER DAEMON-EXIT STATUS=0 + diff --git a/tests/src/libsystem.c b/tests/src/libsystem.c index eb1ebc7f..855f668b 100644 --- a/tests/src/libsystem.c +++ b/tests/src/libsystem.c @@ -5,7 +5,6 @@ #include <pwd.h> #include <grp.h> #include <security/pam_appl.h> -#include <unistd.h> #include <fcntl.h> #define __USE_GNU #include <dlfcn.h> @@ -995,3 +994,19 @@ pam_strerror (pam_handle_t *pamh, int errnum) return "Unknown PAM error"; } } + +void +setutxent (void) +{ +} + +struct utmp * +pututxline (struct utmp *ut) +{ + return ut; +} + +void +endutxent (void) +{ +} diff --git a/tests/test-change-authentication b/tests/test-change-authentication new file mode 100755 index 00000000..3d5ec60b --- /dev/null +++ b/tests/test-change-authentication @@ -0,0 +1,2 @@ +#!/bin/sh +./src/dbus-env ./src/test-runner change-authentication test-gobject-greeter diff --git a/tests/test-restart-authentication b/tests/test-restart-authentication new file mode 100755 index 00000000..b9cb62e4 --- /dev/null +++ b/tests/test-restart-authentication @@ -0,0 +1,2 @@ +#!/bin/sh +./src/dbus-env ./src/test-runner restart-authentication test-gobject-greeter |