From patchwork Sun Nov 13 13:49:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amir Goldstein X-Patchwork-Id: 9424827 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BD66160233 for ; Sun, 13 Nov 2016 13:50:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B8362897F for ; Sun, 13 Nov 2016 13:50:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7CEF728988; Sun, 13 Nov 2016 13:50:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1AC6C2897F for ; Sun, 13 Nov 2016 13:50:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933391AbcKMNuG (ORCPT ); Sun, 13 Nov 2016 08:50:06 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33152 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933365AbcKMNuF (ORCPT ); Sun, 13 Nov 2016 08:50:05 -0500 Received: by mail-wm0-f65.google.com with SMTP id u144so8358089wmu.0; Sun, 13 Nov 2016 05:50:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=hh/5f5cSU/lwn2Lb/YPfxMvqFNbBCasLho/IAHpvnks=; b=lLVyawjmDl0RoGlbATMQTBNre08ck4/55OnvR2EUv5ziluvBTZNh/m9iNuQBexA7EI dQSRMLdjVNztz7crSZDkvnfP2yesTMZV4QVCa0BGQ7U7DeOzvEN4XmQ171Vjn2S87n8Z lGKBDeflWxb75DVePnhY0xnQKc7/u1nEui/5aviRGhOnRu7xtKCd3WAkiTddSDOT2NGX w2Q/l9F+fbwm5p3aUNxCEzXmLvCMYshnI0XlYRJHonjODfSUbGpXDwOsohIdFegaNNnU oircuWs1DGstwBt0bV7SVkpT0Gx4SzbFdfM3A1KOgGrJWHyT4Kqjk6MhMahzNg+fdReN Cv2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=hh/5f5cSU/lwn2Lb/YPfxMvqFNbBCasLho/IAHpvnks=; b=Gkcn3kL/QDvom1ZzE85opsltvZIO+PyostuCNmtHGF2qqvAF0f9pCj44Si3+bbo/kP Qg1Qywf76eUQUdcYvsMhKoUhSfZZfzoyxsi+1XFxmR8w1HeWkMUJwtbGx09kUl9zEJp3 l8HcHiNrzSxgkAJGr4oR5NGkbtQJHFTXsYvVVLEAC3TVvfMw17N47/M1BQRt8mhM4USw zijCqI2r0kYWUFCLQKYDMO9RyM0lv6o56esKxBgru1eH2MPhaLQgLwdiuWNtN5ob18zK ZGdEMdUZb20Uc9l+8h3dZjuSENJ78j486Yv2xlSmvpO41WRdKwa3aKEoZIByZLwsOwkR czyA== X-Gm-Message-State: ABUngvdwlzXEQKUWYOFjc0RHlcHr4a7tIi3rn8BmlR17wZSxlDpsRCfJw127sFdYUHwNaQ== X-Received: by 10.194.82.33 with SMTP id f1mr17131721wjy.87.1479045004093; Sun, 13 Nov 2016 05:50:04 -0800 (PST) Received: from amir-VirtualBox.ctera.local (bzq-82-81-193-202.cablep.bezeqint.net. [82.81.193.202]) by smtp.gmail.com with ESMTPSA id kq7sm8606790wjb.30.2016.11.13.05.50.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 13 Nov 2016 05:50:02 -0800 (PST) From: Amir Goldstein To: Eryu Guan Cc: "Darrick J . Wong" , Miklos Szeredi , Xiong Zhou , linux-unionfs@vger.kernel.org, fstests@vger.kernel.org Subject: [PATCH] generic: use bind mount instead of 2nd _scratch_mount Date: Sun, 13 Nov 2016 15:49:37 +0200 Message-Id: <1479044977-28972-1-git-send-email-amir73il@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP generic/373 and generic/374 test that cross-mountpoint reflink/dedupe fail with EXDEV. For this test, _scratch_mount is called a 2nd time with same mount arguments, but a different value of SCRATCH_MNT. This practice is incorrect for overlayfs, which should not be using the same upper/work dirs on two different overlay super blocks. Change the test to use bind mount instead, which results in the expected setup for both block device mount and overlay mount. Signed-off-by: Amir Goldstein Reviewed-by: Darrick J. Wong --- tests/generic/373 | 4 ++-- tests/generic/374 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/generic/373 b/tests/generic/373 index cf585ba..d74324e 100755 --- a/tests/generic/373 +++ b/tests/generic/373 @@ -64,7 +64,7 @@ blksz=65536 sz=$((blksz * blocks)) echo "Mount otherdir" -SCRATCH_MNT=$otherdir _scratch_mount +mount --bind $SCRATCH_MNT $otherdir echo "Create file" _pwrite_byte 0x61 0 $sz $testdir/file >> $seqres.full @@ -82,7 +82,7 @@ md5sum $testdir/file | _filter_scratch test -e $othertestdir/otherfile && echo "otherfile should not exist" echo "Unmount otherdir" -SCRATCH_MNT=$otherdir _scratch_unmount +umount $otherdir rm -rf $otherdir # success, all done diff --git a/tests/generic/374 b/tests/generic/374 index 0173c13..4546cc5 100755 --- a/tests/generic/374 +++ b/tests/generic/374 @@ -63,7 +63,7 @@ blksz=65536 sz=$((blocks * blksz)) echo "Mount otherdir" -SCRATCH_MNT=$otherdir _scratch_mount +mount --bind $SCRATCH_MNT $otherdir echo "Create file" _pwrite_byte 0x61 0 $sz $testdir/file >> $seqres.full @@ -80,7 +80,7 @@ echo "Check output" md5sum $testdir/file $othertestdir/otherfile | filter_md5 echo "Unmount otherdir" -SCRATCH_MNT=$otherdir _scratch_unmount +umount $otherdir rm -rf $otherdir # success, all done