test/bdev: Use separate function for cleaning lingering files
Change-Id: Ib44dbf1a4ec8e44f26cb8219e53b3ed1ae03d48b Signed-off-by: Michal Berger <michalx.berger@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1095 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
parent
465f4c1254
commit
a940721a29
@ -10,6 +10,14 @@ conf_file="$testdir/bdev.conf"
|
|||||||
# Make sure the configuration is clean
|
# Make sure the configuration is clean
|
||||||
:>"$conf_file"
|
:>"$conf_file"
|
||||||
|
|
||||||
|
function cleanup() {
|
||||||
|
rm -f "/tmp/aiofile"
|
||||||
|
rm -f "/tmp/spdk-pmem-pool"
|
||||||
|
rm -f "$conf_file"
|
||||||
|
|
||||||
|
rbd_cleanup
|
||||||
|
}
|
||||||
|
|
||||||
function start_spdk_tgt() {
|
function start_spdk_tgt() {
|
||||||
local spdk_cmd
|
local spdk_cmd
|
||||||
|
|
||||||
@ -371,7 +379,4 @@ if [ "$test_type" = "gpt" ]; then
|
|||||||
part_dev_by_gpt $conf_file Nvme0n1 $rootdir reset
|
part_dev_by_gpt $conf_file Nvme0n1 $rootdir reset
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f /tmp/aiofile
|
cleanup
|
||||||
rm -f /tmp/spdk-pmem-pool
|
|
||||||
rm -f $conf_file
|
|
||||||
rbd_cleanup
|
|
||||||
|
Loading…
Reference in New Issue
Block a user