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

eugene.loh at oracle.com eugene.loh at oracle.com
Thu Dec 14 22:21:16 UTC 2023


From: Eugene Loh <eugene.loh at oracle.com>

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>
---
 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