From patchwork Mon Jan 4 20:41:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Zwisler X-Patchwork-Id: 7951141 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 0FFA69F6CD for ; Mon, 4 Jan 2016 20:41:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4930620375 for ; Mon, 4 Jan 2016 20:41:58 +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 5046A20361 for ; Mon, 4 Jan 2016 20:41:57 +0000 (UTC) Received: from ml01.vlan14.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 43BB51A212D; Mon, 4 Jan 2016 12:41:57 -0800 (PST) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by ml01.01.org (Postfix) with ESMTP id 8C5241A212D for ; Mon, 4 Jan 2016 12:41:56 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 04 Jan 2016 12:41:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,522,1444719600"; d="scan'208";a="883676535" Received: from rzwisler-desk.amr.corp.intel.com (HELO phyrexia.intel.com) ([10.252.201.148]) by orsmga002.jf.intel.com with ESMTP; 04 Jan 2016 12:41:29 -0800 From: Ross Zwisler To: Dan Williams Subject: [PATCH] ndctl: fix test file paths, fix test bug Date: Mon, 4 Jan 2016 13:41:23 -0700 Message-Id: <1451940083-9455-1-git-send-email-ross.zwisler@linux.intel.com> X-Mailer: git-send-email 2.5.0 Cc: linux-nvdimm@lists.01.org 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: , MIME-Version: 1.0 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 Fix some paths that were recently changed from using 'lib' to 'test'. Also provide another argument to open() in the dax-pmd.c test so that if the file is created via O_CREAT, it doesn't end up with zeroed out permissions which would make it unusable. Signed-off-by: Ross Zwisler --- This patch is against the current 'pending' branch tip on github: 4872e0175a12 ("ndctl: create namespace") --- test/dax-pmd.c | 3 ++- test/dax.sh | 4 ++-- test/mmap.sh | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test/dax-pmd.c b/test/dax-pmd.c index bf21160..ff0c70e 100644 --- a/test/dax-pmd.c +++ b/test/dax-pmd.c @@ -89,7 +89,8 @@ static int test_pmd(int fd) break; } - fd2 = open(TEST_FILE, O_CREAT|O_TRUNC|O_DIRECT|O_RDWR); + fd2 = open(TEST_FILE, O_CREAT|O_TRUNC|O_DIRECT|O_RDWR, + DEFFILEMODE); if (fd2 < 0) { faili(i); munmap(addr, 2*HPAGE_SIZE); diff --git a/test/dax.sh b/test/dax.sh index e83e76d..c5fce47 100755 --- a/test/dax.sh +++ b/test/dax.sh @@ -24,11 +24,11 @@ DEV=$(test/dax-dev) mkfs.ext4 $DEV mount $DEV $MNT -o dax fallocate -l 1GiB $MNT/$FILE -lib/test-dax-pmd $MNT/$FILE +test/dax-pmd $MNT/$FILE umount $MNT mkfs.xfs -f $DEV mount $DEV $MNT -o dax fallocate -l 1GiB $MNT/$FILE -lib/test-dax-pmd $MNT/$FILE +test/dax-pmd $MNT/$FILE umount $MNT diff --git a/test/mmap.sh b/test/mmap.sh index 84725ab..745962b 100755 --- a/test/mmap.sh +++ b/test/mmap.sh @@ -2,7 +2,7 @@ MNT=test_mmap_mnt FILE=image DEV="" -TEST=lib/test-mmap +TEST=test/mmap err() { rc=1