test: Skip tst.depth.sh
PATCH 1/6 test: Skip tst.depth.sh
From: Eugene Loh <[email protected]>
The test asks for very many pid probes. E.g.,
pid$target:::entry,
pid$target:::return,
pid$target:a.out::,If it is successful, this can wreak havoc on some systems, in some cases leading to 1-2 dozen subsequent tests failing due to cascading problems:
poor test clean up, triggers left running, persistent loads, pid=0 not running, tests timing out, and so on. These problems require investigation.
For now, skip the precipitating test.
See
https://oss.oracle.com/pipermail/dtrace-devel/2025-November/006916.html
Incidentally, there are similar issues for
* test/unittest/pid/err.D_PROC_CREATEFAIL.many.d
but this test is already marked SKIP, apparently for the same reason. See commit d9423bd79
("err.D_PROC_CREATEFAIL.many.d causes failures in subsequent tests"). The current patch simply seeks to apply the same SKIP to another test.
* test/demo/user/userfunc.d
but this test is marked XFAIL since it needs a trigger
All three tests should be resolved when the underlying problem is tackled.
Orabug: 38642080
--- test/unittest/ustack/tst.depth.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
test/unittest/ustack/tst.depth.sh +2 -2
@@ -1,10 +1,10 @@ #!/bin/bash # # Oracle Linux DTrace. -# Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 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. -# @@xfail: dtv2 +# @@skip if [ $# != 1 ]; then echo expected one argument: '<'dtrace-path'>'
Signature · 1 line
2.47.3
PATCH 2/6 Simple typo in comment
From: Eugene Loh <[email protected]>
--- libdtrace/dt_probe.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
libdtrace/dt_probe.h +1 -1
@@ -33,7 +33,7 @@ typedef struct dt_probe_instance { typedef struct dt_probe { dt_list_t list; /* prev/next in enablings chain */ dt_list_t stmts; /* stmts */ - dt_list_t dependents; /* dependenct probes to attach */ + dt_list_t dependents; /* dependent probes to attach */ const dtrace_probedesc_t *desc; /* probe description (id, name) */ dt_provider_t *prov; /* pointer to containing provider */ struct dt_hentry he_prv; /* provider name htab links */
Signature · 1 line
2.47.3
Re: [DTrace-devel] [PATCH 2/6] Simple typo in comment
Quoted 3 lines · eugene loh
From: Eugene Loh <[email protected]>
Signed-off-by Eugene Loh <[email protected]>
Signature · 1 line
NULL && (void)
PATCH 3/6 Check if the BPF PROG_LOAD is either -1 or else non-negative
In reply to [email protected]From: Eugene Loh <[email protected]>
The return value is supposed to be -1 or non-negative. The current check lumps 0 with -1.
--- libdtrace/dt_bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
libdtrace/dt_bpf.c +1 -1
@@ -428,7 +428,7 @@ have_helper(uint32_t func_id)/* If the program loads, we can use the helper. */ fd =dt_bpf_prog_attach (BPF_PROG_TYPE_KPROBE ,0 ,0 ,0 , &dp,1 , log,DT_BPF_LOG_SIZE_SMALL ); -if (fd >0 ) { +if (fd >=0 ) {close (fd);return 1 ; }
Signature · 1 line
2.47.3
Re: [DTrace-devel] [PATCH 3/6] Check if the BPF PROG_LOAD is either -1 or else non-negative
On 31 Mar 2026, eugene loh outgrape:
Quoted 6 lines
From: Eugene Loh <[email protected]>
The return value is supposed to be -1 or non-negative. The current check lumps 0 with -1.
Signed-off-by Eugene Loh <[email protected]>
Signature · 1 line
NULL && (void)
PATCH 4/6 test: Remove unnecessary "destructive" pragma
In reply to [email protected]From: Eugene Loh <[email protected]>
--- test/unittest/sched/tst.oncpu.d | 1 - 1 file changed, 1 deletion(-)
test/unittest/sched/tst.oncpu.d +0 -1
@@ -8,7 +8,6 @@ /* @@timeout: 15 */ #pragma D option switchrate=100hz -#pragma D option destructive sched:::on-cpu /pid == $pid/
Signature · 1 line
2.47.3
Re: [DTrace-devel] [PATCH 4/6] test: Remove unnecessary "destructive" pragma
On 31 Mar 2026, eugene loh outgrape:
Quoted 3 lines
From: Eugene Loh <[email protected]>
Signed-off-by Eugene Loh <[email protected]>
Signature · 1 line
NULL && (void)
PATCH 5/6 Possible uninitialized 'last' variable in usdt_copyin_data()
In reply to [email protected]From: Eugene Loh <[email protected]>
Some compilers warn:
libcommon/usdt_parser.c: In function ‘usdt_copyin_data’:libcommon/usdt_parser.c:191:15: warning:
‘last’ may be used uninitialized in this function [-Wmaybe-uninitialized]
last->next = blk;
~~~~~~~~~~~^~~~~Change the "if" check to make it easier for compilers to recognize that "last" will be initialized (and non-NULL even!).
--- libcommon/usdt_parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
libcommon/usdt_parser.c +2 -2
@@ -163,7 +163,7 @@ usdt_destroy_data(usdt_data_t *data)usdt_data_t *usdt_copyin_data (int in,int out,int *ok) { -usdt_data_t *first =NULL , *last; +usdt_data_t *first =NULL , *last =NULL ;size_t cnt; *ok =1 ;
@@ -185,7 +185,7 @@ usdt_copyin_data(int in, int out, int *ok)if ((blk =usdt_copyin_block (in, out, ok)) ==NULL ) goto err; -if (first ==NULL ) +if (last ==NULL ) first = last = blk;else { last->next = blk;
Signature · 1 line
2.47.3
Re: [DTrace-devel] [PATCH 5/6] Possible uninitialized 'last' variable in usdt_copyin_data()
On 31 Mar 2026, eugene loh told this:
Quoted 6 lines
From: Eugene Loh <[email protected]>
Some compilers warn:
libcommon/usdt_parser.c: In function ‘usdt_copyin_data’:libcommon/usdt_parser.c:191:15: warning:
Quoted 8 lines
‘last’ may be used uninitialized in this function [-Wmaybe-uninitialized] last->next = blk; ~~~~~~~~~~~^~~~~Change the "if" check to make it easier for compilers to recognize that "last" will be initialized (and non-NULL even!).
Signed-off-by Eugene Loh <[email protected]>
Ugh. Still, if it works, it works, and it's semantically the same.
Signature · 1 line
NULL && (void)
PATCH 6/6 test: Check declaration (without init) inside a probe
In reply to [email protected]From: Eugene Loh <[email protected]>
We test that declaration (with init) of a variable inside a probe is not allowed.
Check also that declaration without init inside a probe is also forbidden.
The related test/unittest/probes/err.D_SYNTAX/err.D_SYNTAX.declare*.d tests are left alone.
--- .../scalars/err.D_SYNTAX.declare-init.d | 20 +++++++++++++++++++ test/unittest/scalars/err.D_SYNTAX.declare.d | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 test/unittest/scalars/err.D_SYNTAX.declare-init.d
test/unittest/scalars/err.D_SYNTAX.declare-init.d new file +20 -0
@@ -0,0 +1,20 @@ +/* + * Oracle Linux DTrace. + * Copyright (c) 2006, 2026, 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. + */ + +/* + * ASSERTION: + * + * Declare and init a variable Inside Begin and make sure compilation fails. + * + * SECTION: Variables/Scalar Variables + * + */ + +BEGIN +{ + int x = 123; +}
test/unittest/scalars/err.D_SYNTAX.declare.d +2 -2
@@ -1,6 +1,6 @@ /* * Oracle Linux DTrace. - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2026, 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. */
@@ -16,5 +16,5 @@ BEGIN { - int x = 123; + int x; }
Signature · 1 line
2.47.3
Re: [DTrace-devel] [PATCH 6/6] test: Check declaration (without init) inside a probe
On 31 Mar 2026, eugene loh stated:
Quoted 5 lines
From: Eugene Loh <[email protected]>
We test that declaration (with init) of a variable inside a probe is not allowed.
Quoted 7 lines
Check also that declaration without init inside a probe is also forbidden.
The related test/unittest/probes/err.D_SYNTAX/err.D_SYNTAX.declare*.d tests are left alone.
Signed-off-by Eugene Loh <[email protected]>
Signature · 1 line
NULL && (void)
On 31 Mar 2026, eugene loh told this:
Quoted 8 lines
From: Eugene Loh <[email protected]>
The test asks for very many pid probes. E.g.,
pid$target:::entry, pid$target:::return, pid$target:a.out::,
Quoted 7 lines
If it is successful, this can wreak havoc on some systems, in some cases leading to 1-2 dozen subsequent tests failing due to cascading problems:
poor test clean up, triggers left running, persistent loads, pid=0 not running, tests timing out, and so on. These problems require investigation.For now, skip the precipitating test.
This sort of thing is what the tagging system is for. This should probably be a default-skipped tag instead:
@@tag: skip-default
And add
!skip-default
into test/tags.default (not currently existing).
(The same is probably true of most of the other remaining skipped tests.)
Signature · 1 line
NULL && (void)