All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: linux-nvdimm@lists.01.org
Subject: [ndctl PATCH 2/3] ndctl: disable nfit_test regions after test
Date: Thu, 10 Mar 2016 16:45:21 -0800	[thread overview]
Message-ID: <20160311004521.27582.16889.stgit@dwillia2-desk3.jf.intel.com> (raw)
In-Reply-To: <20160311004511.27582.63304.stgit@dwillia2-desk3.jf.intel.com>

Ensure that all nfit_test regions are disabled after a successful test
so the module can be removed.  Otherwise test/libndctl will not run
back-to-back runs in the case of "make TESTS=test/libndctl check".

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

diff --git a/test/libndctl.c b/test/libndctl.c
index 2601117333a4..ca1d7515d406 100644
--- a/test/libndctl.c
+++ b/test/libndctl.c
@@ -482,11 +482,11 @@ static int check_btts(struct ndctl_region *region, struct btt **btts);
 static int check_regions(struct ndctl_bus *bus, struct region *regions, int n,
 		enum ns_mode mode)
 {
+	struct ndctl_region *region;
 	int i, rc = 0;
 
 	for (i = 0; i < n; i++) {
 		struct ndctl_interleave_set *iset;
-		struct ndctl_region *region;
 		char devname[50];
 
 		if (strcmp(regions[i].type, "pmem") == 0)
@@ -566,6 +566,10 @@ static int check_regions(struct ndctl_bus *bus, struct region *regions, int n,
 			break;
 	}
 
+	if (rc == 0)
+		ndctl_region_foreach(bus, region)
+			ndctl_region_disable_invalidate(region);
+
 	return rc;
 }
 

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

  parent reply	other threads:[~2016-03-11  0:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-11  0:45 [ndctl PATCH 0/3] ndctl: clear error support for v52 Dan Williams
2016-03-11  0:45 ` [ndctl PATCH 1/3] ndctl: fix ndctl_bus_cmd_new_ars_status() input validation Dan Williams
2016-03-11  1:17   ` Verma, Vishal L
2016-03-11  0:45 ` Dan Williams [this message]
2016-03-11  0:45 ` [ndctl PATCH 3/3] ndctl: add 'clear error' command support Dan Williams
2016-03-11  1:19   ` Verma, Vishal L
2016-03-11  4:08     ` Dan Williams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160311004521.27582.16889.stgit@dwillia2-desk3.jf.intel.com \
    --to=dan.j.williams@intel.com \
    --cc=linux-nvdimm@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.