[Bug runtime/30131] Testcase at_var_timer_profile.exp regressed
mcermak at redhat dot com
sourceware-bugzilla@sourceware.org
Fri Feb 17 08:36:46 GMT 2023
https://sourceware.org/bugzilla/show_bug.cgi?id=30131
--- Comment #1 from Martin Cermak <mcermak at redhat dot com> ---
Created attachment 14689
--> https://sourceware.org/bugzilla/attachment.cgi?id=14689&action=edit
a demo patch
My sense is that it might be a testcase problem:
> Here's the testcase script as of today:
> https://sourceware.org/git/?p=systemtap.git;a=blob;f=testsuite/systemtap.
> base/at_var_timer_profile.stp;h=479f74941a9fd739ea05b0d566c52d8929af7d03;
> hb=HEAD
The testcase has two probes that fire asynchronously:
global active = 0
probe process.function("sub")
{
active = 1
}
probe timer.profile {
if (active && pid() == target()) {
printf("@var(\"foo\", @1)->bar: %d\n", @var("foo", @1)->bar);
printf("@var(\"foo@at_var_timer_profile.c\", @1)->bar: %d\n",
@var("foo@at_var_timer_profile.c", @1)->bar);
printf("@var(\"foo@at_var_timer_profile.c\", @2)->bar: %d\n",
@var("foo@at_var_timer_profile.c", @2)->bar);
printf("@var(\"foo\", @1)$: %s\n", @var("foo", @1)$);
printf("@var(\"foo\", @1)$$: %s\n", @var("foo", @1)$$);
printf("@defined(@var(\"foo\", \"badmodle\")): %s\n",
@defined(@var("foo", "badmodule")) ? "YES" : "NO")
printf("@defined(@var(\"foo\", @3)): %s\n",
@defined(@var("foo", @3)) ? "YES" : "NO")
exit()
}
}
The failure is caused by a fail to read variables that were available in the
first probe process.function (I've checked that), within the second probe -
timer.profile. My hypothesis is that the second probe simply fires too late,
and the data are gone by then. IMHO The mentioned kernel update possibly only
impacted the probe timing, indirectly causing this testcase failure. The
attached patch "fixes the failure" and demonstrates this hypothesis.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Systemtap
mailing list