All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ganesh Goudar <ganeshgr@linux.ibm.com>
To: linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au
Cc: mahesh@linux.vnet.ibm.com, msuchanek@suse.de,
	Ganesh Goudar <ganeshgr@linux.ibm.com>,
	npiggin@gmail.com
Subject: [PATCH 3/3] selftest/powerpc: Add slb multihit selftest
Date: Wed, 16 Sep 2020 22:52:28 +0530	[thread overview]
Message-ID: <20200916172228.83271-4-ganeshgr@linux.ibm.com> (raw)
In-Reply-To: <20200916172228.83271-1-ganeshgr@linux.ibm.com>

Add selftest to check if the system recovers from slb multihit
errors.

Signed-off-by: Ganesh Goudar <ganeshgr@linux.ibm.com>
---
 tools/testing/selftests/powerpc/Makefile             | 3 ++-
 tools/testing/selftests/powerpc/mces/Makefile        | 6 ++++++
 tools/testing/selftests/powerpc/mces/slb_multihit.sh | 9 +++++++++
 3 files changed, 17 insertions(+), 1 deletion(-)
 create mode 100644 tools/testing/selftests/powerpc/mces/Makefile
 create mode 100755 tools/testing/selftests/powerpc/mces/slb_multihit.sh

diff --git a/tools/testing/selftests/powerpc/Makefile b/tools/testing/selftests/powerpc/Makefile
index 0830e63818c1..3c900b30da79 100644
--- a/tools/testing/selftests/powerpc/Makefile
+++ b/tools/testing/selftests/powerpc/Makefile
@@ -31,7 +31,8 @@ SUB_DIRS = alignment		\
 	   vphn         \
 	   math		\
 	   ptrace	\
-	   security
+	   security	\
+	   mces
 
 endif
 
diff --git a/tools/testing/selftests/powerpc/mces/Makefile b/tools/testing/selftests/powerpc/mces/Makefile
new file mode 100644
index 000000000000..5a356295e952
--- /dev/null
+++ b/tools/testing/selftests/powerpc/mces/Makefile
@@ -0,0 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0
+# Makefile for machine check exceptions selftests
+
+TEST_PROGS := slb_multihit.sh
+
+include ../../lib.mk
diff --git a/tools/testing/selftests/powerpc/mces/slb_multihit.sh b/tools/testing/selftests/powerpc/mces/slb_multihit.sh
new file mode 100755
index 000000000000..35c17c619d0a
--- /dev/null
+++ b/tools/testing/selftests/powerpc/mces/slb_multihit.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
+
+if [ ! -e "/sys/kernel/debug/powerpc/mce_error_inject/inject_slb_multihit" ] ; then
+        exit 0;
+fi
+
+echo 1 > /sys/kernel/debug/powerpc/mce_error_inject/inject_slb_multihit
+exit 0
-- 
2.26.2


  parent reply	other threads:[~2020-09-17  1:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16 17:22 [PATCH 0/3] powerpc/mce: Fix mce handler and add selftest Ganesh Goudar
2020-09-16 17:22 ` [PATCH 1/3] powerpc/mce: remove nmi_enter/exit from real mode handler Ganesh Goudar
2020-09-17 12:20   ` Michal Suchánek
2020-09-18 12:04     ` Ganesh
2020-09-16 17:22 ` [PATCH 2/3] powerpc/mce: Add debugfs interface to inject MCE Ganesh Goudar
2020-09-17  8:24   ` kernel test robot
2020-09-17  8:24     ` kernel test robot
2020-09-17  8:36   ` kernel test robot
2020-09-17  8:36     ` kernel test robot
2020-09-17 12:23   ` Michal Suchánek
2020-09-18 12:06     ` Ganesh
2020-09-18  6:40   ` Michael Ellerman
2020-09-18 12:07     ` Ganesh
2020-09-16 17:22 ` Ganesh Goudar [this message]
2020-09-17 12:29 ` [PATCH 0/3] powerpc/mce: Fix mce handler and add selftest Michal Suchánek
2020-09-18 11:49   ` Ganesh

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=20200916172228.83271-4-ganeshgr@linux.ibm.com \
    --to=ganeshgr@linux.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mahesh@linux.vnet.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=msuchanek@suse.de \
    --cc=npiggin@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.