From b6b6cc7309cfa278e4dd4bd524ed43d9a414a7da Mon Sep 17 00:00:00 2001 From: hu-weihua Date: Thu, 14 Dec 2017 03:00:35 -0500 Subject: [PATCH] Modify or add openbmc test cases or bundle --- .../bundle/hdctrl_openpower_openbmc.bundle | 41 +++++++++--- xCAT-test/autotest/testcase/reventlog/cases0 | 21 ++++++ .../autotest/testcase/rflash/rflash_openbmc.0 | 67 +++++++++---------- 3 files changed, 87 insertions(+), 42 deletions(-) diff --git a/xCAT-test/autotest/bundle/hdctrl_openpower_openbmc.bundle b/xCAT-test/autotest/bundle/hdctrl_openpower_openbmc.bundle index 2a77bb1da..f7ac6792d 100644 --- a/xCAT-test/autotest/bundle/hdctrl_openpower_openbmc.bundle +++ b/xCAT-test/autotest/bundle/hdctrl_openpower_openbmc.bundle @@ -37,14 +37,39 @@ rspconfig_set_all rspconfig_set_all_invalid rspconfig_set_vlan rspconfig_set_vlan_invalid -rflash_check -rflash_invalid_activate -rflash_invalid_activate_and_delete -rflash_invalid_id -rflash_invalid_multiple_id_3 -rflash_invalid_multiple_id_2 -rflash_invalid_node -rflash_invalid_delete_2 +rflash_option_c_without_specify_noderange +rflash_option_l_without_specify_noderange +rflash_option_a_without_specify_noderange +rflash_option_u_without_specify_noderange +rflash_option_d_without_specify_noderange +rflash_without_option +rflash_unsupport_multiple_option_a_u +rflash_unsupport_multiple_option_a_c +rflash_unsupport_multiple_option_a_l +rflash_unsupport_multiple_option_a_d +rflash_unsupport_multiple_option_c_l +rflash_unsupport_multiple_option_c_u +rflash_unsupport_multiple_option_c_d +rflash_unsupport_multiple_option_l_d +rflash_unsupport_multiple_option_l_u +rflash_unsupport_multiple_option_u_d +rflash_option_c_file_not_exist +rflash_option_c_with_multiple_values +rflash_option_c_against_node +rflash_option_check_with_V_against_node +rflash_option_l_with_value +rflash_option_l +rflash_option_u_file_not_exist +rflash_option_u_with_multiple_values +rflash_option_a_file_not_exist +rflash_option_a_with_multiple_values +rflash_option_a_with_non_existent_id +rflash_option_delete_with_multiple_values +rflash_option_delete_with_non_existent_id +rflash_option_d_with_multiple_values +rflash_option_d_with_non_existent_dir +rflash_usage +reventlog_s_openbmc rpower_softoff rpower_suspend_OpenpowerBmc rpower_wake_OpenpowerBmc diff --git a/xCAT-test/autotest/testcase/reventlog/cases0 b/xCAT-test/autotest/testcase/reventlog/cases0 index 1bbca123e..5e73493b7 100644 --- a/xCAT-test/autotest/testcase/reventlog/cases0 +++ b/xCAT-test/autotest/testcase/reventlog/cases0 @@ -18,3 +18,24 @@ cmd:reventlog $$CN 5 check:rc==0 check:output=~$$CN\s*:\s*.*\d\d/\d\d/\d\d\s*\S+|$$CN: no SEL entries|Entry end + +start:reventlog_s_openbmc +description: For openbmc, reventlog has dropped option s +os:Linux +hcp:openbmc +cmd:reventlog $$CN 10 -s +check:output=~The -s option is not supported for OpenBMC +check:rc!=0 +cmd:reventlog $$CN 10 -s 1 +check:output=~The -s option is not supported for OpenBMC +check:rc!=0 +cmd:reventlog $$CN -s all +check:output=~The -s option is not supported for OpenBMC +check:rc!=0 +cmd:reventlog $$CN -s +check:output=~Error: Unsupported command +check:rc!=0 +cmd:reventlog $$CN all aaa +check:output=~Error: Only one option is supported at the same time +check:rc!=0 +end diff --git a/xCAT-test/autotest/testcase/rflash/rflash_openbmc.0 b/xCAT-test/autotest/testcase/rflash/rflash_openbmc.0 index 16993b52d..62a05dd1c 100644 --- a/xCAT-test/autotest/testcase/rflash/rflash_openbmc.0 +++ b/xCAT-test/autotest/testcase/rflash/rflash_openbmc.0 @@ -49,8 +49,7 @@ hcp:openbmc cmd:rflash -d check:output=~Usage: cmd:rflash -d /1234 -check:rc != 0 -check:output=~Error: Invalid nodes and/or groups in noderange +check:Usage: cmd:rflash --delete 1234abc check:rc != 0 check:output=~Error: Invalid nodes and/or groups in noderange @@ -160,16 +159,16 @@ description: basic usage check for option c. if the file does not exist, should os:Linux hcp:openbmc cmd:rflash $$CN -c /tmp/abc123.tz -check:output=~Error: Invalid option +check:output=~Error: Invalid firmware specified with check:rc != 0 cmd:rflash $$CN -c /tmp/ -check:output=~Error: Invalid option +check:output=~Error: Invalid firmware specified with check:rc != 0 cmd:rflash $$CN /tmp/abc123.tz -c -check:output=~Error: Invalid option +check:output=~Error: Invalid firmware specified with check:rc != 0 cmd:rflash $$CN /tmp/ -c -check:output=~Error: Invalid option +check:output=~Error: Invalid firmware specified with check:rc != 0 cmd:rflash $$CN 1.tar -c check:output=~Error: Cannot access @@ -184,16 +183,16 @@ description: basic usage check for option c. if there are multiple value assigne os:Linux hcp:openbmc cmd:rflash $$CN -c /tmp/abc123.tz /tmp/abc124.tz -check:output=~Error: More than one firmware specified is not supported +check:output=~Error: Invalid firmware specified with check:rc != 0 cmd:rflash $$CN -c 1.tz 2.tz 3.tz -check:output=~Error: More than one firmware specified is not supported +check:output=~Error: Invalid firmware specified with check:rc != 0 cmd:rflash $$CN 1.tz 2.tz 3.tz -c -check:output=~Error: More than one firmware specified is not supported +check:output=~Error: Invalid firmware specified with check:rc != 0 cmd:rflash $$CN 1.tz -c 2.tz -check:output=~Error: More than one firmware specified is not supported +check:output=~Error: Invalid firmware specified with check:rc != 0 end @@ -264,19 +263,19 @@ description: basic usage check for option u. if the file does not exist, should os:Linux hcp:openbmc cmd:rflash $$CN -u /tmp/abc123.tz -check:output=~Error: Invalid option +check:output=~Error: Invalid firmware specified with check:output!~Attempting to check:rc != 0 cmd:rflash $$CN -u /tmp/ -check:output=~Error: Invalid option +check:output=~Error: Invalid firmware specified with check:output!~Attempting to check:rc != 0 cmd:rflash $$CN /tmp/abc123.tz -u -check:output=~Error: Invalid option +check:output=~Error: Invalid firmware specified with check:output!~Attempting to check:rc != 0 cmd:rflash $$CN /tmp/ -u -check:output=~Error: Invalid option +check:output=~Error: Invalid firmware specified with check:output!~Attempting to check:rc != 0 cmd:rflash $$CN 1.tar -u @@ -294,19 +293,19 @@ description: basic usage check for option u. if there are multiple value assigne os:Linux hcp:openbmc cmd:rflash $$CN -u /tmp/abc123.tz /tmp/abc124.tz -check:output=~Error: More than one firmware specified is not supported +check:output=~Error: Invalid firmware specified with check:output!~Attempting to check:rc != 0 cmd:rflash $$CN -u 1.tz 2.tz 3.tz -check:output=~Error: More than one firmware specified is not supported +check:output=~Error: Invalid firmware specified with check:output!~Attempting to check:rc != 0 cmd:rflash $$CN 1.tz 2.tz 3.tz -u -check:output=~Error: More than one firmware specified is not supported +check:output=~Error: Invalid firmware specified with check:output!~Attempting to check:rc != 0 cmd:rflash $$CN 1.tz -u 2.tz -check:output=~Error: More than one firmware specified is not supported +check:output=~Error: Invalid firmware specified with check:output!~Attempting to check:rc != 0 end @@ -316,19 +315,19 @@ description: basic usage check for option a. if the file does not exist, should os:Linux hcp:openbmc cmd:rflash $$CN -a /tmp/abc123.tz -check:output=~Error: Invalid option +check:output=~rror: Invalid firmware specified with check:output!~Attempting to check:rc != 0 cmd:rflash $$CN -a /tmp/ -check:output=~Error: Invalid option +check:output=~rror: Invalid firmware specified with check:output!~Attempting to check:rc != 0 cmd:rflash $$CN /tmp/abc123.tz -a -check:output=~Error: Invalid option +check:output=~rror: Invalid firmware specified with check:output!~Attempting to check:rc != 0 cmd:rflash $$CN /tmp/ -a -check:output=~Error: Invalid option +check:output=~rror: Invalid firmware specified with check:output!~Attempting to check:rc != 0 cmd:rflash $$CN 1.tar -a @@ -346,27 +345,27 @@ description: basic usage check for option a. if there are multiple value assigne os:Linux hcp:openbmc cmd:rflash $$CN -a /tmp/abc123.tz /tmp/abc124.tz -check:output=~Error: More than one foirmware specified is not supported +check:output=~Error: Invalid firmware specified with check:output!~Attempting to check:rc != 0 cmd:rflash $$CN -a 1.tz 2.tz 3.tz -check:output=~Error: More than one firmware specified is not supported +check:output=~Error: Invalid firmware specified with check:output!~Attempting to check:rc != 0 cmd:rflash $$CN 1.tz 2.tz 3.tz -a -check:output=~Error: More than one firmware specified is not supported +check:output=~Error: Invalid firmware specified with check:output!~Attempting to check:rc != 0 cmd:rflash $$CN 1.tz -a 2.tz -check:output=~Error: More than one firmware specified is not supported +check:output=~Error: Invalid firmware specified with check:output!~Attempting to check:rc != 0 cmd:rflash $$CN 1234567 -a 2345678 -check:output=~Error: More than one firmware specified is not supported +check:output=~Error: Invalid firmware specified with check:output!~Attempting to check:rc != 0 cmd:rflash $$CN -a 123 abc asdbas -check:output=~Error: More than one firmware specified is not supported +check:output=~Error: Invalid firmware specified with check:output!~Attempting to check:rc != 0 end @@ -391,15 +390,15 @@ description: basic usage check for option delete. if there are multiple value as os:Linux hcp:openbmc cmd:rflash $$CN --delete 1234567 2345678 -check:output=~Error: More than one firmware specified is not supported +check:output=~Error: Invalid firmware specified with check:output!~Attempting to delete check:rc != 0 cmd:rflash $$CN 1234567 2345678 --delete -check:output=~Error: More than one firmware specified is not supported +check:output=~Error: Invalid firmware specified with check:output!~Attempting to delete check:rc != 0 cmd:rflash $$CN 1234567 --delete 2345678 -check:output=~Error: More than one firmware specified is not supported +check:output=~Error: Invalid firmware specified with check:output!~Attempting to delete check:rc != 0 end @@ -454,14 +453,14 @@ check:output =~Error: No BMC tar file found check:output =~Error: No PNOR tar file found check:output!~Attempting to check:rc != 0 -cmd:touch obmc-phosphor-image-witherspoon.ubi.mtd.tar /tmp/bogus123 +cmd:touch /tmp/bogus123/obmc-phosphor-image-witherspoon.ubi.mtd.tar check:rc == 0 cmd:rflash $$CN -d /tmp/bogus123 check:output =~Error: No BMC tar file found check:output =~Error: No PNOR tar file found check:output!~Attempting to check:rc != 0 -cmd:touch witherspoon.pnor.squashfs.tar /tmp/bogus123 +cmd:touch /tmp/bogus123/witherspoon.pnor.squashfs.tar check:rc == 0 cmd:rflash $$CN -d /tmp/bogus123 check:output =~Error: No BMC tar file found @@ -479,7 +478,7 @@ hcp:openbmc cmd:rflash -h check:output =~Usage: check:output =~OpenPOWER OpenBMC specific: -check:output =~ -d +check:output =~ -d.+–no-host-reboot check:output =~ image_id.+--delete check:rc == 0 end