Fix: Tests that assume CPU 0 is present
[lttng-tools.git] / tests / regression / tools / notification / test_notification_multi_app
index cfecd26c3dc80912c1a90a6f83f62c6107c003f5..1e94f44416d32815cea771ee03a30d978c481b98 100755 (executable)
@@ -86,7 +86,7 @@ function ust_event_generator
                        if [[ -f $state_file ]]; then
                                rm $state_file 2> /dev/null
                        fi
-                       taskset  -c 0 $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT > /dev/null 2>&1
+                       taskset -c "$(get_any_available_cpu)" $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT > /dev/null 2>&1
                fi
        done
 }
@@ -286,7 +286,6 @@ function test_multi_app ()
                print_errors $output_dir "${high_output_file_pattern}"
        fi
 
-       rm -rf $output_dir
 
        destroy_lttng_session_ok $SESSION_NAME
        stop_lttng_sessiond
@@ -294,6 +293,8 @@ function test_multi_app ()
        for pipe in "${consumerd_pipe[@]}"; do
                rm -rf "${pipe}"
        done
+
+       rm -rf $output_dir
 }
 
 function test_multi_app_ust ()
@@ -324,7 +325,7 @@ function test_multi_app_kernel ()
        wait $generator_pid 2> /dev/null
        rm -rf ${TESTAPP_STATE_FILE} 2> /dev/null
 
-       rmmod lttng-test
+       modprobe --remove lttng-test
 }
 
 function test_on_register_evaluation_ust ()
@@ -359,7 +360,7 @@ function test_on_register_evaluation_kernel()
        wait $generator_pid 2> /dev/null
        rm -rf ${TESTAPP_STATE_FILE} 2> /dev/null
 
-       rmmod lttng-test
+       modprobe --remove lttng-test
 }
 
 function test_on_register_evaluation ()
@@ -442,7 +443,6 @@ function test_on_register_evaluation ()
                print_errors "${high_output_file_pattern}"
        fi
 
-       rm -rf $output_dir
 
        destroy_lttng_session_ok $SESSION_NAME
        stop_lttng_sessiond
@@ -454,6 +454,7 @@ function test_on_register_evaluation ()
                rm -rf "${pipe}"
        done
 
+       rm -rf "$output_dir"
 }
 
 
This page took 0.024502 seconds and 4 git commands to generate.