[lttng-dev] [PATCH lttng-tools] Fix: test code assumes that child process is schedule to run before parent
Anders Wallin
wallinux at gmail.com
Thu Apr 1 12:37:10 EDT 2021
the following tests fails
- test_event_vpid_tracker ust 0 "${EVENT_NAME}"
- test_event_vpid_track_untrack ust 0 "${EVENT_NAME}"
- test_event_pid_tracker ust 0 "${EVENT_NAME}"
- test_event_pid_track_untrack ust 0 "${EVENT_NAME}"
Signed-off-by: Anders Wallin <wallinux at gmail.com>
---
tests/regression/tools/tracker/test_event_tracker | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/tests/regression/tools/tracker/test_event_tracker b/tests/regression/tools/tracker/test_event_tracker
index 711690af..78e9310b 100755
--- a/tests/regression/tools/tracker/test_event_tracker
+++ b/tests/regression/tools/tracker/test_event_tracker
@@ -5,7 +5,7 @@
#
# SPDX-License-Identifier: GPL-2.0-only
-TEST_DESC="LTTng - Event traker test"
+TEST_DESC="LTTng - Event tracker test"
CURDIR=$(dirname "$0")/
TESTDIR="$CURDIR/../../.."
@@ -30,27 +30,24 @@ SCRIPT_GROUPNAME="$(id -gn)"
CHILD_PID=-1
WAIT_PATH=
-AFTER_FIRST_PATH=
-BEFORE_LAST_PATH=
+BEFORE_FIRST_PATH=
source $TESTDIR/utils/utils.sh
function prepare_ust_app
{
- AFTER_FIRST_PATH=$(mktemp -u)
- BEFORE_LAST_PATH=$(mktemp -u)
+ BEFORE_FIRST_PATH=$(mktemp -u)
- $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT -a "$AFTER_FIRST_PATH" -b "$BEFORE_LAST_PATH" &
+ $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT --sync-before-first-event "$BEFORE_FIRST_PATH" &
CHILD_PID=$!
}
function trace_ust_app
{
- touch "$BEFORE_LAST_PATH"
+ touch "$BEFORE_FIRST_PATH"
wait
ok $? "Traced application stopped."
- rm "$BEFORE_LAST_PATH"
- rm "$AFTER_FIRST_PATH"
+ rm "$BEFORE_FIRST_PATH"
}
function prepare_kernel_app
--
2.31.1
More information about the lttng-dev
mailing list