]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
common/rc: fix MKSWAP_PROG quoting
authorXiong Zhou <xzhou@redhat.com>
Wed, 1 Sep 2021 09:40:24 +0000 (17:40 +0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 5 Sep 2021 13:22:39 +0000 (21:22 +0800)
After commit
  0e4dd8b9 common/rc: fix ignoring of errors on
we are getting this error message when running swapfiles tests:
  +./common/rc: line 2553: MKSWAP_PROG: command not found

Rewrite the line.

Signed-off-by: Murphy Zhou <xzhou@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/rc

index f89e327652a614a1daab4c6e7cb4d9c230e102eb..9dc6df9450cadda511cae45cfa1821e80d47867b 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -2550,7 +2550,8 @@ _format_swapfile() {
        $CHATTR_PROG +C "$fname" > /dev/null 2>&1
        _pwrite_byte 0x61 0 "$sz" "$fname" >> $seqres.full
        # Ignore permission complaints on filesystems that don't support perms
-       $(MKSWAP_PROG "$fname" 2> >(grep -v 'insecure permission' >&2)) >> $seqres.full
+       $MKSWAP_PROG "$fname" 2>&1 >> $seqres.full | \
+               grep -v "insecure permission"
 }
 
 _swapon_file() {