From: Dan Williams <dan.j.williams@intel.com>
To: linux-nvdimm@lists.01.org
Subject: [ndctl PATCH 3/4] test/dax.sh: Validate huge page mappings
Date: Sat, 19 Oct 2019 09:39:54 -0700 [thread overview]
Message-ID: <157150319417.3940762.12887432367621574807.stgit@dwillia2-desk3.amr.corp.intel.com> (raw)
In-Reply-To: <157150317870.3940762.5638079137146963300.stgit@dwillia2-desk3.amr.corp.intel.com>
Using trace-cmd to validate the expectations of the huge page faults
generated by the dax-pmd.c test.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
test/dax.sh | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/test/dax.sh b/test/dax.sh
index 59d5eafadae8..e5945fc3e335 100755
--- a/test/dax.sh
+++ b/test/dax.sh
@@ -30,12 +30,32 @@ cleanup() {
run_test() {
rc=0
- if ! ./dax-pmd $MNT/$FILE; then
+ 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
fi
fi
+
+ # Fragile hack to double check the kernel services this test
+ # with successful pmd faults. If dax-pmd.c ever changes the
+ # number of times the dax_pmd_fault_done trace point fires the
+ # hack needs to be updated from 10 expected firings and the
+ # 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
+ fi
+ fi
+ count=$((count + 1))
+ done
+ if [ $count -lt 10 ]; then
+ cleanup $1
+ fi
}
set -e
@@ -91,4 +111,4 @@ json=$($NDCTL create-namespace -m raw -f -e $dev)
eval $(json2var <<< "$json")
[ $mode != "fsdax" ] && echo "fail: $LINENO" && exit 1
-exit $rc
+exit 0
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
next prev parent reply other threads:[~2019-10-19 16:54 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 ` Dan Williams [this message]
2019-10-23 19:33 ` [ndctl PATCH 3/4] test/dax.sh: Validate huge page mappings Verma, Vishal L
2019-10-23 19:41 ` Verma, Vishal L
2019-10-25 22:44 ` Verma, Vishal L
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=157150319417.3940762.12887432367621574807.stgit@dwillia2-desk3.amr.corp.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 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).