From de873ca26a0364347b494fc58bd7492564bbe880 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Wed, 8 Nov 2017 13:35:25 -0500 Subject: [PATCH] Create a test case that exposes the problem in rinv #4236 --- .../autotest/testcase/UT_openbmc/rinv_cases0 | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 xCAT-test/autotest/testcase/UT_openbmc/rinv_cases0 diff --git a/xCAT-test/autotest/testcase/UT_openbmc/rinv_cases0 b/xCAT-test/autotest/testcase/UT_openbmc/rinv_cases0 new file mode 100644 index 000000000..e3c5ca1f6 --- /dev/null +++ b/xCAT-test/autotest/testcase/UT_openbmc/rinv_cases0 @@ -0,0 +1,39 @@ +start:rinv_check_active_fw +description: Ensure that there is only 1 active BMC and 1 Active PNOR +os:Linux +mgt:openbmc +cmd:rinv $$CN firm | grep -i ibm +check:rc==0 +check:output=~$$CN: BMC Firmware Product +check:rc==0 +check:output=~$$CN: HOST Firmware Product +check:rc==0 +end + +start:rinv_check_active_fw_count +description: Ensure that there are only 2 active firmware (if previous test is OK) +os:Linux +mgt:openbmc +# show the output +cmd:rinv $$CN firm | grep -i ibm +check:rc==0 +# check based on wc +cmd:rinv $$CN firm | grep -i ibm | wc -l +check:output=~2 +check:rc==0 +end + +start:rinv_check_active_fw_verbose_count +description: Ensure that there is only 2 active firmware (in verbose mode) (Issue #4236) +os:Linux +mgt:openbmc +# show the output +cmd:rinv $$CN firm -V | grep -i Active +check:rc==0 +# validate test cased on word count +cmd:rinv $$CN firm -V | grep -i Active | wc -l +check:rc==0 +check:rc==0 +check:output=~2 +check:rc==0 +end