All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vishal Verma <vishal.l.verma@intel.com>
To: linux-nvdimm@lists.01.org
Subject: [ndctl PATCH] test/clear.sh: test to making sure cleared badblocks don't reappear
Date: Fri, 30 Sep 2016 14:10:32 -0600	[thread overview]
Message-ID: <1475266232-18680-1-git-send-email-vishal.l.verma@intel.com> (raw)

>From v4.9 onwards, cleared badblocks won't reappear on an ARS or simply
after disabling/re-enabling a namespace. Add a test to make sure this
doesn't regress.

Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
---
 test/clear.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/test/clear.sh b/test/clear.sh
index 7765c10..336ee44 100755
--- a/test/clear.sh
+++ b/test/clear.sh
@@ -69,6 +69,16 @@ if read sector len < /sys/block/$blockdev/badblocks; then
 	echo "fail: $LINENO" && exit 1
 fi
 
+# check for re-appearance of stale badblocks from poison_list
+$NDCTL disable-region $BUS all
+$NDCTL enable-region $BUS all
+
+# since we have cleared the errors, a disable/reenable shouldn't bring them back
+if read sector len < /sys/block/$blockdev/badblocks; then
+	# fail if reading badblocks returns data
+	echo "fail: $LINENO" && exit 1
+fi
+
 $NDCTL disable-region $BUS all
 $NDCTL disable-region $BUS1 all
 modprobe -r nfit_test
-- 
2.7.4

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

             reply	other threads:[~2016-09-30 20:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-30 20:10 Vishal Verma [this message]
2016-09-30 22:53 ` [ndctl PATCH] test/clear.sh: test to making sure cleared badblocks don't reappear Dan Williams

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=1475266232-18680-1-git-send-email-vishal.l.verma@intel.com \
    --to=vishal.l.verma@intel.com \
    --cc=linux-nvdimm@lists.01.org \
    /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.