From patchwork Wed Aug 8 20:21:36 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Dilger X-Patchwork-Id: 175952 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id CC6662C00A6 for ; Thu, 9 Aug 2012 06:21:41 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755943Ab2HHUVj (ORCPT ); Wed, 8 Aug 2012 16:21:39 -0400 Received: from smtp-out-04.shaw.ca ([64.59.134.12]:41664 "EHLO smtp-out-04.shaw.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753427Ab2HHUVi (ORCPT ); Wed, 8 Aug 2012 16:21:38 -0400 Received: from lb7f8hsrpno-svcs.dcs.int.inet (HELO pd7ml3no-ssvc.prod.shaw.ca) ([10.0.144.222]) by pd5mo1no-svcs.prod.shaw.ca with ESMTP; 08 Aug 2012 14:21:37 -0600 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=aDUJ/pRHNXkohnfhaDKKve0FfU8uPxX8npdo6G126bI= c=1 sm=1 a=obsVUnpDRHEA:10 a=BLceEmwcHowA:10 a=tj+LJhqQaIVWJCGk9Ks9wA==:17 a=kouxtm_zAOs5DBQXxjEA:9 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Received: from unknown (HELO sookie-gig.adilger.int) ([68.147.204.16]) by pd7ml3no-dmz.prod.shaw.ca with ESMTP; 08 Aug 2012 14:21:37 -0600 From: Andreas Dilger To: tytso@mit.edu Cc: linux-ext4@vger.kernel.org, Andreas Dilger Subject: [PATCH] tests: remove unused temporary files for MMP tests Date: Wed, 8 Aug 2012 14:21:36 -0600 Message-Id: <1344457296-27609-1-git-send-email-adilger@dilger.ca> X-Mailer: git-send-email 1.7.3.4 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org The MMP tests need to be run on a real disk instead of tmpfs, since the MMP block access is using O_DIRECT. As such, they create their own test files in the local testing directory instead of using the temporary file created in /tmp by the test_one script. Delete the tempfs file before clobbering TMPFILE, otherwise it will leave the unused file in /tmp after the test is completed. Signed-off-by: Andreas Dilger --- tests/f_mmp/script | 1 + tests/f_mmp_garbage/script | 1 + tests/m_mmp/script | 1 + tests/t_mmp_1on/script | 1 + tests/t_mmp_2off/script | 1 + 5 files changed, 5 insertions(+), 0 deletions(-) diff --git a/tests/f_mmp/script b/tests/f_mmp/script index 1b0ff79..05421c4 100644 --- a/tests/f_mmp/script +++ b/tests/f_mmp/script @@ -1,5 +1,6 @@ FSCK_OPT=-yf +[ -f "$TMPFILE" ] && rm -f $TMPFILE TMPFILE=$test_name.tmp > $TMPFILE diff --git a/tests/f_mmp_garbage/script b/tests/f_mmp_garbage/script index 02cc12a..d4d2cb3 100644 --- a/tests/f_mmp_garbage/script +++ b/tests/f_mmp_garbage/script @@ -1,5 +1,6 @@ FSCK_OPT=-yf +[ -f "$TMPFILE" ] && rm -f $TMPFILE TMPFILE=$test_name.tmp > $TMPFILE diff --git a/tests/m_mmp/script b/tests/m_mmp/script index 02b0b4b..dff98f0 100644 --- a/tests/m_mmp/script +++ b/tests/m_mmp/script @@ -2,6 +2,7 @@ DESCRIPTION="enable MMP during mke2fs" FS_SIZE=65536 MKE2FS_DEVICE_SECTSIZE=2048 export MKE2FS_DEVICE_SECTSIZE +[ -f "$TMPFILE" ] && rm -f $TMPFILE TMPFILE=$test_name.tmp > $TMPFILE stat -f $TMPFILE | grep -q "Type: tmpfs" diff --git a/tests/t_mmp_1on/script b/tests/t_mmp_1on/script index 8fc8158..d15b1e3 100644 --- a/tests/t_mmp_1on/script +++ b/tests/t_mmp_1on/script @@ -1,5 +1,6 @@ FSCK_OPT=-yf +[ -f "$TMPFILE" ] && rm -f $TMPFILE TMPFILE=$test_name.tmp > $TMPFILE diff --git a/tests/t_mmp_2off/script b/tests/t_mmp_2off/script index 1dee14e..572730b 100644 --- a/tests/t_mmp_2off/script +++ b/tests/t_mmp_2off/script @@ -1,5 +1,6 @@ FSCK_OPT=-yf +[ -f "$TMPFILE" ] && rm -f $TMPFILE TMPFILE=$test_name.tmp > $TMPFILE