[Devel] [PATCH vz10] selftests: pstore: skip when no backend is registered

Eva Kurchatova eva.kurchatova at virtuozzo.com
Tue Sep 1 02:48:06 MSK 2026


Without a pstore backend the console, /dev/pmsg0 and every write check
fail.

https://virtuozzo.atlassian.net/browse/VSTOR-142447
Feature: fix selftests
Signed-off-by: Eva Kurchatova <eva.kurchatova at virtuozzo.com>
---
 tools/testing/selftests/pstore/common_tests | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/testing/selftests/pstore/common_tests b/tools/testing/selftests/pstore/common_tests
index 4509f0cc9c91..e486a5a111d8 100755
--- a/tools/testing/selftests/pstore/common_tests
+++ b/tools/testing/selftests/pstore/common_tests
@@ -55,6 +55,7 @@ operate_files() { # tested value, files, operation
 
 # Parameters
 TEST_STRING_PATTERN="Testing pstore: uuid="
+ksft_skip=4
 UUID=`cat /proc/sys/kernel/random/uuid`
 TOP_DIR=`absdir $0`
 LOG_DIR=$TOP_DIR/logs/`date +%Y%m%d-%H%M%S`_${UUID}/
@@ -81,3 +82,7 @@ prlog -e "\tcmdline=`cat /proc/cmdline`"
 if [ $rc -ne 0 ]; then
     exit 1
 fi
+if [ -z "$backend" -o "$backend" = "(null)" ]; then
+    prlog "pstore backend is not registered, skipping"
+    exit $ksft_skip
+fi
-- 
2.55.0



More information about the Devel mailing list