[DTrace-devel] [PATCH 1/2] test: Allow more variations in expected fbt kernel stacks

Kris Van Hees kris.van.hees at oracle.com
Fri Feb 28 15:47:59 UTC 2025


On Sat, Feb 08, 2025 at 06:21:05PM -0500, eugene.loh at oracle.com wrote:
> From: Eugene Loh <eugene.loh at oracle.com>
> 
> This test checks the call stack upon entry to vfs_write().
> Unfortunately, these checks require some maintenance since the call
> stack can vary -- slightly or greatly -- depending on processor or
> kernel.  There is a competition between ease of test maintenance and
> strictness of correctness checks.
> 
> Adapt post processing of output to allow new variations in stacks
> seen in UEK 8 (currently Linux 6.12).
> 
> Orabug: 37459289
> Signed-off-by: Eugene Loh <eugene.loh at oracle.com>

Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>

> ---
>  test/unittest/stack/tst.stack_fbt.sh | 15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/test/unittest/stack/tst.stack_fbt.sh b/test/unittest/stack/tst.stack_fbt.sh
> index c365e14d6..8a0b7999c 100755
> --- a/test/unittest/stack/tst.stack_fbt.sh
> +++ b/test/unittest/stack/tst.stack_fbt.sh
> @@ -37,9 +37,18 @@ if [ $? -ne 0 ]; then
>  	exit 1
>  fi
>  
> -# Strip out blank lines and pointer values.
> -
> -awk 'NF != 0 { sub(/+0x[0-9a-f]*$/, "+{ptr}"); print }' dtrace.out > dtrace.post
> +# Strip out
> +# - blank lines
> +# - "constprop"
> +# - "isra"
> +# - "_after_hwframe"    (x86 starting with UEK8)
> +# - pointer values
> +
> +awk 'NF != 0 { sub("\\.constprop\\.[0-9]", "");
> +               sub("\\.isra\\.[0-9]", "");
> +               sub("_after_hwframe\\+", "+");
> +               sub(/+0x[0-9a-f]*$/, "+{ptr}");
> +               print }' dtrace.out > dtrace.post
>  if [ $? -ne 0 ]; then
>  	echo ERROR: awk failed
>  	cat dtrace.out
> -- 
> 2.43.5
> 



More information about the DTrace-devel mailing list