From f36f4a7985061b2587d3bfce9acabdc1db63ee90 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Fri, 19 Aug 2016 12:22:47 -0700 Subject: [PATCH] test/iscsi: add a sleep before detecting device Allow some time for the iscsiadm login command to finish before trying to find the attached SCSI disk. This makes the reset test consistent with other uses of iscsiadm. Change-Id: I9521a41b51956643a437fcaccceefd256fb4b609 Signed-off-by: Daniel Verkamp --- test/iscsi_tgt/reset/reset.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test/iscsi_tgt/reset/reset.sh b/test/iscsi_tgt/reset/reset.sh index 3155bf2c0..9ea477f8a 100755 --- a/test/iscsi_tgt/reset/reset.sh +++ b/test/iscsi_tgt/reset/reset.sh @@ -55,6 +55,7 @@ sleep 1 iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$PORT iscsiadm -m node --login -p $TARGET_IP:$PORT +sleep 1 dev=$(iscsiadm -m session -P 3 | grep "Attached scsi disk" | awk '{print $4}') sleep 1