From: Ruediger Meier Date: Wed, 9 Dec 2015 15:27:17 +0000 (+0100) Subject: tests: skip BLKDISCARD if unsupported X-Git-Tag: v2.28-rc1~229 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fdc106a4ebf551a23da10c3bf11926f803f49a5d;p=thirdparty%2Futil-linux.git tests: skip BLKDISCARD if unsupported CC: Federico Simoncelli Signed-off-by: Ruediger Meier --- diff --git a/tests/ts/blkdiscard/offsets b/tests/ts/blkdiscard/offsets index 29597ad185..288841199a 100755 --- a/tests/ts/blkdiscard/offsets +++ b/tests/ts/blkdiscard/offsets @@ -46,6 +46,11 @@ function run_tscmd { 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" \ + && ts_skip "BLKDISCARD not supported" +fi run_tscmd $TS_CMD_BLKDISCARD -v -o 1 $DEVICE run_tscmd $TS_CMD_BLKDISCARD -v -o 511 $DEVICE run_tscmd $TS_CMD_BLKDISCARD -v -o 512 $DEVICE