File tree Expand file tree Collapse file tree 5 files changed +80
-0
lines changed Expand file tree Collapse file tree 5 files changed +80
-0
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ TESTS = \
46
46
test-autologin-guest \
47
47
test-autologin-guest-fail-setup-script \
48
48
test-autologin-guest-logout \
49
+ test-guest-wrapper \
49
50
test-group-membership \
50
51
test-xdg-current-desktop \
51
52
test-xdg-seat \
@@ -334,6 +335,7 @@ EXTRA_DIST = \
334
335
scripts/greeter-wrapper.conf \
335
336
scripts/greeter-xserver-crash.conf \
336
337
scripts/group-membership.conf \
338
+ scripts/guest-wrapper.conf \
337
339
scripts/headless.conf \
338
340
scripts/home-dir-on-authenticate.conf \
339
341
scripts/home-dir-on-session.conf \
Original file line number Diff line number Diff line change
1
+ #
2
+ # Check guest wrapper works
3
+ #
4
+
5
+ [SeatDefaults]
6
+ autologin-guest=true
7
+ user-session=default
8
+ guest-wrapper=test-guest-wrapper
9
+
10
+ #?RUNNER DAEMON-START
11
+
12
+ # X server starts
13
+ #?XSERVER-0 START VT=7
14
+
15
+ # Daemon connects when X server is ready
16
+ #?*XSERVER-0 INDICATE-READY
17
+ #?XSERVER-0 INDICATE-READY
18
+ #?XSERVER-0 ACCEPT-CONNECT
19
+
20
+ # Guest account created
21
+ #?GUEST-ACCOUNT ADD USERNAME=guest-.*
22
+
23
+ # Greeter wrapper starts
24
+ #?GUEST-WRAPPER-X-0 START
25
+
26
+ # Guest session starts
27
+ #?SESSION-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 DESKTOP_SESSION=default USER=guest-.*
28
+ #?XSERVER-0 ACCEPT-CONNECT
29
+ #?SESSION-X-0 CONNECT-XSERVER
30
+
31
+ # Cleanup
32
+ #?*STOP-DAEMON
33
+ #?SESSION-X-0 TERMINATE SIGNAL=15
34
+ #?XSERVER-0 TERMINATE SIGNAL=15
35
+ #?GUEST-ACCOUNT REMOVE USERNAME=guest.*
36
+ #?RUNNER DAEMON-EXIT STATUS=0
37
+
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ noinst_PROGRAMS = dbus-env \
3
3
plymouth \
4
4
test-gobject-greeter \
5
5
test-greeter-wrapper \
6
+ test-guest-wrapper \
6
7
test-mir-greeter \
7
8
test-runner \
8
9
test-script-hook \
@@ -96,6 +97,15 @@ test_greeter_wrapper_LDADD = \
96
97
$(GLIB_LIBS ) \
97
98
$(GIO_UNIX_LIBS )
98
99
100
+ test_guest_wrapper_SOURCES = test-guest-wrapper.c status.c status.h
101
+ test_guest_wrapper_CFLAGS = \
102
+ $(WARN_CFLAGS ) \
103
+ $(GLIB_CFLAGS ) \
104
+ $(GIO_UNIX_CFLAGS )
105
+ test_guest_wrapper_LDADD = \
106
+ $(GLIB_LIBS ) \
107
+ $(GIO_UNIX_LIBS )
108
+
99
109
test_gobject_greeter_SOURCES = test-gobject-greeter.c status.c status.h
100
110
test_gobject_greeter_CFLAGS = \
101
111
-I$(top_srcdir ) /liblightdm-gobject \
Original file line number Diff line number Diff line change
1
+ #include <stdlib.h>
2
+ #include <unistd.h>
3
+
4
+ #include "status.h"
5
+
6
+ static void
7
+ request_cb (const gchar * request )
8
+ {
9
+ }
10
+
11
+ int
12
+ main (int argc , char * * argv )
13
+ {
14
+ gchar * display ;
15
+
16
+ status_connect (request_cb );
17
+
18
+ display = getenv ("DISPLAY" );
19
+ if (display == NULL )
20
+ status_notify ("GUEST-WRAPPER-? START" );
21
+ else if (display [0 ] == ':' )
22
+ status_notify ("GUEST-WRAPPER-X-%s START" , display + 1 );
23
+ else
24
+ status_notify ("GUEST-WRAPPER-X-%s START" , display );
25
+
26
+ execv (argv [1 ], argv + 1 );
27
+
28
+ return EXIT_FAILURE ;
29
+ }
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ ./src/dbus-env ./src/test-runner guest-wrapper test-gobject-greeter
You can’t perform that action at this time.
0 commit comments