[DTrace-devel] [PATCH] test: Skip err.Z_no-w for now
Nick Alcock
nick.alcock at oracle.com
Tue Jul 8 12:15:08 UTC 2025
From: Eugene Loh <eugene.loh at oracle.com>
>
> It is unclear what behavior is desired. For example, consider:
>
> dtrace -Z -n 'BEGIN { exit(0) } foo:bar:baz:bop { raise(SIGUSR1) }'
... isn't the lack of semicolons here a syntax error? (Or have I been
inserting them pointlessly all these years just because awk needs them?)
>
> The first probe exists. The second one will be ignored. Solaris will
> reject the script with:
>
> dtrace: description 'BEGIN ' matched 1 probe
> dtrace: could not enable tracing: Destructive actions not allowed
>
> On Linux, we have:
>
> dtrace: description 'BEGIN ' matched 1 probe
> CPU ID FUNCTION:NAME
> 0 1 :BEGIN
>
> Perhaps both behaviors have merit. For now, just skip the test to
> avoid test failures we are not ready to arbitrate.
Does execution fail if the probe exists but there's a BEGIN that exits?
I guess so. So the interesting question is: if you start with -Z and
specify a destructive action in a nonexistent probe, and then a
USDT-containing program starts up that provides that probe, what do we
do? If we don't terminate, that would be surprising. If we terminate in
the middle of execution, would that be more surprising than checking all
bodies at startup and failing early?
--
NULL && (void)
More information about the DTrace-devel
mailing list