diff mbox

[ndctl] ndctl: wait for initial ars scrubbing

Message ID 20160224022144.23203.62623.stgit@dwillia2-desk3.amr.corp.intel.com (mailing list archive)
State Accepted
Commit 553b5134cb3e
Headers show

Commit Message

Dan Williams Feb. 24, 2016, 2:21 a.m. UTC
Regions are registered asynchronously after scrubbing the list of
regions may still be populating as the test is initiating.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 test/libndctl.c |    4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/test/libndctl.c b/test/libndctl.c
index 0af0c071ddc1..2601117333a4 100644
--- a/test/libndctl.c
+++ b/test/libndctl.c
@@ -1903,6 +1903,8 @@  static int do_test0(struct ndctl_ctx *ctx, struct ndctl_test *test)
 	if (!bus)
 		return -ENXIO;
 
+	ndctl_bus_wait_probe(bus);
+
 	/* disable all regions so that set_config_data commands are permitted */
 	ndctl_region_foreach(bus, region)
 		ndctl_region_disable_invalidate(region);
@@ -1940,6 +1942,8 @@  static int do_test1(struct ndctl_ctx *ctx, struct ndctl_test *test)
 	if (!bus)
 		return -ENXIO;
 
+	ndctl_bus_wait_probe(bus);
+
 	rc = check_dimms(bus, dimms1, ARRAY_SIZE(dimms1), 0, 0, test);
 	if (rc)
 		return rc;