* [PATCH 2/6] Simple typo in comment
2026-03-31 1:02 [PATCH 1/6] test: Skip tst.depth.sh eugene.loh
@ 2026-03-31 1:02 ` eugene.loh
2026-04-14 21:36 ` [DTrace-devel] " Nick Alcock
2026-03-31 1:02 ` [PATCH 3/6] Check if the BPF PROG_LOAD is either -1 or else non-negative eugene.loh
` (4 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: eugene.loh @ 2026-03-31 1:02 UTC (permalink / raw)
To: dtrace, dtrace-devel
From: Eugene Loh <eugene.loh@oracle.com>
Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
---
libdtrace/dt_probe.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libdtrace/dt_probe.h b/libdtrace/dt_probe.h
index 54053cd3d..73b15553a 100644
--- a/libdtrace/dt_probe.h
+++ b/libdtrace/dt_probe.h
@@ -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 */
--
2.47.3
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH 3/6] Check if the BPF PROG_LOAD is either -1 or else non-negative
2026-03-31 1:02 [PATCH 1/6] test: Skip tst.depth.sh eugene.loh
2026-03-31 1:02 ` [PATCH 2/6] Simple typo in comment eugene.loh
@ 2026-03-31 1:02 ` eugene.loh
2026-04-14 21:40 ` [DTrace-devel] " Nick Alcock
2026-03-31 1:02 ` [PATCH 4/6] test: Remove unnecessary "destructive" pragma eugene.loh
` (3 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: eugene.loh @ 2026-03-31 1:02 UTC (permalink / raw)
To: dtrace, dtrace-devel
From: Eugene Loh <eugene.loh@oracle.com>
The return value is supposed to be -1 or non-negative. The current
check lumps 0 with -1.
Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
---
libdtrace/dt_bpf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libdtrace/dt_bpf.c b/libdtrace/dt_bpf.c
index fb66bd93b..c328f5100 100644
--- a/libdtrace/dt_bpf.c
+++ b/libdtrace/dt_bpf.c
@@ -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;
}
--
2.47.3
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH 4/6] test: Remove unnecessary "destructive" pragma
2026-03-31 1:02 [PATCH 1/6] test: Skip tst.depth.sh eugene.loh
2026-03-31 1:02 ` [PATCH 2/6] Simple typo in comment eugene.loh
2026-03-31 1:02 ` [PATCH 3/6] Check if the BPF PROG_LOAD is either -1 or else non-negative eugene.loh
@ 2026-03-31 1:02 ` eugene.loh
2026-04-14 21:41 ` [DTrace-devel] " Nick Alcock
2026-03-31 1:02 ` [PATCH 5/6] Possible uninitialized 'last' variable in usdt_copyin_data() eugene.loh
` (2 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: eugene.loh @ 2026-03-31 1:02 UTC (permalink / raw)
To: dtrace, dtrace-devel
From: Eugene Loh <eugene.loh@oracle.com>
Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
---
test/unittest/sched/tst.oncpu.d | 1 -
1 file changed, 1 deletion(-)
diff --git a/test/unittest/sched/tst.oncpu.d b/test/unittest/sched/tst.oncpu.d
index 7a33bab4f..65bb313f0 100644
--- a/test/unittest/sched/tst.oncpu.d
+++ b/test/unittest/sched/tst.oncpu.d
@@ -8,7 +8,6 @@
/* @@timeout: 15 */
#pragma D option switchrate=100hz
-#pragma D option destructive
sched:::on-cpu
/pid == $pid/
--
2.47.3
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH 5/6] Possible uninitialized 'last' variable in usdt_copyin_data()
2026-03-31 1:02 [PATCH 1/6] test: Skip tst.depth.sh eugene.loh
` (2 preceding siblings ...)
2026-03-31 1:02 ` [PATCH 4/6] test: Remove unnecessary "destructive" pragma eugene.loh
@ 2026-03-31 1:02 ` eugene.loh
2026-04-14 21:43 ` [DTrace-devel] " Nick Alcock
2026-03-31 1:02 ` [PATCH 6/6] test: Check declaration (without init) inside a probe eugene.loh
2026-04-14 21:35 ` [DTrace-devel] [PATCH 1/6] test: Skip tst.depth.sh Nick Alcock
5 siblings, 1 reply; 12+ messages in thread
From: eugene.loh @ 2026-03-31 1:02 UTC (permalink / raw)
To: dtrace, dtrace-devel
From: Eugene Loh <eugene.loh@oracle.com>
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!).
Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
---
libcommon/usdt_parser.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libcommon/usdt_parser.c b/libcommon/usdt_parser.c
index 864198098..d8cb9b7ba 100644
--- a/libcommon/usdt_parser.c
+++ b/libcommon/usdt_parser.c
@@ -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;
--
2.47.3
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [DTrace-devel] [PATCH 5/6] Possible uninitialized 'last' variable in usdt_copyin_data()
2026-03-31 1:02 ` [PATCH 5/6] Possible uninitialized 'last' variable in usdt_copyin_data() eugene.loh
@ 2026-04-14 21:43 ` Nick Alcock
0 siblings, 0 replies; 12+ messages in thread
From: Nick Alcock @ 2026-04-14 21:43 UTC (permalink / raw)
To: dtrace-devel, dtrace
On 31 Mar 2026, eugene loh told this:
> From: Eugene Loh <eugene.loh@oracle.com>
>
> 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!).
>
> Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
Ugh. Still, if it works, it works, and it's semantically the same.
Reviewed-by: Nick Alcock <nick.alcock@oracle.com>
--
NULL && (void)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 6/6] test: Check declaration (without init) inside a probe
2026-03-31 1:02 [PATCH 1/6] test: Skip tst.depth.sh eugene.loh
` (3 preceding siblings ...)
2026-03-31 1:02 ` [PATCH 5/6] Possible uninitialized 'last' variable in usdt_copyin_data() eugene.loh
@ 2026-03-31 1:02 ` eugene.loh
2026-04-14 21:44 ` [DTrace-devel] " Nick Alcock
2026-04-14 21:35 ` [DTrace-devel] [PATCH 1/6] test: Skip tst.depth.sh Nick Alcock
5 siblings, 1 reply; 12+ messages in thread
From: eugene.loh @ 2026-03-31 1:02 UTC (permalink / raw)
To: dtrace, dtrace-devel
From: Eugene Loh <eugene.loh@oracle.com>
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.
Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
---
.../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
diff --git a/test/unittest/scalars/err.D_SYNTAX.declare-init.d b/test/unittest/scalars/err.D_SYNTAX.declare-init.d
new file mode 100644
index 000000000..fd8dca6c0
--- /dev/null
+++ b/test/unittest/scalars/err.D_SYNTAX.declare-init.d
@@ -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;
+}
diff --git a/test/unittest/scalars/err.D_SYNTAX.declare.d b/test/unittest/scalars/err.D_SYNTAX.declare.d
index f5b2ea914..b26acd04a 100644
--- a/test/unittest/scalars/err.D_SYNTAX.declare.d
+++ b/test/unittest/scalars/err.D_SYNTAX.declare.d
@@ -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;
}
--
2.47.3
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [DTrace-devel] [PATCH 6/6] test: Check declaration (without init) inside a probe
2026-03-31 1:02 ` [PATCH 6/6] test: Check declaration (without init) inside a probe eugene.loh
@ 2026-04-14 21:44 ` Nick Alcock
0 siblings, 0 replies; 12+ messages in thread
From: Nick Alcock @ 2026-04-14 21:44 UTC (permalink / raw)
To: dtrace-devel, dtrace
On 31 Mar 2026, eugene loh stated:
> From: Eugene Loh <eugene.loh@oracle.com>
>
> 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.
>
> Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
Reviewed-by: Nick Alcock <nick.alcock@oracle.com>
--
NULL && (void)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [DTrace-devel] [PATCH 1/6] test: Skip tst.depth.sh
2026-03-31 1:02 [PATCH 1/6] test: Skip tst.depth.sh eugene.loh
` (4 preceding siblings ...)
2026-03-31 1:02 ` [PATCH 6/6] test: Check declaration (without init) inside a probe eugene.loh
@ 2026-04-14 21:35 ` Nick Alcock
5 siblings, 0 replies; 12+ messages in thread
From: Nick Alcock @ 2026-04-14 21:35 UTC (permalink / raw)
To: dtrace-devel, dtrace
On 31 Mar 2026, eugene loh told this:
> From: Eugene Loh <eugene.loh@oracle.com>
>
> 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.
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.)
--
NULL && (void)
^ permalink raw reply [flat|nested] 12+ messages in thread