<div dir="ltr">OK, <br><br>I tried this and for <br>- test_event_vpid_track_untrack ust 0 "${EVENT_NAME}"<br>- test_event_pid_track_untrack ust 0 "${EVENT_NAME}"<div>it works well.<br><br>For <br>- test_event_vpid_tracker ust 0 "${EVENT_NAME}"<br>- test_event_pid_tracker ust 0 "${EVENT_NAME}"<br>validate_trace_empty fails since there is no data at all in the trace_path<br><br>This run is just calling copy of test_event_tracker running only "test_event_vpid_tracker ust 0 ..."</div><div>1..747<br># LTTng - Event tracker test<br>ok 1 - Start session daemon<br># Test UST tracker<br>ok 2 - Create session tracker in -o /tmp/tmp.lu5aeCJhQ3<br>ok 3 - Enable ust event tp:tptest for session tracker<br>ok 4 - Untrack command with opts: -u --all --vpid<br>ok 5 - Start tracing for session <br>ok 6 - Track command with opts: -u --vpid 11842<br>ok 7 - Traced application stopped.<br>ok 8 - Stop lttng tracing for session <br>ok 9 - Destroy session tracker<br><b>not ok 10 - Failed to parse trace<br># Failed test 'Failed to parse trace'<br></b># in ./regression/tools/tracker//../../../utils/tap/tap.sh:fail() at line 159.<br># Killing (signal SIGTERM) lttng-sessiond and lt-lttng-sessiond pids: 11808 11809 11830 <br>ok 11 - Wait after kill session daemon<br># Looks like you planned 747 tests but only ran 11.<br># Looks like you failed 1 test of 11.<br><br># find /tmp/tmp.lu5aeCJhQ3<br>/tmp/tmp.lu5aeCJhQ3<br>/tmp/tmp.lu5aeCJhQ3/ust<br><br>Do you want me to add a special version of "validate_trace_empty" not returning <br>"Failed to parse trace" for this? If so should it be added in "test_event_tracker" or in "utils.sh"</div><div><br><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Anders Wallin</div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 7, 2021 at 5:31 PM Mathieu Desnoyers <<a href="mailto:mathieu.desnoyers@efficios.com">mathieu.desnoyers@efficios.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">----- On Apr 1, 2021, at 12:37 PM, lttng-dev <a href="mailto:lttng-dev@lists.lttng.org" target="_blank">lttng-dev@lists.lttng.org</a> wrote:<br>
<br>
> the following tests fails<br>
> - test_event_vpid_tracker ust 0 "${EVENT_NAME}"<br>
> - test_event_vpid_track_untrack ust 0 "${EVENT_NAME}"<br>
> - test_event_pid_tracker ust 0 "${EVENT_NAME}"<br>
> - test_event_pid_track_untrack ust 0 "${EVENT_NAME}"<br>
<br>
There is indeed an issue with these tests: there is a missing "untrack all pids"<br>
which should be done at the very beginning of each test to have the expected<br>
behavior. AFAIU this explains why there is a small window where traced applications<br>
can generate events when none are expected.<br>
<br>
Fixing this should solve the issues without requiring any addition to the test<br>
program.<br>
<br>
Thanks,<br>
<br>
Mathieu<br>
<br>
> <br>
> Signed-off-by: Anders Wallin <<a href="mailto:wallinux@gmail.com" target="_blank">wallinux@gmail.com</a>><br>
> ---<br>
> tests/regression/tools/tracker/test_event_tracker | 15 ++++++---------<br>
> 1 file changed, 6 insertions(+), 9 deletions(-)<br>
> <br>
> diff --git a/tests/regression/tools/tracker/test_event_tracker<br>
> b/tests/regression/tools/tracker/test_event_tracker<br>
> index 711690af..78e9310b 100755<br>
> --- a/tests/regression/tools/tracker/test_event_tracker<br>
> +++ b/tests/regression/tools/tracker/test_event_tracker<br>
> @@ -5,7 +5,7 @@<br>
> #<br>
> # SPDX-License-Identifier: GPL-2.0-only<br>
> <br>
> -TEST_DESC="LTTng - Event traker test"<br>
> +TEST_DESC="LTTng - Event tracker test"<br>
> <br>
> CURDIR=$(dirname "$0")/<br>
> TESTDIR="$CURDIR/../../.."<br>
> @@ -30,27 +30,24 @@ SCRIPT_GROUPNAME="$(id -gn)"<br>
> <br>
> CHILD_PID=-1<br>
> WAIT_PATH=<br>
> -AFTER_FIRST_PATH=<br>
> -BEFORE_LAST_PATH=<br>
> +BEFORE_FIRST_PATH=<br>
> <br>
> source $TESTDIR/utils/utils.sh<br>
> <br>
> function prepare_ust_app<br>
> {<br>
> - AFTER_FIRST_PATH=$(mktemp -u)<br>
> - BEFORE_LAST_PATH=$(mktemp -u)<br>
> + BEFORE_FIRST_PATH=$(mktemp -u)<br>
> <br>
> - $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT -a "$AFTER_FIRST_PATH" -b<br>
> "$BEFORE_LAST_PATH" &<br>
> + $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT --sync-before-first-event<br>
> "$BEFORE_FIRST_PATH" &<br>
> CHILD_PID=$!<br>
> }<br>
> <br>
> function trace_ust_app<br>
> {<br>
> - touch "$BEFORE_LAST_PATH"<br>
> + touch "$BEFORE_FIRST_PATH"<br>
> wait<br>
> ok $? "Traced application stopped."<br>
> - rm "$BEFORE_LAST_PATH"<br>
> - rm "$AFTER_FIRST_PATH"<br>
> + rm "$BEFORE_FIRST_PATH"<br>
> }<br>
> <br>
> function prepare_kernel_app<br>
> --<br>
> 2.31.1<br>
> <br>
> _______________________________________________<br>
> lttng-dev mailing list<br>
> <a href="mailto:lttng-dev@lists.lttng.org" target="_blank">lttng-dev@lists.lttng.org</a><br>
> <a href="https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev" rel="noreferrer" target="_blank">https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev</a><br>
<br>
-- <br>
Mathieu Desnoyers<br>
EfficiOS Inc.<br>
<a href="http://www.efficios.com" rel="noreferrer" target="_blank">http://www.efficios.com</a><br>
</blockquote></div>