public inbox for dtrace@lists.linux.dev
 help / color / mirror / Atom feed
From: Nick Alcock <nick.alcock@oracle.com>
To: eugene.loh@oracle.com
Cc: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: Re: [PATCH] test: Suppress some white space
Date: Fri, 13 Jun 2025 15:10:17 +0100	[thread overview]
Message-ID: <87cyb7enqu.fsf@esperi.org.uk> (raw)
In-Reply-To: <20250609180647.4424-1-eugene.loh@oracle.com> (eugene loh's message of "Mon, 9 Jun 2025 14:06:47 -0400")

On 9 Jun 2025, eugene loh spake thusly:

> 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.

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)

  reply	other threads:[~2025-06-13 14:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-09 18:06 [PATCH] test: Suppress some white space eugene.loh
2025-06-13 14:10 ` Nick Alcock [this message]
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=87cyb7enqu.fsf@esperi.org.uk \
    --to=nick.alcock@oracle.com \
    --cc=dtrace-devel@oss.oracle.com \
    --cc=dtrace@lists.linux.dev \
    --cc=eugene.loh@oracle.com \
    /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