]> rtime.felk.cvut.cz Git - sojka/lightdm.git/commitdiff
Check LightDM exits if the system compositor crashes
authorRobert Ancell <robert.ancell@canonical.com>
Wed, 26 Feb 2014 01:23:59 +0000 (14:23 +1300)
committerRobert Ancell <robert.ancell@canonical.com>
Wed, 26 Feb 2014 01:23:59 +0000 (14:23 +1300)
tests/Makefile.am
tests/scripts/unity-compositor-crash.conf [new file with mode: 0644]
tests/scripts/unity-compositor-fail-ready.conf
tests/scripts/unity-compositor-fail-start.conf
tests/src/unity-system-compositor.c
tests/test-unity-compositor-crash [new file with mode: 0755]

index caf765a75a935c223399a0b816bfdbdefc08c535..aa981e60dd0ce56e68f46d078e8d40b743d97b3c 100644 (file)
@@ -160,6 +160,7 @@ TESTS = \
        test-unity-compositor-command \
        test-unity-compositor-fail-start \
        test-unity-compositor-fail-ready \
+       test-unity-compositor-crash \
        test-unity-compositor-fallback \
        test-unity-compositor-next-session \
        test-unity-compositor-mir-next-session \
@@ -439,6 +440,7 @@ EXTRA_DIST = \
        scripts/system-xauthority.conf \
        scripts/unity-autologin.conf \
        scripts/unity-compositor-command.conf \
+       scripts/unity-compositor-crash.conf \
        scripts/unity-compositor-fail-ready.conf \
        scripts/unity-compositor-fail-start.conf \
        scripts/unity-compositor-fallback.conf \
diff --git a/tests/scripts/unity-compositor-crash.conf b/tests/scripts/unity-compositor-crash.conf
new file mode 100644 (file)
index 0000000..d1b11a4
--- /dev/null
@@ -0,0 +1,38 @@
+#
+# Check LightDM ? if the compositor crashes
+#
+
+[SeatDefaults]
+type=unity
+
+#?RUNNER DAEMON-START
+
+# System compositor starts
+#?UNITY-SYSTEM-COMPOSITOR START FILE=/tmp/mir_socket VT=7 XDG_VTNR=7
+#?*UNITY-SYSTEM-COMPOSITOR READY
+
+# X server starts
+#?XSERVER-0 START SEAT=seat0 MIR-ID=x-0
+
+# 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
+#?XSERVER-0 ACCEPT-CONNECT
+#?GREETER-X-0 CONNECT-XSERVER
+#?GREETER-X-0 CONNECT-TO-DAEMON
+#?GREETER-X-0 CONNECTED-TO-DAEMON
+
+# System compositor switches to greeter
+#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=x-0
+
+# Crash system compositor
+#?*UNITY-SYSTEM-COMPOSITOR CRASH
+
+# Daemon exits with error code
+#?GREETER-X-0 TERMINATE SIGNAL=15
+#?XSERVER-0 TERMINATE SIGNAL=15
+#?RUNNER DAEMON-EXIT STATUS=1
index 3ceade5b6d755a8e1799700200e5d0551acb902f..66db639684e36148d688ca3c0af103cbc4edb08c 100644 (file)
@@ -14,5 +14,5 @@ unity-compositor-timeout=1
 # Timeout and compositor is stopped
 #?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
 
-# Cleanup
+# Daemon exits with error code
 #?RUNNER DAEMON-EXIT STATUS=1
index 7f7efa28a5fdde08fdc58de92f7368f8e3671120..d6e90310ea886f5d8734b1dd7ddeb256713b285e 100644 (file)
@@ -14,5 +14,5 @@ type=unity
 #?UNITY-SYSTEM-COMPOSITOR START FILE=/tmp/mir_socket VT=7 XDG_VTNR=7
 #?UNITY-SYSTEM-COMPOSITOR EXIT CODE=1
 
-# Cleanup
+# Daemon exits with error code
 #?RUNNER DAEMON-EXIT STATUS=1
index 8dcd41a7fa541a1b661d58cf02b006d98be633d4..e10041fe058a1090156f8534b2a692b79d0b8c83 100644 (file)
@@ -132,6 +132,8 @@ request_cb (const gchar *request)
         write_message (USC_MESSAGE_PONG, NULL, 0);
     else if (strcmp (request, "UNITY-SYSTEM-COMPOSITOR READY") == 0)
         write_message (USC_MESSAGE_READY, NULL, 0);
+    else if (strcmp (request, "UNITY-SYSTEM-COMPOSITOR CRASH") == 0)
+        kill (getpid (), SIGSEGV);
 }
 
 int
diff --git a/tests/test-unity-compositor-crash b/tests/test-unity-compositor-crash
new file mode 100755 (executable)
index 0000000..d6e9e5d
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+./src/dbus-env ./src/test-runner unity-compositor-crash test-gobject-greeter