public inbox for dtrace@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] test: Suppress some white space
@ 2025-06-09 18:06 eugene.loh
  2025-06-13 14:10 ` Nick Alcock
  0 siblings, 1 reply; 4+ messages in thread
From: eugene.loh @ 2025-06-09 18:06 UTC (permalink / raw)
  To: dtrace, dtrace-devel

From: Eugene Loh <eugene.loh@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.

Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
---
 test/unittest/aggs/tst.ustack.r   | 32 +++++++++++++++----------------
 test/unittest/aggs/tst.ustack.r.p |  3 +++
 2 files changed, 19 insertions(+), 16 deletions(-)
 create mode 100755 test/unittest/aggs/tst.ustack.r.p

diff --git a/test/unittest/aggs/tst.ustack.r b/test/unittest/aggs/tst.ustack.r
index ed26cc5f3..271a0b30c 100644
--- a/test/unittest/aggs/tst.ustack.r
+++ b/test/unittest/aggs/tst.ustack.r
@@ -1,18 +1,18 @@
-  ustack-tst-basic`myfunc_y+{ptr}                     
-  ustack-tst-basic`myfunc_y                         
-  ustack-tst-basic                                  
-  ustack-tst-basic`myfunc_y                         
+ ustack-tst-basic`myfunc_y+{ptr} 
+ ustack-tst-basic`myfunc_y 
+ ustack-tst-basic 
+ ustack-tst-basic`myfunc_y 
 
-              ustack-tst-basic`myfunc_z+{ptr}
-              ustack-tst-basic`myfunc_y+{ptr}
-              ustack-tst-basic`myfunc_x+{ptr}
-              ustack-tst-basic`myfunc_w+{ptr}
-              ustack-tst-basic`myfunc_v+{ptr}
+ ustack-tst-basic`myfunc_z+{ptr}
+ ustack-tst-basic`myfunc_y+{ptr}
+ ustack-tst-basic`myfunc_x+{ptr}
+ ustack-tst-basic`myfunc_w+{ptr}
+ ustack-tst-basic`myfunc_v+{ptr}
 
-       97  ustack-tst-basic`myfunc_y+{ptr}                       ustack-tst-basic`myfunc_y                           ustack-tst-basic                                    ustack-tst-basic`myfunc_y                         
-              ustack-tst-basic`myfunc_z+{ptr}
-              ustack-tst-basic`myfunc_y+{ptr}
-              ustack-tst-basic`myfunc_x+{ptr}
-              ustack-tst-basic`myfunc_w+{ptr}
-              ustack-tst-basic`myfunc_v+{ptr}
-        4             1234
+ 97 ustack-tst-basic`myfunc_y+{ptr} ustack-tst-basic`myfunc_y ustack-tst-basic ustack-tst-basic`myfunc_y 
+ ustack-tst-basic`myfunc_z+{ptr}
+ ustack-tst-basic`myfunc_y+{ptr}
+ ustack-tst-basic`myfunc_x+{ptr}
+ ustack-tst-basic`myfunc_w+{ptr}
+ ustack-tst-basic`myfunc_v+{ptr}
+ 4 1234
diff --git a/test/unittest/aggs/tst.ustack.r.p b/test/unittest/aggs/tst.ustack.r.p
new file mode 100755
index 000000000..16a0451c4
--- /dev/null
+++ b/test/unittest/aggs/tst.ustack.r.p
@@ -0,0 +1,3 @@
+#!/usr/bin/gawk -f
+
+{ gsub(/ +/, " "); print; }
-- 
2.43.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-07-22 13:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-09 18:06 [PATCH] test: Suppress some white space eugene.loh
2025-06-13 14:10 ` Nick Alcock
2025-06-23 20:33   ` Eugene Loh
2025-07-22 13:41     ` Nick Alcock

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox