]> git.lttng.org Git - lttng-tools.git/commitdiff
tests: Disable tap for shell scripts that only invoke the test scripts
authorKienan Stewart <kstewart@efficios.com>
Thu, 13 Feb 2025 15:16:29 +0000 (10:16 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 21 Feb 2025 16:13:56 +0000 (16:13 +0000)
In successful test runs there is the following line in some cases

    # Looks like your test died before it could output anything

This happens due the test script's util.sh automatically "starting"
the TAP state; however, in these cases the actual tap output is
produced by other scripts or binaries.

Change-Id: Iad8f74b0fc1b0a998eba3171d7a2626cd3e86824
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
25 files changed:
tests/regression/tools/live/test_kernel
tests/regression/tools/live/test_ust
tests/regression/tools/live/test_ust_tracefile_count
tests/regression/tools/notification/test_notification_kernel_buffer_usage
tests/regression/tools/notification/test_notification_kernel_capture
tests/regression/tools/notification/test_notification_kernel_error
tests/regression/tools/notification/test_notification_kernel_instrumentation
tests/regression/tools/notification/test_notification_kernel_syscall
tests/regression/tools/notification/test_notification_kernel_userspace_probe
tests/regression/tools/notification/test_notification_ust_buffer_usage
tests/regression/tools/notification/test_notification_ust_capture
tests/regression/tools/notification/test_notification_ust_error
tests/regression/tools/notification/test_notification_ust_event_rule_condition_exclusion
tests/regression/tools/notification/test_rotation
tests/regression/tools/rotation/test_schedule_api
tests/regression/tools/trigger/hidden/test_hidden_trigger
tests/regression/tools/trigger/name/test_trigger_name_backwards_compat
tests/regression/ust/baddr-statedump/test_baddr-statedump
tests/regression/ust/daemon/test_daemon
tests/regression/ust/exit-fast/test_exit-fast
tests/regression/ust/fork/test_fork
tests/regression/ust/libc-wrapper/test_libc-wrapper
tests/regression/ust/linking/test_linking
tests/regression/ust/type-declarations/test_type_declarations
tests/regression/ust/ust-dl/test_ust-dl.in

index 2edba96cc1920d39141ffcc480f194ac8d3695be..1d364538256d4394c54586485f1ff39fc3fd65cb 100755 (executable)
@@ -46,6 +46,7 @@ check_skip_kernel_test &&
 }
 
 modprobe lttng-test
+tap_disable
 
 start_lttng_sessiond_notap
 start_lttng_relayd_notap "-o $TRACE_PATH"
index c3bf09345fd7c7a8167462900b564e4f3ac1487a..2ce711ce3ea828ad2e001954ac4f51246b3b20a5 100755 (executable)
@@ -26,6 +26,7 @@ DIR=$(readlink -f $TESTDIR)
 source $TESTDIR/utils/utils.sh
 
 echo "$TEST_DESC"
+tap_disable
 
 function setup_live_tracing()
 {
index 11c6e9431d3f0f579c38ec443cfbfe9588623b68..180133c088b9cd85f0ef8768e55751a47abfadbd 100755 (executable)
@@ -26,6 +26,7 @@ DIR=$(readlink -f $TESTDIR)
 source $TESTDIR/utils/utils.sh
 
 echo "$TEST_DESC"
+tap_disable
 
 function setup_live_tracing()
 {
index dcff9e61b730e58ae956c84e20960afebee0c300..4c2152a3b1ef88f8e3d189639c1b1059b3487c98 100755 (executable)
@@ -70,6 +70,8 @@ check_skip_kernel_test &&
        exit 0
 }
 
+tap_disable
+
 validate_lttng_modules_present
 
 modprobe lttng-test
index fa33b2540e9a49c6e0c4e9d217b759ce19fb32d8..e2d340f18a50ade57f0bee939cb9cb39850a7de5 100755 (executable)
@@ -38,6 +38,7 @@ check_skip_kernel_test &&
 }
 
 validate_lttng_modules_present
+tap_disable
 
 modprobe lttng-test
 
index 2efcb594947aaa487651da344714a3a7ff1f4fe2..40bb9c2d314bab5567764955275b60786b286688 100755 (executable)
@@ -37,6 +37,7 @@ check_skip_kernel_test &&
 }
 
 validate_lttng_modules_present
+tap_disable
 
 modprobe lttng-test
 
index 04545a17b76370e10702cb434fc07634709af65c..755ef280e9c2dd0abab46e430de37a611ea32737 100755 (executable)
@@ -35,6 +35,7 @@ check_skip_kernel_test &&
 }
 
 validate_lttng_modules_present
+tap_disable
 
 modprobe lttng-test
 
index ca4e893695905d21b87c0c0a97eb2614632e0485..c15e1cce6c7ccb3d21e7a037aad4d3b2936e5f54 100755 (executable)
@@ -38,6 +38,7 @@ check_skip_kernel_test &&
 }
 
 validate_lttng_modules_present
+tap_disable
 
 start_lttng_sessiond_notap
 
index f1e3e631147e551ff5721aebdd122800634f0dc0..21e8a0651e3859ff01ae470e9540a8212f4bb850 100755 (executable)
@@ -36,6 +36,7 @@ check_skip_kernel_test &&
 }
 
 validate_lttng_modules_present
+tap_disable
 
 start_lttng_sessiond_notap
 
index bd1c146de6d66afd6e1e533f8fe3f3ab94814f85..c64c988703f0cf106a9c7b7cf224728b0cc1065c 100755 (executable)
@@ -54,21 +54,34 @@ function test_buffer_usage_notification
 
        ust_event_generator "$GEN_UST_EVENTS_TESTAPP_BIN" "$TESTAPP_STATE_PATH" &
        APP_PID=$!
+       diag "Started generator pid $APP_PID"
 
+       while pgrep notification ; do
+               diag "WARNING: notification already running"
+               kill $(pgrep notification)
+               sleep 1
+       done
+       diag "$CURDIR/notification 2 LTTNG_DOMAIN_UST $APP_PID $TESTAPP_STATE_PATH $SESSION_NAME $CHANNEL_NAME ${consumerd_pipe[@]}"
        "$CURDIR/notification" 2 LTTNG_DOMAIN_UST $APP_PID "$TESTAPP_STATE_PATH" \
-               $SESSION_NAME $CHANNEL_NAME "${consumerd_pipe[@]}"
+                              $SESSION_NAME $CHANNEL_NAME "${consumerd_pipe[@]}"
 
        destroy_lttng_session_notap $SESSION_NAME
 
        # On ungraceful kill the app is cleaned up via the full_cleanup call
        # Suppress kill message
        kill -SIGUSR2 $APP_PID
+       diag "About to wait on PID $APP_PID"
        wait $APP_PID 2> /dev/null
+       diag "Wait done"
 
        # Just in case cleanup
        rm -rf "$TRACE_PATH"
+       diag "Test done"
 }
 
+# Avoid spurious messages about exiting before the test output anything on cleanup
+tap_disable
+
 LTTNG_SESSIOND_ENV_VARS="LTTNG_TESTPOINT_ENABLE=1 CONSUMER_PAUSE_PIPE_PATH=${TESTPOINT_PIPE_PATH} LD_PRELOAD=${TESTPOINT}"
 start_lttng_sessiond_notap
 
index bcd468e641f7f09214c01f0b6cb11160755e3f73..ef88d7685af7a45a0468f3c0a95916ea0a7fa584 100755 (executable)
@@ -31,6 +31,7 @@ function test_basic_error_path
        wait $APP_PID 2> /dev/null
 }
 
+tap_disable
 start_lttng_sessiond_notap
 
 test_basic_error_path
index fdfd880116cc77162884b2cea7ae6b52fd51d556..473461cedf37ad05499d367c9f256eba289f7103 100755 (executable)
@@ -31,6 +31,9 @@ function test_basic_error_path
        wait $APP_PID 2> /dev/null
 }
 
+# Avoid spurious tap messages from the shell runner
+tap_disable
+
 start_lttng_sessiond_notap
 
 test_basic_error_path
index 6a0cff4849623dbd4466a43e5e8635574e57c2e1..a84bb2fb22418ba1e4c833d8cc23a8df610a9a6b 100755 (executable)
@@ -30,6 +30,7 @@ function test_event_rule_condition_exclusion_notification
        wait $APP_PID 2> /dev/null
 }
 
+tap_disable
 start_lttng_sessiond_notap
 
 test_event_rule_condition_exclusion_notification
index 432919349a5538f728866b662c1ff0de44ebfc68..e033c772523193cd82f9e257e2abd2d6ae6736af 100755 (executable)
@@ -26,7 +26,9 @@ NR_USEC_WAIT=5
 DIR=$(readlink -f $TESTDIR)
 
 source $TESTDIR/utils/utils.sh
+
 start_lttng_sessiond_notap
+tap_disable
 
 create_lttng_session_notap $SESSION_NAME $SESSION_OUTPUT_PATH
 
index a9f99f21e92ea3d21dd8ac82ba4bd124e33d8348..89ea4850ffea6d87565e684cb1fd65c1f0c22b5a 100755 (executable)
@@ -17,6 +17,7 @@ source $TESTDIR/utils/utils.sh
 print_test_banner "$TEST_DESC"
 
 start_lttng_sessiond_notap
+tap_disable
 
 create_lttng_session_notap $SESSION_NAME $TRACE_PATH
 
index 13e9dc610d5baa88a00d9e29feb6d76b57e4758e..307d06f821bec520fc10796dfa4542d7984de7b1 100755 (executable)
@@ -18,6 +18,7 @@ HIDDEN_TRIGGER_BIN="$CURDIR/hidden_trigger"
 # MUST set TESTDIR before calling those functions
 
 start_lttng_sessiond_notap
+tap_disable
 
 $HIDDEN_TRIGGER_BIN "$TRACE_PATH"
 
index 0203368a0e934b5fe31c860227991dd8b7fb340c..0e79045d76f1e5794022cd346eae1a64cf09766c 100755 (executable)
@@ -17,6 +17,7 @@ TRIGGER_NAME_BIN="$CURDIR/trigger_name"
  # MUST set TESTDIR before calling those functions
 
 start_lttng_sessiond_notap
+tap_disable
 
 $TRIGGER_NAME_BIN
 
index 9ab5d9bf3e7d6f6f1f6855f19e6c214937321b0f..7848dfd5842af1fa6854dce3a37bfbf815f38ca3 100755 (executable)
@@ -9,6 +9,7 @@ TESTDIR=${CURDIR}/../../..
 
 source $TESTDIR/utils/utils.sh
 
+tap_disable
 start_lttng_sessiond_notap
 
 python3 ${CURDIR}/test_baddr-statedump.py
index 5c42e8cc97400eb6a8c533369424f8a74ddcad54..7b87cdb546b662cf9dc98af4e9162a0866a8f1d8 100755 (executable)
@@ -10,6 +10,7 @@ TESTDIR=${CURDIR}/../../..
 source $TESTDIR/utils/utils.sh
 
 start_lttng_sessiond_notap
+tap_disable
 
 python3 ${CURDIR}/test_daemon.py
 
index 1919bcc451d90184962df6dbd1b1195ff08e93e4..8941b875feec89126021d939ee89e11cc7e17d16 100755 (executable)
@@ -10,6 +10,7 @@ TESTDIR=${CURDIR}/../../..
 source $TESTDIR/utils/utils.sh
 
 start_lttng_sessiond_notap
+tap_disable
 
 python3 ${CURDIR}/test_exit-fast.py
 
index 598308e6dc85c31b4ec2ed6645fdf148bc855a71..c21ce82b62fa12b65afb0bc0af0cd26533637c21 100755 (executable)
@@ -10,6 +10,7 @@ TESTDIR=${CURDIR}/../../..
 source $TESTDIR/utils/utils.sh
 
 start_lttng_sessiond_notap
+tap_disable
 
 python3 ${CURDIR}/test_fork.py
 
index f80379b5d2cb327b3a12fabb7b5df1eccb04b47b..44401ec6c2e7d2302c38ab7d4500a1e4b766bbec 100755 (executable)
@@ -10,6 +10,7 @@ TESTDIR=${CURDIR}/../../..
 source $TESTDIR/utils/utils.sh
 
 start_lttng_sessiond_notap
+tap_disable
 
 python3 ${CURDIR}/test_libc-wrapper.py
 
index 89ea462224e4e918c826aecd27975ff17ab51341..793df3e7d58b74637b6b4a43a819e93bde3e77ca 100755 (executable)
@@ -11,6 +11,7 @@ source $TESTDIR/utils/utils.sh
 
 # Try to launch a sessiond before invoking the python test script
 start_lttng_sessiond_notap
+tap_disable
 
 python3 ${CURDIR}/test_linking.py
 
index 4559f108fbdee834698490179f3d6ce9edc3a1f0..442d2e22bd7af647550d007c0359e5fcd08e016c 100755 (executable)
@@ -12,6 +12,7 @@ TESTDIR=${CURDIR}/../../..
 
 source $TESTDIR/utils/utils.sh
 
+tap_disable
 start_lttng_sessiond_notap
 
 python3 ${CURDIR}/test_type_declarations.py
index 198e4ac97f22fa7d4d11093b8a4b9b23825574d2..d6dcaa3a30ad1a45ce3431b6dcca4539efc3fa38 100644 (file)
@@ -17,6 +17,7 @@ fi
 export LTTNG_TOOLS_HAVE_DLMOPEN=@HAVE_DLMOPEN@
 
 start_lttng_sessiond_notap
+tap_disable
 
 python3 ${CURDIR}/test_ust-dl.py
 
This page took 0.038412 seconds and 4 git commands to generate.