]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: check correct log file for errors in blkdiscard test
authorRoss Burton <ross.burton@arm.com>
Tue, 29 Jun 2021 17:10:40 +0000 (18:10 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 20 Jul 2021 09:53:10 +0000 (11:53 +0200)
When checking if the discard ioctl is supported, look in stderr not stdout as
that is where the error appears.

Signed-off-by: Ross Burton <ross.burton@arm.com>
tests/ts/blkdiscard/offsets

index 9dddc35e23e0bfd7ff3fa5683179d66f7ef51292..5e724d51b4aefe2f6d3dccc927bcb6b14d6d3834 100755 (executable)
@@ -48,7 +48,7 @@ ts_log "testing offsets with full block size"
 run_tscmd $TS_CMD_BLKDISCARD -v $DEVICE
 if [ "$?" != "0" ]; then
        # Skip the rest? For example loop backing files on NFS seem unsupported.
-       grep -q "BLKDISCARD ioctl failed: Operation not supported" "$TS_OUTPUT" \
+       grep -q "BLKDISCARD ioctl failed: Operation not supported" "$TS_ERRLOG" \
                && ts_skip "BLKDISCARD not supported"
 fi
 run_tscmd $TS_CMD_BLKDISCARD -v -o 1 $DEVICE