fstests: check for unknown flag result in _require_xfs_io_command
authorEric Sandeen <sandeen@redhat.com>
Mon, 18 May 2020 16:18:08 +0000 (11:18 -0500)
committerEryu Guan <guaneryu@gmail.com>
Sun, 24 May 2020 15:09:42 +0000 (23:09 +0800)
If we are testing for "xfs_io -c chattr $FOO" be sure to catch any
unknown flag output and _notrun

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/rc

index 310fdc46a888f7bbd7b315531579431791ae0021..a6967831fad51322efca9d8d9dfb1f640878e96b 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -2255,6 +2255,8 @@ _require_xfs_io_command()
                _notrun "xfs_io $command $param_checked not supported on $FSTYP"
        echo $testio | grep -q "Function not implemented" && \
                _notrun "xfs_io $command $param_checked support is missing (missing syscall?)"
                _notrun "xfs_io $command $param_checked not supported on $FSTYP"
        echo $testio | grep -q "Function not implemented" && \
                _notrun "xfs_io $command $param_checked support is missing (missing syscall?)"
+       echo $testio | grep -q "unknown flag" && \
+               _notrun "xfs_io $command $param_checked support is missing (unknown flag)"
 
        [ -n "$param" ] || return
 
 
        [ -n "$param" ] || return