Kernel options like FAULT_INJECTION_DEBUG_FS being enabled does not guarantee debugfs is actually mounted at /sys/kernel/debug: on systemd systems, sys-kernel-debug.mount may not be started by default (e.g. SLE). Add _have_debugfs(), mirroring the existing _have_configfs() and _have_tracefs() checks, so tests that depend on debugfs-backed interfaces can skip cleanly with a clear reason instead of failing. Signed-off-by: Sebastian Chlad --- common/rc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/rc b/common/rc index d60a125..de5eb6d 100644 --- a/common/rc +++ b/common/rc @@ -223,6 +223,14 @@ _have_configfs() { return 0 } +_have_debugfs() { + if ! findmnt -t debugfs /sys/kernel/debug >/dev/null; then + SKIP_REASONS+=("debugfs is not mounted at /sys/kernel/debug") + return 1 + fi + return 0 +} + # Check if the specified kernel config files are available. _have_kernel_config_file() { if [[ ! -f /proc/config.gz && ! -f /boot/config-$(uname -r) ]]; then -- 2.51.0