From 831fc0cd5a0f08f0b61381a9eb889db4bf05d5eb Mon Sep 17 00:00:00 2001 From: Joona Hakkarainen Date: Thu, 21 Jul 2011 13:23:45 +0300 Subject: [PATCH] Changes: Test unixSignalHAndlers by killing booster-m and booster-d, singnal hup RevBy: Nimika Keshri --- tests/harmattan/red-tests/tests.xml | 4 ++++ .../testscripts/test-func-launcher.py | 21 +++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/tests/harmattan/red-tests/tests.xml b/tests/harmattan/red-tests/tests.xml index 84a0167..8161a52 100644 --- a/tests/harmattan/red-tests/tests.xml +++ b/tests/harmattan/red-tests/tests.xml @@ -30,6 +30,10 @@ source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_writable_executable_mem + + + source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_unix_signal_handlers + source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_nonlaunchable_apps diff --git a/tests/harmattan/testscripts/test-func-launcher.py b/tests/harmattan/testscripts/test-func-launcher.py index 91bce8a..820e8f2 100644 --- a/tests/harmattan/testscripts/test-func-launcher.py +++ b/tests/harmattan/testscripts/test-func-launcher.py @@ -952,6 +952,27 @@ class launcher_tests (unittest.TestCase): p = run_cmd_as_user('invoker --help') self.assert_(p.wait() == 0, "'invoker --help' failed") + def test_unix_signal_handlers(self): + """ + Test unixSignalHAndlers by killing booster-m and booster-d, singnal hub + """ + + mpid = get_pid('booster-m') + st, op = commands.getstatusoutput('kill -hup %s' % mpid) + time.sleep(2) + mpid_new = wait_for_app('booster-m') + self.assert_(mpid != mpid_new, "booster-m pid is not changed") + + + dpid = get_pid('booster-d') + st, op = commands.getstatusoutput('kill -hup %s' % dpid) + time.sleep(2) + dpid_new = wait_for_app('booster-d') + self.assert_(dpid != dpid_new, "booster-d pid is not changed") + + + + def test_writable_executable_mem(self): """ Test that applauncherd does not have the writable and executable memory