X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Fregression%2Ftools%2Fnotification%2Ftest_notification_multi_app;h=dae482ce3e5d19b4605d4d84fbbd9b9f05d0bd9d;hp=51d94e4fa9a4761ed002e3cb87995e4ffd886ddd;hb=8166571605074ec793777b210d212ca208554708;hpb=3be453c9ec6469235f0dc6cdaec9d55f0a6ee517 diff --git a/tests/regression/tools/notification/test_notification_multi_app b/tests/regression/tools/notification/test_notification_multi_app index 51d94e4fa..dae482ce3 100755 --- a/tests/regression/tools/notification/test_notification_multi_app +++ b/tests/regression/tools/notification/test_notification_multi_app @@ -1,19 +1,8 @@ #!/bin/bash # -# Copyright (C) - 2017 Jonathan Rajotte > +# Copyright (C) 2017 Jonathan Rajotte > # -# This library is free software; you can redistribute it and/or modify it under -# the terms of the GNU Lesser General Public License as published by the Free -# Software Foundation; version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more -# details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this library; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# SPDX-License-Identifier: LGPL-2.1-only TEST_DESC="Notification" @@ -54,7 +43,7 @@ print_test_banner "$TEST_DESC" app_pids=() -function kernel_event_generator_toogle_state +function kernel_event_generator_toggle_state { kernel_event_generator_suspended=$((kernel_event_generator_suspended==0)) @@ -63,7 +52,7 @@ function kernel_event_generator { state_file=$1 kernel_event_generator_suspended=0 - trap kernel_event_generator_toogle_state SIGUSR1 + trap kernel_event_generator_toggle_state SIGUSR1 while (true); do if [[ $kernel_event_generator_suspended -eq "1" ]]; then @@ -78,7 +67,7 @@ function kernel_event_generator done } -function ust_event_generator_toogle_state +function ust_event_generator_toggle_state { ust_event_generator_suspended=$((ust_event_generator_suspended==0)) @@ -87,7 +76,7 @@ function ust_event_generator { state_file=$1 ust_event_generator_suspended=0 - trap ust_event_generator_toogle_state SIGUSR1 + trap ust_event_generator_toggle_state SIGUSR1 trap "exit" SIGTERM SIGINT while (true); do if [[ $ust_event_generator_suspended -eq "1" ]]; then @@ -97,7 +86,7 @@ function ust_event_generator if [[ -f $state_file ]]; then rm $state_file 2> /dev/null fi - taskset -c 0 $TESTAPP_BIN $NR_ITER $NR_USEC_WAIT > /dev/null 2>&1 + taskset -c 0 $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT > /dev/null 2>&1 fi done } @@ -297,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 @@ -305,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 () @@ -453,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 @@ -465,6 +454,7 @@ function test_on_register_evaluation () rm -rf "${pipe}" done + rm -rf "$output_dir" } @@ -474,6 +464,7 @@ TESTS=( ) if [ "$(id -u)" == "0" ]; then + validate_lttng_modules_present TESTS+=( test_multi_app_kernel test_on_register_evaluation_kernel