From: eugene.loh@oracle.com
To: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: [PATCH] test: Suppress some white space
Date: Mon, 9 Jun 2025 14:06:47 -0400 [thread overview]
Message-ID: <20250609180647.4424-1-eugene.loh@oracle.com> (raw)
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
next reply other threads:[~2025-06-09 18:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-09 18:06 eugene.loh [this message]
2025-06-13 14:10 ` [PATCH] test: Suppress some white space Nick Alcock
2025-06-23 20:33 ` Eugene Loh
2025-07-22 13:41 ` Nick Alcock
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250609180647.4424-1-eugene.loh@oracle.com \
--to=eugene.loh@oracle.com \
--cc=dtrace-devel@oss.oracle.com \
--cc=dtrace@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox