From 48b3bce58a561e72f8b9fb6925d690af12ee68ea Mon Sep 17 00:00:00 2001 From: Chengwei Yang Date: Tue, 9 Jul 2013 10:51:22 +0800 Subject: [PATCH 2/2] Test: add a test case for launch-helper This test is for trigger a failure of launch-helper, which will fail if the service A to be activated provided by B.service Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66608 Signed-off-by: Chengwei Yang --- bus/test-launch-helper.c | 5 +++++ configure.ac | 1 + ...Bus.TestSuiteDifferentBusNameService.service.in | 5 +++++ 3 files changed, 11 insertions(+) create mode 100644 test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteDifferentBusNameService.service.in diff --git a/bus/test-launch-helper.c b/bus/test-launch-helper.c index e88c989..0c46e6d 100644 --- a/bus/test-launch-helper.c +++ b/bus/test-launch-helper.c @@ -132,6 +132,11 @@ main (int argc, char **argv) "org.freedesktop.DBus.TestSuiteEchoService")) die ("OOM failed"); + if (!_dbus_test_oom_handling ("dbus-daemon-launch-helper", + bus_activation_helper_oom_test, + "org.freedesktop.DBus.TestSuiteDifferentBusName")) + die ("OOM failed"); + test_post_hook (argv[0]); printf ("%s: Success\n", argv[0]); diff --git a/configure.ac b/configure.ac index c80fcfc..a2653d8 100644 --- a/configure.ac +++ b/configure.ac @@ -1798,6 +1798,7 @@ test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteEchoService.s test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteSegfaultService.service test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service +test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteDifferentBusNameService.service test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoExec.service test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoUser.service test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoService.service diff --git a/test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteDifferentBusNameService.service.in b/test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteDifferentBusNameService.service.in new file mode 100644 index 0000000..752651b --- /dev/null +++ b/test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteDifferentBusNameService.service.in @@ -0,0 +1,5 @@ +[D-BUS Service] +# The filename isn't in format of .service +Name=org.freedesktop.DBus.TestSuiteDifferentBusName +Exec=@DBUS_TEST_EXEC@/test-service@EXEEXT@ +User=anyrandomuser -- 1.7.9.5