From patchwork Tue May 28 12:08:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amir Goldstein X-Patchwork-Id: 10964803 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 99919112C for ; Tue, 28 May 2019 12:08:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8947522B39 for ; Tue, 28 May 2019 12:08:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7CB0B28358; Tue, 28 May 2019 12:08:55 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,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 1A2A122B39 for ; Tue, 28 May 2019 12:08:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726809AbfE1MIy (ORCPT ); Tue, 28 May 2019 08:08:54 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:39814 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726620AbfE1MIy (ORCPT ); Tue, 28 May 2019 08:08:54 -0400 Received: by mail-wm1-f66.google.com with SMTP id z23so2573621wma.4 for ; Tue, 28 May 2019 05:08:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=AC7W11LDpEq9s6X7wta8GMwV1CandkezCXwWDOAohmA=; b=Xg8coWrxzl2XeiOY3UTF1wlf67jkaHXpBRTC1bgEbzMDJOkeO7O4ZcxBL0B7ZwZ18v a0GvTv9MWjZU1cYweYrTWAq+WrzVhdIC+gnzbYxOlywQ3SoUMrx3h5f0FYueR4AegC15 w/Kn1cMOxxnVT6ANcbJx5GopWYdWQkflyB/CtGQ/ZpsZEU86ApUcSKRmFhTdUC0ihM0O E6E9Jfw2pOp3KsFe+YZXTKSv3TpdmInc7LnnhurrJhIYfONqdH+hVnNJP2c3jGjxrUcW cVnRWj+0XjaNIWEK1hsy86HP5utN74lQqzOIFuRwBD+NoIQZSOoAvG860h+LKqMmxW++ Xffw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=AC7W11LDpEq9s6X7wta8GMwV1CandkezCXwWDOAohmA=; b=GfWJCZayUKi/0YdPieSD/x02S3psdQBvBijPtnJPg5OcUjNL6DlCDt2H4K7AUxLkpO O7k3puAGq9ftv7xfbCUm2dK3wTotrVOyj7vnCWpQZdaqMKK44jfzE6BDvbn3qVvoMoUh 4Y6gxnARFGLvwV8YcbRKp5YqwwS+fhswtd4y2JRA2xCz+kVUnnKb8Ltuz79xy6nhUdLI Rz92NHGFlfosMf+j4ZGb3SyPrsT6tN9Anvl9WFKo5xgraZf9Q6C3zOzlpmtdFftNdgG+ GFE1CuqtiHrBT86JNbq5vWTL7BfrFstdGeOvfu87XMxIaasbv0Zj3RY/lbHHrkz/0vZA V52Q== X-Gm-Message-State: APjAAAWftL1MgW3xVrrnDAGZsM/JY5Tsmy9NTGVXRhIJfqtxDz8aU2er fS7u1PRTABrk54cjQRd9bHg= X-Google-Smtp-Source: APXvYqz0T8PbeFXbfX8aydcB+QDwosNg8dmxltx7nNgRqQVPeTf3ysXmptfhSl0KZvxccbqFSKRnwQ== X-Received: by 2002:a1c:700c:: with SMTP id l12mr3014769wmc.170.1559045332723; Tue, 28 May 2019 05:08:52 -0700 (PDT) Received: from amir-ThinkPad-T480.ctera.local (bzq-166-168-31-246.red.bezeqint.net. [31.168.166.246]) by smtp.gmail.com with ESMTPSA id j7sm10990329wrt.31.2019.05.28.05.08.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 May 2019 05:08:52 -0700 (PDT) From: Amir Goldstein To: Eryu Guan Cc: zhangyi , fstests@vger.kernel.org Subject: [PATCH] fstests: fix _repair_scratch_fs error reporting Date: Tue, 28 May 2019 15:08:47 +0300 Message-Id: <20190528120847.31003-1-amir73il@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP _dump_err2() helper was introduced over two years ago and it broke the error reporting from _repair_scratch_fs. Every test that runs: _repair_scratch_fs >> $seqres.full and expect to fail if anything is written to stderr is not working as intended. Spotted-by: zhangyi (F) Signed-off-by: Amir Goldstein Reviewed-by: zhangyi (F) --- Eryu, This bug was found by zhangyi while working on fsck.overlay patches, but it affects all filesystems. I just re-found zhangyi's fix while going through some old notes. Amir. common/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/rc b/common/rc index 17b89d5d..e78e0920 100644 --- a/common/rc +++ b/common/rc @@ -98,7 +98,7 @@ _dump_err_cont() _dump_err2() { _err_msg="$*" - >2& echo "$_err_msg" + >&2 echo "$_err_msg" } _log_err()