From c50e7dffa1e9025a7023e2c221b7d9be74e36ac3 Mon Sep 17 00:00:00 2001 From: Benjamin Marzinski Date: Tue, 20 Feb 2018 23:55:07 -0600 Subject: [PATCH] Fix some tests to be more robust --- tests/bindings/main.sh | 3 +++ tests/include/ec.sh | 2 ++ 2 files changed, 5 insertions(+) diff --git a/tests/bindings/main.sh b/tests/bindings/main.sh index 83217ba..518333d 100755 --- a/tests/bindings/main.sh +++ b/tests/bindings/main.sh @@ -26,6 +26,7 @@ trun "service multipathd stop" rpm -q device-mapper-multipath || yum install -y device-mapper-multipath trun "mpathconf --enable --with_multipathd y --user_friendly_names y" trun "service multipathd status" +sleep 5 trun "multipath -F" sleep 5 @@ -44,6 +45,7 @@ trun "multipath -r" sleep 5 tok "[[ -b /dev/mapper/$new_alias ]]" tok is_mpath $new_alias +sleep 5 trun "multipath -F" sleep 5 @@ -51,4 +53,5 @@ trun "modprobe -r scsi_debug" trun "service multipathd stop" sleep 3 trun "multipath -W" +trun "rm /etc/multipath/bindings" tend diff --git a/tests/include/ec.sh b/tests/include/ec.sh index a7369bc..e9726eb 100755 --- a/tests/include/ec.sh +++ b/tests/include/ec.sh @@ -159,6 +159,7 @@ AA sleep 5s #multipathd return premature multipath -r multipathd -k'reconfigure' + sleep 5s mpath_name_list=$(dmsetup table \ | perl -ne 'print "$1 " if /(mpath[a-z0-9]+):[0-9 ]+multipath.*/') fi @@ -217,6 +218,7 @@ AA service multipathd restart sleep 5s #multipathd return premature multipathd -k'reconfig' + sleep 5s mpath_name_list=$(dmsetup table | perl -ne 'print "$1 " if /(mpath[a-z0-9]+):[0-9 ]+multipath.*/') if [ "CHK${mpath_name_list}" != "CHK" ];then