public inbox for dtrace@lists.linux.dev
 help / color / mirror / Atom feed
From: Kris Van Hees <kris.van.hees@oracle.com>
To: eugene.loh@oracle.com
Cc: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: Re: [PATCH 1/4] test: Turn char[16] into string to ignore garbage bytes
Date: Tue, 7 Oct 2025 11:37:40 -0400	[thread overview]
Message-ID: <aOUzxAmFtyumMnX2@oracle.com> (raw)
In-Reply-To: <20251006215726.8893-1-eugene.loh@oracle.com>

On Mon, Oct 06, 2025 at 05:57:23PM -0400, eugene.loh@oracle.com wrote:
> From: Eugene Loh <eugene.loh@oracle.com>
> 
> In commit 308e996c0 ("cg, agg: fix alignment of key components"), a new
> test test/unittest/aggs/tst.chararray-key.d used a char[16] as an agg key.
> The problem is that the char array, curpsinfo->pr_fname, could have
> garbage bytes after the first NUL byte, polluting test output.
> 
> Since we do not care about any such garbage bytes, convert to a string.
> 
> Signed-off-by: Eugene Loh <eugene.loh@oracle.com>

Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>

> ---
>  test/unittest/aggs/tst.chararray-key.d | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/test/unittest/aggs/tst.chararray-key.d b/test/unittest/aggs/tst.chararray-key.d
> index af45d4a5e..2bb638372 100644
> --- a/test/unittest/aggs/tst.chararray-key.d
> +++ b/test/unittest/aggs/tst.chararray-key.d
> @@ -15,7 +15,7 @@
>  
>  BEGIN
>  {
> -	@[curpsinfo->pr_fname] = count();
> +	@[(string)curpsinfo->pr_fname] = count();
>  	exit(0);
>  }
>  
> -- 
> 2.47.3
> 

      parent reply	other threads:[~2025-10-07 15:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-06 21:57 [PATCH 1/4] test: Turn char[16] into string to ignore garbage bytes eugene.loh
2025-10-06 21:57 ` [PATCH 2/4] test: Use syscall in case of no execveat() wrapper eugene.loh
2025-10-07 15:38   ` [DTrace-devel] " Kris Van Hees
2025-10-07 17:44     ` Eugene Loh
2025-10-06 21:57 ` [PATCH 3/4] test: Supply XFAIL for tests that use vtimestamp eugene.loh
2025-10-07 15:41   ` [DTrace-devel] " Kris Van Hees
2025-10-07 22:54     ` Eugene Loh
2025-10-06 21:57 ` [PATCH 4/4] test: Skip D return() action if kernel not configured right eugene.loh
2025-10-06 22:14   ` Kris Van Hees
2025-10-07 15:37 ` Kris Van Hees [this message]

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=aOUzxAmFtyumMnX2@oracle.com \
    --to=kris.van.hees@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