diff --git a/xCAT-test/autotest/testcase/rflash/rflash_openbmc.0 b/xCAT-test/autotest/testcase/rflash/rflash_openbmc.0 new file mode 100644 index 000000000..52874f64e --- /dev/null +++ b/xCAT-test/autotest/testcase/rflash/rflash_openbmc.0 @@ -0,0 +1,375 @@ +start:rflash_option_c_without_specify_noderange +description: basic usage check for option c. if without specify noderange for rflash command, should offer usage message +os:Linux +hcp:openbmc +cmd:rflash -c +check:output=~Usage: +cmd:rflash -c 1.tar +check:rc != 0 +check:output=~Error: Invalid nodes and/or groups in noderange +end + +start:rflash_option_l_without_specify_noderange +description: basic usage check for option l. if without specify noderange for rflash command, should offer usage message +os:Linux +hcp:openbmc +cmd:rflash -l +check:output=~Usage: +end + +start:rflash_option_a_without_specify_noderange +description: basic usage check for option a. if without specify noderange for rflash command, should offer usage message +os:Linux +hcp:openbmc +cmd:rflash -a +check:output=~Usage: +cmd:rflash -a 1.tar +check:rc != 0 +check:output=~Error: Invalid nodes and/or groups in noderange +end + +start:rflash_option_u_without_specify_noderange +description: basic usage check for option u. if without specify noderange for rflash command, should offer usage message +os:Linux +hcp:openbmc +cmd:rflash -u +check:output=~Usage: +cmd:rflash -u 1.tar +check:rc != 0 +check:output=~Error: Invalid nodes and/or groups in noderange +end + +start:rflash_option_d_without_specify_noderange +description: basic usage check for option d. if without specify noderange for rflash command, should offer usage message +os:Linux +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 +end + +start:rflash_without_option +description: basic usage check, if without option, should throw out a error +os:Linux +hcp:openbmc +cmd:rflash $$CN 1.tar +check:rc != 0 +check:output=~Error: Invalid option specified when a file is provided: +end + +start:rflash_unsupport_multiple_option_a_u +description: basic usage check. If specify multiple options a+u, should throw out error message +os:Linux +hcp:openbmc +cmd:rflash $$CN -a 1.tz -u +check:output=~Error: Multiple options are not supported +check:rc != 0 +end + +start:rflash_unsupport_multiple_option_a_c +description: basic usage check. If specify multiple options a+c, should throw out error message +os:Linux +hcp:openbmc +cmd:rflash $$CN -a 1.tz -c +check:output=~Error: Multiple options are not supported +check:rc != 0 +end + +start:rflash_unsupport_multiple_option_a_l +description: basic usage check. If specify multiple options a+l, should throw out error message +os:Linux +hcp:openbmc +cmd:rflash $$CN -a 1.tz -l +check:output=~Error: Multiple options are not supported +check:rc != 0 +end + +start:rflash_unsupport_multiple_option_a_d +description: basic usage check. If specify multiple options a+d, should throw out error message +os:Linux +hcp:openbmc +cmd:rflash $$CN -a 1.tz -d +check:output=~Error: Multiple options are not supported +check:rc != 0 +end + +start:rflash_unsupport_multiple_option_c_l +description: basic usage check. If specify multiple options c+l, should throw out error message +os:Linux +hcp:openbmc +cmd:rflash $$CN -c 1.tz -l +check:output=~Error: Multiple options are not supported +check:rc != 0 +end + +start:rflash_unsupport_multiple_option_c_u +description: basic usage check. If specify multiple options c+u, should throw out error message +os:Linux +hcp:openbmc +cmd:rflash $$CN -c 1.tz -u +check:output=~Error: Multiple options are not supported +check:rc != 0 +end + +start:rflash_unsupport_multiple_option_c_d +description: basic usage check. If specify multiple options c+d, should throw out error message +os:Linux +hcp:openbmc +cmd:rflash $$CN -c 1.tz -d +check:output=~Error: Multiple options are not supported +check:rc != 0 +end + +start:rflash_unsupport_multiple_option_l_d +description: basic usage check. If specify multiple options l+d, should throw out error message +os:Linux +hcp:openbmc +cmd:rflash $$CN -l -d +check:output=~Error: Multiple options are not supported +check:rc != 0 +end + +start:rflash_unsupport_multiple_option_l_u +description: basic usage check. If specify multiple options l+u, should throw out error message +os:Linux +hcp:openbmc +cmd:rflash $$CN -l -u +check:output=~Error: Multiple options are not supported +check:rc != 0 +end + +start:rflash_unsupport_multiple_option_u_d +description: basic usage check. If specify multiple options u+d, should throw out error message +os:Linux +hcp:openbmc +cmd:rflash $$CN -u -d +check:output=~Error: Multiple options are not supported +check:rc != 0 +end + +start:rflash_option_c_file_not_exist +description: basic usage check for option c. if the file does not exist, should throw out error message +os:Linux +hcp:openbmc +cmd:rflash $$CN -c /tmp/abc123.tz +check:output=~Error: Invalid option +check:rc != 0 +cmd:rflash $$CN -c /tmp/ +check:output=~Error: Invalid option +check:rc != 0 +cmd:rflash $$CN /tmp/abc123.tz -c +check:output=~Error: Invalid option +check:rc != 0 +cmd:rflash $$CN /tmp/ -c +check:output=~Error: Invalid option +check:rc != 0 +cmd:rflash $$CN 1.tar -c +check:output=~Error: Cannot access +check:rc != 0 +cmd:rflash $$CN -c /tmp/1.tar +check:output=~Error: Cannot access +check:rc != 0 +end + +start:rflash_option_c_with_multiple_values +description: basic usage check for option c. if there are multiple value assigned to c option, should throw out error message +os:Linux +hcp:openbmc +cmd:rflash $$CN -c /tmp/abc123.tz /tmp/abc124.tz +check:output=~Invalid option specified when an directory is provided +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:rc != 0 +cmd:rflash $$CN 1.tz 2.tz 3.tz -c +check:output=~Error: More than one firmware specified is not supported +check:rc != 0 +cmd:rflash $$CN 1.tz -c 2.tz +check:output=~Error: More than one firmware specified is not supported +check:rc != 0 +end + +start:rflash_option_c_against_node +description: Make sure the -c option against node works +os:Linux +hcp:openbmc +cmd:rflash $$CN -c |tee /tmp/rflash_option_c.output +check:rc == 0 +cmd:grep -i ibm /tmp/rflash_option_c.output |grep -i 'HOST Firmware Product' | grep -i 'Active)\*' | wc -l +check:rc==0 +check:output=~1 +cmd:grep -i ibm /tmp/rflash_option_c.output |grep -i 'BMC Firmware Product' | grep -i 'Active)\*' | wc -l +check:rc==0 +check:output=~1 +cmd:rm -rf /tmp/rflash_option_c.output +check:rc==0 +end + +start:rflash_option_check_with_V_against_node +description: Make sure the --check option with V works +os:Linux +hcp:openbmc +cmd:rflash $$CN --check -V |tee /tmp/rflash_option_check_with_V.output +check:rc == 0 +cmd:grep -i ibm /tmp/rflash_option_check_with_V.output |grep -i 'HOST Firmware Product' | grep -i 'Active)\*' | wc -l +check:rc==0 +check:output=~1 +cmd:grep -i ibm /tmp/rflash_option_check_with_V.output |grep -i 'BMC Firmware Product' | grep -i 'Active)\*' | wc -l +check:rc==0 +check:output=~1 +cmd:rm -rf /tmp/rflash_option_check_with_V.output +check:rc==0 +end + + +start:rflash_option_l_with_value +description: basic usage check for option l. if there is value for l option, should throw out error message +os:Linux +hcp:openbmc +cmd:rflash $$CN -l /tmp/abc123.tz +check:output=~Error: Invalid option +check:rc != 0 +cmd: rflash $$CN /tmp/abc123.tz -l +check:output=~Error: Invalid option +check:rc != 0 +end + +start:rflash_option_l +description: Make sure the -l option works +os:Linux +hcp:openbmc +cmd:rflash $$CN -l |tee /tmp/rflash_option_l.output +check:rc == 0 +cmd:grep -i ' bmc ' /tmp/rflash_option_l.output | grep -i 'Active(\*)' | wc -l +check:rc==0 +check:output=~1 +cmd:grep -i ' host ' /tmp/rflash_option_l.output | grep -i 'Active(\*)' | wc -l +check:rc==0 +check:output=~1 +cmd:rm -rf /tmp/rflash_option_l.output +check:rc==0 +end + + +start:rflash_option_u_file_not_exist +description: basic usage check for option u. if the file does not exist, should throw out error message +os:Linux +hcp:openbmc +cmd:rflash $$CN -u /tmp/abc123.tz +check:output=~Error: Invalid option +check:rc != 0 +cmd:rflash $$CN -u /tmp/ +check:output=~Error: Invalid option +check:rc != 0 +cmd:rflash $$CN /tmp/abc123.tz -u +check:output=~Error: Invalid option +check:rc != 0 +cmd:rflash $$CN /tmp/ -u +check:output=~Error: Invalid option +check:rc != 0 +cmd:rflash $$CN 1.tar -u +check:output=~Error: Cannot access +check:rc != 0 +cmd:rflash $$CN -u /tmp/1.tar +check:output=~Error: Cannot access +check:rc != 0 +end + +start:rflash_option_u_with_multiple_values +description: basic usage check for option u. if there are multiple value assigned to u option, should throw out error message +os:Linux +hcp:openbmc +cmd:rflash $$CN -u /tmp/abc123.tz /tmp/abc124.tz +check:output=~Error: Invalid option specified when an directory is provided +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:rc != 0 +cmd:rflash $$CN 1.tz 2.tz 3.tz -u +check:output=~Error: More than one firmware specified is not supported +check:rc != 0 +cmd:rflash $$CN 1.tz -u 2.tz +check:output=~Error: More than one firmware specified is not supported +check:rc != 0 +end + +start:rflash_option_a_file_not_exist +description: basic usage check for option a. if the file does not exist, should throw out error message +os:Linux +hcp:openbmc +cmd:rflash $$CN -a /tmp/abc123.tz +check:output=~Error: Invalid option +check:rc != 0 +cmd:rflash $$CN -a /tmp/ +check:output=~Error: Invalid option +check:rc != 0 +cmd:rflash $$CN /tmp/abc123.tz -a +check:output=~Error: Invalid option +check:rc != 0 +cmd:rflash $$CN /tmp/ -a +check:output=~Error: Invalid option +check:rc != 0 +cmd:rflash $$CN 1.tar -a +check:output=~Error: Cannot access +check:rc != 0 +cmd:rflash $$CN -a /tmp/1.tar +check:output=~Error: Cannot access +check:rc != 0 +end + +start:rflash_option_a_with_multiple_values +description: basic usage check for option a. if there are multiple value assigned to a option, should throw out error message +os:Linux +hcp:openbmc +cmd:rflash $$CN -a /tmp/abc123.tz /tmp/abc124.tz +check:output=~Error: Invalid option specified when an directory is provided +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:rc != 0 +cmd:rflash $$CN 1.tz 2.tz 3.tz -a +check:output=~Error: More than one firmware specified is not supported +check:rc != 0 +cmd:rflash $$CN 1.tz -a 2.tz +check:output=~Error: More than one firmware specified is not supported +check:rc != 0 +cmd:rflash $$CN 1234567 -a 2345678 +check:output=~Error: More than one firmware specified is not supported +check:rc != 0 +end + + +start:rflash_option_a_with_non_existent_id +description: basic usage check for option a. if active a non-existent firmware ID, should throw out error message +os:Linux +hcp:openbmc +cmd:rflash $$CN -a 1234567 +check:output=~Error: Invalid ID provided to activate +check:rc != 0 +end + +start:rflash_option_delete_with_multiple_values +description: basic usage check for option delete. if there are multiple value assigned to delete option, should throw out error message +os:Linux +hcp:openbmc +cmd:rflash $$CN --delete 1234567 2345678 +check:output=~Error: More than one firmware specified is not supported +check:rc != 0 +cmd:rflash $$CN 1234567 2345678 --delete +check:output=~Error: More than one firmware specified is not supported +check:rc != 0 +cmd:rflash $$CN 1234567 --delete 2345678 +check:output=~Error: More than one firmware specified is not supported +check:rc != 0 +end + +start:rflash_option_delete_with_non_existent_id +description: basic usage check for option --delete. if delete a non-existent firmware ID, should throw out error message +os:Linux +hcp:openbmc +cmd:rflash $$CN --delete 1234567 +check:output=~Error: Invalid ID provided to delete +check:rc != 0 +end