From patchwork Fri Apr 26 05:29:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 2490861 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id C6337DF230 for ; Fri, 26 Apr 2013 05:29:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753005Ab3DZF3Y (ORCPT ); Fri, 26 Apr 2013 01:29:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36862 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752769Ab3DZF3X (ORCPT ); Fri, 26 Apr 2013 01:29:23 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3Q5TMdA007005 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 26 Apr 2013 01:29:22 -0400 Received: from liberator.sandeen.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3Q5TL9h024498 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 26 Apr 2013 01:29:22 -0400 Message-ID: <517A10B1.7040107@redhat.com> Date: Fri, 26 Apr 2013 00:29:21 -0500 From: Eric Sandeen User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: xfs-oss , linux-btrfs Subject: [PATCH] xfstests: btrfs/276 - stop all fsstress before exiting X-Enigmail-Version: 1.5.1 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Tests after 276 were failing because the background fsstress hadn't quit prior to exit, devices couldn't be unmounted, etc. Just use the same trick as generic/068 does, and use a tmpfile to control whether the background loop keeps running. Also, no need to umount scratch at cleanup time, the scripts do that for us. Signed-off-by: Eric Sandeen --- (nobody else ran into this? really?) -- 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/btrfs/276 b/tests/btrfs/276 index 0a5ce36..9d68b54 100755 --- a/tests/btrfs/276 +++ b/tests/btrfs/276 @@ -36,14 +36,8 @@ noise_pid=0 _cleanup() { - if [ $noise_pid -ne 0 ]; then - echo "background noise kill $noise_pid" >>$seqres.full - kill $noise_pid - noise_pid=0 - wait - fi - echo "*** unmount" - umount $SCRATCH_MNT 2>/dev/null + rm $tmp.running + wait rm -f $tmp.* } trap "_cleanup; exit \$status" 0 1 2 3 15 @@ -210,7 +204,7 @@ workout() if [ $do_bg_noise -ne 0 ]; then # make background noise while backrefs are being walked - while /bin/true; do + while [ -f "$tmp.running" ]; do echo background fsstress >>$seqres.full run_check $FSSTRESS_PROG -d $SCRATCH_MNT/bgnoise -n 999 echo background rm >>$seqres.full @@ -263,6 +257,8 @@ nfiles=4 numprocs=1 do_bg_noise=1 +touch $tmp.running + workout $filesize $nfiles $numprocs $snap_name $do_bg_noise echo "*** done" diff --git a/tests/btrfs/276.out b/tests/btrfs/276.out index 2032dea..5113164 100644 --- a/tests/btrfs/276.out +++ b/tests/btrfs/276.out @@ -1,4 +1,3 @@ QA output created by 276 *** test backref walking *** done -*** unmount