Skip to content

Commit 4a98b18

Browse files
committed
Add tests for Xauthority file location
1 parent 502499c commit 4a98b18

File tree

5 files changed

+77
-0
lines changed

5 files changed

+77
-0
lines changed

tests/Makefile.am

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ TESTS = \
2222
test-autologin-guest-logout \
2323
test-session-stdout \
2424
test-session-stderr \
25+
test-xauthority \
26+
test-system-xauthority \
2527
test-user-renamed \
2628
test-user-renamed-invalid \
2729
test-keyboard-layout \
@@ -194,8 +196,10 @@ EXTRA_DIST = \
194196
scripts/switch-to-user-existing-session.conf \
195197
scripts/switch-to-user-logout.conf \
196198
scripts/switch-to-user-no-password.conf \
199+
scripts/system-xauthority.conf \
197200
scripts/user-renamed.conf \
198201
scripts/user-renamed-invalid.conf \
199202
scripts/vnc-login.conf \
203+
scripts/xauthority.conf \
200204
scripts/xdmcp-login.conf \
201205
scripts/xserver-fail-start.conf

tests/scripts/system-xauthority.conf

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#
2+
# Check X authority written into system directory
3+
#
4+
5+
[LightDM]
6+
minimum-display-number=50
7+
user-authority-in-system-dir=true
8+
9+
[SeatDefaults]
10+
autologin-user=have-password1
11+
12+
#?RUNNER DAEMON-START
13+
14+
# X server starts
15+
#?XSERVER :50 START
16+
#?XSERVER :50 INDICATE-READY
17+
18+
# LightDM connects to X server
19+
#?XSERVER :50 ACCEPT-CONNECT
20+
21+
# Session starts
22+
#?SESSION :50 START USER=have-password1
23+
#?XSERVER :50 ACCEPT-CONNECT
24+
#?SESSION :50 CONNECT-XSERVER
25+
26+
# Check where the X authority is
27+
#?*SESSION :50 READ-ENV NAME=XAUTHORITY
28+
#?SESSION :50 READ-ENV NAME=XAUTHORITY VALUE=.*/var/run/lightdm/have-password1/xauthority
29+
30+
# Cleanup
31+
#?*STOP-DAEMON
32+
# Don't know what order they will terminate
33+
#?(SESSION :50 TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15)
34+
#?(SESSION :50 TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15)
35+
#?RUNNER DAEMON-EXIT STATUS=0

tests/scripts/xauthority.conf

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#
2+
# Check X authority written into home directory
3+
#
4+
5+
[LightDM]
6+
minimum-display-number=50
7+
8+
[SeatDefaults]
9+
autologin-user=have-password1
10+
11+
#?RUNNER DAEMON-START
12+
13+
# X server starts
14+
#?XSERVER :50 START
15+
#?XSERVER :50 INDICATE-READY
16+
17+
# LightDM connects to X server
18+
#?XSERVER :50 ACCEPT-CONNECT
19+
20+
# Session starts
21+
#?SESSION :50 START USER=have-password1
22+
#?XSERVER :50 ACCEPT-CONNECT
23+
#?SESSION :50 CONNECT-XSERVER
24+
25+
# Check where the X authority is
26+
#?*SESSION :50 READ-ENV NAME=XAUTHORITY
27+
#?SESSION :50 READ-ENV NAME=XAUTHORITY VALUE=.*/home/have-password1/.Xauthority
28+
29+
# Cleanup
30+
#?*STOP-DAEMON
31+
# Don't know what order they will terminate
32+
#?(SESSION :50 TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15)
33+
#?(SESSION :50 TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15)
34+
#?RUNNER DAEMON-EXIT STATUS=0

tests/test-system-xauthority

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
./src/dbus-env ./src/test-runner system-xauthority test-gobject-greeter

tests/test-xauthority

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
./src/dbus-env ./src/test-runner xauthority test-gobject-greeter

0 commit comments

Comments
 (0)