[Pdbg] [PATCH v2 1/5] tests: Fix the condition to check if bmc is up

Amitay Isaacs amitay at ozlabs.org
Wed Nov 14 16:14:07 AEDT 2018


Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
Reviewed-by: Alistair Popple <alistair at popple.id.au>
---
 tests/test_hw_bmc.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/test_hw_bmc.sh b/tests/test_hw_bmc.sh
index 7054181..c65a630 100755
--- a/tests/test_hw_bmc.sh
+++ b/tests/test_hw_bmc.sh
@@ -62,15 +62,17 @@ do_skip ()
     fi
 }
 
+
 echo -n "Checking if the host is up... "
 output=$(test_wrapper /usr/sbin/obmcutil state | grep CurrentHostState)
 rc=$?
 if [ $rc -ne 0 ] || \
-    [ "$output" != "xyz.openbmc_project.State.Host.HostState.Running" ] ; then
+    [ "$output" = "CurrentHostState    : xyz.openbmc_project.State.Host.HostState.Running" ] ; then
 	echo "yes"
 	hw_state=1
 else
 	echo "no"
+	echo "$output"
 fi
 
 result_filter ()
-- 
2.19.1



More information about the Pdbg mailing list