* [ndctl PATCH] test/clear.sh: test to making sure cleared badblocks don't reappear
@ 2016-09-30 20:10 Vishal Verma
2016-09-30 22:53 ` Dan Williams
0 siblings, 1 reply; 2+ messages in thread
From: Vishal Verma @ 2016-09-30 20:10 UTC (permalink / raw)
To: linux-nvdimm
>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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [ndctl PATCH] test/clear.sh: test to making sure cleared badblocks don't reappear
2016-09-30 20:10 [ndctl PATCH] test/clear.sh: test to making sure cleared badblocks don't reappear Vishal Verma
@ 2016-09-30 22:53 ` Dan Williams
0 siblings, 0 replies; 2+ messages in thread
From: Dan Williams @ 2016-09-30 22:53 UTC (permalink / raw)
To: Vishal Verma; +Cc: linux-nvdimm
On Fri, Sep 30, 2016 at 1:10 PM, Vishal Verma <vishal.l.verma@intel.com> wrote:
> 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
> +
Hmm, can you gate this test by kernel version? I want to allow the
unit test suite be run with expectations set to a specific kernel
version. We have ndctl_test_attempt() for C tests, but for shell
tests we'd want to use get_system_kver() which honors a "KVER"
environment variable.
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-30 22:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-30 20:10 [ndctl PATCH] test/clear.sh: test to making sure cleared badblocks don't reappear Vishal Verma
2016-09-30 22:53 ` Dan Williams
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.