[DTrace-devel] [PATCH] test: Suppress some white space
Nick Alcock
nick.alcock at oracle.com
Fri Jun 13 14:10:17 UTC 2025
On 9 Jun 2025, eugene loh spake thusly:
> From: Eugene Loh <eugene.loh at oracle.com>
>
> The test suite turns pointers into "{ptr}" so that results
> comparisons will not be sensitive to particular pointer offset
> values.
>
> If these offsets change in width -- say, from 0xf0 to 0x100 --
> the amount of white space in the postprocessed output can change.
>
> Add additional postprocessing to a test that sometimes fails due
> to this problem.
Hmm... this would work for this test, but maybe we should change the
{ptr} substitution in runtest.sh itself so that it gets this right in
the general case?
Something like
diff --git a/runtest.sh b/runtest.sh
index 156e7dec8a1c3..c5703a81bc6d4 100755
--- a/runtest.sh
+++ b/runtest.sh
@@ -509,7 +509,7 @@ postprocess()
# TODO: may need adjustment or making optional if scripts emit hex
# values which are not continuously variable.
- sed -e '/^==[0-9][0-9]*== /!s,0x[0-9a-f][0-9a-f]*,{ptr},g' \
+ sed -e '/^==[0-9][0-9]*== /!s,0x[0-9a-f][0-9a-f]*\([ \t]*\),{ptr}\1,g' \
-e 's,at BPF pc [1-9][0-9]*,at BPF pc NNN,' < $tmpdir/pp.out > $final
return $retval
might work. (Obviously the lines would no longer line up, but the number
of spaces would remain the same as they were before the substitution.)
Lots and lots of expected results would need regenerating after this,
of course...
--
NULL && (void)
More information about the DTrace-devel
mailing list