[DTrace-devel] [PATCH 04/14] Test: caller and stackdepth tests for fbt provider

Nick Alcock nick.alcock at oracle.com
Fri Jun 13 14:40:55 UTC 2025


On 22 May 2025, eugene loh uttered the following:

> From: Eugene Loh <eugene.loh at oracle.com>
>
> We will introduce a set of tests for the caller and stackdepth
> built-in variables for a wide selection of providers.
>
> For the caller test, we will essentially call
>         stack(2);
>         sym(caller);
> and then compare the caller to the second stack frame using
> the new script check_caller_to_stack2.awk.
>
> For the stackdepth test, we will essentially call
>         printf("%d\n", stackdepth);
>         stack();
> and then compare the stackdepth to the reported frames using
> the new script check_stackdepth_to_stack.awk.
>
> In this patch, introduce tests for the fbt provider, along with
> the support scripts they need.  Subsequent patches will handle
> other providers.
>
> The old tst.caller2.d and tst.stackdepth2.d, which tested fbt,
> become obsolete.  Remove them.

Nice! My only caveat (easily fixed) is that the old tests had header
comments saying what they were testing, while the new ones don't.
(Yes, the awk scripts do make it clearer, but still...)

> Signed-off-by: Eugene Loh <eugene.loh at oracle.com>

Reviewed-by: Nick Alcock <nick.alcock at oracle.com>

-- 
NULL && (void)



More information about the DTrace-devel mailing list