[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240516174357.26755-18-jim.cromie@gmail.com>
Date: Thu, 16 May 2024 11:43:41 -0600
From: Jim Cromie <jim.cromie@...il.com>
To: jbaron@...mai.com,
gregkh@...uxfoundation.org,
linux-kernel@...r.kernel.org
Cc: ukaszb@...omium.org,
linux@...musvillemoes.dk,
joe@...ches.com,
mcgrof@...nel.org,
daniel.vetter@...ll.ch,
tvrtko.ursulin@...ux.intel.com,
jani.nikula@...el.com,
ville.syrjala@...ux.intel.com,
seanpaul@...omium.org,
robdclark@...il.com,
groeck@...gle.com,
yanivt@...gle.com,
bleung@...gle.com,
Jim Cromie <jim.cromie@...il.com>
Subject: [PATCH v8-RESEND 17/33] selftests-dyndbg: exit 127 if no facility
Test if /proc/dynamic_debug/control exists, exit 127 otherwise.
This distinguishes an untestable config from both pass & fail.
The 127 choice is pretty arbitrary, but imitating bisect.
That control file's presense guarantees that dynamic-debugging is
configured (unless /proc is off, unusually), without dealing with the
<debugfs> mount.
Signed-off-by: Jim Cromie <jim.cromie@...il.com>
---
tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh b/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh
index 1be70af26a38..cb77ae142520 100755
--- a/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh
+++ b/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh
@@ -11,6 +11,11 @@ CYAN="\033[0;36m"
NC="\033[0;0m"
error_msg=""
+[ -e /proc/dynamic_debug/control ] || {
+ echo -e "${RED}: kernel not configured for this test ${NC}"
+ exit 127
+}
+
function vx () {
echo $1 > /sys/module/dynamic_debug/parameters/verbose
}
--
2.45.0
Powered by blists - more mailing lists