diff mbox

[ndctl] ndctl, test: skip btt-pad compat test on pre-4K capable kernels

Message ID 151936915701.18166.11705045442243684598.stgit@dwillia2-desk3.amr.corp.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Williams Feb. 23, 2018, 6:59 a.m. UTC
Prior to the introduction of v1.2 namespace labels it was not possible
to specify a pmem namespace with a 4K sector size. Skip this test when
that namespace creation attempt fails.

Cc: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 test/btt-pad-compat.sh |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Ross Zwisler Feb. 23, 2018, 9:01 p.m. UTC | #1
On Thu, Feb 22, 2018 at 10:59:17PM -0800, Dan Williams wrote:
> Prior to the introduction of v1.2 namespace labels it was not possible
> to specify a pmem namespace with a 4K sector size. Skip this test when
> that namespace creation attempt fails.
> 
> Cc: Vishal Verma <vishal.l.verma@intel.com>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>

Sure, seems fine.

Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com>
diff mbox

Patch

diff --git a/test/btt-pad-compat.sh b/test/btt-pad-compat.sh
index a157c589460e..b2e395de2297 100755
--- a/test/btt-pad-compat.sh
+++ b/test/btt-pad-compat.sh
@@ -136,8 +136,12 @@  copy_xxd_img()
 
 create_oldfmt_ns()
 {
-	# create null-uuid namespace
+	# create null-uuid namespace, note that this requires a kernel
+	# that supports a raw namespace with a 4K sector size, prior to
+	# v4.13 raw namespaces are limited to 512-byte sector size.
+	rc=77
 	json=$($ndctl create-namespace -b "$bus" -s 64M -t pmem -m raw -l 4096 -u 00000000-0000-0000-0000-000000000000)
+	rc=1
 	eval "$(echo "$json" | sed -e "$json2var")"
 	[ -n "$dev" ] || err "$LINENO" 2
 	[ -n "$size" ] || err "$LINENO" 2