Commit a940721a authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

test/bdev: Use separate function for cleaning lingering files

parent 465f4c12
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -10,6 +10,14 @@ conf_file="$testdir/bdev.conf"
# Make sure the configuration is clean
:>"$conf_file"

function cleanup() {
	rm -f "/tmp/aiofile"
	rm -f "/tmp/spdk-pmem-pool"
	rm -f "$conf_file"

	rbd_cleanup
}

function start_spdk_tgt() {
	local spdk_cmd

@@ -371,7 +379,4 @@ if [ "$test_type" = "gpt" ]; then
	part_dev_by_gpt $conf_file Nvme0n1 $rootdir reset
fi

rm -f /tmp/aiofile
rm -f /tmp/spdk-pmem-pool
rm -f $conf_file
rbd_cleanup
cleanup