[DTrace-devel] [PATCH 1/4] test: Skip lockstat prior to 5.10

Kris Van Hees kvanhees at kvh-deb-bpf.us.oracle.com
Tue Jan 23 16:53:10 UTC 2024


On Thu, Dec 14, 2023 at 05:21:16PM -0500, eugene.loh at oracle.com wrote:
> 
> Turn off lockstat testing prior to 5.10 due to commit 197115e2
> "lockstat: refuse to provide probes on kernels < 5.10.0".
> 
> Signed-off-by: Eugene Loh <eugene.loh at oracle.com>

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

> ---
>  test/demo/lockstat/whatlock.x | 13 +++++++++++++
>  test/unittest/lockstat/test.x | 13 +++++++++++++
>  2 files changed, 26 insertions(+)
>  create mode 100755 test/demo/lockstat/whatlock.x
>  create mode 100755 test/unittest/lockstat/test.x
> 
> diff --git a/test/demo/lockstat/whatlock.x b/test/demo/lockstat/whatlock.x
> new file mode 100755
> index 00000000..39e0e752
> --- /dev/null
> +++ b/test/demo/lockstat/whatlock.x
> @@ -0,0 +1,13 @@
> +#!/bin/bash
> +  
> +read MAJOR MINOR <<< `uname -r | grep -Eo '^[0-9]+\.[0-9]+' | tr '.' ' '`
> +
> +if [ $MAJOR -gt 5 ]; then
> +	exit 0
> +fi
> +if [ $MAJOR -eq 5 -a $MINOR -ge 10 ]; then
> +	exit 0
> +fi
> +
> +echo "lockstat disabled prior to 5.10"
> +exit 1
> diff --git a/test/unittest/lockstat/test.x b/test/unittest/lockstat/test.x
> new file mode 100755
> index 00000000..39e0e752
> --- /dev/null
> +++ b/test/unittest/lockstat/test.x
> @@ -0,0 +1,13 @@
> +#!/bin/bash
> +  
> +read MAJOR MINOR <<< `uname -r | grep -Eo '^[0-9]+\.[0-9]+' | tr '.' ' '`
> +
> +if [ $MAJOR -gt 5 ]; then
> +	exit 0
> +fi
> +if [ $MAJOR -eq 5 -a $MINOR -ge 10 ]; then
> +	exit 0
> +fi
> +
> +echo "lockstat disabled prior to 5.10"
> +exit 1
> -- 
> 2.18.4
> 
> 



More information about the DTrace-devel mailing list