diff mbox series

[2/2] test/dsm-fail: Update namespace size to take care of interleaved DIMMs

Message ID 20200120134112.62945-2-aneesh.kumar@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series [1/2] test/libndctl: Update namespace size to take care of interleaved DIMMs | expand

Commit Message

Aneesh Kumar K.V Jan. 20, 2020, 1:41 p.m. UTC
The minimum size of a namespace should be SUB_SECTION_SIZE * interleaved DIMM
count. Update the test to use the correct size.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
 test/dsm-fail.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/test/dsm-fail.c b/test/dsm-fail.c
index 6e812aec008f..1bc15514e43c 100644
--- a/test/dsm-fail.c
+++ b/test/dsm-fail.c
@@ -228,11 +228,15 @@  static int do_test(struct ndctl_ctx *ctx, struct ndctl_test *test)
 	ndctl_region_foreach(bus, region) {
 		if (ndctl_region_get_type(region) != ND_DEVICE_REGION_PMEM)
 			continue;
+		/*
+		 * We have max 4 interleaved dimms in region1.
+		 * Hence size needs to be 8M
+		 */
 		ndctl_dimm_foreach_in_region(region, dimm) {
 			const char *argv[] = {
 				"__func__", "-v", "-r",
 				ndctl_region_get_devname(region),
-				"-s", "4M", "-m", "raw",
+				"-s", "8M", "-m", "raw",
 			};
 			struct ndctl_namespace *ndns;
 			int count, i;