From 6de3ac79ea286bc3876628ca16df830eb4d0acd6 Mon Sep 17 00:00:00 2001 From: Shuhei Matsumoto Date: Mon, 4 Nov 2019 10:06:28 +0900 Subject: [PATCH] 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: Shuhei Matsumoto Change-Id: I6b2a0d7d38348fcbf7ccc272063dc8408f15315a Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473156 Tested-by: SPDK CI Jenkins Reviewed-by: Tomasz Zawadzki Reviewed-by: Jim Harris Reviewed-by: yidong0635 --- test/iscsi_tgt/filesystem/filesystem.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/iscsi_tgt/filesystem/filesystem.sh b/test/iscsi_tgt/filesystem/filesystem.sh index b1de2fc43..e8cd778c3 100755 --- a/test/iscsi_tgt/filesystem/filesystem.sh +++ b/test/iscsi_tgt/filesystem/filesystem.sh @@ -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