From patchwork Thu Dec 11 10:49:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eryu Guan X-Patchwork-Id: 5475711 Return-Path: X-Original-To: patchwork-fstests@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 72EA1BEEA8 for ; Thu, 11 Dec 2014 12:29:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AB78120125 for ; Thu, 11 Dec 2014 12:29:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B343420121 for ; Thu, 11 Dec 2014 12:29:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754299AbaLKM3e (ORCPT ); Thu, 11 Dec 2014 07:29:34 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56454 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753006AbaLKM3e (ORCPT ); Thu, 11 Dec 2014 07:29:34 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBBCTRlg012851 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 11 Dec 2014 07:29:33 -0500 Received: from localhost (dhcp-12-108.nay.redhat.com [10.66.12.108]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sBBAnWcW015489; Thu, 11 Dec 2014 05:49:33 -0500 From: Eryu Guan To: fstests@vger.kernel.org Cc: Eryu Guan Subject: [PATCH] generic/299: various fixes Date: Thu, 11 Dec 2014 18:49:12 +0800 Message-Id: <1418294952-20035-1-git-send-email-eguan@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 three problems in generic/299 1. Use $XFS_IO_PROG instead of fallocate/truncate, old distros like RHEL5 don't have these commands. 2. Remove $seqres.full before test, otherwise the file is growing all the time. 3. Make sure fio really exits, otherwise fio would block umount. $pid is the pid of function run_check not fio, sometimes fio is still there when $pid is dead and blocking umount. Signed-off-by: Eryu Guan --- tests/generic/299 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/generic/299 b/tests/generic/299 index e8685a4..ae1bf74 100755 --- a/tests/generic/299 +++ b/tests/generic/299 @@ -125,20 +125,23 @@ _workout() do for ((k=1; k <= NUM_JOBS; k++)) do - fallocate -l $FILE_SIZE $SCRATCH_MNT/direct_aio.$k.0 \ + $XFS_IO_PROG -f -c "falloc 0 $FILE_SIZE" $SCRATCH_MNT/direct_aio.$k.0 \ >> $seqres.full 2>&1 done for ((k=1; k <= NUM_JOBS; k++)) do - truncate -s 0 $SCRATCH_MNT/direct_aio.$k.0 >> $seqres.full 2>&1 + $XFS_IO_PROG -f -c "truncate 0" $SCRATCH_MNT/direct_aio.$k.0 \ + >>$seqres.full 2>&1 done # Following like will check that pid is still run. # Once fio exit we can stop fallocate/truncate loop - kill -0 $pid > /dev/null 2>&1 || break + pgrep fio >/dev/null 2>&1 || break done wait $pid } +rm -f $seqres.full + _scratch_mkfs >> $seqres.full 2>&1 _scratch_mount