diff --git a/test/bdev/blockdev.sh b/test/bdev/blockdev.sh index f5d1db4e6..989c644da 100755 --- a/test/bdev/blockdev.sh +++ b/test/bdev/blockdev.sh @@ -144,9 +144,14 @@ function fio_test_suite() { # Generate the fio config file given the list of all unclaimed bdevs that support unmap fio_config_gen $testdir/bdev.fio trim - for b in $(echo $bdevs | jq -r 'select(.supported_io_types.unmap == true) | .name'); do - fio_config_add_job $testdir/bdev.fio $b - done + if [ "$(echo $bdevs | jq -r 'select(.supported_io_types.unmap == true) | .name')" != "" ]; then + for b in $(echo $bdevs | jq -r 'select(.supported_io_types.unmap == true) | .name'); do + fio_config_add_job $testdir/bdev.fio $b + done + else + rm -f $testdir/bdev.fio + return 0 + fi run_test "bdev_fio_trim" fio_bdev $fio_params --output=$output_dir/blockdev_trim.txt rm -f ./*.state