All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] test: Turn char[16] into string to ignore garbage bytes
@ 2025-10-06 21:57 eugene.loh
  2025-10-06 21:57 ` [PATCH 2/4] test: Use syscall in case of no execveat() wrapper eugene.loh
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: eugene.loh @ 2025-10-06 21:57 UTC (permalink / raw)
  To: dtrace, dtrace-devel

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


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

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

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 1/4] test: Turn char[16] into string to ignore garbage bytes Kris Van Hees

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.