It's possible that a previous run of blktest left some stale
configuration left. E.g. when the module unload doesn't work (the bug
might in the kernel we are testing). In this case error out and avoid
confusion.
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
local nvmet_ctrlkey="$4"
local host_path="${NVMET_CFS}/hosts/${nvmet_hostnqn}"
+ if [[ -d "${host_path}" ]]; then
+ echo "FAIL target setup failed. stale host configuration found"
+ return 1;
+ fi
+
mkdir "${host_path}"
_add_nvmet_allow_hosts "${nvmet_subsystem}" "${nvmet_hostnqn}"
if [[ "${nvmet_hostkey}" ]] ; then