cxl/test: skip, don't fail, when kernel tracing is not enabled
[email protected]
maintainerPATCH 1/1 cxl/test: skip, don't fail, when kernel tracing is not enabled
From: Alison Schofield <[email protected]>
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.
---
Noticed this behavior in Itaru's test results:
https://lore.kernel.org/linux-cxl/[email protected]/
test/cxl-events.sh | 1 + test/cxl-poison.sh | 1 + 2 files changed, 2 insertions(+)
test/cxl-events.sh +1 -0
@@ -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
test/cxl-poison.sh +1 -0
@@ -7,6 +7,7 @@ rc=77 set -ex +[ -d "/sys/kernel/tracing" ] || do_skip "test requires CONFIG_TRACING" trap 'err $LINENO' ERR
Signature · 1 line
2.37.3
Quoted 9 lines · alison.schofield@ wrote:
From: Alison Schofield <[email protected]>
cxl-events.shandcxl-poison.shrequire a kernel withCONFIG_TRACINGenabled and currently report a FAIL when/sys/kernel/tracingis 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.
Quoted 5 lines
Signed-off-by Alison Schofield <[email protected]>---
Noticed this behavior in Itaru's test results:
https://lore.kernel.org/linux-cxl/[email protected]/
You could borrow the kernel process for information like this and move it above the --- line with the following trailers:
...you can also add:
Quoted 36 lines · On 2025-05-22 20:15, [email protected] wrote:
From: Alison Schofield <[email protected]>
cxl-events.shandcxl-poison.shrequire a kernel withCONFIG_TRACINGenabled and currently report a FAIL when/sys/kernel/tracingis 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 <[email protected]>---
Noticed this behavior in Itaru's test results:
https://lore.kernel.org/linux-cxl/[email protected]/test/cxl-events.sh | 1 + test/cxl-poison.sh | 1 + 2 files changed, 2 insertions(+)test/cxl-events.sh +1
-0@@ -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' ERRtest/cxl-poison.sh +0
-0
test/cxl-poison.sh line 13
Quoted 7 lines
test/cxl-poison.sh +1
-0@@ -7,6 +7,7 @@ rc=77 set -ex +[ -d "/sys/kernel/tracing" ] || do_skip "test requires CONFIG_TRACING" trap 'err $LINENO' ERR
Quoted 10 lines · On 5/22/25 8:15 PM, [email protected] wrote:
From: Alison Schofield <[email protected]>
cxl-events.shandcxl-poison.shrequire a kernel withCONFIG_TRACINGenabled and currently report a FAIL when/sys/kernel/tracingis 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 <[email protected]>
Quoted 33 lines
---
Noticed this behavior in Itaru's test results:
https://lore.kernel.org/linux-cxl/[email protected]/test/cxl-events.sh | 1 + test/cxl-poison.sh | 1 + 2 files changed, 2 insertions(+)test/cxl-events.sh +1
-0@@ -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' ERRtest/cxl-poison.sh +1
-0@@ -7,6 +7,7 @@ rc=77 set -ex +[ -d "/sys/kernel/tracing" ] || do_skip "test requires CONFIG_TRACING" trap 'err $LINENO' ERR
Quoted 8 lines · On Thu, May 22, 2025 at 08:15:06PM -0700, [email protected] wrote:
From: Alison Schofield <[email protected]>
cxl-events.shandcxl-poison.shrequire a kernel withCONFIG_TRACINGenabled and currently report a FAIL when/sys/kernel/tracingis 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.
Applied to pending branch:
https://github.com/pmem/ndctl/tree/pending
Quoted 38 lines
Signed-off-by Alison Schofield <[email protected]>---
Noticed this behavior in Itaru's test results:
https://lore.kernel.org/linux-cxl/[email protected]/test/cxl-events.sh | 1 + test/cxl-poison.sh | 1 + 2 files changed, 2 insertions(+)test/cxl-events.sh +1
-0@@ -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' ERRtest/cxl-poison.sh +1
-0@@ -7,6 +7,7 @@ rc=77 set -ex +[ -d "/sys/kernel/tracing" ] || do_skip "test requires CONFIG_TRACING" trap 'err $LINENO' ERRSignature · 1 line
2.37.3