<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
Hello Jérémie!</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
I think the key here is to run the test on arm. I don't see the issue on x86 and there the total number of tests is the same with and without the patch.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
Below is the output from running on arm with and without the patch:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
# grep NUM_TESTS= regression/kernel/test_callstack.old
<div class="ContentPasted0">NUM_TESTS=11</div>
<div class="ContentPasted0"> NUM_TESTS=$((NUM_TESTS+11))</div>
<div class="ContentPasted0"><br>
</div>
<div class="ContentPasted0"># regression/kernel/test_callstack.old</div>
<div class="ContentPasted0">1..11</div>
<div class="ContentPasted0"># Kernel tracer - Callstack context</div>
<div class="ContentPasted0">ok 1 - Start session daemon</div>
<div class="ContentPasted0"># Kernel callstack test</div>
<div class="ContentPasted0">ok 2 - Create session callstack in -o /tmp/tmp.SMAJwATHfC</div>
<div class="ContentPasted0">ok 3 - Enable channel chan0 for session callstack</div>
<div class="ContentPasted0">ok 4 - Enable kernel syscall read for session callstack on channel chan0</div>
<div class="ContentPasted0">ok 5 - Add context command for type: callstack-kernel</div>
<div class="ContentPasted0">ok 6 - Untrack command with opts: -s callstack --all --pid -k</div>
<div class="ContentPasted0">ok 7 - Track command with opts: -s callstack -k --pid=2208</div>
<div class="ContentPasted0">ok 8 - Start tracing for session </div>
<div class="ContentPasted0">ok 9 - Stop lttng tracing for session </div>
<div class="ContentPasted0">ok 10 - Destroy session callstack</div>
<div class="ContentPasted0">ok 11 - Validate kernel callstack</div>
<div class="ContentPasted0"># Killing (signal SIGTERM) lttng-sessiond and lt-lttng-sessiond pids: 2172 2173 2195
</div>
<div class="ContentPasted0">ok 12 - Wait after kill session daemon</div>
<div class="ContentPasted0"># Looks like you planned 11 tests but ran 1 extra.</div>
<div class="ContentPasted0"><br>
</div>
<div class="ContentPasted0"># grep NUM_TESTS= regression/kernel/test_callstack
</div>
<div class="ContentPasted0">NUM_TESTS=12</div>
<div class="ContentPasted0"> NUM_TESTS=$((NUM_TESTS+10))</div>
<div class="ContentPasted0"><br>
</div>
<div class="ContentPasted0"># regression/kernel/test_callstack </div>
<div class="ContentPasted0">1..12</div>
<div class="ContentPasted0"># Kernel tracer - Callstack context</div>
<div class="ContentPasted0">ok 1 - Start session daemon</div>
<div class="ContentPasted0"># Kernel callstack test</div>
<div class="ContentPasted0">ok 2 - Create session callstack in -o /tmp/tmp.ddcyRuGLzX</div>
<div class="ContentPasted0">ok 3 - Enable channel chan0 for session callstack</div>
<div class="ContentPasted0">ok 4 - Enable kernel syscall read for session callstack on channel chan0</div>
<div class="ContentPasted0">ok 5 - Add context command for type: callstack-kernel</div>
<div class="ContentPasted0">ok 6 - Untrack command with opts: -s callstack --all --pid -k</div>
<div class="ContentPasted0">ok 7 - Track command with opts: -s callstack -k --pid=2292</div>
<div class="ContentPasted0">ok 8 - Start tracing for session </div>
<div class="ContentPasted0">ok 9 - Stop lttng tracing for session </div>
<div class="ContentPasted0">ok 10 - Destroy session callstack</div>
<div class="ContentPasted0">ok 11 - Validate kernel callstack</div>
<div class="ContentPasted0"># Killing (signal SIGTERM) lttng-sessiond and lt-lttng-sessiond pids: 2256 2257 2279
</div>
<div class="ContentPasted0">ok 12 - Wait after kill session daemon</div>
<div class="ContentPasted0"><br>
</div>
<div class="ContentPasted0"># uname -a</div>
<div class="ContentPasted0">Linux #1 SMP PREEMPT Thu Oct 20 10:28:23 CEST 2022 armv7l armv7l armv7l GNU/Linux</div>
<div class="ContentPasted0"><br>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Från:</b> Jérémie Galarneau <jeremie.galarneau@efficios.com><br>
<b>Skickat:</b> den 21 oktober 2022 20:38<br>
<b>Till:</b> Beckius, Mikael <mikael.beckius@windriver.com><br>
<b>Kopia:</b> lttng-dev@lists.lttng.org <lttng-dev@lists.lttng.org><br>
<b>Ämne:</b> Re: [lttng-dev] [PATCH] Fix incorrect number of tests in test_callstack</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">[Please note: This e-mail is from an EXTERNAL e-mail address]<br>
<br>
Hi Mikael,<br>
<br>
I'm getting the correct number of tests here.<br>
Can you provide the full output of the test?<br>
<br>
Thanks,<br>
Jérémie<br>
<br>
On Thu, Oct 20, 2022 at 07:12:26PM +0200, Mikael Beckius via lttng-dev wrote:<br>
> regression/kernel/test_callstack (Wstat: 256 Tests: 12 Failed: 1)<br>
> Failed test: 12<br>
> Non-zero exit status: 1<br>
> Parse errors: Bad plan. You planned 11 tests but ran 12.<br>
><br>
> Signed-off-by: Mikael Beckius <mikael.beckius@windriver.com><br>
> ---<br>
> tests/regression/kernel/test_callstack | 4 ++--<br>
> 1 file changed, 2 insertions(+), 2 deletions(-)<br>
><br>
> diff --git a/tests/regression/kernel/test_callstack b/tests/regression/kernel/test_callstack<br>
> index a4477fd7c..b5d604535 100755<br>
> --- a/tests/regression/kernel/test_callstack<br>
> +++ b/tests/regression/kernel/test_callstack<br>
> @@ -9,7 +9,7 @@ TEST_DESC="Kernel tracer - Callstack context"<br>
><br>
> CURDIR=$(dirname "$0")/<br>
> TESTDIR=$CURDIR/../..<br>
> -NUM_TESTS=11<br>
> +NUM_TESTS=12<br>
> TEST_APP_USERSPACE="$TESTDIR/utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack"<br>
> TEST_APP_KERNELSPACE="$TESTDIR/utils/testapp/gen-syscall-events/gen-syscall-events"<br>
> PARSE_CALLSTACK="$TESTDIR/utils/parse-callstack.py"<br>
> @@ -123,7 +123,7 @@ function test_kernel_callstack()<br>
> # Only run userspace callstack test on x86<br>
> uname -m | grep -E "x86" >/dev/null 2>&1<br>
> if test $? == 0; then<br>
> - NUM_TESTS=$((NUM_TESTS+11))<br>
> + NUM_TESTS=$((NUM_TESTS+10))<br>
> RUN_USERSPACE_TEST=1<br>
> else<br>
> RUN_USERSPACE_TEST=0<br>
> --<br>
> 2.34.1<br>
><br>
> _______________________________________________<br>
> lttng-dev mailing list<br>
> lttng-dev@lists.lttng.org<br>
> <a href="https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev">https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev</a><br>
</div>
</span></font></div>
</body>
</html>