@@ -45,7 +45,7 @@ trap 'err $LINENO cleanup' ERR
# setup (reset nfit_test dimms)
modprobe nfit_test
-reset
+resetV
rc=1
@@ -124,7 +124,7 @@ dd if=$MNT/$FILE of=/dev/null iflag=direct bs=4096 count=1
# reset everything to get a clean log
if grep -q "$MNT" /proc/mounts; then umount $MNT; fi
-reset
+resetV
dev="x"
json=$($NDCTL create-namespace -b $NFIT_TEST_BUS0 -t pmem -m sector)
eval "$(echo "$json" | json2var)"
@@ -148,7 +148,7 @@ do_tests()
verify_idx 0 1
# do the same with an old format namespace
- reset
+ resetV
create_oldfmt_ns
verify_idx 0 2
@@ -49,14 +49,21 @@ err()
reset()
{
$NDCTL disable-region -b $NFIT_TEST_BUS0 all
- $NDCTL zero-labels -b $NFIT_TEST_BUS0 all
+ $NDCTL init-labels -f -b $NFIT_TEST_BUS0 all
+ $NDCTL enable-region -b $NFIT_TEST_BUS0 all
+}
+
+resetV()
+{
+ $NDCTL disable-region -b $NFIT_TEST_BUS0 all
+ $NDCTL init-labels -f -V 1.2 -b $NFIT_TEST_BUS0 all
$NDCTL enable-region -b $NFIT_TEST_BUS0 all
}
reset1()
{
$NDCTL disable-region -b $NFIT_TEST_BUS1 all
- $NDCTL zero-labels -b $NFIT_TEST_BUS1 all
+ $NDCTL init-labels -f -b $NFIT_TEST_BUS1 all
$NDCTL enable-region -b $NFIT_TEST_BUS1 all
}
@@ -17,7 +17,7 @@ trap 'err $LINENO' ERR
# setup (reset nfit_test dimms)
modprobe nfit_test
$NDCTL disable-region -b $NFIT_TEST_BUS0 all
-$NDCTL zero-labels -b $NFIT_TEST_BUS0 all
+$NDCTL init-labels -f -b $NFIT_TEST_BUS0 all
# grab the largest pmem region on -b $NFIT_TEST_BUS0
query=". | sort_by(.available_size) | reverse | .[0].dev"
The removal of BLK-mode support causes nfit_test regions to not be 'aliased' by default, which means that the only way to enable labels is to initialize the namespace label index block. In support of that the common 'reset()' helper is updated to initialize v1.1 labels instead of zero them. Additionally, it highlighted that some btt tests have silent assumptions of v1.1 vs v1.2 label support. Add a 'resetV()' alternative to the common 'reset()' function that initializes the label area to v1.2. Signed-off-by: Dan Williams <dan.j.williams@intel.com> --- test/btt-errors.sh | 4 ++-- test/btt-pad-compat.sh | 2 +- test/common | 11 +++++++++-- test/label-compat.sh | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-)