From patchwork Tue Jan 10 03:57:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eryu Guan X-Patchwork-Id: 9506295 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 14427606E1 for ; Tue, 10 Jan 2017 03:57:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1201827FA1 for ; Tue, 10 Jan 2017 03:57:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 056CA2818A; Tue, 10 Jan 2017 03:57:35 +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=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 7130327FA1 for ; Tue, 10 Jan 2017 03:57:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932742AbdAJD5d (ORCPT ); Mon, 9 Jan 2017 22:57:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35206 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932667AbdAJD5d (ORCPT ); Mon, 9 Jan 2017 22:57:33 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ED858C04B30F; Tue, 10 Jan 2017 03:57:33 +0000 (UTC) Received: from localhost (dhcp-13-108.nay.redhat.com [10.66.13.108]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v0A3vWg9015746; Mon, 9 Jan 2017 22:57:33 -0500 Date: Tue, 10 Jan 2017 11:57:32 +0800 From: Eryu Guan To: Christoph Hellwig Cc: fstests@vger.kernel.org Subject: Re: [PATCH] fstests: fix error redirection in generic/256 Message-ID: <20170110035732.GI1859@eguan.usersys.redhat.com> References: <20161112164720.GA18127@infradead.org> <20161112183943.GK27776@eguan.usersys.redhat.com> <20170109134008.GC19577@infradead.org> <20170110034605.GH1859@eguan.usersys.redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170110034605.GH1859@eguan.usersys.redhat.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 10 Jan 2017 03:57:33 +0000 (UTC) Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Jan 10, 2017 at 11:46:05AM +0800, Eryu Guan wrote: > On Mon, Jan 09, 2017 at 05:40:08AM -0800, Christoph Hellwig wrote: > > On Sun, Nov 13, 2016 at 02:39:43AM +0800, Eryu Guan wrote: > > > On Sat, Nov 12, 2016 at 08:47:20AM -0800, Christoph Hellwig wrote: > > > > Not sure if my shell is the problem here, but I need this explicit > > > > redirection to ignore the error output from mkdir and xfs_io, otherwise > > > > the test fails due to the error messages from these commands. > > > > > > That's weird, from bash manpage, "&>" should be equivalent to "> ... 2>&1" > > > > > > There're many other tests use "&>" as well, do you see such failures > > > from other tests, such as generic/347? > > > > No. But 256 keeps on failing for me without this. Given that it's > > just a slightly more verbose syntax is there any reason not to just > > apply this patch for now? > > Ok, I've queued it up for next update. I need to do some tweaks on this patch, generic/256 has been updated and patch didn't apply cleanly. I replaced all "&>" with "> ... 2>&1", though some of them won't generate any output. Thanks, Eryu From: Christoph Hellwig Date: Sat, 12 Nov 2016 08:47:20 -0800 Subject: [PATCH] generic/256: fix error redirection Not sure if my shell is the problem here, but I need this explicit redirection to ignore the error output from mkdir and xfs_io, otherwise the test fails due to the error messages from these commands. Signed-off-by: Christoph Hellwig --- tests/generic/256 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe fstests" 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/256 b/tests/generic/256 index 63f2d4f..5327c33 100755 --- a/tests/generic/256 +++ b/tests/generic/256 @@ -81,10 +81,10 @@ _test_full_fs_punch() exit 1 fi - rm -f $file_name &> /dev/null + rm -f $file_name > /dev/null 2>&1 $XFS_IO_PROG -f -c "pwrite 0 $file_len" \ - -c "fsync" $file_name &> /dev/null + -c "fsync" $file_name > /dev/null 2>&1 chmod 666 $file_name # All files are created as a non root user to prevent reserved blocks @@ -111,8 +111,8 @@ _test_full_fs_punch() } # Make a small file system to fill -_scratch_unmount &> /dev/null -_scratch_mkfs_sized $(( 1536 * 1024 * 1024 )) &> /dev/null +_scratch_unmount > /dev/null 2>&1 +_scratch_mkfs_sized $(( 1536 * 1024 * 1024 )) > /dev/null 2>&1 _scratch_mount # Test must be able to write files with non-root permissions chmod 777 $SCRATCH_MNT