Linux CXL
 help / color / mirror / Atom feed
* [ndctl PATCH] cxl/test: skip, don't fail, when kernel tracing is not enabled
@ 2025-05-23  3:15 alison.schofield
  2025-05-23  3:57 ` Dan Williams
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: alison.schofield @ 2025-05-23  3:15 UTC (permalink / raw)
  To: nvdimm; +Cc: Alison Schofield, linux-cxl

From: Alison Schofield <alison.schofield@intel.com>

cxl-events.sh and cxl-poison.sh require a kernel with CONFIG_TRACING
enabled and currently report a FAIL when /sys/kernel/tracing is
missing. Update these tests to report a SKIP along with a message
stating the requirement. This allows the tests to run cleanly on
systems without TRACING enabled and gives users the info needed to
enable TRACING for testing.

Signed-off-by: Alison Schofield <alison.schofield@intel.com>
---

Noticed this behavior in Itaru's test results:
https://lore.kernel.org/linux-cxl/FD4183E1-162E-4790-B865-E50F20249A74@linux.dev/

 test/cxl-events.sh | 1 +
 test/cxl-poison.sh | 1 +
 2 files changed, 2 insertions(+)

diff --git a/test/cxl-events.sh b/test/cxl-events.sh
index c216d6aa9148..7326eb7447ee 100644
--- a/test/cxl-events.sh
+++ b/test/cxl-events.sh
@@ -13,6 +13,7 @@ num_info_expected=3
 rc=77
 
 set -ex
+[ -d "/sys/kernel/tracing" ] || do_skip "test requires CONFIG_TRACING"
 
 trap 'err $LINENO' ERR
 
diff --git a/test/cxl-poison.sh b/test/cxl-poison.sh
index 2caf092db460..6ed890bc666c 100644
--- a/test/cxl-poison.sh
+++ b/test/cxl-poison.sh
@@ -7,6 +7,7 @@
 rc=77
 
 set -ex
+[ -d "/sys/kernel/tracing" ] || do_skip "test requires CONFIG_TRACING"
 
 trap 'err $LINENO' ERR
 
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-05-28 20:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-23  3:15 [ndctl PATCH] cxl/test: skip, don't fail, when kernel tracing is not enabled alison.schofield
2025-05-23  3:57 ` Dan Williams
2025-05-23  6:00 ` Marc Herbert
2025-05-23 16:48 ` Dave Jiang
2025-05-28 20:53 ` Alison Schofield

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox