X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Fregression%2Ftools%2Fnotification%2Ftest_notification_kernel;h=990e8bc8da168edb1b71ae5717998f7fe3687ac6;hp=e7368df260e0bde0e5fbc97ca9dc147c85236232;hb=cb7237295335b181ac1959001e9e71aab7a19fdc;hpb=5da3fc8579a9f93ea4767729a107784bf2d034ae diff --git a/tests/regression/tools/notification/test_notification_kernel b/tests/regression/tools/notification/test_notification_kernel index e7368df26..990e8bc8d 100755 --- a/tests/regression/tools/notification/test_notification_kernel +++ b/tests/regression/tools/notification/test_notification_kernel @@ -1,19 +1,8 @@ #!/bin/bash # -# Copyright (C) - 2017 Jonathan Rajotte-Julien +# Copyright (C) 2017 Jonathan Rajotte-Julien # -# 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 CURDIR=$(dirname $0)/ TESTDIR=$CURDIR/../../../ @@ -46,7 +35,7 @@ NUM_TESTS=104 source $TESTDIR/utils/utils.sh -function kernel_event_generator_toogle_state +function kernel_event_generator_toggle_state { kernel_event_generator_suspended=$((kernel_event_generator_suspended==0)) @@ -55,8 +44,8 @@ function kernel_event_generator { state_file=$1 kernel_event_generator_suspended=0 - trap kernel_event_generator_toogle_state SIGUSR1 - trap "exit" SIGTERM SIGINT EXIT + trap kernel_event_generator_toggle_state SIGUSR1 + while (true); do if [[ $kernel_event_generator_suspended -eq "1" ]]; then touch $state_file