Changes: Test for restore signal handlers by boosters

RevBy: TrustMe
pull/1/head
Nimika Keshri 15 years ago
parent 26ebd32c83
commit 2350ee17e5

@ -33,6 +33,9 @@
<case name="applauncherd__test_nonlaunchable_apps" type="Functional" description="Test for booster warning while invoking non launchable apps" timeout="360" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_nonlaunchable_apps</step>
</case>
<case name="applauncherd__test_signal_status" type="Functional" description="Test that SigBlk, SigIgn and SigCgt is same for launched and non launched applications" timeout="360" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_signal_status</step>
</case>
<!--case name="applauncherd__test_application_specific_theming" type="Functional" description="Application specific theming tests" timeout="360" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/tc_theming.rb name test_application_specific_theming</step>
</case>

@ -1247,6 +1247,39 @@ class launcher_tests (unittest.TestCase):
pos = op.split("\n")[0].find("Booster: Loading symbol 'main' failed:")
self.assert_(pos != -1, "The booster did not give warning")
def test_signal_status(self):
"""
Test that values of SigBlk, SigIgn and SigCgt in /proc/pid/status
is same for both boosted and non boosted applications
"""
#Get status for non boosted apps
os.system("/usr/bin/fala_wl &")
time.sleep(2)
pid = get_pid("fala_wl")
st, SigBlk_wol = commands.getstatusoutput("cat /proc/%s/status | grep SigBlk" %pid)
st, SigIgn_wol = commands.getstatusoutput("cat /proc/%s/status | grep SigIgn" %pid)
st, SigCgt_wol = commands.getstatusoutput("cat /proc/%s/status | grep SigCgt" %pid)
kill_process("fala_wl")
time.sleep(2)
#Get status for booster application
os.system("/usr/bin/invoker --type=m /usr/bin/fala_wl &")
time.sleep(2)
pid = get_pid("fala_wl")
st, SigBlk_wl = commands.getstatusoutput("cat /proc/%s/status | grep SigBlk" %pid)
st, SigIgn_wl = commands.getstatusoutput("cat /proc/%s/status | grep SigIgn" %pid)
st, SigCgt_wl = commands.getstatusoutput("cat /proc/%s/status | grep SigCgt" %pid)
kill_process("fala_wl")
time.sleep(2)
self.assert_(SigBlk_wol == SigBlk_wl, "The SigBlk is not same for both apps")
self.assert_(SigIgn_wol == SigIgn_wl, "The SigIgn is not same for both apps")
self.assert_(SigCgt_wol == SigCgt_wl, "The SigCgt is not same for both apps")
# main
if __name__ == '__main__':
# When run with testrunner, for some reason the PATH doesn't include

Loading…
Cancel
Save