From patchwork Fri Dec 2 01:14:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 9457581 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 1EC9760235 for ; Fri, 2 Dec 2016 01:13:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 109DB284E3 for ; Fri, 2 Dec 2016 01:13:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0540228518; Fri, 2 Dec 2016 01:13:00 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable 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 9E4B0284E3 for ; Fri, 2 Dec 2016 01:12:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759053AbcLBBMv (ORCPT ); Thu, 1 Dec 2016 20:12:51 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:34239 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759009AbcLBBMp (ORCPT ); Thu, 1 Dec 2016 20:12:45 -0500 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id uB21BcQV013535 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 2 Dec 2016 01:11:39 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.13.8/8.14.4) with ESMTP id uB21Bb9e025269 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 2 Dec 2016 01:11:38 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id uB21BbZA031681; Fri, 2 Dec 2016 01:11:37 GMT Received: from [192.168.43.163] (/157.49.105.188) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 01 Dec 2016 17:11:37 -0800 Subject: Re: [PATCH] fstests: btrfs, add missing umount for raid5 tests 124 and 125 To: fdmanana@kernel.org, fstests@vger.kernel.org References: <1479968719-10713-1-git-send-email-fdmanana@kernel.org> Cc: linux-btrfs@vger.kernel.org, Filipe Manana From: Anand Jain Message-ID: Date: Fri, 2 Dec 2016 09:14:47 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <1479968719-10713-1-git-send-email-fdmanana@kernel.org> X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, I didn't add umount at end of the test because... _check_btrfs_filesystem() does it, which gets called as this test does not specify _require_scratch_nocheck ---------------- _check_btrfs_filesystem() { device=$1 # If type is set, we're mounted type=`_fs_type $device` ok=1 if [ "$type" = "$FSTYP" ] then # mounted ... mountpoint=`_umount_or_remount_ro $device` <---- fi btrfsck $device >$tmp.fsck 2>&1 ---------------- I faced the similar problem on some other tests and I found adding the delay is the right approach. for eg: -------------------------- # success, all done status=0 -------------------------- HTH -Anand On 11/24/16 14:25, fdmanana@kernel.org wrote: > From: Filipe Manana > > The tests mount the second device in the device pool but never unmount > it, causing the next test to fail. > > Example: > > $ cat local.config > export TEST_DEV=/dev/sdb > export TEST_DIR=/home/fdmanana/btrfs-tests/dev > export SCRATCH_MNT="/home/fdmanana/btrfs-tests/scratch_1" > export SCRATCH_DEV_POOL="/dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg" > export FSTYP=btrfs > > $ ./check btrfs/125 btrfs/126 > FSTYP -- btrfs > PLATFORM -- Linux/x86_64 debian3 4.8.0-rc8-btrfs-next-35+ > MKFS_OPTIONS -- /dev/sdc > MOUNT_OPTIONS -- /dev/sdc /home/fdmanana/btrfs-tests/scratch_1 > > btrfs/125 23s ... 22s > btrfs/126 1s ... - output mismatch (see /home/fdmanana/git/hub/xfstests/results//btrfs/126.out.bad) > --- tests/btrfs/126.out 2016-11-24 06:11:42.048372385 +0000 > +++ /home/fdmanana/git/hub/xfstests/results//btrfs/126.out.bad 2016-11-24 06:16:35.987988895 +0000 > @@ -1,2 +1,5 @@ > QA output created by 126 > -pwrite: Disk quota exceeded > +ERROR: /dev/sdc is mounted > +mount: /dev/sdc is already mounted or /home/fdmanana/btrfs-tests/scratch_1 busy > + /dev/sdc is already mounted on /home/fdmanana/btrfs-tests/scratch_1 > +/home/fdmanana/btrfs-tests/scratch_1/test_file: Disk quota exceeded > ... > (Run 'diff -u tests/btrfs/126.out /home/fdmanana/git/hub/xfstests/results//btrfs/126.out.bad' to see the entire diff) > Ran: btrfs/125 btrfs/126 > Failures: btrfs/126 > Failed 1 of 2 tests > > So just make sure those test unmount the device before they finish. > > Signed-off-by: Filipe Manana > --- > tests/btrfs/124 | 1 + > tests/btrfs/125 | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/tests/btrfs/124 b/tests/btrfs/124 > index 2618a26..7206094 100755 > --- a/tests/btrfs/124 > +++ b/tests/btrfs/124 > @@ -159,6 +159,7 @@ if [ "$checkpoint1" != "$checkpoint3" ]; then > echo "Inital sum does not match with data on dev2 written by balance" > fi > > +$UMOUNT_PROG $dev2 > _scratch_dev_pool_put > _test_mount > > diff --git a/tests/btrfs/125 b/tests/btrfs/125 > index 1062b87..91aa8d8 100755 > --- a/tests/btrfs/125 > +++ b/tests/btrfs/125 > @@ -175,6 +175,7 @@ if [ "$checkpoint1" != "$checkpoint3" ]; then > echo "Inital sum does not match with data on dev2 written by balance" > fi > > +$UMOUNT_PROG $dev2 > _scratch_dev_pool_put > _test_mount > > --- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/tests/generic/298 b/tests/generic/298 index e85db1266fa9..4092efa6b961 100755 --- a/tests/generic/298 +++ b/tests/generic/298 @@ -92,7 +92,7 @@ echo "reflink of $n bytes took $delta seconds" >> $seqres.full test $delta -gt $timeout && _fail "reflink didn't stop in time, n=$n t=$delta" echo "Check scratch fs" -sleep 2 # give it a few seconds to actually die... +sleep 40 # give it a few seconds to actually die...