summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2012-03-01 12:08:43 +1100
committerRobert Ancell <robert.ancell@canonical.com>2012-03-01 12:08:43 +1100
commit4a98b184749c533aef71c793cc32a254ca711432 (patch)
treee46221b1bdb98ebe45e8a268efe44c2def3fbd4d /tests
parent502499c5c8c33ec248460839dd9b63a02bb81fa2 (diff)
downloadlightdm-4a98b184749c533aef71c793cc32a254ca711432.tar.gz
Add tests for Xauthority file location
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am4
-rw-r--r--tests/scripts/system-xauthority.conf35
-rw-r--r--tests/scripts/xauthority.conf34
-rwxr-xr-xtests/test-system-xauthority2
-rwxr-xr-xtests/test-xauthority2
5 files changed, 77 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0776e148..932aaa62 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -22,6 +22,8 @@ TESTS = \
test-autologin-guest-logout \
test-session-stdout \
test-session-stderr \
+ test-xauthority \
+ test-system-xauthority \
test-user-renamed \
test-user-renamed-invalid \
test-keyboard-layout \
@@ -194,8 +196,10 @@ EXTRA_DIST = \
scripts/switch-to-user-existing-session.conf \
scripts/switch-to-user-logout.conf \
scripts/switch-to-user-no-password.conf \
+ scripts/system-xauthority.conf \
scripts/user-renamed.conf \
scripts/user-renamed-invalid.conf \
scripts/vnc-login.conf \
+ scripts/xauthority.conf \
scripts/xdmcp-login.conf \
scripts/xserver-fail-start.conf
diff --git a/tests/scripts/system-xauthority.conf b/tests/scripts/system-xauthority.conf
new file mode 100644
index 00000000..17f4de54
--- /dev/null
+++ b/tests/scripts/system-xauthority.conf
@@ -0,0 +1,35 @@
+#
+# Check X authority written into system directory
+#
+
+[LightDM]
+minimum-display-number=50
+user-authority-in-system-dir=true
+
+[SeatDefaults]
+autologin-user=have-password1
+
+#?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 :50 START USER=have-password1
+#?XSERVER :50 ACCEPT-CONNECT
+#?SESSION :50 CONNECT-XSERVER
+
+# Check where the X authority is
+#?*SESSION :50 READ-ENV NAME=XAUTHORITY
+#?SESSION :50 READ-ENV NAME=XAUTHORITY VALUE=.*/var/run/lightdm/have-password1/xauthority
+
+# Cleanup
+#?*STOP-DAEMON
+# Don't know what order they will terminate
+#?(SESSION :50 TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15)
+#?(SESSION :50 TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15)
+#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/xauthority.conf b/tests/scripts/xauthority.conf
new file mode 100644
index 00000000..f07890bb
--- /dev/null
+++ b/tests/scripts/xauthority.conf
@@ -0,0 +1,34 @@
+#
+# Check X authority written into home directory
+#
+
+[LightDM]
+minimum-display-number=50
+
+[SeatDefaults]
+autologin-user=have-password1
+
+#?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 :50 START USER=have-password1
+#?XSERVER :50 ACCEPT-CONNECT
+#?SESSION :50 CONNECT-XSERVER
+
+# Check where the X authority is
+#?*SESSION :50 READ-ENV NAME=XAUTHORITY
+#?SESSION :50 READ-ENV NAME=XAUTHORITY VALUE=.*/home/have-password1/.Xauthority
+
+# Cleanup
+#?*STOP-DAEMON
+# Don't know what order they will terminate
+#?(SESSION :50 TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15)
+#?(SESSION :50 TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15)
+#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/test-system-xauthority b/tests/test-system-xauthority
new file mode 100755
index 00000000..d6bef727
--- /dev/null
+++ b/tests/test-system-xauthority
@@ -0,0 +1,2 @@
+#!/bin/sh
+./src/dbus-env ./src/test-runner system-xauthority test-gobject-greeter
diff --git a/tests/test-xauthority b/tests/test-xauthority
new file mode 100755
index 00000000..b1625675
--- /dev/null
+++ b/tests/test-xauthority
@@ -0,0 +1,2 @@
+#!/bin/sh
+./src/dbus-env ./src/test-runner xauthority test-gobject-greeter