All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Eryu Guan <guaneryu@gmail.com>
Cc: zhangyi <yi.zhang@huawei.com>, fstests@vger.kernel.org
Subject: [PATCH] fstests: fix _repair_scratch_fs error reporting
Date: Tue, 28 May 2019 15:08:47 +0300	[thread overview]
Message-ID: <20190528120847.31003-1-amir73il@gmail.com> (raw)

_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) <yi.zhang@huawei.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---

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()
-- 
2.17.1

             reply	other threads:[~2019-05-28 12:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-28 12:08 Amir Goldstein [this message]
2019-05-29 13:37 ` [PATCH] fstests: fix _repair_scratch_fs error reporting zhangyi (F)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190528120847.31003-1-amir73il@gmail.com \
    --to=amir73il@gmail.com \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    --cc=yi.zhang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.