Commit 6ac949c0 authored by Seth Howell's avatar Seth Howell Committed by Tomasz Zawadzki
Browse files

test/blockdev: check bdev list before running unmap



Some bdevs don't support unmap so they may not be able to run the fio
unmap tests. In case none of the bdevs we are testing support this
operation, the test will be skipped.

Change-Id: I5063297f0378bc87abf50e5311d147251cfe0ad9
Signed-off-by: default avatarSeth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478337


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
parent 5883d343
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -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
	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