* [PATCH 1/5] test: fbt return0: work on quiet systems
@ 2025-10-06 15:28 Nick Alcock
2025-10-06 15:28 ` [PATCH 2/5] test: nfs: don't require a locking daemon Nick Alcock
` (4 more replies)
0 siblings, 5 replies; 13+ messages in thread
From: Nick Alcock @ 2025-10-06 15:28 UTC (permalink / raw)
To: dtrace, dtrace-devel
These two tests probe on sys_poll and just hope something calls it.
On sufficiently quiet systems, nothing does.
Define a trivial trigger to do so.
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
---
test/triggers/Build | 2 +-
test/triggers/fbt-tst-poll.c | 23 ++++++++++++++++++++
test/unittest/fbtprovider/tst.return0.d | 6 ++++-
test/unittest/providers/rawfbt/tst.return0.d | 6 ++++-
4 files changed, 34 insertions(+), 3 deletions(-)
create mode 100644 test/triggers/fbt-tst-poll.c
diff --git a/test/triggers/Build b/test/triggers/Build
index 4ff5002a853ed..bd6b0510ba003 100644
--- a/test/triggers/Build
+++ b/test/triggers/Build
@@ -4,7 +4,7 @@
# http://oss.oracle.com/licenses/upl.
EXTERNAL_64BIT_TRIGGERS = testprobe readwholedir mmap bogus-ioctl open delaydie futex \
- periodic_output \
+ periodic_output fbt-tst-poll \
pid-tst-args1 pid-tst-float pid-tst-fork pid-tst-gcc \
pid-tst-ret1 pid-tst-ret2 pid-tst-vfork pid-tst-weak1 pid-tst-weak2 \
proc-tst-sigwait proc-tst-omp proc-tst-pthread-exec profile-tst-ufuncsort \
diff --git a/test/triggers/fbt-tst-poll.c b/test/triggers/fbt-tst-poll.c
new file mode 100644
index 0000000000000..8b1e72eddd258
--- /dev/null
+++ b/test/triggers/fbt-tst-poll.c
@@ -0,0 +1,23 @@
+/*
+ * Oracle Linux DTrace.
+ * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
+ * Licensed under the Universal Permissive License v 1.0 as shown at
+ * http://oss.oracle.com/licenses/upl.
+ */
+
+/*
+ * Simply loop, polling stdin for something that cannot happen until killed.
+ */
+
+#include <poll.h>
+
+int
+main(int argc, char **argv)
+{
+ struct pollfd fd = {0};
+
+ fd.fd = 0;
+ fd.events = POLLPRI;
+ for (;;)
+ poll(&fd, 1, 100);
+}
diff --git a/test/unittest/fbtprovider/tst.return0.d b/test/unittest/fbtprovider/tst.return0.d
index 0b7091b320904..78a82ffde7473 100644
--- a/test/unittest/fbtprovider/tst.return0.d
+++ b/test/unittest/fbtprovider/tst.return0.d
@@ -11,11 +11,15 @@
* SECTION: FBT Provider/Probe arguments
*/
+/* @@trigger: fbt-tst-poll */
+/* @@trigger-timing: before */
+/* @@runtest-opts: $_pid */
+
#pragma D option quiet
#pragma D option statusrate=10ms
fbt::do_sys_poll:return
-/arg1 == 0/
+/pid == $1 && arg1 == 0/
{
printf("%s %x returned 0", probefunc, arg0);
exit(0);
diff --git a/test/unittest/providers/rawfbt/tst.return0.d b/test/unittest/providers/rawfbt/tst.return0.d
index 0146d684f1033..915830c800b70 100644
--- a/test/unittest/providers/rawfbt/tst.return0.d
+++ b/test/unittest/providers/rawfbt/tst.return0.d
@@ -9,11 +9,15 @@
* ASSERTION: simple rawfbt provider arg0 and probefunc print test.
*/
+/* @@trigger: fbt-tst-poll */
+/* @@trigger-timing: before */
+/* @@runtest-opts: $_pid */
+
#pragma D option quiet
#pragma D option statusrate=10ms
rawfbt::do_sys_poll:return
-/arg1 == 0/
+/pid == $1 && arg1 == 0/
{
printf("%s %x returned 0", probefunc, arg0);
exit(0);
base-commit: 877fcdeb25b370be182d51f27fb4bd8e4f739fb1
--
2.51.0.284.g117bcb8de7
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/5] test: nfs: don't require a locking daemon
2025-10-06 15:28 [PATCH 1/5] test: fbt return0: work on quiet systems Nick Alcock
@ 2025-10-06 15:28 ` Nick Alcock
2025-10-06 16:11 ` Kris Van Hees
2025-10-06 15:28 ` [PATCH 3/5] test: preprocessor: work on GCC 16 Nick Alcock
` (3 subsequent siblings)
4 siblings, 1 reply; 13+ messages in thread
From: Nick Alcock @ 2025-10-06 15:28 UTC (permalink / raw)
To: dtrace, dtrace-devel
On modern (NFSv4) systems, there is no guarantee that statd is running,
and indeed it has probably been explicitly turned off (unless writable
NFSv3 exports exist). This causes mount-time warnings that trigger test
failures unless we disable locking.
No DTrace NFS tests need locking, so disable it.
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
---
test/triggers/io-mount-nfs.sh | 2 +-
test/unittest/io/tst.nfs2.sh | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/triggers/io-mount-nfs.sh b/test/triggers/io-mount-nfs.sh
index 338443eb72240..71c83103075b8 100755
--- a/test/triggers/io-mount-nfs.sh
+++ b/test/triggers/io-mount-nfs.sh
@@ -18,4 +18,4 @@ fi
mountdir=$1
serverpath=$2
-mount -t nfs -o nfsvers=3 127.0.0.1:$serverpath $mountdir
+mount -t nfs -o nfsvers=3,nolock 127.0.0.1:$serverpath $mountdir
diff --git a/test/unittest/io/tst.nfs2.sh b/test/unittest/io/tst.nfs2.sh
index 41a7a465868f9..87452d3a3be10 100755
--- a/test/unittest/io/tst.nfs2.sh
+++ b/test/unittest/io/tst.nfs2.sh
@@ -31,13 +31,13 @@ systemctl enable --now nfs-server > /dev/null 2>&1
mkdir $exdir
exportfs -i -v -o "rw,sync,no_root_squash,insecure,fsid=8434437288" 127.0.0.1:$exdir > /dev/null
mkdir $iodir
- mount -t nfs -o nfsvers=3 127.0.0.1:$exdir $iodir
+ mount -t nfs -o nolock,nfsvers=3 127.0.0.1:$exdir $iodir
$rundt "dd if=/dev/urandom of=$tempfile count=$filesize bs=1 status=none" -o log.write
myinode=`stat $tempfile | gawk '/ Inode: / {print $4}'`
umount $iodir
# flush caches and remount to force IO
echo 3 > /proc/sys/vm/drop_caches
- mount -t nfs -o nfsvers=3 127.0.0.1:$exdir $iodir
+ mount -t nfs -o nolock,nfsvers=3 127.0.0.1:$exdir $iodir
$rundt "sum $tempfile" -o log.read
rm -f $tempfile
umount $iodir
--
2.51.0.284.g117bcb8de7
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 3/5] test: preprocessor: work on GCC 16
2025-10-06 15:28 [PATCH 1/5] test: fbt return0: work on quiet systems Nick Alcock
2025-10-06 15:28 ` [PATCH 2/5] test: nfs: don't require a locking daemon Nick Alcock
@ 2025-10-06 15:28 ` Nick Alcock
2025-10-07 15:08 ` Kris Van Hees
2025-10-06 15:28 ` [PATCH 4/5] test: tid_pid: don't assume the type of pthread_t Nick Alcock
` (2 subsequent siblings)
4 siblings, 1 reply; 13+ messages in thread
From: Nick Alcock @ 2025-10-06 15:28 UTC (permalink / raw)
To: dtrace, dtrace-devel
GCC commit c397a8c12296b75a91ae51e4889debf023e6c338 ("libcpp, genmatch:
Use gcc_diag instead of printf for libcpp diagnostics") made libcpp
quote identifiers and tokens in diagnostics like the rest of GCC does.
We have several tests that rely on the old error formatting: sed away
quotes and smartquotes into quotes or nothing (as appropriate to match
older GCCs), until such time as GCC 15 is obsolete (a long long time
away).
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
---
test/unittest/preprocessor/err.defincomp.r.p | 1 +
test/unittest/preprocessor/err.ifdefincomp.r.p | 4 ++++
test/unittest/preprocessor/err.incompelse.r.p | 4 ++++
test/unittest/preprocessor/err.mulelse.r.p | 1 +
4 files changed, 10 insertions(+)
create mode 120000 test/unittest/preprocessor/err.defincomp.r.p
create mode 100755 test/unittest/preprocessor/err.ifdefincomp.r.p
create mode 100755 test/unittest/preprocessor/err.incompelse.r.p
create mode 120000 test/unittest/preprocessor/err.mulelse.r.p
diff --git a/test/unittest/preprocessor/err.defincomp.r.p b/test/unittest/preprocessor/err.defincomp.r.p
new file mode 120000
index 0000000000000..62577fe0b6bbd
--- /dev/null
+++ b/test/unittest/preprocessor/err.defincomp.r.p
@@ -0,0 +1 @@
+err.incompelse.r.p
\ No newline at end of file
diff --git a/test/unittest/preprocessor/err.ifdefincomp.r.p b/test/unittest/preprocessor/err.ifdefincomp.r.p
new file mode 100755
index 0000000000000..7629ac5973957
--- /dev/null
+++ b/test/unittest/preprocessor/err.ifdefincomp.r.p
@@ -0,0 +1,4 @@
+#!/usr/bin/sed -f
+# GCC 16 improved diagnostics formatting. Until GCC 16 is the minimum
+# supported, we have to sed it back again.
+s,[‘’],",g
diff --git a/test/unittest/preprocessor/err.incompelse.r.p b/test/unittest/preprocessor/err.incompelse.r.p
new file mode 100755
index 0000000000000..ae9a6833d106d
--- /dev/null
+++ b/test/unittest/preprocessor/err.incompelse.r.p
@@ -0,0 +1,4 @@
+#!/usr/bin/sed -f
+# GCC 16 improved diagnostics formatting. Until GCC 16 is the minimum
+# supported, we have to sed it back again.
+s,[‘’],,g
diff --git a/test/unittest/preprocessor/err.mulelse.r.p b/test/unittest/preprocessor/err.mulelse.r.p
new file mode 120000
index 0000000000000..62577fe0b6bbd
--- /dev/null
+++ b/test/unittest/preprocessor/err.mulelse.r.p
@@ -0,0 +1 @@
+err.incompelse.r.p
\ No newline at end of file
--
2.51.0.284.g117bcb8de7
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 4/5] test: tid_pid: don't assume the type of pthread_t
2025-10-06 15:28 [PATCH 1/5] test: fbt return0: work on quiet systems Nick Alcock
2025-10-06 15:28 ` [PATCH 2/5] test: nfs: don't require a locking daemon Nick Alcock
2025-10-06 15:28 ` [PATCH 3/5] test: preprocessor: work on GCC 16 Nick Alcock
@ 2025-10-06 15:28 ` Nick Alcock
2025-10-06 16:13 ` Kris Van Hees
2025-10-06 15:28 ` [PATCH 5/5] test: dupstruct: fix extra duplicate identifier case Nick Alcock
2025-10-06 16:09 ` [PATCH 1/5] test: fbt return0: work on quiet systems Kris Van Hees
4 siblings, 1 reply; 13+ messages in thread
From: Nick Alcock @ 2025-10-06 15:28 UTC (permalink / raw)
To: dtrace, dtrace-devel
GCC 16 warns about this mismatch.
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
---
test/unittest/builtinvar/tst.tid_pid.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/unittest/builtinvar/tst.tid_pid.sh b/test/unittest/builtinvar/tst.tid_pid.sh
index e367411dcfb7d..7551f7c4b8f5c 100755
--- a/test/unittest/builtinvar/tst.tid_pid.sh
+++ b/test/unittest/builtinvar/tst.tid_pid.sh
@@ -51,7 +51,7 @@ int main(int c, char **v) {
pthread_create(&mythr, NULL, &foo, NULL);
/* Also report the pthread_t. */
- printf("created pthread_t %lld\n\n", mythr);
+ printf("created pthread_t %llu\n\n", (long long unsigned) mythr);
fflush(stdout);
/* Wait endlessly. DTrace will kill me when it is done. */
--
2.51.0.284.g117bcb8de7
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 5/5] test: dupstruct: fix extra duplicate identifier case
2025-10-06 15:28 [PATCH 1/5] test: fbt return0: work on quiet systems Nick Alcock
` (2 preceding siblings ...)
2025-10-06 15:28 ` [PATCH 4/5] test: tid_pid: don't assume the type of pthread_t Nick Alcock
@ 2025-10-06 15:28 ` Nick Alcock
2025-10-06 16:14 ` Kris Van Hees
2025-10-06 16:09 ` [PATCH 1/5] test: fbt return0: work on quiet systems Kris Van Hees
4 siblings, 1 reply; 13+ messages in thread
From: Nick Alcock @ 2025-10-06 15:28 UTC (permalink / raw)
To: dtrace, dtrace-devel
We were failing to handle one case where duplicate members or variables
are now reported as duplicate members, enumerators, or variables.
(It was concealed inside an .r.p.)
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
---
test/unittest/types/err.D_UNKNOWN.dupstruct.r | 2 +-
test/utils/libctf.r.p | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/test/unittest/types/err.D_UNKNOWN.dupstruct.r b/test/unittest/types/err.D_UNKNOWN.dupstruct.r
index 7afa74aa7f6d7..762b24f4c5901 100644
--- a/test/unittest/types/err.D_UNKNOWN.dupstruct.r
+++ b/test/unittest/types/err.D_UNKNOWN.dupstruct.r
@@ -1,2 +1,2 @@
-- @@stderr --
-dtrace: failed to compile script test/unittest/types/err.D_UNKNOWN.dupstruct.d: [D_UNKNOWN] line 17: failed to define member 'x': Duplicate member or variable name
+dtrace: failed to compile script test/unittest/types/err.D_UNKNOWN.dupstruct.d: [D_UNKNOWN] line 17: failed to define member 'x': Duplicate member, enumerator, or variable name
diff --git a/test/utils/libctf.r.p b/test/utils/libctf.r.p
index a2b4602cf713b..774eda7f57e1f 100755
--- a/test/utils/libctf.r.p
+++ b/test/utils/libctf.r.p
@@ -1,7 +1,8 @@
#!/usr/bin/gawk -f
# Licensed under the Universal Permissive License v 1.0 as shown at
# http://oss.oracle.com/licenses/upl.
-/Duplicate member or variable name\.$/ { sub(/\.$/, ""); }
+/Duplicate member or variable name/ { sub(/Duplicate member/, "&, enumerator,"); }
+/Duplicate member, enumerator, or variable name\.$/ { sub(/\.$/, ""); }
/Member name not found\.$/ { sub(/\.$/, ""); }
/enum union pirate:/ { sub(/enum union pirate/, "enum struct pirate"); }
{ print; }
--
2.51.0.284.g117bcb8de7
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 1/5] test: fbt return0: work on quiet systems
2025-10-06 15:28 [PATCH 1/5] test: fbt return0: work on quiet systems Nick Alcock
` (3 preceding siblings ...)
2025-10-06 15:28 ` [PATCH 5/5] test: dupstruct: fix extra duplicate identifier case Nick Alcock
@ 2025-10-06 16:09 ` Kris Van Hees
2025-10-07 15:36 ` Nick Alcock
2025-10-08 11:16 ` [PATCH v2 " Nick Alcock
4 siblings, 2 replies; 13+ messages in thread
From: Kris Van Hees @ 2025-10-06 16:09 UTC (permalink / raw)
To: Nick Alcock; +Cc: dtrace, dtrace-devel
On Mon, Oct 06, 2025 at 04:28:24PM +0100, Nick Alcock wrote:
> These two tests probe on sys_poll and just hope something calls it.
> On sufficiently quiet systems, nothing does.
>
> Define a trivial trigger to do so.
Why not change the probe to be on hrtimer_nanosleep and use periodic_output
as trigger, rather than adding another trigger executable?
> Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
> ---
> test/triggers/Build | 2 +-
> test/triggers/fbt-tst-poll.c | 23 ++++++++++++++++++++
> test/unittest/fbtprovider/tst.return0.d | 6 ++++-
> test/unittest/providers/rawfbt/tst.return0.d | 6 ++++-
> 4 files changed, 34 insertions(+), 3 deletions(-)
> create mode 100644 test/triggers/fbt-tst-poll.c
>
> diff --git a/test/triggers/Build b/test/triggers/Build
> index 4ff5002a853ed..bd6b0510ba003 100644
> --- a/test/triggers/Build
> +++ b/test/triggers/Build
> @@ -4,7 +4,7 @@
> # http://oss.oracle.com/licenses/upl.
>
> EXTERNAL_64BIT_TRIGGERS = testprobe readwholedir mmap bogus-ioctl open delaydie futex \
> - periodic_output \
> + periodic_output fbt-tst-poll \
> pid-tst-args1 pid-tst-float pid-tst-fork pid-tst-gcc \
> pid-tst-ret1 pid-tst-ret2 pid-tst-vfork pid-tst-weak1 pid-tst-weak2 \
> proc-tst-sigwait proc-tst-omp proc-tst-pthread-exec profile-tst-ufuncsort \
> diff --git a/test/triggers/fbt-tst-poll.c b/test/triggers/fbt-tst-poll.c
> new file mode 100644
> index 0000000000000..8b1e72eddd258
> --- /dev/null
> +++ b/test/triggers/fbt-tst-poll.c
> @@ -0,0 +1,23 @@
> +/*
> + * Oracle Linux DTrace.
> + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
> + * Licensed under the Universal Permissive License v 1.0 as shown at
> + * http://oss.oracle.com/licenses/upl.
> + */
> +
> +/*
> + * Simply loop, polling stdin for something that cannot happen until killed.
> + */
> +
> +#include <poll.h>
> +
> +int
> +main(int argc, char **argv)
> +{
> + struct pollfd fd = {0};
> +
> + fd.fd = 0;
> + fd.events = POLLPRI;
> + for (;;)
> + poll(&fd, 1, 100);
> +}
> diff --git a/test/unittest/fbtprovider/tst.return0.d b/test/unittest/fbtprovider/tst.return0.d
> index 0b7091b320904..78a82ffde7473 100644
> --- a/test/unittest/fbtprovider/tst.return0.d
> +++ b/test/unittest/fbtprovider/tst.return0.d
> @@ -11,11 +11,15 @@
> * SECTION: FBT Provider/Probe arguments
> */
>
> +/* @@trigger: fbt-tst-poll */
> +/* @@trigger-timing: before */
> +/* @@runtest-opts: $_pid */
> +
> #pragma D option quiet
> #pragma D option statusrate=10ms
>
> fbt::do_sys_poll:return
> -/arg1 == 0/
> +/pid == $1 && arg1 == 0/
> {
> printf("%s %x returned 0", probefunc, arg0);
> exit(0);
> diff --git a/test/unittest/providers/rawfbt/tst.return0.d b/test/unittest/providers/rawfbt/tst.return0.d
> index 0146d684f1033..915830c800b70 100644
> --- a/test/unittest/providers/rawfbt/tst.return0.d
> +++ b/test/unittest/providers/rawfbt/tst.return0.d
> @@ -9,11 +9,15 @@
> * ASSERTION: simple rawfbt provider arg0 and probefunc print test.
> */
>
> +/* @@trigger: fbt-tst-poll */
> +/* @@trigger-timing: before */
> +/* @@runtest-opts: $_pid */
> +
> #pragma D option quiet
> #pragma D option statusrate=10ms
>
> rawfbt::do_sys_poll:return
> -/arg1 == 0/
> +/pid == $1 && arg1 == 0/
> {
> printf("%s %x returned 0", probefunc, arg0);
> exit(0);
>
> base-commit: 877fcdeb25b370be182d51f27fb4bd8e4f739fb1
> --
> 2.51.0.284.g117bcb8de7
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/5] test: nfs: don't require a locking daemon
2025-10-06 15:28 ` [PATCH 2/5] test: nfs: don't require a locking daemon Nick Alcock
@ 2025-10-06 16:11 ` Kris Van Hees
0 siblings, 0 replies; 13+ messages in thread
From: Kris Van Hees @ 2025-10-06 16:11 UTC (permalink / raw)
To: Nick Alcock; +Cc: dtrace, dtrace-devel
On Mon, Oct 06, 2025 at 04:28:25PM +0100, Nick Alcock wrote:
> On modern (NFSv4) systems, there is no guarantee that statd is running,
> and indeed it has probably been explicitly turned off (unless writable
> NFSv3 exports exist). This causes mount-time warnings that trigger test
> failures unless we disable locking.
>
> No DTrace NFS tests need locking, so disable it.
>
> Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
> ---
> test/triggers/io-mount-nfs.sh | 2 +-
> test/unittest/io/tst.nfs2.sh | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/test/triggers/io-mount-nfs.sh b/test/triggers/io-mount-nfs.sh
> index 338443eb72240..71c83103075b8 100755
> --- a/test/triggers/io-mount-nfs.sh
> +++ b/test/triggers/io-mount-nfs.sh
> @@ -18,4 +18,4 @@ fi
> mountdir=$1
> serverpath=$2
>
> -mount -t nfs -o nfsvers=3 127.0.0.1:$serverpath $mountdir
> +mount -t nfs -o nfsvers=3,nolock 127.0.0.1:$serverpath $mountdir
> diff --git a/test/unittest/io/tst.nfs2.sh b/test/unittest/io/tst.nfs2.sh
> index 41a7a465868f9..87452d3a3be10 100755
> --- a/test/unittest/io/tst.nfs2.sh
> +++ b/test/unittest/io/tst.nfs2.sh
> @@ -31,13 +31,13 @@ systemctl enable --now nfs-server > /dev/null 2>&1
> mkdir $exdir
> exportfs -i -v -o "rw,sync,no_root_squash,insecure,fsid=8434437288" 127.0.0.1:$exdir > /dev/null
> mkdir $iodir
> - mount -t nfs -o nfsvers=3 127.0.0.1:$exdir $iodir
> + mount -t nfs -o nolock,nfsvers=3 127.0.0.1:$exdir $iodir
> $rundt "dd if=/dev/urandom of=$tempfile count=$filesize bs=1 status=none" -o log.write
> myinode=`stat $tempfile | gawk '/ Inode: / {print $4}'`
> umount $iodir
> # flush caches and remount to force IO
> echo 3 > /proc/sys/vm/drop_caches
> - mount -t nfs -o nfsvers=3 127.0.0.1:$exdir $iodir
> + mount -t nfs -o nolock,nfsvers=3 127.0.0.1:$exdir $iodir
> $rundt "sum $tempfile" -o log.read
> rm -f $tempfile
> umount $iodir
> --
> 2.51.0.284.g117bcb8de7
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 4/5] test: tid_pid: don't assume the type of pthread_t
2025-10-06 15:28 ` [PATCH 4/5] test: tid_pid: don't assume the type of pthread_t Nick Alcock
@ 2025-10-06 16:13 ` Kris Van Hees
0 siblings, 0 replies; 13+ messages in thread
From: Kris Van Hees @ 2025-10-06 16:13 UTC (permalink / raw)
To: Nick Alcock; +Cc: dtrace, dtrace-devel
On Mon, Oct 06, 2025 at 04:28:27PM +0100, Nick Alcock wrote:
> GCC 16 warns about this mismatch.
>
> Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
> ---
> test/unittest/builtinvar/tst.tid_pid.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/test/unittest/builtinvar/tst.tid_pid.sh b/test/unittest/builtinvar/tst.tid_pid.sh
> index e367411dcfb7d..7551f7c4b8f5c 100755
> --- a/test/unittest/builtinvar/tst.tid_pid.sh
> +++ b/test/unittest/builtinvar/tst.tid_pid.sh
> @@ -51,7 +51,7 @@ int main(int c, char **v) {
> pthread_create(&mythr, NULL, &foo, NULL);
>
> /* Also report the pthread_t. */
> - printf("created pthread_t %lld\n\n", mythr);
> + printf("created pthread_t %llu\n\n", (long long unsigned) mythr);
> fflush(stdout);
>
> /* Wait endlessly. DTrace will kill me when it is done. */
> --
> 2.51.0.284.g117bcb8de7
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 5/5] test: dupstruct: fix extra duplicate identifier case
2025-10-06 15:28 ` [PATCH 5/5] test: dupstruct: fix extra duplicate identifier case Nick Alcock
@ 2025-10-06 16:14 ` Kris Van Hees
0 siblings, 0 replies; 13+ messages in thread
From: Kris Van Hees @ 2025-10-06 16:14 UTC (permalink / raw)
To: Nick Alcock; +Cc: dtrace, dtrace-devel
On Mon, Oct 06, 2025 at 04:28:28PM +0100, Nick Alcock wrote:
> We were failing to handle one case where duplicate members or variables
> are now reported as duplicate members, enumerators, or variables.
> (It was concealed inside an .r.p.)
>
> Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
> ---
> test/unittest/types/err.D_UNKNOWN.dupstruct.r | 2 +-
> test/utils/libctf.r.p | 3 ++-
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/test/unittest/types/err.D_UNKNOWN.dupstruct.r b/test/unittest/types/err.D_UNKNOWN.dupstruct.r
> index 7afa74aa7f6d7..762b24f4c5901 100644
> --- a/test/unittest/types/err.D_UNKNOWN.dupstruct.r
> +++ b/test/unittest/types/err.D_UNKNOWN.dupstruct.r
> @@ -1,2 +1,2 @@
> -- @@stderr --
> -dtrace: failed to compile script test/unittest/types/err.D_UNKNOWN.dupstruct.d: [D_UNKNOWN] line 17: failed to define member 'x': Duplicate member or variable name
> +dtrace: failed to compile script test/unittest/types/err.D_UNKNOWN.dupstruct.d: [D_UNKNOWN] line 17: failed to define member 'x': Duplicate member, enumerator, or variable name
> diff --git a/test/utils/libctf.r.p b/test/utils/libctf.r.p
> index a2b4602cf713b..774eda7f57e1f 100755
> --- a/test/utils/libctf.r.p
> +++ b/test/utils/libctf.r.p
> @@ -1,7 +1,8 @@
> #!/usr/bin/gawk -f
> # Licensed under the Universal Permissive License v 1.0 as shown at
> # http://oss.oracle.com/licenses/upl.
> -/Duplicate member or variable name\.$/ { sub(/\.$/, ""); }
> +/Duplicate member or variable name/ { sub(/Duplicate member/, "&, enumerator,"); }
> +/Duplicate member, enumerator, or variable name\.$/ { sub(/\.$/, ""); }
> /Member name not found\.$/ { sub(/\.$/, ""); }
> /enum union pirate:/ { sub(/enum union pirate/, "enum struct pirate"); }
> { print; }
> --
> 2.51.0.284.g117bcb8de7
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/5] test: preprocessor: work on GCC 16
2025-10-06 15:28 ` [PATCH 3/5] test: preprocessor: work on GCC 16 Nick Alcock
@ 2025-10-07 15:08 ` Kris Van Hees
0 siblings, 0 replies; 13+ messages in thread
From: Kris Van Hees @ 2025-10-07 15:08 UTC (permalink / raw)
To: Nick Alcock; +Cc: dtrace, dtrace-devel
On Mon, Oct 06, 2025 at 04:28:26PM +0100, Nick Alcock wrote:
> GCC commit c397a8c12296b75a91ae51e4889debf023e6c338 ("libcpp, genmatch:
> Use gcc_diag instead of printf for libcpp diagnostics") made libcpp
> quote identifiers and tokens in diagnostics like the rest of GCC does.
> We have several tests that rely on the old error formatting: sed away
> quotes and smartquotes into quotes or nothing (as appropriate to match
> older GCCs), until such time as GCC 15 is obsolete (a long long time
> away).
>
> Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
> ---
> test/unittest/preprocessor/err.defincomp.r.p | 1 +
> test/unittest/preprocessor/err.ifdefincomp.r.p | 4 ++++
> test/unittest/preprocessor/err.incompelse.r.p | 4 ++++
> test/unittest/preprocessor/err.mulelse.r.p | 1 +
> 4 files changed, 10 insertions(+)
> create mode 120000 test/unittest/preprocessor/err.defincomp.r.p
> create mode 100755 test/unittest/preprocessor/err.ifdefincomp.r.p
> create mode 100755 test/unittest/preprocessor/err.incompelse.r.p
> create mode 120000 test/unittest/preprocessor/err.mulelse.r.p
>
> diff --git a/test/unittest/preprocessor/err.defincomp.r.p b/test/unittest/preprocessor/err.defincomp.r.p
> new file mode 120000
> index 0000000000000..62577fe0b6bbd
> --- /dev/null
> +++ b/test/unittest/preprocessor/err.defincomp.r.p
> @@ -0,0 +1 @@
> +err.incompelse.r.p
> \ No newline at end of file
> diff --git a/test/unittest/preprocessor/err.ifdefincomp.r.p b/test/unittest/preprocessor/err.ifdefincomp.r.p
> new file mode 100755
> index 0000000000000..7629ac5973957
> --- /dev/null
> +++ b/test/unittest/preprocessor/err.ifdefincomp.r.p
> @@ -0,0 +1,4 @@
> +#!/usr/bin/sed -f
> +# GCC 16 improved diagnostics formatting. Until GCC 16 is the minimum
> +# supported, we have to sed it back again.
> +s,[??????],",g
> diff --git a/test/unittest/preprocessor/err.incompelse.r.p b/test/unittest/preprocessor/err.incompelse.r.p
> new file mode 100755
> index 0000000000000..ae9a6833d106d
> --- /dev/null
> +++ b/test/unittest/preprocessor/err.incompelse.r.p
> @@ -0,0 +1,4 @@
> +#!/usr/bin/sed -f
> +# GCC 16 improved diagnostics formatting. Until GCC 16 is the minimum
> +# supported, we have to sed it back again.
> +s,[??????],,g
> diff --git a/test/unittest/preprocessor/err.mulelse.r.p b/test/unittest/preprocessor/err.mulelse.r.p
> new file mode 120000
> index 0000000000000..62577fe0b6bbd
> --- /dev/null
> +++ b/test/unittest/preprocessor/err.mulelse.r.p
> @@ -0,0 +1 @@
> +err.incompelse.r.p
> \ No newline at end of file
> --
> 2.51.0.284.g117bcb8de7
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/5] test: fbt return0: work on quiet systems
2025-10-06 16:09 ` [PATCH 1/5] test: fbt return0: work on quiet systems Kris Van Hees
@ 2025-10-07 15:36 ` Nick Alcock
2025-10-08 11:16 ` [PATCH v2 " Nick Alcock
1 sibling, 0 replies; 13+ messages in thread
From: Nick Alcock @ 2025-10-07 15:36 UTC (permalink / raw)
To: Kris Van Hees; +Cc: dtrace, dtrace-devel
On 6 Oct 2025, Kris Van Hees spake thusly:
> On Mon, Oct 06, 2025 at 04:28:24PM +0100, Nick Alcock wrote:
>> These two tests probe on sys_poll and just hope something calls it.
>> On sufficiently quiet systems, nothing does.
>>
>> Define a trivial trigger to do so.
>
> Why not change the probe to be on hrtimer_nanosleep and use periodic_output
> as trigger, rather than adding another trigger executable?
Happy to. I wasn't sure if we depended on it being poll :)
Patch coming shortly.
--
NULL && (void)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 1/5] test: fbt return0: work on quiet systems
2025-10-06 16:09 ` [PATCH 1/5] test: fbt return0: work on quiet systems Kris Van Hees
2025-10-07 15:36 ` Nick Alcock
@ 2025-10-08 11:16 ` Nick Alcock
2025-10-08 16:15 ` Kris Van Hees
1 sibling, 1 reply; 13+ messages in thread
From: Nick Alcock @ 2025-10-08 11:16 UTC (permalink / raw)
To: dtrace, dtrace-devel
These two tests probe on sys_poll and just hope something calls it.
On sufficiently quiet systems, nothing does.
Use hrtimer_nanosleep instead.
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
---
test/unittest/fbtprovider/tst.return0.d | 4 +++-
test/unittest/fbtprovider/tst.return0.r | 2 +-
test/unittest/providers/rawfbt/tst.return0.d | 4 +++-
test/unittest/providers/rawfbt/tst.return0.r | 2 +-
4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/test/unittest/fbtprovider/tst.return0.d b/test/unittest/fbtprovider/tst.return0.d
index 0b7091b320904..f06120a55e5d0 100644
--- a/test/unittest/fbtprovider/tst.return0.d
+++ b/test/unittest/fbtprovider/tst.return0.d
@@ -11,10 +11,12 @@
* SECTION: FBT Provider/Probe arguments
*/
+/* @@trigger: periodic_output */
+
#pragma D option quiet
#pragma D option statusrate=10ms
-fbt::do_sys_poll:return
+fbt:vmlinux:hrtimer_nanosleep:return
/arg1 == 0/
{
printf("%s %x returned 0", probefunc, arg0);
diff --git a/test/unittest/fbtprovider/tst.return0.r b/test/unittest/fbtprovider/tst.return0.r
index 53308c30f27ab..e4065e20062e0 100644
--- a/test/unittest/fbtprovider/tst.return0.r
+++ b/test/unittest/fbtprovider/tst.return0.r
@@ -1 +1 @@
-do_sys_poll ffffffffffffffff returned 0
+hrtimer_nanosleep ffffffffffffffff returned 0
diff --git a/test/unittest/providers/rawfbt/tst.return0.d b/test/unittest/providers/rawfbt/tst.return0.d
index 0146d684f1033..3a39740071c49 100644
--- a/test/unittest/providers/rawfbt/tst.return0.d
+++ b/test/unittest/providers/rawfbt/tst.return0.d
@@ -9,10 +9,12 @@
* ASSERTION: simple rawfbt provider arg0 and probefunc print test.
*/
+/* @@trigger: periodic_output */
+
#pragma D option quiet
#pragma D option statusrate=10ms
-rawfbt::do_sys_poll:return
+fbt:vmlinux:hrtimer_nanosleep:return
/arg1 == 0/
{
printf("%s %x returned 0", probefunc, arg0);
diff --git a/test/unittest/providers/rawfbt/tst.return0.r b/test/unittest/providers/rawfbt/tst.return0.r
index 53308c30f27ab..e4065e20062e0 100644
--- a/test/unittest/providers/rawfbt/tst.return0.r
+++ b/test/unittest/providers/rawfbt/tst.return0.r
@@ -1 +1 @@
-do_sys_poll ffffffffffffffff returned 0
+hrtimer_nanosleep ffffffffffffffff returned 0
base-commit: 877fcdeb25b370be182d51f27fb4bd8e4f739fb1
--
2.51.0.284.g117bcb8de7
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH v2 1/5] test: fbt return0: work on quiet systems
2025-10-08 11:16 ` [PATCH v2 " Nick Alcock
@ 2025-10-08 16:15 ` Kris Van Hees
0 siblings, 0 replies; 13+ messages in thread
From: Kris Van Hees @ 2025-10-08 16:15 UTC (permalink / raw)
To: Nick Alcock; +Cc: dtrace, dtrace-devel
On Wed, Oct 08, 2025 at 12:16:42PM +0100, Nick Alcock wrote:
> These two tests probe on sys_poll and just hope something calls it.
> On sufficiently quiet systems, nothing does.
>
> Use hrtimer_nanosleep instead.
>
> Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
> ---
> test/unittest/fbtprovider/tst.return0.d | 4 +++-
> test/unittest/fbtprovider/tst.return0.r | 2 +-
> test/unittest/providers/rawfbt/tst.return0.d | 4 +++-
> test/unittest/providers/rawfbt/tst.return0.r | 2 +-
> 4 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/test/unittest/fbtprovider/tst.return0.d b/test/unittest/fbtprovider/tst.return0.d
> index 0b7091b320904..f06120a55e5d0 100644
> --- a/test/unittest/fbtprovider/tst.return0.d
> +++ b/test/unittest/fbtprovider/tst.return0.d
> @@ -11,10 +11,12 @@
> * SECTION: FBT Provider/Probe arguments
> */
>
> +/* @@trigger: periodic_output */
> +
> #pragma D option quiet
> #pragma D option statusrate=10ms
>
> -fbt::do_sys_poll:return
> +fbt:vmlinux:hrtimer_nanosleep:return
> /arg1 == 0/
> {
> printf("%s %x returned 0", probefunc, arg0);
> diff --git a/test/unittest/fbtprovider/tst.return0.r b/test/unittest/fbtprovider/tst.return0.r
> index 53308c30f27ab..e4065e20062e0 100644
> --- a/test/unittest/fbtprovider/tst.return0.r
> +++ b/test/unittest/fbtprovider/tst.return0.r
> @@ -1 +1 @@
> -do_sys_poll ffffffffffffffff returned 0
> +hrtimer_nanosleep ffffffffffffffff returned 0
> diff --git a/test/unittest/providers/rawfbt/tst.return0.d b/test/unittest/providers/rawfbt/tst.return0.d
> index 0146d684f1033..3a39740071c49 100644
> --- a/test/unittest/providers/rawfbt/tst.return0.d
> +++ b/test/unittest/providers/rawfbt/tst.return0.d
> @@ -9,10 +9,12 @@
> * ASSERTION: simple rawfbt provider arg0 and probefunc print test.
> */
>
> +/* @@trigger: periodic_output */
> +
> #pragma D option quiet
> #pragma D option statusrate=10ms
>
> -rawfbt::do_sys_poll:return
> +fbt:vmlinux:hrtimer_nanosleep:return
> /arg1 == 0/
> {
> printf("%s %x returned 0", probefunc, arg0);
> diff --git a/test/unittest/providers/rawfbt/tst.return0.r b/test/unittest/providers/rawfbt/tst.return0.r
> index 53308c30f27ab..e4065e20062e0 100644
> --- a/test/unittest/providers/rawfbt/tst.return0.r
> +++ b/test/unittest/providers/rawfbt/tst.return0.r
> @@ -1 +1 @@
> -do_sys_poll ffffffffffffffff returned 0
> +hrtimer_nanosleep ffffffffffffffff returned 0
>
> base-commit: 877fcdeb25b370be182d51f27fb4bd8e4f739fb1
> --
> 2.51.0.284.g117bcb8de7
>
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2025-10-08 16:15 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-06 15:28 [PATCH 1/5] test: fbt return0: work on quiet systems Nick Alcock
2025-10-06 15:28 ` [PATCH 2/5] test: nfs: don't require a locking daemon Nick Alcock
2025-10-06 16:11 ` Kris Van Hees
2025-10-06 15:28 ` [PATCH 3/5] test: preprocessor: work on GCC 16 Nick Alcock
2025-10-07 15:08 ` Kris Van Hees
2025-10-06 15:28 ` [PATCH 4/5] test: tid_pid: don't assume the type of pthread_t Nick Alcock
2025-10-06 16:13 ` Kris Van Hees
2025-10-06 15:28 ` [PATCH 5/5] test: dupstruct: fix extra duplicate identifier case Nick Alcock
2025-10-06 16:14 ` Kris Van Hees
2025-10-06 16:09 ` [PATCH 1/5] test: fbt return0: work on quiet systems Kris Van Hees
2025-10-07 15:36 ` Nick Alcock
2025-10-08 11:16 ` [PATCH v2 " Nick Alcock
2025-10-08 16:15 ` Kris Van Hees
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox