Commit 6de3ac79 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Tomasz Zawadzki
Browse files

test/iscsi_tgt: Call remove_backends after iscsicleanup in the trap handler



In the trap handler, iscsicleanup had been called after remove_backends.
This ordering found a bug in SCSI library but is not different from
normal path, and had created LVOL hotplug test unintentionally.

Fix the ordering first and consider an independent test case for
LVOL hotplug + iSCSI target separately later.

The failure which invoked the trap handler will be also investigated
regardless of this patch.

Signed-off-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6b2a0d7d38348fcbf7ccc272063dc8408f15315a
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473156


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avataryidong0635 <dongx.yi@intel.com>
parent 7cef60b6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$ISCSI_PORT
iscsiadm -m node --login -p $TARGET_IP:$ISCSI_PORT
waitforiscsidevices 1

trap 'remove_backends; umount /mnt/device; rm -rf /mnt/device; iscsicleanup; killprocess $pid; iscsitestfini $1 $2; exit 1' SIGINT SIGTERM EXIT
trap 'iscsicleanup; remove_backends; umount /mnt/device; rm -rf /mnt/device; killprocess $pid; iscsitestfini $1 $2; exit 1' SIGINT SIGTERM EXIT

mkdir -p /mnt/device