Changes: Refactored tests

RevBy: Olli Leppanen
Description: 1. unused scripts removed
             2. tests categorized
             3. stable tests moved from red to functional tests
pull/1/head
Nimika Keshri 14 years ago
parent 923d847869
commit 0e93b25b6f

@ -1,8 +1,4 @@
usr/share/applauncherd-testscripts/test-func-launcher.py
usr/share/applauncherd-testscripts/ts_prestartapp.rb
usr/share/applauncherd-testscripts/check_pipes.py
usr/share/applauncherd-testscripts/test-perf-mbooster.py
usr/share/applauncherd-testscripts/tc_theming.rb
usr/share/applauncherd-testscripts/tc_splash.rb
usr/share/applauncherd-testscripts/test-perf.rb
usr/share/applauncherd-testscripts/get-coordinates.rb
@ -13,8 +9,5 @@ usr/share/applauncherd-testscripts/test-daemons.py
usr/share/applauncherd-testscripts/test-boot-mode.py
usr/share/applauncherd-testscripts/view.qml
usr/bin/fala_wid
usr/share/applauncherd-testscripts/fala_xres_wl
usr/share/applauncherd-testscripts/fala_xres_wol
usr/share/applauncherd-testscripts/signal-forward/*
usr/share/applauncherd-testscripts/test-single-instance.py
usr/share/applauncherd-testscripts/test-core-dump.py

@ -11,16 +11,16 @@
</pre_steps>
<case name="applauncherd__test_launch_multiple_apps" type="Functional" description="To test that more than one applications are launched by the launcher" timeout="360" level="System">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_launch_multiple_apps</step>
<case name="applauncherd__test_launch_multiple_apps_m" type="Functional" description="To test that more than one applications are launched by the launcher" timeout="360" level="System">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_launch_multiple_apps_m</step>
</case>
<case name="applauncherd__test_one_instance" type="Functional" description="To test that only one instance of a application exist" timeout="360" level="System">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_one_instance</step>
<case name="applauncherd__test_one_instance_m" type="Functional" description="To test that only one instance of a application exist" timeout="360" level="System">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_one_instance_m</step>
</case>
<case name="applauncherd__test_zombie_state" type="Functional" description="To test that no Zombie process exist after the application is killed" timeout="360" level="System">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_zombie_state</step>
<case name="applauncherd__test_zombie_state_m" type="Functional" description="To test that no Zombie process exist after the application is killed" timeout="360" level="System">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_zombie_state_m</step>
</case>
<environments>

@ -5,66 +5,54 @@
<!-- Schema: https://projects.maemo.org/docs/testing/xml-definition.html -->
<suite name="applauncherd-functional-tests" domain="Application framework">
<set name="TC_Daemon" description="Launcher functional tests" feature="AF Basic Launcher daemon support" requirement="300168">
<pre_steps>
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="applauncherd__test_001_daemon_list" type="Functional" description="To list the running daemons using invoker after boot" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-daemons.py test_001_daemon_list</step>
</case>
<case name="applauncherd__test_daemon" type="Functional" description="Test that the applauncherd can be started daemonized" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_daemon</step>
</case>
<environments>
<scratchbox>true</scratchbox>
<hardware>true</hardware>
</environments>
</set>
<set name="TC_Launcher" description="Launcher functional tests" feature="AF Basic Launcher daemon support" requirement="300168">
<set name="TC_Daemon" description="Launcher functional tests" feature="AF Basic Launcher daemon support" requirement="300168">
<pre_steps>
<step>source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py stop_daemons</step>
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="applauncherd__test_launcher_exist" type="Functional" description="To test if the launcher exists and is executable or not" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_launcher_exist</step>
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-daemons.py test_launcher_exist</step>
</case>
<case name="applauncherd__test_applications_exist" type="Functional" description="test_launchable_application_exists " timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_applications_exist</step>
<case name="applauncherd__test_daemon_list" type="Functional" description="To list the running daemons using invoker after boot" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-daemons.py test_daemon_list</step>
</case>
<case name="applauncherd__test_daemon_second_instance" type="Functional" description="Test that 2nd instance of daemon cannot be started" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-daemons.py test_daemon_second_instance </step>
</case>
<case name="applauncherd__test_zombie_state" type="Functional" description="To test that no Zombie process exist after the application is killed" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_zombie_state</step>
<case name="applauncherd__test_writable_executable_mem" type="Functional" description="Test that applauncherd does not have the writable and executable memory" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-daemons.py test_writable_executable_mem</step>
</case>
<case name="applauncherd__test_launch_multiple_apps" type="Functional" description="To test that more than one applications are launched by the launcher" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_launch_multiple_apps</step>
<case name="applauncherd__test_applauncherd_fd_close" type="Functional" description="Test that applauncherd file descriptor does not change after closing aapp " timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-daemons.py test_applauncherd_fd_close</step>
</case>
<case name="applauncherd__test_one_instance" type="Functional" description="To test that only one instance of a application exist" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_one_instance</step>
<case name="applauncherd__test_applauncherd_fd_kill" type="Functional" description="Test that applauncherd file descriptor does not change after killing app" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-daemons.py test_applauncherd_fd_kill</step>
</case>
<case name="applauncherd__test_nonlaunchable_apps" type="Functional" description="Test for booster warning while invoking non launchable apps" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-daemons.py test_nonlaunchable_apps</step>
</case>
<case name="applauncherd__test_launch_multiple_apps_cont" type="Functional" description="Test that launcher can launch multiple applications continously" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_launch_multiple_apps_cont</step>
<case name="applauncherd__test_daemon" type="Functional" description="Test that the applauncherd can be started daemonized" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-daemons.py test_daemon</step>
</case>
<post_steps>
<step>source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py start_daemons</step>
<step>source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py start_daemons</step>
</post_steps>
<environments>
<scratchbox>true</scratchbox>
<scratchbox>false</scratchbox>
<hardware>true</hardware>
</environments>
</set>
<set name="TC_Invoker" description="Tests for invoker" feature="AF Basic Launcher daemon support" requirement="300168">
<pre_steps>
@ -72,55 +60,109 @@
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="applauncherd__test_signal_forwarding" type="Functional" description="To Test that invoker is killed by the same signal as the application" 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_forwarding</step>
<case name="applauncherd__test_oom_adj_minus_two" type="Functional" description="Test that oom.adj is -1 for launched application process when using invokers -o parameter" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_oom_adj_minus_two</step>
</case>
<case name="applauncherd__test_signal_forwarding" type="Functional" description="To Test that invoker is killed by the same signal as the application" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_signal_forwarding</step>
</case>
<case name="applauncherd__test_invoker_delay" type="Functional" description="Test that invokers --delay parameter works" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_invoker_delay</step>
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_invoker_delay</step>
</case>
<case name="applauncherd__test_invoker_usage_printing" type="Functional" description="Test that applauncherd invoker --help usage printing ok" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_invoker_usage_printing</step>
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_invoker_usage_printing</step>
</case>
<case name="applauncherd__test_invoker_search_prog" type="Functional" description="Test that invoker finds binaries from PATH" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_invoker_search_prog</step>
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_invoker_search_prog</step>
</case>
<case name="applauncherd__test_wait_term" type="Functional" description="Test that the launched application is killed when killing invoker that is waiting for app to terminate" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_wait_term</step>
</case>
<case name="applauncherd__test_invoker_exit_status" type="Functional" description="To test that invoker returns the same exit status as the application" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_invoker_exit_status</step>
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_invoker_exit_status</step>
</case>
<case name="applauncherd__test_invoker_gid_uid" type="Functional" description="To Test that the set gid and uid is passed from invoker process to launcher" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_invoker_gid_uid</step>
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_invoker_gid_uid</step>
</case>
<case name="applauncherd__test_launch_wo_applauncherd" type="Functional" description="Test invoker cannot launch applications when applauncherd is not running" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_launch_wo_applauncherd</step>
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_launch_wo_applauncherd</step>
</case>
<case name="applauncherd__test_invoker_signal_forward" type="Functional" description="Test that UNIX signals are forwarded from invoker to the invoked process" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_invoker_signal_forward</step>
</case>
<case name="applauncherd__test_wrong_type" type="Functional" description="Test that invoker help is printed if application is invoked using a wrong type" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_wrong_type</step>
</case>
<case name="applauncherd__test_unknown_parameter" type="Functional" description="Test that help is printed if unknown parameter is passed to invoker" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_unknown_parameter</step>
</case>
<case name="applauncherd__test_non_existing_binary_launch" type="Functional" description="Test that invoker gives error when it tries to launch a binary that does not exist" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_non_existing_binary_launch</step>
</case>
<case name="applauncherd__test_invoker_symlink" type="Functional" description="Test that the symlink of invoker is unable to launch applications" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_invoker_symlink</step>
</case>
<case name="applauncherd__test_app_link" type="Functional" description="Test that symlink of an application can be launched." timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_app_link</step>
</case>
<case name="applauncherd__test_D_and_G_option" type="Functional" description="Test that -D and -G options work and applications are launcherd" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_D_and_G_option</step>
</case>
<case name="applauncherd__test_app_directory" type="Functional" description="Test that invoker is unable to launch an application which is a directory" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_app_directory</step>
</case>
<case name="applauncherd__test_unsetPATH_launch" type="Functional" description="Test that invoker is unable to launch an application when PATH env is unset" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_unsetPATH_launch</step>
</case>
<case name="applauncherd__test_invoker_wait_term" type="Functional" description="Test that invoker waits for the application to exit" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_invoker_wait_term</step>
</case>
<case name="applauncherd__test_relative_path_search" type="Functional" description="Test that invoker searches the application through relative path" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_relative_path_search</step>
</case>
<case name="applauncherd__test_invoker_param_creds" type="Functional" description="test invoker --creds" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_invoker_param_creds</step>
</case>
<case name="applauncherd__test_invoker_param_respawn_delay" type="Functional" description="test invoker --respawn" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_invoker_param_respawn_delay</step>
</case>
<case name="applauncherd__test_invoker_bogus_apptype" type="Functional" description="test giving bogus apptype to invoker" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_invoker_bogus_apptype</step>
</case>
<post_steps>
<step>source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py start_daemons</step>
<step>source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py start_daemons</step>
</post_steps>
<environments>
<scratchbox>true</scratchbox>
<scratchbox>false</scratchbox>
<hardware>true</hardware>
</environments>
</set>
<set name="TC_Booster" description="Functional tests for applauncherd boosters" feature="AF Basic Launcher daemon support" requirement="300168">
<set name="TC_CommonBooster" description="Functional tests for applauncherd boosters" feature="AF Basic Launcher daemon support" requirement="300168">
<pre_steps>
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
<step>source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py stop_daemons</step>
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="applauncherd__test_unix_signal_handlers" type="Functional" description="Test unixSignalHAndlers by killing booster-m and booster-d, singnal hup" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_unix_signal_handlers</step>
</case>
<case name="applauncherd__test_applications_exist" type="Functional" description="test_launchable_application_exists " timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_applications_exist</step>
</case>
<case name="applauncherd__test_restart_booster" type="Functional" description="Test that booster is restarted if it is killed" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_restart_booster</step>
</case>
@ -129,23 +171,129 @@
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_booster_pid_change</step>
</case>
<case name="applauncherd__test_booster_killed_or_restarted" type="Functional" description="Test that booster is restarted if applauncherd is killed" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_booster_killed_or_restarted</step>
</case>
<case name="applauncherd__test_launched_app_name" type="Functional" description="Test that launched application name have .launch at the end" timeout="460" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_launched_app_name</step>
</case>
<post_steps>
<step>source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py start_daemons</step>
</post_steps>
<environments>
<scratchbox>false</scratchbox>
<hardware>true</hardware>
</environments>
</set>
<set name="TC_MBooster" description="Launcher functional tests" feature="AF Basic Launcher daemon support" requirement="300168">
<pre_steps>
<step>source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py stop_daemons</step>
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="applauncherd__test_wait_term_m" type="Functional" description="Test that the launched application is killed when killing invoker that is waiting for app to terminate" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_wait_term_m</step>
</case>
<case name="applauncherd__test_zombie_state_m" type="Functional" description="To test that no Zombie process exist after the application is killed" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_zombie_state_m</step>
</case>
<case name="applauncherd__test_launch_multiple_apps_m" type="Functional" description="To test that more than one applications are launched by the launcher" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_launch_multiple_apps_m</step>
</case>
<case name="applauncherd__test_one_instance_m" type="Functional" description="To test that only one instance of a application exist" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_one_instance_m</step>
</case>
<case name="applauncherd__test_fd_booster_m" type="Functional" description="File descriptor test for booster-m" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_fd_booster_m</step>
</case>
<case name="applauncherd__test_qttas_load_booster_m" type="Functional" description="To test invoker that qttestability plugin is loaded with -testability argument for booster-m" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_qttas_load_booster_m</step>
</case>
<case name="applauncherd__test_qttas_load_env_booster_m" type="Functional" description="To test invoker that qttestability plugin is loaded with QT_LOAD_TESTABILITY env variable for booster-m" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_qttas_load_env_booster_m</step>
</case>
<case name="applauncherd__test_signal_status_m" type="Functional" description="Test that SigBlk, SigIgn and SigCgt is same for launched and non launched applications" timeout="360" level="System" insignificant="false">
<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_m</step>
</case>
<case name="applauncherd__test_argv_mbooster_limit" type="Functional" description="Test that ARGV_LIMIT (32) arguments are successfully passed to cached [QM]Application." timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_argv_mbooster_limit</step>
</case>
<case name="applauncherd__test_argv_mbooster_over_limit" type="Functional" description="Test that extra arguments than ARGV_LIMIT are ignored" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_argv_mbooster_over_limit</step>
</case>
<case name="applauncherd__test_launch_multiple_apps_cont_m" type="Functional" description="Test that launcher can launch multiple applications continously" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_launch_multiple_apps_cont_m</step>
</case>
<post_steps>
<step>source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py start_daemons</step>
</post_steps>
<environments>
<scratchbox>false</scratchbox>
<hardware>true</hardware>
</environments>
</set>
<set name="TC_QtBooster" description="Functional tests for applauncherd boosters" feature="AF Basic Launcher daemon support" requirement="300168">
<pre_steps>
<step>source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py stop_daemons</step>
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="applauncherd__test_fd_booster_q" type="Functional" description="File descriptor test for booster-q" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_fd_booster_q</step>
</case>
<case name="applauncherd__test_booster_killed_or_restarted" type="Functional" description="Test that booster is restarted if applauncherd is killed" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_booster_killed_or_restarted</step>
<case name="applauncherd__test_dirPath_filePath_q" type="Functional" description="Test that correct file path and dir path is passed by booster q" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_dirPath_filePath_q</step>
</case>
<!-- Chaning of theme is no more valid-->
<!--case name="applauncherd__test_theme_change_booster_restart" type="Functional" description="Tests that booster-m and booster-w are restarted after theme change" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/tc_theming.rb name test_theme_change_booster_restart</step>
</case-->
<environments>
<scratchbox>false</scratchbox>
<hardware>true</hardware>
</environments>
</set>
<set name="TC_DBooster" description="functional tests for qml boosters" feature="AF Basic Launcher daemon support" requirement="300168">
<pre_steps>
<step>source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py stop_daemons</step>
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="applauncherd__test_zombie_state_qml" type="Functional" description="To test that no Zombie process exist after the application is killed" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_zombie_state_qml</step>
</case>
<case name="applauncherd__test_launch_multiple_apps_qml" type="Functional" description="To test that more than one applications are launched by the launcher" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_launch_multiple_apps_qml</step>
</case>
<case name="applauncherd__test_one_instance_qml" type="Functional" description="To test that only one instance of a application exist" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_one_instance_qml</step>
</case>
<case name="applauncherd__test_launch_multiple_apps_cont_qml" type="Functional" description="To test that more than one applications are launched by the launcher" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_launch_multiple_apps_cont_qml</step>
</case>
<case name="applauncherd__test_wait_term_qml" type="Functional" description="When calling invoker with --wait-term and killing invoker,the launched application should die too." timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_wait_term_qml</step>
</case>
<case name="applauncherd__test_fd_booster_d" type="Functional" description="File descriptor test for booster-d" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_fd_booster_d</step>
</case>
<case name="applauncherd__test_qttas_load_booster_d" type="Functional" description="To test invoker that qttestability plugin is loaded with -testability argument for booster-d" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_qttas_load_booster_d</step>
</case>
@ -153,28 +301,75 @@
<case name="applauncherd__test_qttas_load_env_booster_d" type="Functional" description="To test invoker that qttestability plugin is loaded with QT_LOAD_TESTABILITY env variable for booster-d" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_qttas_load_env_booster_d</step>
</case>
<case name="applauncherd__test_signal_status_qml" type="Functional" description="Test that SigBlk, SigIgn and SigCgt is same for launched and non launched applications" timeout="360" level="System" insignificant="false">
<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_qml</step>
</case>
<case name="applauncherd__test_argv_dbooster_limit" type="Functional" description="Test that ARGV_LIMIT (32) arguments are successfully passed to cached [QM]Application." timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_argv_dbooster_limit</step>
</case>
<case name="applauncherd__test_argv_dbooster_over_limit" type="Functional" description="Test that extra arguments than ARGV_LIMIT are ignored " timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_argv_mbooster_over_limit </step>
</case>
<case name="applauncherd__test_dirPath_filePath_d" type="Functional" description="Test that correct file path and dir path is passed by booster d" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_dirPath_filePath_d</step>
</case>
<case name="applauncherd__test_qttas_load_booster_m" type="Functional" description="To test invoker that qttestability plugin is loaded with -testability argument for booster-m" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_qttas_load_booster_m</step>
<post_steps>
<step>source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py start_daemons</step>
</post_steps>
<environments>
<scratchbox>false</scratchbox>
<hardware>true</hardware>
</environments>
</set>
<!-- Test for e booster -->
<set name="TC_EBooster" description="functional tests for qml boosters" feature="AF Basic Launcher daemon support" requirement="300168">
<pre_steps>
<step>source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py stop_daemons</step>
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="applauncherd__test_wait_term_e" type="Functional" description="When calling invoker with --wait-term and killing invoker,the launched application should die too." timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_wait_term_e</step>
</case>
<case name="applauncherd__test_qttas_load_env_booster_m" type="Functional" description="To test invoker that qttestability plugin is loaded with QT_LOAD_TESTABILITY env variable for booster-m" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_qttas_load_env_booster_m</step>
<case name="applauncherd__test_zombie_state_e" type="Functional" description="To test that no Zombie process exist after the application is killed" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_zombie_state_e</step>
</case>
<case name="applauncherd__test_launch_multiple_apps_e" type="Functional" description="To test that more than one applications are launched by the launcher" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_launch_multiple_apps_e</step>
</case>
<case name="applauncherd__test_one_instance_e" type="Functional" description="To test that only one instance of a application exist" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_one_instance_e</step>
</case>
<case name="applauncherd__test_fd_booster_e" type="Functional" description="File descriptor test for booster-d" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_fd_booster_e</step>
</case>
<case name="applauncherd__test_dirPath_filePath_e" type="Functional" description="Test that correct file path and dir path is passed by booster e" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_dirPath_filePath_e</step>
</case>
<case name="applauncherd__test_launch_multiple_apps_cont_e" type="Functional" description="To test that more than one applications are launched by the launcher" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_launch_multiple_apps_cont_e</step>
</case>
<post_steps>
<step>source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py start_daemons</step>
</post_steps>
<environments>
<scratchbox>true</scratchbox>
<scratchbox>false</scratchbox>
<hardware>true</hardware>
</environments>
</set>
<set name="TC_Security" description="Tests that have something to do with the security platform" feature="AF Basic Launcher daemon support" requirement="300168">
<pre_steps>
<step>source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py stop_daemons</step>
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
@ -188,8 +383,7 @@
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-security.py test_invoker_creds</step>
</case>
<case name="applauncherd__test_correct_creds" type="Functional" description="Test that launched applications get correct credentials when they provide Aegis files" timeout="360" level="System" insignificant="true">
<case name="applauncherd__test_correct_creds" type="Functional" description="Test that launched applications get correct credentials when they provide Aegis files" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-security.py test_correct_creds</step>
</case>
@ -207,30 +401,14 @@
</environments>
</set>
<!--set name="Prestart-launched" description="To test that prestarted application is launched" feature="AF DUI Booster for Launcher daemon" requirement="300195">
<pre_steps>
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="Prestart-launched" type="Functional" description="To test that prestarted application is launched" timeout="360" level="System">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/ts_prestartapp.rb name test_launch_prestarted_app</step>
</case>
<environments>
<scratchbox>true</scratchbox>
<hardware>true</hardware>
</environments>
<-get>
</get>
</set-->
<!-- Single Instance Tests (without invoker) -->
<set name="TC_SingleInstance_No_Invoker" description="functional tests for single instance without invoker" feature="AF Basic Launcher daemon support" requirement="300168">
<pre_steps>
<step>source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py stop_daemons</step>
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="applauncherd__test_single_instance_window_raise_wo_invoker" type="Functional" description="Test basic single instance functionality and window raising" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-single-instance.py test_single_instance_window_raise_without_invoker</step>
</case>
@ -246,19 +424,23 @@
<case name="applauncherd__test_single_instance_abnormal_lock_release_wo_invoker" type="Functional" description="Try starting an app, killing it and starting it again checking that the pid has changed" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-single-instance.py test_single_instance_abnormal_lock_release_without_invoker</step>
</case>
<post_steps>
<step>source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py start_daemons</step>
</post_steps>
<environments>
<scratchbox>true</scratchbox>
<scratchbox>false</scratchbox>
<hardware>true</hardware>
</environments>
</set>
<!-- Single Instance Tests (with invoker) -->
<set name="TC_SingleInstance_Invoker" description="functional tests for single instance with invoker" feature="AF Basic Launcher daemon support" requirement="300168">
<pre_steps>
<step>source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py stop_daemons</step>
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="applauncherd__test_single_instance_window_raise_w_invoker" type="Functional" description="Test basic single instance functionality and window raising" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-single-instance.py test_single_instance_window_raise_with_invoker</step>
</case>
@ -274,91 +456,57 @@
<case name="applauncherd__test_single_instance_abnormal_lock_release_w_invoker" type="Functional" description="Try starting an app, killing it and starting it again checking that the pid has changed" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-single-instance.py test_single_instance_abnormal_lock_release_with_invoker</step>
</case>
<post_steps>
<step>source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py start_daemons</step>
</post_steps>
<environments>
<scratchbox>true</scratchbox>
<scratchbox>false</scratchbox>
<hardware>true</hardware>
</environments>
</set>
<!-- Test for qml booster -->
<set name="TC_Qml_Booster" description="functional tests for qml boosters" feature="AF Basic Launcher daemon support" requirement="300168">
<set name="TC_Splash" description="functional tests for splash" feature="AF Basic Launcher daemon support" requirement="300168">
<pre_steps>
<step>source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py stop_daemons</step>
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="applauncherd__test_zombie_state_qml" type="Functional" description="To test that no Zombie process exist after the application is killed" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_zombie_state_qml</step>
</case>
<case name="applauncherd__test_launch_multiple_apps_qml" type="Functional" description="To test that more than one applications are launched by the launcher" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_launch_multiple_apps_qml</step>
</case>
<case name="applauncherd__test_one_instance_qml" type="Functional" description="To test that only one instance of a application exist" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_one_instance_qml</step>
</case>
<case name="applauncherd__test_launch_multiple_apps_cont_qml" type="Functional" description="To test that more than one applications are launched by the launcher" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_launch_multiple_apps_cont_qml</step>
<case name="applauncherd__test_splash" type="Functional" description="To test --splash functionality" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/tc_splash.rb --name test_splash</step>
</case>
<case name="applauncherd__test_wait_term_qml" type="Functional" description="When calling invoker with --wait-term and killing invoker,the launched application should die too." timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_wait_term_qml</step>
<case name="applauncherd__test_splash_landscape" type="Functional" description="To test --splash-landscape functionality" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/tc_splash.rb --name test_splash_landscape</step>
</case>
<case name="applauncherd__test_fd_booster_d" type="Functional" description="File descriptor test for booster-d" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_fd_booster_d</step>
<case name="applauncherd__test_no_splash" type="Functional" description="To test splash parameters is not reset " timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/tc_splash.rb --name test_no_splash</step>
</case>
<post_steps>
<step>source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py start_daemons</step>
</post_steps>
<environments>
<scratchbox>true</scratchbox>
<hardware>true</hardware>
</environments>
</set>
<!-- Test for e booster -->
<set name="TC_e_Booster" description="functional tests for qml boosters" feature="AF Basic Launcher daemon support" requirement="300168">
<set name="TC_Bootmode" description="functional tests for boot mode" feature="AF Basic Launcher daemon support" requirement="300168">
<pre_steps>
<step>source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py stop_daemons</step>
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="applauncherd__test_zombie_state_e" type="Functional" description="To test that no Zombie process exist after the application is killed" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_zombie_state_e</step>
<case name="applauncherd__test_change_to_normal_mode" type="Functional" description="To test change from boot mode to normal mode" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-boot-mode.py test_change_to_normal_mode</step>
</case>
<case name="applauncherd__test_launch_multiple_apps_e" type="Functional" description="To test that more than one applications are launched by the launcher" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_launch_multiple_apps_e</step>
<case name="applauncherd__test_boot_mode_and_normal_mode" type="Functional" description="To test boot mode and normal mode" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-boot-mode.py test_boot_mode_and_normal_mode</step>
</case>
<case name="applauncherd__test_one_instance_e" type="Functional" description="To test that only one instance of a application exist" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_one_instance_e</step>
<case name="applauncherd__test_single_instance_window_raise_with_script" type="Functional" description="Test basic single instance functionality and window raising using script" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-single-instance.py test_single_instance_window_raise_with_script</step>
</case>
<case name="applauncherd__test_launch_multiple_apps_cont_e" type="Functional" description="To test that more than one applications are launched by the launcher" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_launch_multiple_apps_cont_e</step>
</case>
<case name="applauncherd__test_wait_term_e" type="Functional" description="When calling invoker with --wait-term and killing invoker,the launched application should die too." timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_wait_term_e</step>
<case name="applauncherd__test_SIGUSR2" type="Functional" description="Test for SIGUSR2" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-boot-mode.py test_SIGUSR2</step>
</case>
<case name="applauncherd__test_fd_booster_e" type="Functional" description="File descriptor test for booster-d" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_fd_booster_e</step>
<case name="applauncherd__test_SIGUSR1" type="Functional" description="Test for SIGUSR1" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-boot-mode.py test_SIGUSR1 </step>
</case>
<post_steps>
<step>source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py start_daemons</step>
</post_steps>
<environments>
<scratchbox>true</scratchbox>
<hardware>true</hardware>

@ -14,196 +14,16 @@
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_dirPath_filePath_m</step>
</case -->
<case name="applauncherd__test_dirPath_filePath_d" type="Functional" description="Test that correct file path and dir path is passed by booster d" 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_dirPath_filePath_d</step>
</case>
<case name="applauncherd__test_dirPath_filePath_q" type="Functional" description="Test that correct file path and dir path is passed by booster q" 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_dirPath_filePath_q</step>
</case>
<case name="applauncherd__test_dirPath_filePath_e" type="Functional" description="Test that correct file path and dir path is passed by booster e" 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_dirPath_filePath_e</step>
</case>
<case name="applauncherd__test_correct_creds" type="Functional" description="Test that launched applications get correct credentials when they provide Aegis files" 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-security.py test_correct_creds</step>
</case>
<case name="applauncherd__test_writable_executable_mem" type="Functional" description="Test that applauncherd does not have the writable and executable memory" 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_writable_executable_mem</step>
</case>
<case name="applauncherd__test_unix_signal_handlers" type="Functional" description="Test unixSignalHAndlers by killing booster-m and booster-d, singnal hup" 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_unix_signal_handlers</step>
</case>
<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_m" 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_m</step>
</case>
<case name="applauncherd__test_signal_status_qml" 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_qml</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>
<case name="applauncherd__test_global_theming" type="Functional" description="Tests that global theming changes affect launched applications" 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_global_theming</step>
</case-->
<!--case name="applauncherd__test_oom_adj_zero" type="Functional" description="Test that oom.adj is 0 for launched application process" 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_oom_adj_zero</step>
</case-->
<case name="applauncherd__test_oom_adj_minus_one" type="Functional" description="Test that oom.adj is -1 for launched application process when using invokers -o parameter" 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_oom_adj_minus_one</step>
</case>
<case name="applauncherd__test_launched_app_name" type="Functional" description="Test that launched application name have .launch at the end" timeout="460" 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_launched_app_name</step>
</case>
<case name="applauncherd__test_argv_mbooster_limit" type="Functional" description="Test that ARGV_LIMIT (32) arguments are successfully passed to cached [QM]Application." 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_argv_mbooster_limit</step>
</case>
<case name="applauncherd__test_argv_dbooster_limit" type="Functional" description="Test that ARGV_LIMIT (32) arguments are successfully passed to cached [QM]Application." 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_argv_dbooster_limit</step>
</case>
<case name="applauncherd__test_argv_mbooster_over_limit" type="Functional" description="Test that extra arguments than ARGV_LIMIT are ignored" 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_argv_mbooster_over_limit</step>
</case>
<case name="applauncherd__test_argv_dbooster_over_limit" type="Functional" description="Test that extra arguments than ARGV_LIMIT are ignored " 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_argv_mbooster_over_limit </step>
</case>
<!--case name="applauncherd__test_stress_boosted_apps" type="Functional" description="Stress test for boosted applications to check only one instance is running." 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_stress_boosted_apps</step>
</case-->
<case name="applauncherd__test_invoker_param_creds" type="Functional" description="test invoker --creds" 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_invoker_param_creds</step>
</case>
<case name="applauncherd__test_invoker_param_respawn_delay" type="Functional" description="test invoker --respawn" 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_invoker_param_respawn_delay</step>
</case>
<case name="applauncherd__test_invoker_bogus_apptype" type="Functional" description="test giving bogus apptype to invoker" 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_invoker_bogus_apptype</step>
</case>
<!--case name="applauncherd__test_launch_prestarted_app" type="Functional" description="To test that prestarted application is launched" timeout="360" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/ts_prestartapp.rb dash-dash-name test_launch_prestarted_app</step>
</case-->
<!--case name="applauncherd__test_core_dump" type="Functional" description="Test that core dumps are generated with boosted 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-core-dump.py test_core_dumps</step>
</case-->
<environments>
<scratchbox>true</scratchbox>
<hardware>true</hardware>
</environments>
</set>
<set name="TC_Splash" description="functional tests for splash" feature="AF Basic Launcher daemon support" requirement="300168">
<pre_steps>
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="applauncherd__test_splash" type="Functional" description="To test --splash functionality" timeout="360" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/tc_splash.rb --name test_splash</step>
</case>
<case name="applauncherd__test_splash_landscape" type="Functional" description="To test --splash-landscape functionality" timeout="360" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/tc_splash.rb --name test_splash_landscape</step>
</case>
<case name="applauncherd__test_no_splash" type="Functional" description="To test splash parameters is not reset " timeout="360" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/tc_splash.rb --name test_no_splash</step>
</case>
<environments>
<scratchbox>true</scratchbox>
<hardware>true</hardware>
</environments>
</set>
<set name="TC_Boot_mode" description="functional tests for boot mode" feature="AF Basic Launcher daemon support" requirement="300168">
<pre_steps>
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="applauncherd__test_change_to_normal_mode" type="Functional" description="To test change from boot mode to normal mode" 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-boot-mode.py test_change_to_normal_mode</step>
</case>
<case name="applauncherd__test_boot_mode_and_normal_mode" type="Functional" description="To test boot mode and normal mode" 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-boot-mode.py test_boot_mode_and_normal_mode</step>
</case>
<case name="applauncherd__test_single_instance_window_raise_with_script" type="Functional" description="Test basic single instance functionality and window raising using script" 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-single-instance.py test_single_instance_window_raise_with_script</step>
</case>
<case name="applauncherd__test_applauncherd_fd_close" type="Functional" description="Test that applauncherd file descriptor does not change after closing aapp " 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_applauncherd_fd_close</step>
</case>
<case name="applauncherd__test_applauncherd_fd_kill" type="Functional" description="Test that applauncherd file descriptor does not change after killing app" 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_applauncherd_fd_kill</step>
</case>
<case name="applauncherd__test_SIGUSR2" type="Functional" description="Test for SIGUSR2" 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-boot-mode.py test_SIGUSR2</step>
</case>
<case name="applauncherd__test_SIGUSR1" type="Functional" description="Test for SIGUSR1" 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-boot-mode.py test_SIGUSR1 </step>
</case>
<case name="applauncherd__test_daemon_second_instance" type="Functional" description="Test that 2nd instance of daemon cannot be started" 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_daemon_second_instance </step>
</case>
<environments>
<scratchbox>true</scratchbox>
<hardware>true</hardware>
</environments>
</set>
<set name="TC_Invoker" description="functional tests for invoker" feature="AF Basic Launcher daemon support" requirement="300168">
<pre_steps>
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="applauncherd__test_invoker_signal_forward" type="Functional" description="Test that UNIX signals are forwarded from invoker to the invoked process" 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-invoker.py test_invoker_signal_forward</step>
</case>
<case name="applauncherd__test_wrong_type" type="Functional" description="Test that invoker help is printed if application is invoked using a wrong type" 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-invoker.py test_wrong_type</step>
</case>
<case name="applauncherd__test_unknown_parameter" type="Functional" description="Test that help is printed if unknown parameter is passed to invoker" 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-invoker.py test_unknown_parameter</step>
</case>
<case name="applauncherd__test_non_existing_binary_launch" type="Functional" description="Test that invoker gives error when it tries to launch a binary that does not exist" 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-invoker.py test_non_existing_binary_launch</step>
</case>
<case name="applauncherd__test_invoker_symlink" type="Functional" description="Test that the symlink of invoker is unable to launch 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-invoker.py test_invoker_symlink</step>
</case>
<case name="applauncherd__test_app_link" type="Functional" description="Test that symlink of an application can be launched." 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-invoker.py test_app_link</step>
</case>
<case name="applauncherd__test_D_and_G_option" type="Functional" description="Test that -D and -G options work and applications are launcherd" 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-invoker.py test_D_and_G_option</step>
</case>
<case name="applauncherd__test_app_directory" type="Functional" description="Test that invoker is unable to launch an application which is a directory" 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-invoker.py test_app_directory</step>
</case>
<case name="applauncherd__test_unsetPATH_launch" type="Functional" description="Test that invoker is unable to launch an application when PATH env is unset" 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-invoker.py test_unsetPATH_launch</step>
</case>
<case name="applauncherd__test_invoker_wait_term" type="Functional" description="Test that invoker waits for the application to exit" 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-invoker.py test_invoker_wait_term</step>
</case>
<case name="applauncherd__test_relative_path_search" type="Functional" description="Test that invoker searches the application through relative path" 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-invoker.py test_relative_path_search</step>
</case>
<environments>
<scratchbox>true</scratchbox>
<hardware>true</hardware>
</environments>
</set>
</suite>
</testdefinition>

@ -4,26 +4,19 @@ endif ($ENV{MEEGO})
if ($ENV{HARMATTAN})
install(FILES
test-perf-mbooster.py
check_pipes.py
test-func-launcher.py
utils.py
test-security.py
test-invoker.py
test-daemons.py
test-single-instance.py
test-core-dump.py
test-boot-mode.py
DESTINATION /usr/share/applauncherd-testscripts)
install(PROGRAMS
ts_prestartapp.rb
tc_theming.rb
tc_splash.rb
get-coordinates.rb
test-perf.rb
fala_xres_wl
fala_xres_wol
DESTINATION /usr/share/applauncherd-testscripts)
install(PROGRAMS fala_wid DESTINATION /usr/bin/)

@ -6,7 +6,7 @@ import commands
#Launching application from the script
os.system("/usr/share/applauncherd-testscripts/signal-forward/fala_sf_d.sh &")
time.sleep(3)
time.sleep(4)
st, op = commands.getstatusoutput("pgrep fala_qml_helloworld")
#Killing application with a signal 15 (Terminated)

@ -6,7 +6,7 @@ import commands
#Launching application from the script
os.system("/usr/share/applauncherd-testscripts/signal-forward/fala_sf_e.sh &")
time.sleep(3)
time.sleep(4)
st, op = commands.getstatusoutput("pgrep fala_qml_helloworld")
#Killing application with a signal 15 (Terminated)

@ -6,7 +6,7 @@ import commands
#Launching application from the script
os.system("/usr/share/applauncherd-testscripts/signal-forward/fala_sf_m.sh &")
time.sleep(2)
time.sleep(4)
st, op = commands.getstatusoutput("pgrep fala_ft_hello")
#Killing application with a signal 11 (Segmentation Fault)

@ -6,7 +6,7 @@ import commands
#Launching application from the script
os.system("/usr/share/applauncherd-testscripts/signal-forward/fala_sf_qt.sh &")
time.sleep(3)
time.sleep(4)
st, op = commands.getstatusoutput("pgrep fala_ft_hello")
#Killing application with a signal 11 (Segmentation Fault)

@ -31,7 +31,14 @@ class DaemonTests(unittest.TestCase):
def tearDown(self):
debug("tearDown")
def test_001_daemon_list(self):
def test_launcher_exist(self):
"""
To test if the launcher exists and is executable or not
"""
self.assert_(os.path.isfile(LAUNCHER_BINARY), "Launcher file does not exist")
self.assert_(os.access(LAUNCHER_BINARY, os.X_OK), "Launcher exists, but is not executable")
def test_daemon_list(self):
"""
To List the daemons running using invoker after boot
"""
@ -41,6 +48,140 @@ class DaemonTests(unittest.TestCase):
if op.split("\n")[i].find("prestart") == -1:
debug("%s" %op.split("\n")[i])
def test_daemon(self):
"""
Test that the --daemon parameter works for applauncherd
"""
stop_applauncherd()
remove_applauncherd_runtime_files()
p = run_cmd_as_user('/usr/bin/applauncherd.bin --daemon')
time.sleep(5)
st, op = commands.getstatusoutput('pgrep -lf "applauncherd.bin --daemon"')
p_id = op.split(" ")[0]
debug("The pid of applauncherd --daemon is %s" %op)
# filter some cruft out from the output and see how many
# instances are running
op = filter(lambda x: x.find("sh ") == -1, op.split("\n"))
count = len(op)
debug("count = %d" % count)
self.assert_(count == 1, "applauncherd was not daemonized (or too many instances running ..)")
# try to launch an app
run_cmd_as_user('/usr/bin/fala_ft_hello')
time.sleep(2)
pid = wait_for_app('fala_ft_hello')
if pid != None:
kill_process(apppid = pid)
else:
self.assert_(False, "fala_ft_hello was not launched!")
# only the daemonized applauncherd should be running now
kill_process(apppid = p_id)
#commands.getstatusoutput('pkill applauncherd')
remove_applauncherd_runtime_files()
start_applauncherd()
def test_daemon_second_instance(self):
"""
Test that second instance of applauncherd cannot be started
"""
daemon_pid = get_pid("applauncherd")
if daemon_pid == None:
start_applauncherd
daemon_pid = get_pid("applauncherd")
debug("start applauncherd again")
st, op = commands.getstatusoutput("initctl start xsession/applauncherd")
time.sleep(3)
daemon_pid_new = get_pid("applauncherd")
self.assert_(daemon_pid == daemon_pid_new, "New instance of applauncherd started")
self.assert_(st != 0, "Second instance of applauncherd started")
def test_writable_executable_mem(self):
"""
Test that applauncherd does not have the writable and executable memory
"""
pid = get_pid('applauncherd')
st, op = commands.getstatusoutput("grep wx /proc/%s/smaps" %pid)
debug("The value of status is %d" %st)
debug("The value of output is %s" %op)
self.assert_(st != 0, "applauncherd has writable and executable memory")
def test_applauncherd_fd_close(self):
self._test_applauncherd_fd()
def test_applauncherd_fd_kill(self):
self._test_applauncherd_fd(False)
def _test_applauncherd_fd(self, close = True):
"""
To test that file descriptors are closed before calling application main
"""
#get fd of booster before launching application
debug("get fd of applauncherd before launching application")
pid = commands.getoutput("pgrep applauncherd")
init_count = commands.getoutput('ls -l /proc/%s/fd/ | wc -l' % str(pid))
debug("\nThe count of initial file descriptors is : %s\n" %init_count)
time.sleep(3)
#launch application using booster
debug("launch fala_wl using booster")
status = os.system('invoker --type=m /usr/bin/fala_wl &')
#get fd of booster after launching the application
debug("get fd of booster after launching the application")
if status == 0:
launch_count = commands.getoutput('ls -l /proc/%s/fd/ | wc -l' % str(pid))
debug("\nThe count of file descriptors after launch : %s\n" %launch_count)
time.sleep(3)
#Close application
if close:
st, wid = commands.getstatusoutput(\
"xwininfo -root -tree| awk '/Applauncherd testapp/ {print $1}'")
os.system("/usr/bin/xsendevent close %s" %wid)
else:
pid_app = commands.getoutput('pgrep fala_wl')
kill_process(apppid=pid_app)
time.sleep(3)
#get fd of booster after closing the application
debug("get fd of booster after closing the application")
close_count = commands.getoutput('ls -l /proc/%s/fd/ | wc -l' % str(pid))
debug("\nThe count file descriptors after close: %s\n" %close_count)
self.assert_(int(launch_count) == int(init_count) +1, "The file descriptors was not changed")
self.assert_(close_count == init_count, "The file descriptors was changed")
def test_nonlaunchable_apps(self):
"""
Test that Booster gives warning while trying to launch non launchable applications
Here fala_wid is a shell script and libebooster.so is a library
"""
st, op = commands.getstatusoutput("/usr/bin/invoker --type=m /usr/bin/fala_wid")
debug("The Warning is %s" %(op.split("\n")[0]))
pos = op.split("\n")[0].find("Booster: Loading invoked application failed:")
self.assert_(pos != -1, "The booster did not give warning")
st, op = commands.getstatusoutput("/usr/bin/invoker --type=m /usr/lib/applauncherd/libebooster.so")
debug("The Warning is %s" %(op.split("\n")[0]))
pos = op.split("\n")[0].find("Booster: Loading symbol 'main' failed:")
self.assert_(pos != -1, "The booster did not give warning")
if __name__ == '__main__':
tests = sys.argv[1:]

@ -45,24 +45,8 @@ from subprocess import Popen
from utils import *
from os.path import basename
LAUNCHER_BINARY='/usr/bin/applauncherd'
DEV_NULL = file("/dev/null","w")
LAUNCHABLE_APPS = ['/usr/bin/fala_ft_hello','/usr/bin/fala_ft_hello1', '/usr/bin/fala_ft_hello2']
LAUNCHABLE_APPS_QML = ['/usr/bin/fala_qml_helloworld','/usr/bin/fala_qml_helloworld1', '/usr/bin/fala_qml_helloworld2']
PREFERED_APP = '/usr/bin/fala_ft_hello'
PREFERED_APP_QML = '/usr/bin/fala_qml_helloworld'
GET_COORDINATE_SCRIPT = '/usr/share/applauncherd-testscripts/get-coordinates.rb'
PIXELCHANHED_BINARY = '/usr/bin/fala_pixelchanged'
using_scratchbox = False
def start_launcher_daemon():
temp = basename(LAUNCHER_BINARY)
st, op = commands.getstatusoutput("pgrep %s" %temp)
if st == 0:
debug("Launcher already started")
return op
def check_prerequisites():
if os.getenv('DISPLAY') == None:
error("DISPLAY is not set. Check the requirements.")
@ -74,8 +58,6 @@ def check_prerequisites():
for app in LAUNCHABLE_APPS:
assert len(basename(app)) <= 15, "For app: %s , base name !<= 14" %app
class daemon_handling (unittest.TestCase):
def stop_daemons(self):
@ -109,12 +91,6 @@ class launcher_tests (unittest.TestCase):
start_daemons()
#Testcases
def test_launcher_exist(self):
"""
To test if the launcher exists and is executable or not
"""
self.assert_(os.path.isfile(LAUNCHER_BINARY), "Launcher file does not exist")
self.assert_(os.access(LAUNCHER_BINARY, os.X_OK), "Launcher exists, but is not executable")
def test_applications_exist(self):
"""
@ -126,7 +102,7 @@ class launcher_tests (unittest.TestCase):
failed_apps.append(app)
self.assert_(failed_apps == [], "Some applications do not have the launch files, list: %s" % str(failed_apps))
def test_zombie_state(self):
def test_zombie_state_m(self):
self._test_zombie_state(PREFERED_APP,'m')
def test_zombie_state_qml(self):
@ -163,7 +139,7 @@ class launcher_tests (unittest.TestCase):
self.assert_(process_id != process_id1 , "New Process not launched")
self.assert_(process_id1 == None , "Process still running")
def test_launch_multiple_apps(self):
def test_launch_multiple_apps_m(self):
self._test_launch_multiple_apps(LAUNCHABLE_APPS, 'm')
def test_launch_multiple_apps_qml(self):
@ -192,10 +168,10 @@ class launcher_tests (unittest.TestCase):
self.fail("%s was not launched using applauncherd")
pidlist.append(pid)
kill_launched(pidlist)
self.assert_(len(pidlist) == len(launchable_apps),"All apps were not launched")
def test_one_instance(self):
def test_one_instance_m(self):
self._test_one_instance(PREFERED_APP, 'm')
def test_one_instance_qml(self):
@ -229,7 +205,7 @@ class launcher_tests (unittest.TestCase):
self.assert_( len(process_id.split(' ')) == 1, "Only one instance of app not running")
def test_launch_multiple_apps_cont(self):
def test_launch_multiple_apps_cont_m(self):
self._test_launch_multiple_apps_cont(LAUNCHABLE_APPS, 'fala_ft_hello', 'm')
def test_launch_multiple_apps_cont_qml(self):
@ -253,128 +229,10 @@ class launcher_tests (unittest.TestCase):
process_id = get_pid(app_common_prefix)
pid_list = process_id.split()
self.assert_(len(pid_list) == len(launchable_apps), "All Applications were not launched using launcher")
for pid in pid_list:
kill_process(apppid=pid)
def test_wait_term(self):
self._test_wait_term('/usr/bin/fala_ft_hello', 'fala_ft_hello', 'm')
def test_wait_term_qml(self):
self._test_wait_term('/usr/bin/fala_qml_helloworld', 'fala_qml_helloworld', 'd')
def test_wait_term_e(self):
self._test_wait_term('/usr/bin/fala_ft_hello', 'fala_ft_hello', 'e')
def _test_wait_term(self, app_path, app_name, btype):
"""
When calling invoker with --wait-term and killing invoker,
the launched application should die too.
"""
# Launch the app with invoker using --wait-term
p = run_app_as_user_with_invoker(app_path,booster = btype, arg = '--wait-term' )
time.sleep(2)
# Retrieve their pids
invoker_pid = wait_for_app('invoker')
app_pid = wait_for_app(app_name)
# Make sure that both apps started
self.assert_(invoker_pid != None, "invoker not executed?")
self.assert_(app_pid != None, "%s not launched by invoker?" % app_path)
# Send SIGTERM to invoker, the launched app should die
debug(" Send SIGTERM to invoker, the launched app should die")
kill_process(None, invoker_pid, 15)
time.sleep(2)
# This should be None
app_pid2 = get_pid(app_name)
self.assert_(app_pid2 == None, "%s was not killed" % app_path)
def test_daemon(self):
"""
Test that the --daemon parameter works for applauncherd
"""
stop_applauncherd()
remove_applauncherd_runtime_files()
p = run_cmd_as_user('/usr/bin/applauncherd.bin --daemon')
time.sleep(5)
st, op = commands.getstatusoutput('pgrep -lf "applauncherd.bin --daemon"')
p_id = op.split(" ")[0]
debug("The pid of applauncherd --daemon is %s" %op)
# filter some cruft out from the output and see how many
# instances are running
op = filter(lambda x: x.find("sh ") == -1, op.split("\n"))
count = len(op)
debug("count = %d" % count)
self.assert_(count == 1, "applauncherd was not daemonized (or too many instances running ..)")
# try to launch an app
run_cmd_as_user('/usr/bin/fala_ft_hello')
time.sleep(2)
pid = wait_for_app('fala_ft_hello')
if pid != None:
kill_process(apppid = pid)
else:
self.assert_(False, "fala_ft_hello was not launched!")
# only the daemonized applauncherd should be running now
kill_process(apppid = p_id)
#commands.getstatusoutput('pkill applauncherd')
remove_applauncherd_runtime_files()
start_applauncherd()
def test_invoker_delay(self):
"""
Test the --delay parameter of the invoker.
"""
# launch an app with invoker --delay n
debug("launching fala_ft_hello ...")
p = Popen(['/usr/bin/invoker', '--delay', '10', '--type=m', '--no-wait',
'/usr/bin/fala_ft_hello'],
shell=False,
stdout=DEV_NULL, stderr=DEV_NULL)
# wait a little
debug("waiting ...")
time.sleep(5)
success = True
if p.poll() == None:
debug("NOT DEAD")
else:
debug("DEAD")
success = False
debug("waiting for invoker to terminate ...")
p.wait()
debug("terminating fala_ft_hello ...")
Popen(['pkill', 'fala_ft_hello']).wait()
self.assert_(success, "invoker terminated before delay elapsed")
self.assert_(len(pid_list) == len(launchable_apps), "All Applications were not launched using launcher")
def test_fd_booster_m(self):
@ -452,197 +310,6 @@ class launcher_tests (unittest.TestCase):
self.assert_(epid_new != None, "No booster process running")
self.assert_(epid_new != epid, "booster process was not killed")
def test_invoker_exit_status(self):
"""
To test that invoker returns the same exit status as the application
"""
#Run application without invoker and get the exit status
debug("Run application without invoker and get the exit status")
st, op = commands.getstatusoutput('/usr/bin/fala_status')
app_st_wo_inv = os.WEXITSTATUS(st)
debug("The exit status of app without invoker is : %d" %app_st_wo_inv)
#Run application with invoker and get the exit status - booster-m case
debug("Run application with invoker and get the exit status")
st, op = commands.getstatusoutput('invoker --type=m --wait-term /usr/bin/fala_status')
app_st_w_inv = os.WEXITSTATUS(st)
debug("The exit status of app with invoker (booster-m) is : %d" %app_st_w_inv)
#Run application with invoker and get the exit status - booster-e case
debug("Run application with invoker and get the exit status")
st, op = commands.getstatusoutput('invoker --type=e --wait-term /usr/bin/fala_status')
app_st_we_inv = os.WEXITSTATUS(st)
debug("The exit status of app with invoker (booster-e) is : %d" %app_st_we_inv)
self.assert_(app_st_wo_inv == app_st_w_inv, "The invoker returns a wrong exit status for booster-m")
self.assert_(app_st_wo_inv == app_st_we_inv, "The invoker returns a wrong exit status for booster-e")
def test_invoker_gid_uid(self):
"""
To Test that the set gid and uid is passed from invoker process to launcher
"""
debug("This test uses a test application that returns the uid and gid and exits")
#get the id in user mode
debug("Get the system's uid and gid in User Mode \n")
st, op = commands.getstatusoutput('su user -c ' "id")
usr_id1 = op.split(' ')[0].split('(')[0]
grp_id1 = op.split(' ')[1].split('(')[0]
debug("System %s \tSyetem %s" %(usr_id1, grp_id1))
#get invokers's uid and gid by running the application using invoker in user mode
debug("get invoker's uid and gid by running the application using invoker in user mode")
app = "invoker --type=m --no-wait /usr/bin/fala_status"
st, op = commands.getstatusoutput('su user -c "%s"' %app );
usr_id = op.split('\n')[1]
grp_id = op.split('\n')[2]
debug("Invoker %s \tInvoker %s" %(usr_id, grp_id))
#get application's uid and gid by running the application without invoker in user mode
debug("get application's uid and gid by running the application without invoker in user mode")
app = "/usr/bin/fala_status"
st, op = commands.getstatusoutput('su user -c "%s"' %app );
usr_id2 = op.split('\n')[-2]
grp_id2 = op.split('\n')[-1]
debug("Application %s \tApplication %s" %(usr_id2, grp_id2))
self.assert_(usr_id == usr_id1, "The correct UID is not passed by invoker")
self.assert_(grp_id == grp_id1, "The correct GID is not passed by invoker")
self.assert_(usr_id == usr_id2, "The correct UID is not passed by invoker")
self.assert_(grp_id == grp_id2, "The correct GID is not passed by invoker")
#get the id in root mode
debug("Get the Sysem's uid and gid in Root Mode \n")
st, op = commands.getstatusoutput("id")
usr_id1 = op.split(' ')[0].split('(')[0]
grp_id1 = op.split(' ')[1].split('(')[0]
debug("System %s \tSyetem %s" %(usr_id1, grp_id1))
#get id by running the application using invoker in root mode
debug("get invoker's uid and gid by running the application using invoker in root mode")
app = "invoker --type=m --no-wait /usr/bin/fala_status"
st, op = commands.getstatusoutput("%s" %app );
usr_id = op.split('\n')[1]
grp_id = op.split('\n')[2]
debug("Invoker %s \tInvoker %s" %(usr_id, grp_id))
#get id by running the application without invoker in root mode
debug("get application's uid and gid by running the application without invoker in root mode")
app = "/usr/bin/fala_status"
st, op = commands.getstatusoutput("%s" %app );
usr_id2 = op.split('\n')[-2]
grp_id2 = op.split('\n')[-1]
debug("Application %s \tApplication %s" %(usr_id2, grp_id2))
self.assert_(usr_id == usr_id1, "The correct UID is not passed by invoker")
self.assert_(grp_id == grp_id1, "The correct GID is not passed by invoker")
self.assert_(usr_id == usr_id2, "The correct UID is not passed by invoker")
self.assert_(grp_id == grp_id2, "The correct GID is not passed by invoker")
def test_signal_forwarding(self):
"""
To test that invoker is killed by the same signal as the application
"""
#Test for m-booster
debug("Test for m-booster")
st, op = commands.getstatusoutput("/usr/share/applauncherd-testscripts/signal-forward/fala_sf_m.py")
time.sleep(3)
debug("The Invoker killed by : <%s>" %op.split ('\n')[-1])
self.assert_(op.split('\n')[-1].startswith('Segmentation fault') == True, "The invoker(m-booster) was not killed by the same signal")
time.sleep(2)
#Test for d-booster
debug("Test for d-booster")
st, op = commands.getstatusoutput("/usr/share/applauncherd-testscripts/signal-forward/fala_sf_d.py")
time.sleep(3)
debug("The Invoker killed by : %s" % op.split('\n')[-1])
self.assert_(op.split('\n')[-1].startswith('Terminated') == True, "The invoker(d-booster) was not killed by the same signal")
time.sleep(2)
#Test for e-booster
debug("Test for e-booster")
st, op = commands.getstatusoutput("/usr/share/applauncherd-testscripts/signal-forward/fala_sf_e.py")
time.sleep(3)
debug("The Invoker killed by : %s" % op.split('\n')[-1])
self.assert_(op.split('\n')[-1].startswith('Terminated') == True, "The invoker(e-booster) was not killed by the same signal")
time.sleep(2)
#This case is launching the application in user mode
#Test for q-booster
debug("Test for q-booster")
st, op = commands.getstatusoutput("/usr/share/applauncherd-testscripts/signal-forward/fala_sf_qt.py")
time.sleep(3)
debug("The Invoker killed by : %s" %op.split('\n')[-1])
self.assert_(op.split('\n')[-1].startswith('Aborted') == True, "The invoker(q-booster) was not killed by the same signal")
time.sleep(2)
def test_launch_wo_applauncherd(self):
"""
To Test that invoker can launch applications when the
applauncherd is not running. Try launching applications with
all boosters
"""
stop_applauncherd()
if get_pid(PREFERED_APP) != None:
kill_process(PREFERED_APP)
p = run_app_as_user_with_invoker(PREFERED_APP, booster = 'm')
pid1 = wait_for_app(PREFERED_APP)
self.assert_(pid1 != None, "Application was executed")
kill_process(PREFERED_APP)
p = run_app_as_user_with_invoker(PREFERED_APP, booster = 'e')
pid1 = wait_for_app(PREFERED_APP)
self.assert_(pid1 != None, "Application was executed")
kill_process(PREFERED_APP)
p = run_app_as_user_with_invoker(PREFERED_APP, booster = 'q')
pid1 = wait_for_app(PREFERED_APP)
self.assert_(pid1 != None, "Application was executed")
kill_process(PREFERED_APP)
p = run_app_as_user_with_invoker(PREFERED_APP, booster = 'd')
pid1 = wait_for_app(PREFERED_APP)
self.assert_(pid1 != None, "Application was executed")
kill_process(PREFERED_APP)
start_applauncherd()
def test_invoker_search_prog(self):
"""
Test that invoker can find programs from directories listed in
PATH environment variable and that it doesn't find something
that isn't there.
"""
# invoker searches PATH for the executable
p = run_app_as_user_with_invoker(PREFERED_APP, booster = 'm', arg = '--no-wait')
self.assert_(p.wait() == 0, "Couldn't launch fala_ft_hello")
time.sleep(2)
kill_process('fala_ft_hello')
# launch with relative path
p = run_cmd_as_user('cd /usr/share/; invoker --type=m --no-wait ' +
"../bin/fala_ft_hello")
self.assert_(p.wait() == 0, "Couldnt launch fala_ft_hello" +
" with relative path")
time.sleep(2)
kill_process('fala_ft_hello')
# and finally, try to launch something that doesn't exist
p = run_cmd_as_user('invoker --type=m --no-wait spam_cake')
self.assert_(p.wait() != 127, "Found spam_cakefor some reason")
time.sleep(2)
kill_process('spam_cake')
def test_booster_killed_or_restarted(self):
"""
Test that boosters are killed if applauncherd is stopped
@ -739,34 +406,6 @@ class launcher_tests (unittest.TestCase):
self.assert_(epid_new != None, "No booster process running")
self.assert_(epid_new != epid, "booster process was not killed")
def test_invoker_param_creds(self):
p = run_cmd_as_user('invoker --creds')
self.assert_(p.wait() == 0, "'invoker --creds' failed")
def test_invoker_param_respawn_delay(self):
p = run_cmd_as_user('invoker --respawn 10 --type=q --no-wait fala_ft_hello')
time.sleep(7)
pid = get_pid('booster-q')
self.assert_(pid == None, "'booster-q' was respawned too soon")
time.sleep(7)
pid = get_pid('booster-q')
self.assert_(pid != None, "'booster-q' was not respawned in time")
p = run_cmd_as_user('invoker --respawn 256 --type=q --no-wait fala_ft_hello')
self.assert_(p.wait() != 0, "invoker didn't die with too big respawn delay")
kill_process('fala_ft_hello')
def test_invoker_bogus_apptype(self):
p = run_cmd_as_user('invoker --type=foobar fala_ft_hello')
self.assert_(p.wait() != 0, "invoker didn't die with bogus apptype")
p = run_cmd_as_user('invoker fala_ft_hello')
self.assert_(p.wait() != 0, "invoker didn't die with empty apptype")
def test_booster_pid_change(self):
"""
Test that application pid changes to the booster 'x' when application
@ -791,11 +430,11 @@ class launcher_tests (unittest.TestCase):
time.sleep(4)
app_pid = get_pid('fala_qml_helloworld')
dpid_new = get_pid('booster-d')
kill_process('fala_qml_helloworld')
self.assert_(app_pid != None, "Application is not running")
self.assert_(app_pid == dpid, "Application is not assigned the booster-d pid")
self.assert_(dpid_new != None, "No booster process running")
self.assert_(dpid_new != dpid, "booster-d process did not receive the new pid")
kill_process('fala_qml_helloworld')
#Launching application with booster-e
epid = get_pid('booster-e')
@ -803,11 +442,11 @@ class launcher_tests (unittest.TestCase):
time.sleep(4)
app_pid = get_pid('fala_ft_hello')
epid_new = get_pid('booster-e')
kill_process('fala_ft_hello')
self.assert_(app_pid != None, "Application is not running")
self.assert_(app_pid == epid, "Application is not assigned the booster-e pid")
self.assert_(epid_new != None, "No booster process running")
self.assert_(epid_new != epid, "booster-e process did not receive the new pid")
kill_process('fala_ft_hello')
#Launching application with booster-q
qpid = get_pid('booster-q')
@ -815,11 +454,11 @@ class launcher_tests (unittest.TestCase):
time.sleep(4)
app_pid = get_pid('fala_ft_hello')
qpid_new = get_pid('booster-q')
kill_process('fala_ft_hello')
self.assert_(app_pid != None, "Application is not running")
self.assert_(app_pid == qpid, "Application is not assigned the booster-q pid")
self.assert_(qpid_new != None, "No booster process running")
self.assert_(qpid_new != qpid, "booster-q process did not receive the new pid")
kill_process('fala_ft_hello')
def test_stress_boosted_apps(self):
@ -852,10 +491,10 @@ class launcher_tests (unittest.TestCase):
time.sleep(3)
debug("Sleeping for 3 secs")
app_pid = get_pid(app_name)
kill_process(app_name)
self.assert_(pid == app_pid, "Same instance of application not running")
st, op = commands.getstatusoutput('ps ax | grep invoker | grep %s| grep -v -- -sh | wc -l' % app_name)
count = int(op)
kill_process(app_name)
def test_launched_app_name(self):
"""
@ -872,8 +511,8 @@ class launcher_tests (unittest.TestCase):
#check through the window property
st, op = commands.getstatusoutput("xwininfo -root -tree| awk '/Applauncherd testapp/ {print $1}'")
st, op1 = commands.getstatusoutput("xprop -id %s | awk '/WM_COMMAND/{print $4}'" %op)
self.assert_(op1.split(",")[0] == '"fala_wl"','Application name is incorrect')
kill_process('fala_wl')
self.assert_(op1.split(",")[0] == '"fala_wl"','Application name is incorrect')
#For booster-d
#Check though the process list
@ -886,8 +525,8 @@ class launcher_tests (unittest.TestCase):
#check through the window property
st, op = commands.getstatusoutput("xwininfo -root -tree| awk '/Applauncherd QML testapp/ {print $1}'")
st, op1 = commands.getstatusoutput("xprop -id %s | awk '/WM_COMMAND/{print $4}'" %op)
self.assert_(op1.split(",")[0] == '"fala_qml_helloworld"','Application name is incorrect')
kill_process('fala_qml_helloworld')
self.assert_(op1.split(",")[0] == '"fala_qml_helloworld"','Application name is incorrect')
#For booster-e
#Check though the process list
@ -900,8 +539,8 @@ class launcher_tests (unittest.TestCase):
#check through the window property
st, op = commands.getstatusoutput("xwininfo -root -tree| awk '/Applauncherd testapp/ {print $1}'")
st, op1 = commands.getstatusoutput("xprop -id %s | awk '/WM_COMMAND/{print $4}'" %op)
self.assert_(op1.split(",")[0] == '"fala_wl"','Application name is incorrect')
kill_process('fala_wl')
self.assert_(op1.split(",")[0] == '"fala_wl"','Application name is incorrect')
#For booster-q
#Check though the process list
@ -914,45 +553,10 @@ class launcher_tests (unittest.TestCase):
#check through the window property
st, op = commands.getstatusoutput("xwininfo -root -tree| awk '/Applauncherd testapp/ {print $1}'")
st, op1 = commands.getstatusoutput("xprop -id %s | awk '/WM_COMMAND/{print $4}'" %op)
self.assert_(op1.split(",")[0] == '"fala_wl"','Application name is incorrect')
kill_process('fala_wl')
self.assert_(op1.split(",")[0] == '"fala_wl"','Application name is incorrect')
def test_oom_adj_zero(self):
"""
Test that oom.adj is 0 for launched application process
"""
p = run_app_as_user_with_invoker(PREFERED_APP, booster = 'm')
time.sleep(2)
pid = get_pid(PREFERED_APP)
st, op = commands.getstatusoutput('cat /proc/%s/oom_adj' %pid)
self.assert_(op == '0',"oom.adj of the launched process is not 0")
kill_process(PREFERED_APP)
def test_oom_adj_minus_one(self):
"""
Test that oom.adj is -1 for launched application process when using
invokers -o param
"""
p = run_app_as_user_with_invoker(PREFERED_APP, booster = 'm',
arg = '-o')
time.sleep(2)
pid = get_pid(PREFERED_APP)
st, op = commands.getstatusoutput('cat /proc/%s/oom_adj' % pid)
self.assert_(op == '-2', "oom.adj of the launched process is not -1")
kill_process(PREFERED_APP)
def test_invoker_usage_printing(self):
"""
Test that applauncherd invoker --help usage printing ok
"""
p = run_cmd_as_user('invoker --help')
self.assert_(p.wait() == 0, "'invoker --help' failed")
def test_unix_signal_handlers(self):
"""
@ -972,28 +576,19 @@ class launcher_tests (unittest.TestCase):
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
"""
def test_qttas_load_booster_d(self):
self._test_qttas_load_booster(PREFERED_APP_QML, 'd')
pid = get_pid('applauncherd')
st, op = commands.getstatusoutput("grep wx /proc/%s/smaps" %pid)
debug("The value of status is %d" %st)
debug("The value of output is %s" %op)
self.assert_(st != 0, "applauncherd has writable and executable memory")
def test_qttas_load_booster_m(self):
self._test_qttas_load_booster(PREFERED_APP, 'm')
def test_qttas_load_booster_d(self):
def _test_qttas_load_booster(self, testapp, btype):
"""
To test invoker that qttestability plugin is loaded with -testability argument for booster-d
"""
for i in range(2):
debug("Running cycle %s" %i)
testapp = PREFERED_APP_QML
p = run_app_as_user_with_invoker("%s -testability" %testapp, booster = 'd')
p = run_app_as_user_with_invoker("%s -testability" %testapp, booster = btype)
time.sleep(2)
pid = get_pid(testapp)
@ -1014,43 +609,20 @@ class launcher_tests (unittest.TestCase):
time.sleep(2)
def test_qttas_load_booster_m(self):
"""
To test invoker that qttestability plugin is loaded with -testability argument for booster-m
"""
for i in range(2):
debug("Running cycle %s" %i)
testapp = PREFERED_APP
p = run_app_as_user_with_invoker("%s -testability" %testapp, booster = 'm')
time.sleep(2)
pid = get_pid(testapp)
self.assert_(pid != None, "Can't start application %s" %testapp)
st_tas, op_tas = commands.getstatusoutput("grep -c libtestability.so /proc/%s/maps" %pid)
debug("The value of status is %d" %st_tas)
debug("The value of output is %s" %op_tas)
st_tas_plug, op_tas_plug = commands.getstatusoutput("grep -c libqttestability.so /proc/%s/maps" %pid)
debug("The value of status is %d" %st_tas_plug)
debug("The value of output is %s" %op_tas_plug)
kill_process(apppid=pid)
self.assert_(st_tas == 0,"libtestability.so not loaded")
self.assert_(st_tas_plug == 0,"libqttestability.so not loaded")
def test_qttas_load_env_booster_d(self):
self._test_qttas_load_env_booster(PREFERED_APP_QML, 'd')
time.sleep(2)
def test_qttas_load_env_booster_m(self):
self._test_qttas_load_env_booster(PREFERED_APP, 'm')
def test_qttas_load_env_booster_d(self):
def _test_qttas_load_env_booster(self, testapp, btype):
"""
To test invoker that qttestability plugin is loaded with QT_LOAD_TESTABILITY env variable for booster-d
"""
for i in range(2):
debug("Running cycle %s" %i)
testapp = PREFERED_APP_QML
cmd = ['su', '-', 'user', '-c']
invoke="export QT_LOAD_TESTABILITY=1; /usr/bin/invoker --type=d %s" %testapp
invoke="export QT_LOAD_TESTABILITY=1; /usr/bin/invoker --type=%s %s" %(btype, testapp)
cmd.append(invoke)
p = subprocess.Popen(cmd, shell = False, stdout = DEV_NULL, stderr = DEV_NULL)
@ -1076,39 +648,6 @@ class launcher_tests (unittest.TestCase):
time.sleep(2)
def test_qttas_load_env_booster_m(self):
"""
To test invoker that qttestability plugin is loaded with QT_LOAD_TESTABILITY env variable for booster-m
"""
for i in range(2):
debug("Running cycle %s" %i)
testapp = PREFERED_APP
cmd = ['su', '-', 'user', '-c']
invoke="export QT_LOAD_TESTABILITY=1; /usr/bin/invoker --type=m %s" %testapp
cmd.append(invoke)
p = subprocess.Popen(cmd, shell = False, stdout = DEV_NULL, stderr = DEV_NULL)
time.sleep(2)
pid = get_pid(testapp)
self.assert_(pid != None, "Can't start application %s" %testapp)
st_tas, op_tas = commands.getstatusoutput("grep -c libtestability.so /proc/%s/maps" %pid)
debug("The value of status is %d" %st_tas)
debug("The value of output is %s" %op_tas)
st_tas_plug, op_tas_plug = commands.getstatusoutput("grep -c libqttestability.so /proc/%s/maps" %pid)
debug("The value of status is %d" %st_tas_plug)
debug("The value of output is %s" %op_tas_plug)
kill_process(apppid=pid)
self.assert_(st_tas == 0,"libtestability.so not loaded")
self.assert_(st_tas_plug == 0,"libqttestability.so not loaded")
time.sleep(2)
def test_dirPath_filePath_m(self):
self._test_dirPath_filePath('m', "/usr/share/fala_images", "fala_hello")
@ -1138,54 +677,9 @@ class launcher_tests (unittest.TestCase):
dirpath = op.split("\n")[0].split(" ")[2]
self.assert_(dirpath == path, "Wrong dirPath: %s" % dirpath)
filepath = op.split("\n")[1].split(" ")[2]
self.assert_(filepath == "%s/%s" % (path, testapp), "Wrong filePath: %s" % filepath)
kill_process(apppid=pid)
self.assert_(filepath == "%s/%s" % (path, testapp), "Wrong filePath: %s" % filepath)
def test_applauncherd_fd_close(self):
self._test_applauncherd_fd()
def test_applauncherd_fd_kill(self):
self._test_applauncherd_fd(False)
def _test_applauncherd_fd(self, close = True):
"""
To test that file descriptors are closed before calling application main
"""
#get fd of booster before launching application
debug("get fd of applauncherd before launching application")
pid = commands.getoutput("pgrep applauncherd")
init_count = commands.getoutput('ls -l /proc/%s/fd/ | wc -l' % str(pid))
debug("\nThe count of initial file descriptors is : %s\n" %init_count)
time.sleep(3)
#launch application using booster
debug("launch fala_wl using booster")
status = os.system('invoker --type=m /usr/bin/fala_wl &')
#get fd of booster after launching the application
debug("get fd of booster after launching the application")
if status == 0:
launch_count = commands.getoutput('ls -l /proc/%s/fd/ | wc -l' % str(pid))
debug("\nThe count of file descriptors after launch : %s\n" %launch_count)
time.sleep(3)
#Close application
if close:
st, wid = commands.getstatusoutput(\
"xwininfo -root -tree| awk '/Applauncherd testapp/ {print $1}'")
os.system("/usr/bin/xsendevent close %s" %wid)
else:
pid_app = commands.getoutput('pgrep fala_wl')
kill_process(apppid=pid_app)
time.sleep(3)
#get fd of booster after closing the application
debug("get fd of booster after closing the application")
close_count = commands.getoutput('ls -l /proc/%s/fd/ | wc -l' % str(pid))
debug("\nThe count file descriptors after close: %s\n" %close_count)
self.assert_(int(launch_count) == int(init_count) +1, "The file descriptors was not changed")
self.assert_(close_count == init_count, "The file descriptors was changed")
def test_argv_mbooster_limit(self):
self._test_argv_booster_limit("m", "fala_wl")
@ -1208,8 +702,8 @@ class launcher_tests (unittest.TestCase):
st, op = commands.getstatusoutput("grep argv: /tmp/%s.log | tail -2" % testapp)
original_argv = op.split("\n")[0]
cache_argv = op.split("\n")[1]
self.assert_(original_argv == cache_argv, "Wrong arguments passed.\nOriginal: %s\nCached: %s" % (original_argv, cache_argv))
kill_process(apppid=pid)
self.assert_(original_argv == cache_argv, "Wrong arguments passed.\nOriginal: %s\nCached: %s" % (original_argv, cache_argv))
def test_argv_mbooster_over_limit(self):
self._test_argv_booster_over_limit("m", "fala_wl")
@ -1230,6 +724,7 @@ class launcher_tests (unittest.TestCase):
p = run_cmd_as_user('invoker --type=%s /usr/bin/%s --log-args 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z' % (btype, testapp))
time.sleep(4)
pid = get_pid(testapp)
kill_process(apppid=pid)
self.assert_(pid != None, "The application was not launched")
debug("get arguments from log file")
st, op = commands.getstatusoutput("grep argv: /tmp/%s.log | tail -2" % testapp)
@ -1238,37 +733,57 @@ class launcher_tests (unittest.TestCase):
self.assert_(len(cache_argv) == ARGV_LIMIT, "Wrong number of arguments passed.\nOriginal: %s\nCached: %s" % (original_argv, cache_argv))
for i in range(ARGV_LIMIT):
self.assert_(original_argv[i] == cache_argv[i], "Wrong arguments passed.\nOriginal: %s\nCached: %s" % (original_argv, cache_argv))
kill_process(apppid=pid)
def test_daemon_second_instance(self):
def test_signal_status_m(self):
self._test_signal_status("fala_wl", "fala_wol")
def test_signal_status_qml(self):
self._test_signal_status("fala_qml_wl", "fala_qml_wol")
def _test_signal_status(self, app_wl, app_wol):
"""
Test that second instance of applauncherd cannot be started
Test that values of SigBlk, SigIgn and SigCgt in /proc/pid/status
is same for both boosted and non boosted applications
"""
daemon_pid = get_pid("applauncherd")
if daemon_pid == None:
start_applauncherd
daemon_pid = get_pid("applauncherd")
debug("start applauncherd again")
st, op = commands.getstatusoutput("initctl start xsession/applauncherd")
time.sleep(3)
daemon_pid_new = get_pid("applauncherd")
self.assert_(daemon_pid == daemon_pid_new, "New instance of applauncherd started")
self.assert_(st != 0, "Second instance of applauncherd started")
#Get status for non boosted apps
os.system("initctl restart xsession/mthome")
time.sleep(5)
st, op = commands.getstatusoutput("%s -a %s" %(GET_COORDINATE_SCRIPT, app_wol))
time.sleep(2)
pos = op.split("\n")[-1]
def test_nonlaunchable_apps(self):
"""
Test that Booster gives warning while trying to launch non launchable applications
Here fala_wid is a shell script and libebooster.so is a library
"""
st, op = commands.getstatusoutput("/usr/bin/invoker --type=m /usr/bin/fala_wid")
debug("The Warning is %s" %(op.split("\n")[0]))
pos = op.split("\n")[0].find("Booster: Loading invoked application failed:")
self.assert_(pos != -1, "The booster did not give warning")
os.system("%s -c %s -q" %(PIXELCHANHED_BINARY, pos))
time.sleep(2)
pid = get_pid(app_wol)
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(app_wol)
time.sleep(2)
#Get status for booster application
os.system("initctl restart xsession/mthome")
time.sleep(5)
st, op = commands.getstatusoutput("%s -a %s" %(GET_COORDINATE_SCRIPT, app_wl))
time.sleep(2)
pos = op.split("\n")[-1]
os.system("%s -c %s -q" %(PIXELCHANHED_BINARY, pos))
time.sleep(2)
pid = get_pid(app_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(app_wl)
time.sleep(2)
st, op = commands.getstatusoutput("/usr/bin/invoker --type=m /usr/lib/applauncherd/libebooster.so")
debug("The Warning is %s" %(op.split("\n")[0]))
pos = op.split("\n")[0].find("Booster: Loading symbol 'main' failed:")
self.assert_(pos != -1, "The booster did not give warning")
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")
def test_signal_status_m(self):
self._test_signal_status("fala_wl", "fala_wol")
@ -1330,7 +845,6 @@ if __name__ == '__main__':
using_scratchbox = True
check_prerequisites()
start_launcher_daemon()
tests = sys.argv[1:]
try:
mysuite = unittest.TestSuite(map(launcher_tests, tests))

@ -34,6 +34,11 @@ from os.path import basename
class InvokerTests(unittest.TestCase):
def setUp(self):
debug("setUp")
if daemons_running():
stop_daemons()
self.START_DAEMONS_AT_TEARDOWN = True
else:
self.START_DAEMONS_AT_TEARDOWN = False
if get_pid('applauncherd') == None:
start_applauncherd()
@ -43,8 +48,300 @@ class InvokerTests(unittest.TestCase):
start_applauncherd()
wait_for_single_applauncherd()
if self.START_DAEMONS_AT_TEARDOWN:
start_daemons()
#Testcases
def test_wait_term_m(self):
self._test_wait_term('/usr/bin/fala_ft_hello', 'fala_ft_hello', 'm')
def test_wait_term_qml(self):
self._test_wait_term('/usr/bin/fala_qml_helloworld', 'fala_qml_helloworld', 'd')
def test_wait_term_e(self):
self._test_wait_term('/usr/bin/fala_ft_hello', 'fala_ft_hello', 'e')
def _test_wait_term(self, app_path, app_name, btype):
"""
When calling invoker with --wait-term and killing invoker,
the launched application should die too.
"""
# Launch the app with invoker using --wait-term
p = run_app_as_user_with_invoker(app_path,booster = btype, arg = '--wait-term' )
time.sleep(4)
# Retrieve their pids
invoker_pid = wait_for_app('invoker')
app_pid = wait_for_app(app_name)
# Make sure that both apps started
self.assert_(invoker_pid != None, "invoker not executed?")
self.assert_(app_pid != None, "%s not launched by invoker?" % app_path)
# Send SIGTERM to invoker, the launched app should die
debug(" Send SIGTERM to invoker, the launched app should die")
kill_process(None, invoker_pid, 15)
time.sleep(4)
# This should be None
app_pid2 = get_pid(app_name)
self.assert_(app_pid2 == None, "%s was not killed" % app_path)
def test_launch_wo_applauncherd(self):
"""
To Test that invoker can launch applications when the
applauncherd is not running. Try launching applications with
all boosters
"""
stop_applauncherd()
if get_pid(PREFERED_APP) != None:
kill_process(PREFERED_APP)
p = run_app_as_user_with_invoker(PREFERED_APP, booster = 'm')
pid1 = wait_for_app(PREFERED_APP)
self.assert_(pid1 != None, "Application was executed")
kill_process(PREFERED_APP)
p = run_app_as_user_with_invoker(PREFERED_APP, booster = 'e')
pid1 = wait_for_app(PREFERED_APP)
self.assert_(pid1 != None, "Application was executed")
kill_process(PREFERED_APP)
p = run_app_as_user_with_invoker(PREFERED_APP, booster = 'q')
pid1 = wait_for_app(PREFERED_APP)
self.assert_(pid1 != None, "Application was executed")
kill_process(PREFERED_APP)
p = run_app_as_user_with_invoker(PREFERED_APP, booster = 'd')
pid1 = wait_for_app(PREFERED_APP)
self.assert_(pid1 != None, "Application was executed")
kill_process(PREFERED_APP)
start_applauncherd()
def test_signal_forwarding(self):
"""
To test that invoker is killed by the same signal as the application
"""
#Test for m-booster
debug("Test for m-booster")
st, op = commands.getstatusoutput("/usr/share/applauncherd-testscripts/signal-forward/fala_sf_m.py")
time.sleep(3)
debug("The Invoker killed by : <%s>" %op.split ('\n')[-1])
self.assert_(op.split('\n')[-1].startswith('Segmentation fault') == True, "The invoker(m-booster) was not killed by the same signal")
time.sleep(2)
#Test for d-booster
debug("Test for d-booster")
st, op = commands.getstatusoutput("/usr/share/applauncherd-testscripts/signal-forward/fala_sf_d.py")
time.sleep(3)
debug("The Invoker killed by : %s" % op.split('\n')[-1])
self.assert_(op.split('\n')[-1].startswith('Terminated') == True, "The invoker(d-booster) was not killed by the same signal")
time.sleep(2)
#Test for e-booster
debug("Test for e-booster")
st, op = commands.getstatusoutput("/usr/share/applauncherd-testscripts/signal-forward/fala_sf_e.py")
time.sleep(3)
debug("The Invoker killed by : %s" % op.split('\n')[-1])
self.assert_(op.split('\n')[-1].startswith('Terminated') == True, "The invoker(e-booster) was not killed by the same signal")
time.sleep(2)
#This case is launching the application in user mode
#Test for q-booster
debug("Test for q-booster")
st, op = commands.getstatusoutput("/usr/share/applauncherd-testscripts/signal-forward/fala_sf_qt.py")
time.sleep(3)
debug("The Invoker killed by : %s" %op.split('\n')[-1])
self.assert_(op.split('\n')[-1].startswith('Aborted') == True, "The invoker(q-booster) was not killed by the same signal")
time.sleep(2)
def test_invoker_delay(self):
"""
Test the --delay parameter of the invoker.
"""
# launch an app with invoker --delay n
debug("launching fala_ft_hello ...")
p = Popen(['/usr/bin/invoker', '--delay', '10', '--type=m', '--no-wait',
'/usr/bin/fala_ft_hello'],
shell=False,
stdout=DEV_NULL, stderr=DEV_NULL)
# wait a little
debug("waiting ...")
time.sleep(5)
success = True
if p.poll() == None:
debug("NOT DEAD")
else:
debug("DEAD")
success = False
debug("waiting for invoker to terminate ...")
p.wait()
debug("terminating fala_ft_hello ...")
Popen(['pkill', 'fala_ft_hello']).wait()
self.assert_(success, "invoker terminated before delay elapsed")
def test_invoker_exit_status(self):
"""
To test that invoker returns the same exit status as the application
"""
#Run application without invoker and get the exit status
debug("Run application without invoker and get the exit status")
st, op = commands.getstatusoutput('/usr/bin/fala_status')
app_st_wo_inv = os.WEXITSTATUS(st)
debug("The exit status of app without invoker is : %d" %app_st_wo_inv)
#Run application with invoker and get the exit status - booster-m case
debug("Run application with invoker and get the exit status")
st, op = commands.getstatusoutput('invoker --type=m --wait-term /usr/bin/fala_status')
app_st_w_inv = os.WEXITSTATUS(st)
debug("The exit status of app with invoker (booster-m) is : %d" %app_st_w_inv)
#Run application with invoker and get the exit status - booster-e case
debug("Run application with invoker and get the exit status")
st, op = commands.getstatusoutput('invoker --type=e --wait-term /usr/bin/fala_status')
app_st_we_inv = os.WEXITSTATUS(st)
debug("The exit status of app with invoker (booster-e) is : %d" %app_st_we_inv)
self.assert_(app_st_wo_inv == app_st_w_inv, "The invoker returns a wrong exit status for booster-m")
self.assert_(app_st_wo_inv == app_st_we_inv, "The invoker returns a wrong exit status for booster-e")
def test_invoker_search_prog(self):
"""
Test that invoker can find programs from directories listed in
PATH environment variable and that it doesn't find something
that isn't there.
"""
# invoker searches PATH for the executable
p = run_app_as_user_with_invoker(PREFERED_APP, booster = 'm', arg = '--no-wait')
self.assert_(p.wait() == 0, "Couldn't launch fala_ft_hello")
time.sleep(2)
kill_process('fala_ft_hello')
# launch with relative path
p = run_cmd_as_user('cd /usr/share/; invoker --type=m --no-wait ' +
"../bin/fala_ft_hello")
self.assert_(p.wait() == 0, "Couldnt launch fala_ft_hello" +
" with relative path")
time.sleep(2)
kill_process('fala_ft_hello')
# and finally, try to launch something that doesn't exist
p = run_cmd_as_user('invoker --type=m --no-wait spam_cake')
self.assert_(p.wait() != 127, "Found spam_cakefor some reason")
time.sleep(2)
kill_process('spam_cake')
def test_invoker_gid_uid(self):
"""
To Test that the set gid and uid is passed from invoker process to launcher
"""
debug("This test uses a test application that returns the uid and gid and exits")
#get the id in user mode
debug("Get the system's uid and gid in User Mode \n")
st, op = commands.getstatusoutput('su user -c ' "id")
usr_id1 = op.split(' ')[0].split('(')[0]
grp_id1 = op.split(' ')[1].split('(')[0]
debug("System %s \tSyetem %s" %(usr_id1, grp_id1))
#get invokers's uid and gid by running the application using invoker in user mode
debug("get invoker's uid and gid by running the application using invoker in user mode")
app = "invoker --type=m --no-wait /usr/bin/fala_status"
st, op = commands.getstatusoutput('su user -c "%s"' %app );
usr_id = op.split('\n')[1]
grp_id = op.split('\n')[2]
debug("Invoker %s \tInvoker %s" %(usr_id, grp_id))
#get application's uid and gid by running the application without invoker in user mode
debug("get application's uid and gid by running the application without invoker in user mode")
app = "/usr/bin/fala_status"
st, op = commands.getstatusoutput('su user -c "%s"' %app );
usr_id2 = op.split('\n')[-2]
grp_id2 = op.split('\n')[-1]
debug("Application %s \tApplication %s" %(usr_id2, grp_id2))
self.assert_(usr_id == usr_id1, "The correct UID is not passed by invoker")
self.assert_(grp_id == grp_id1, "The correct GID is not passed by invoker")
self.assert_(usr_id == usr_id2, "The correct UID is not passed by invoker")
self.assert_(grp_id == grp_id2, "The correct GID is not passed by invoker")
#get the id in root mode
debug("Get the Sysem's uid and gid in Root Mode \n")
st, op = commands.getstatusoutput("id")
usr_id1 = op.split(' ')[0].split('(')[0]
grp_id1 = op.split(' ')[1].split('(')[0]
debug("System %s \tSyetem %s" %(usr_id1, grp_id1))
#get id by running the application using invoker in root mode
debug("get invoker's uid and gid by running the application using invoker in root mode")
app = "invoker --type=m --no-wait /usr/bin/fala_status"
st, op = commands.getstatusoutput("%s" %app );
usr_id = op.split('\n')[1]
grp_id = op.split('\n')[2]
debug("Invoker %s \tInvoker %s" %(usr_id, grp_id))
#get id by running the application without invoker in root mode
debug("get application's uid and gid by running the application without invoker in root mode")
app = "/usr/bin/fala_status"
st, op = commands.getstatusoutput("%s" %app );
usr_id2 = op.split('\n')[-2]
grp_id2 = op.split('\n')[-1]
debug("Application %s \tApplication %s" %(usr_id2, grp_id2))
self.assert_(usr_id == usr_id1, "The correct UID is not passed by invoker")
self.assert_(grp_id == grp_id1, "The correct GID is not passed by invoker")
self.assert_(usr_id == usr_id2, "The correct UID is not passed by invoker")
self.assert_(grp_id == grp_id2, "The correct GID is not passed by invoker")
def test_invoker_param_creds(self):
p = run_cmd_as_user('invoker --creds')
self.assert_(p.wait() == 0, "'invoker --creds' failed")
def test_invoker_param_respawn_delay(self):
p = run_cmd_as_user('invoker --respawn 10 --type=q --no-wait fala_ft_hello')
time.sleep(7)
pid = get_pid('booster-q')
self.assert_(pid == None, "'booster-q' was respawned too soon")
time.sleep(7)
pid = get_pid('booster-q')
self.assert_(pid != None, "'booster-q' was not respawned in time")
p = run_cmd_as_user('invoker --respawn 256 --type=q --no-wait fala_ft_hello')
self.assert_(p.wait() != 0, "invoker didn't die with too big respawn delay")
kill_process('fala_ft_hello')
def test_invoker_bogus_apptype(self):
p = run_cmd_as_user('invoker --type=foobar fala_ft_hello')
self.assert_(p.wait() != 0, "invoker didn't die with bogus apptype")
p = run_cmd_as_user('invoker fala_ft_hello')
self.assert_(p.wait() != 0, "invoker didn't die with empty apptype")
def test_invoker_signal_forward(self):
"""
Test that UNIX signals are forwarded from
@ -98,6 +395,14 @@ class InvokerTests(unittest.TestCase):
os.system("rm /usr/bin/invoker_link")
self.assert_(st != 0,"The application was launched")
def test_invoker_usage_printing(self):
"""
Test that applauncherd invoker --help usage printing ok
"""
p = run_cmd_as_user('invoker --help')
self.assert_(p.wait() == 0, "'invoker --help' failed")
def test_app_link(self):
"""
Test that symlink of an application can be launched.
@ -190,6 +495,24 @@ class InvokerTests(unittest.TestCase):
kill_process("fala_wl")
self.assert_(pid != None ,"The application was not launched")
def test_oom_adj_minus_two(self):
"""
Test that oom.adj is -2 for launched application process when using
invokers -o param
"""
p = run_app_as_user_with_invoker(PREFERED_APP, booster = 'm',
arg = '-o')
time.sleep(4)
pid = get_pid(PREFERED_APP)
st, op = commands.getstatusoutput('cat /proc/%s/oom_adj' % pid)
self.assert_(op == '-2', "oom.adj of the launched process is not -1")
kill_process(PREFERED_APP)
# main

@ -9,6 +9,14 @@ from os.path import basename
DEV_NULL = file("/dev/null","w")
DAEMONS_TO_BE_STOPPED = ['xsession/applifed', 'xsession/conndlgs']
LAUNCHER_BINARY='/usr/bin/applauncherd'
DEV_NULL = file("/dev/null","w")
LAUNCHABLE_APPS = ['/usr/bin/fala_ft_hello','/usr/bin/fala_ft_hello1', '/usr/bin/fala_ft_hello2']
LAUNCHABLE_APPS_QML = ['/usr/bin/fala_qml_helloworld','/usr/bin/fala_qml_helloworld1', '/usr/bin/fala_qml_helloworld2']
PREFERED_APP = '/usr/bin/fala_ft_hello'
PREFERED_APP_QML = '/usr/bin/fala_qml_helloworld'
GET_COORDINATE_SCRIPT = '/usr/share/applauncherd-testscripts/get-coordinates.rb'
PIXELCHANHED_BINARY = '/usr/bin/fala_pixelchanged'
# Function to stop desired daemons. This is also done in setup function
# if stop_daemons is not called before.
@ -283,7 +291,7 @@ def get_file_descriptor(booster, type, app_name):
#launch application using booster
debug("launch %s using booster" % app_name)
st = os.system('invoker --type=%s --no-wait /usr/bin/%s' % (type, app_name))
time.sleep(2)
time.sleep(4)
#get fd of booster after launching the application
debug("get fd of booster after launching the application")
@ -305,7 +313,7 @@ def get_file_descriptor(booster, type, app_name):
count = count + 1
except KeyError:
print "some key in init is not in final"
time.sleep(2)
time.sleep(4)
debug("The number of changed file descriptors %d" %count)
kill_process(apppid=pid)
return count

Loading…
Cancel
Save