linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftests/livepatch: Ignore NO_SUPPORT line in dmesg
@ 2025-08-19 17:37 Ricardo B. Marlière
  2025-08-19 19:36 ` Ricardo B. Marlière
  2025-08-20 11:56 ` Petr Mladek
  0 siblings, 2 replies; 3+ messages in thread
From: Ricardo B. Marlière @ 2025-08-19 17:37 UTC (permalink / raw)
  To: Josh Poimboeuf, Jiri Kosina, Miroslav Benes, Petr Mladek,
	Joe Lawrence, Shuah Khan
  Cc: live-patching, linux-kselftest, linux-kernel,
	Marcos Paulo de Souza, Ricardo B. Marlière

Some systems might disable unloading a livepatch and when running tests on
them they fail like the following:

$ ./run_kselftest.sh -c livepatch
  TAP version 13
  1..8
  # selftests: livepatch: test-livepatch.sh
  # TEST: basic function patching ... not ok
  #
  # --- expected
  # +++ result
  # @@ -5,6 +5,7 @@ livepatch: 'test_klp_livepatch': starting
  #  livepatch: 'test_klp_livepatch': completing patching transition
  #  livepatch: 'test_klp_livepatch': patching complete
  #  % echo 0 > /sys/kernel/livepatch/test_klp_livepatch/enabled
  # +livepatch: attempt to disable live patch test_klp_livepatch, setting
  NO_SUPPORT taint flag
  #  livepatch: 'test_klp_livepatch': initializing unpatching transition
  #  livepatch: 'test_klp_livepatch': starting unpatching transition
  #  livepatch: 'test_klp_livepatch': completing unpatching transition
  #
  # ERROR: livepatch kselftest(s) failed

Cc: Marcos Paulo de Souza <mpdesouza@suse.com>
Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
 tools/testing/selftests/livepatch/functions.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/livepatch/functions.sh b/tools/testing/selftests/livepatch/functions.sh
index 46991a029f7c64ace3945727b3540521ffe2e529..13fc289962cdd77c9fc4eaf1ad336775d6db710d 100644
--- a/tools/testing/selftests/livepatch/functions.sh
+++ b/tools/testing/selftests/livepatch/functions.sh
@@ -321,6 +321,7 @@ function check_result {
 	result=$(dmesg | awk -v last_dmesg="$LAST_DMESG" 'p; $0 == last_dmesg { p=1 }' | \
 		 grep -e 'livepatch:' -e 'test_klp' | \
 		 grep -v '\(tainting\|taints\) kernel' | \
+		 grep -v 'setting NO_SUPPORT taint flag' | \
 		 sed 's/^\[[ 0-9.]*\] //' | \
 		 sed 's/^\[[ ]*[CT][0-9]*\] //')
 

---
base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
change-id: 20250819-selftests-lp_taint_flag-c96f5b9b2ed9

Best regards,
-- 
Ricardo B. Marlière <rbm@suse.com>


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

end of thread, other threads:[~2025-08-20 11:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-19 17:37 [PATCH] selftests/livepatch: Ignore NO_SUPPORT line in dmesg Ricardo B. Marlière
2025-08-19 19:36 ` Ricardo B. Marlière
2025-08-20 11:56 ` Petr Mladek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).