From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49B8FCA9EAC for ; Sat, 19 Oct 2019 16:54:14 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2622C222C2 for ; Sat, 19 Oct 2019 16:54:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2622C222C2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvdimm-bounces@lists.01.org Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id EF1B91007B75F; Sat, 19 Oct 2019 09:56:12 -0700 (PDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=dan.j.williams@intel.com; receiver= Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4657A1007B759 for ; Sat, 19 Oct 2019 09:56:11 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Oct 2019 09:54:11 -0700 X-IronPort-AV: E=Sophos;i="5.67,316,1566889200"; d="scan'208";a="371771469" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.16]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Oct 2019 09:54:11 -0700 Subject: [ndctl PATCH 3/4] test/dax.sh: Validate huge page mappings From: Dan Williams To: linux-nvdimm@lists.01.org Date: Sat, 19 Oct 2019 09:39:54 -0700 Message-ID: <157150319417.3940762.12887432367621574807.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <157150317870.3940762.5638079137146963300.stgit@dwillia2-desk3.amr.corp.intel.com> References: <157150317870.3940762.5638079137146963300.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.18-2-gc94f MIME-Version: 1.0 Message-ID-Hash: XEALMCHKIQ4T4LT4A22CC4ESYTQ2GC76 X-Message-ID-Hash: XEALMCHKIQ4T4LT4A22CC4ESYTQ2GC76 X-MailFrom: dan.j.williams@intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.1.1 Precedence: list List-Id: "Linux-nvdimm developer list." Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Using trace-cmd to validate the expectations of the huge page faults generated by the dax-pmd.c test. Signed-off-by: Dan Williams --- 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