linux-nvdimm.lists.01.org archive mirror
 help / color / mirror / Atom feed
From: "Verma, Vishal L" <vishal.l.verma@intel.com>
To: "Williams, Dan J" <dan.j.williams@intel.com>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>
Subject: Re: [ndctl PATCH 3/4] test/dax.sh: Validate huge page mappings
Date: Fri, 25 Oct 2019 22:44:27 +0000	[thread overview]
Message-ID: <690e59a9ba44cefe73c8b6ce70a92c53af471364.camel@intel.com> (raw)
In-Reply-To: <5e6086c2a48bce222aaedb8bb121bc64bd7fa445.camel@intel.com>

> On Wed, 2019-10-23 at 19:33 +0000, Verma, Vishal L wrote:
> > > @@ -91,4 +111,4 @@ json=$($NDCTL create-namespace -m raw -f -e $dev)
> > >  eval $(json2var <<< "$json")
> > >  [ $mode != "fsdax" ] && echo "fail: $LINENO" &&  exit 1
> > 
> > same comment about quoting "$mode". If 'mode' happens to be empty for
> > soem reason, we want to fail with the error message - instead the above
> > will fail with a syntax error.
> 
> Sorry ignore this - that was a context line..
> 

Hey Dan,

I've applied patches 1-3, with the following fixup to patch 3.
Patch 4 didn't apply cleanly, if you can resend that I'll queue it up too.

--8<--

From 9d6c43d5240ddb18b5540b3064f2f90c25dcf574 Mon Sep 17 00:00:00 2001
From: Vishal Verma <vishal.l.verma@intel.com>
Date: Fri, 25 Oct 2019 16:41:22 -0600
Subject: [ndctl PATCH] fixup! test/dax.sh: Validate huge page mappings

---
 test/dax.sh | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/test/dax.sh b/test/dax.sh
index 157b398..45c2027 100755
--- a/test/dax.sh
+++ b/test/dax.sh
@@ -32,8 +32,8 @@ run_test() {
 	rc=0
 	if ! trace-cmd record -e fs_dax:dax_pmd_fault_done ./dax-pmd $MNT/$FILE; then
 		rc=$?
-		if [ $rc -ne 77 -a $rc -ne 0 ]; then
-			cleanup $1
+		if [ "$rc" -ne 77 ] && [ "$rc" -ne 0 ]; then
+			cleanup "$1"
 		fi
 	fi
 
@@ -44,17 +44,18 @@ run_test() {
 	# result of success (NOPAGE).
 	count=0
 	rc=1
-	for p in $(trace-cmd report | awk '{ print $21 }')
-	do
-		if [ $count -lt 10 ]; then
-			if [ $p != "0x100" -a $p != "NOPAGE" ]; then
-				cleanup $1
+	while read -r p; do
+		[[ $p ]] || continue
+		if [ "$count" -lt 10 ]; then
+			if [ "$p" != "0x100" ] && [ "$p" != "NOPAGE" ]; then
+				cleanup "$1"
 			fi
 		fi
 		count=$((count + 1))
-	done
+	done < <(trace-cmd report | awk '{ print $21 }')
+
 	if [ $count -lt 10 ]; then
-		cleanup $1
+		cleanup "$1"
 	fi
 }
 
-- 
2.20.1


_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

  reply	other threads:[~2019-10-25 22:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-19 16:39 [ndctl PATCH 0/4] test/dax.sh: Add huge page fault validation Dan Williams
2019-10-19 16:39 ` [ndctl PATCH 1/4] test/dax.sh: Fix failure reporting / handling Dan Williams
2019-10-19 16:39 ` [ndctl PATCH 2/4] test/dax.sh: Fix xfs 2M alignment Dan Williams
2019-10-19 16:39 ` [ndctl PATCH 3/4] test/dax.sh: Validate huge page mappings Dan Williams
2019-10-23 19:33   ` Verma, Vishal L
2019-10-23 19:41     ` Verma, Vishal L
2019-10-25 22:44       ` Verma, Vishal L [this message]
2019-10-25 23:26         ` Dan Williams
2019-10-19 16:39 ` [ndctl PATCH 4/4] test/dax.sh: Split into ext4 and xfs tests 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=690e59a9ba44cefe73c8b6ce70a92c53af471364.camel@intel.com \
    --to=vishal.l.verma@intel.com \
    --cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).