test/bdev: Call rbd_cleanup() only if rbd test was run

This is to avoid spammy stderr comming from ceph/stop.sh:

  + umount /dev/loop200p2
  umount: /dev/loop200p2: not mounted.
  + losetup -d /dev/loop200
  losetup: /dev/loop200: detach failed: No such device or address

Change-Id: Id1ecfc5da1a530c63d454bfacc8fb36c29549f8e
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1006
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
Michal Berger 2020-03-02 21:46:14 +01:00 committed by Tomasz Zawadzki
parent b3b45f1659
commit 85cda93b8d

View File

@ -15,7 +15,9 @@ function cleanup() {
rm -f "/tmp/spdk-pmem-pool"
rm -f "$conf_file"
rbd_cleanup
if [[ $test_type == rbd ]]; then
rbd_cleanup
fi
}
function start_spdk_tgt() {