From patchwork Wed Feb 24 02:21:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 8398321 Return-Path: X-Original-To: patchwork-linux-nvdimm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 841E49F52D for ; Wed, 24 Feb 2016 02:22:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C17BA202F0 for ; Wed, 24 Feb 2016 02:22:09 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E58DE2024C for ; Wed, 24 Feb 2016 02:22:08 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0D5991A1F7D; Tue, 23 Feb 2016 18:22:12 -0800 (PST) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by ml01.01.org (Postfix) with ESMTP id 1CA401A1F7D for ; Tue, 23 Feb 2016 18:22:11 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 23 Feb 2016 18:22:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,492,1449561600"; d="scan'208";a="919802430" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.136]) by orsmga002.jf.intel.com with ESMTP; 23 Feb 2016 18:22:07 -0800 Subject: [ndctl PATCH] ndctl: wait for initial ars scrubbing From: Dan Williams To: linux-nvdimm@lists.01.org Date: Tue, 23 Feb 2016 18:21:44 -0800 Message-ID: <20160224022144.23203.62623.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.17.1-9-g687f MIME-Version: 1.0 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Regions are registered asynchronously after scrubbing the list of regions may still be populating as the test is initiating. Signed-off-by: Dan Williams --- test/libndctl.c | 4 ++++ 1 file changed, 4 insertions(+) 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;