test: Account for readahead tracepoints
PATCH 1/1 test: Account for readahead tracepoints
From: Eugene Loh <[email protected]>
Some tests check for empty probe descriptions. In some cases, the tests relied on the absence of any read* modules.
However, some kernels can have "readahead" tracepoints. Tests expecting no read* modules will therefore fail.
Change these tests to ask for readfoo* modules to ensure that the probe descriptions will indeed find no probes.
--- test/unittest/dtrace-util/tst.ListProbesFuncEmpty.r | 2 +- test/unittest/dtrace-util/tst.ListProbesFuncEmpty.sh | 2 +- test/unittest/dtrace-util/tst.ListProbesNameEmpty.r | 2 +- test/unittest/dtrace-util/tst.ListProbesNameEmpty.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
test/unittest/dtrace-util/tst.ListProbesFuncEmpty.r +1 -1
@@ -8,7 +8,7 @@ dtrace: failed to match ::profile:: No probe matches description dtrace: failed to match ::vmlinux:: No probe matches description dtrace: failed to match vmlinux:::: No probe matches description dtrace: failed to match :read::: No probe matches description -dtrace: failed to match :read*::: No probe matches description +dtrace: failed to match :readfoo*::: No probe matches description dtrace: invalid probe specifier profile:::tick-1000: invalid probe description "profile:::tick-1000": Overspecified probe description dtrace: invalid probe specifier fbt:des:des3_crunch_block:return: invalid probe description "fbt:des:des3_crunch_block:return": Overspecified probe description dtrace: invalid probe specifier read: extraneous argument '{printf("FOUND");}' ($1 is not referenced)
test/unittest/dtrace-util/tst.ListProbesFuncEmpty.sh +1 -1
@@ -28,7 +28,7 @@ $dtrace $dt_flags -lf profile $dtrace $dt_flags -lf vmlinux $dtrace $dt_flags -lf :vmlinux:: $dtrace $dt_flags -lf ::read: -$dtrace $dt_flags -lf ::'read*': +$dtrace $dt_flags -lf ::'readfoo*': $dtrace $dt_flags -lf profile:::tick-1000 $dtrace $dt_flags -lf fbt:des:des3_crunch_block:return # This is curiously different from what man.ListProbesWithFunctions says should
test/unittest/dtrace-util/tst.ListProbesNameEmpty.r +1 -1
@@ -17,5 +17,5 @@ dtrace: failed to match ::vmlinux:read: No probe matches description dtrace: failed to match :syscall:vmlinux:read: No probe matches description dtrace: failed to match ::vmlinux:: No probe matches description dtrace: failed to match fbt:des:des3_crunch_block:return: No probe matches description -dtrace: failed to match :read*::: No probe matches description +dtrace: failed to match :readfoo*::: No probe matches description dtrace: failed to match :::read: No probe matches description
test/unittest/dtrace-util/tst.ListProbesNameEmpty.sh +1 -1
@@ -32,6 +32,6 @@ $dtrace $dt_flags -ln vmlinux:read $dtrace $dt_flags -ln syscall:vmlinux:read $dtrace $dt_flags -ln :vmlinux: $dtrace $dt_flags -ln fbt:des:des3_crunch_block:return -$dtrace $dt_flags -ln :'read*':: +$dtrace $dt_flags -ln :'readfoo*':: $dtrace $dt_flags -ln read'{printf("FOUND");}' exit 0
Signature · 1 line
2.47.3
On 22 Jan 2026, eugene loh uttered the following:
Quoted 4 lines
From: Eugene Loh <[email protected]>
Some tests check for empty probe descriptions. In some cases, the tests relied on the absence of any read* modules.
Argh! Sorry, this was my bug way back when. I don't know why I thought this would work in the long term...
Quoted 7 lines
However, some kernels can have "readahead" tracepoints. Tests expecting no read* modules will therefore fail.
Change these tests to ask for readfoo* modules to ensure that the probe descriptions will indeed find no probes.
Signed-off-by Eugene Loh <[email protected]>
Signature · 1 line
NULL && (void)
Quoted 15 lines · Nick Alcock
On 22 Jan 2026, eugene loh uttered the following:
Quoted 4 lines
From: Eugene Loh <[email protected]>
Some tests check for empty probe descriptions. In some cases, the tests relied on the absence of any read* modules.
Argh! Sorry, this was my bug way back when. I don't know why I thought this would work in the long term...
Quoted 5 lines
However, some kernels can have "readahead" tracepoints. Tests expecting no read* modules will therefore fail.
Change these tests to ask for readfoo* modules to ensure that the probe descriptions will indeed find no probes.
But this commit message surely needs fixing because "read*" surely refers to the tracepoint names and not to the module names.
Quoted 7 lines
Quoted 2 lines
Signed-off-by Eugene Loh <[email protected]>Reviewed-by Nick Alcock <[email protected]>Signature · 1 line
NULL && (void)