OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
From: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
To: khorenko@virtuozzo.com
Cc: devel@openvz.org
Subject: [Devel] [PATCH vz10 v2 2/2] selftests: pstore: skip the frontends the kernel does not have
Date: Thu, 10 Sep 2026 06:17:53 +0300	[thread overview]
Message-ID: <20260910031755.397386-2-eva.kurchatova@virtuozzo.com> (raw)
In-Reply-To: <20260910031755.397386-1-eva.kurchatova@virtuozzo.com>

The console and pmsg frontends are separate options from the backend:
CONFIG_PSTORE_CONSOLE and CONFIG_PSTORE_PMSG can both be off on a kernel
that registers one. pstore_tests checks for both regardless and fails
where they are absent.

Report them as skips instead.

https://virtuozzo.atlassian.net/browse/VSTOR-142447
Feature: fix selftests

Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
---
 tools/testing/selftests/pstore/pstore_tests | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/tools/testing/selftests/pstore/pstore_tests b/tools/testing/selftests/pstore/pstore_tests
index 2aa9a3852a84..9674bcace942 100755
--- a/tools/testing/selftests/pstore/pstore_tests
+++ b/tools/testing/selftests/pstore/pstore_tests
@@ -9,13 +9,22 @@
 
 . ./common_tests
 
+# The console and pmsg frontends are separate options from the backend, so
+# a kernel can register a backend and still have neither.  Report what is
+# missing instead of failing over it.
 prlog -n "Checking pstore console is registered ... "
-dmesg | grep -Eq "console \[(pstore|${backend})"
-show_result $?
+if dmesg | grep -Eq "console \[(pstore|${backend})"; then
+    show_result 0
+else
+    prlog "SKIP (no pstore console, needs CONFIG_PSTORE_CONSOLE)"
+fi
 
 prlog -n "Checking /dev/pmsg0 exists ... "
-test -e /dev/pmsg0
-show_result $?
+if [ -e /dev/pmsg0 ]; then
+    show_result 0
+else
+    prlog "SKIP (no /dev/pmsg0, needs CONFIG_PSTORE_PMSG)"
+fi
 
 prlog -n "Writing unique string to /dev/pmsg0 ... "
 if [ -e "/dev/pmsg0" ]; then
@@ -23,8 +32,7 @@ if [ -e "/dev/pmsg0" ]; then
     show_result $?
     echo "$UUID" > $TOP_DIR/uuid
 else
-    prlog "FAIL"
-    rc=1
+    prlog "SKIP (no /dev/pmsg0)"
 fi
 
 exit $rc
-- 
2.55.0

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

  reply	other threads:[~2026-09-10  3:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-10  3:17 [Devel] [PATCH vz10 v2 1/2] selftests: pstore: skip when no backend is registered Eva Kurchatova
2026-09-10  3:17 ` Eva Kurchatova [this message]
2026-09-23 18:37   ` [Devel] [PATCH vz10 v2 2/2] selftests: pstore: skip the frontends the kernel does not have Konstantin Khorenko
2026-09-23 18:03 ` [Devel] [PATCH vz10 v2 1/2] selftests: pstore: skip when no backend is registered Konstantin Khorenko
2026-09-23 18:37 ` Konstantin Khorenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260910031755.397386-2-eva.kurchatova@virtuozzo.com \
    --to=eva.kurchatova@virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=khorenko@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox