mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 11:22:27 +00:00 
			
		
		
		
	Merge pull request #4272 from whowutwut/openbmc_UT_rflash
Add some UT cases for rflash and rinv
This commit is contained in:
		
							
								
								
									
										72
									
								
								xCAT-test/autotest/testcase/UT_openbmc/rflash_cases0
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										72
									
								
								xCAT-test/autotest/testcase/UT_openbmc/rflash_cases0
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,72 @@ | ||||
| start:rflash_check | ||||
| description: Make sure the --check option works | ||||
| os:Linux | ||||
| hcp:openbmc | ||||
| cmd:rflash $$CN --check | ||||
| check:rc==0 | ||||
| check:output=~$$CN: BMC Firmware Product | ||||
| check:output=~$$CN: HOST Firmware Product | ||||
| end | ||||
|  | ||||
| start:rflash_invalid_activate | ||||
| description: Provide an invalid option for activte, file does not end in .tar | ||||
| os:Linux | ||||
| hcp:openbmc | ||||
| cmd: rflash $$CN -a /tmp/abc123.tz | ||||
| check:rc==1 | ||||
| check:output=~Error: Invalid option | ||||
| end  | ||||
|  | ||||
| start:rflash_invalid_activate_and_delete | ||||
| description: Cannot specify -a and -d at the same time | ||||
| os:Linux | ||||
| hcp:openbmc | ||||
| cmd: rflash $$CN -a 123 -d 123 | ||||
| check:rc==1 | ||||
| check:output=~Error: Multiple options specified is not supported | ||||
| end  | ||||
|  | ||||
| start:rflash_invalid_id  | ||||
| description: Passing an invalid ID to activate | ||||
| os:Linux | ||||
| hcp:openbmc | ||||
| cmd: rflash $$CN -a 123 | ||||
| check:rc==1 | ||||
| check:output=~Error: Invalid ID provided to activate | ||||
| end  | ||||
|  | ||||
| start:rflash_invalid_multiple_id_3 | ||||
| description: Code does not currently support multiple IDs to activate | ||||
| os:Linux | ||||
| hcp:openbmc | ||||
| cmd: rflash $$CN -a 123 abc asdbas  | ||||
| check:rc==1 | ||||
| check:output=~Error: More than one firmware specified is not supported | ||||
| end  | ||||
|  | ||||
| start:rflash_invalid_multiple_id_2 | ||||
| description: Code does not currently support multiple IDs to activate | ||||
| os:Linux | ||||
| hcp:openbmc | ||||
| cmd: rflash $$CN -a asdbas 123 | ||||
| check:rc==1 | ||||
| check:output=~Error: More than one firmware specified is not supported | ||||
| end  | ||||
|  | ||||
| start:rflash_invalid_node | ||||
| description: Activate a valid ID hash but forget to put in a node range  | ||||
| os:Linux | ||||
| hcp:openbmc | ||||
| cmd: rflash -a 221d9020 | ||||
| check:rc==1  | ||||
| check:output=~Error: Invalid nodes and/or groups in noderange: 221d9020 | ||||
| end | ||||
|  | ||||
| start:rflash_invalid_delete_2 | ||||
| description: Attempt to delete more than 1 ID from the FW | ||||
| os:Linux | ||||
| hcp:openbmc | ||||
| cmd: rflash $$CN -d 221d9020 221d9020 | ||||
| check:rc==1  | ||||
| check:output=~Error: More than one firmware specified is not supported | ||||
| end | ||||
							
								
								
									
										29
									
								
								xCAT-test/autotest/testcase/UT_openbmc/rinv_cases0
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								xCAT-test/autotest/testcase/UT_openbmc/rinv_cases0
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,29 @@ | ||||
| start:rinv_check_active_fw_count | ||||
| description: Ensure that there is only 2 active firmware, one for bmc and one for pnor | ||||
| hcp:openbmc | ||||
| cmd: rinv $$CN firm | tee /tmp/xcattest.rinv_check_active_fw_count.output | ||||
| check:rc==0 | ||||
| cmd: grep -i ibm /tmp/xcattest.rinv_check_active_fw_count.output | grep -i 'HOST Firmware Product' | grep -i 'Active)\*' | wc -l | ||||
| check:rc==0 | ||||
| check:output=~1 | ||||
| cmd: grep -i ibm /tmp/xcattest.rinv_check_active_fw_count.output | grep -i 'BMC Firmware Product'|grep -i 'Active)\*' | wc -l | ||||
| check:rc==0 | ||||
| check:output=~1 | ||||
| cmd : rm -rf /tmp/xcattest.rinv_check_active_fw_count.output | ||||
| check:rc==0 | ||||
| end | ||||
|  | ||||
| start:rinv_check_active_fw_count_verbose | ||||
| description: Ensure that there is only 2 active firmware, one for bmc and one for pnor (in verbose mode) (Issue #4236) | ||||
| hcp:openbmc | ||||
| cmd: rinv $$CN firm -V | tee /tmp/xcattest.rinv_check_active_fw_count_verbose.output | ||||
| check:rc==0 | ||||
| cmd: grep -i ibm /tmp/xcattest.rinv_check_active_fw_count_verbose.output| grep -i 'HOST Firmware Product' | grep -i 'Active)\*' | wc -l | ||||
| check:rc==0 | ||||
| check:output=~1 | ||||
| cmd: grep -i ibm /tmp/xcattest.rinv_check_active_fw_count_verbose.output | grep -i 'BMC Firmware Product'|grep -i 'Active)\*' | wc -l | ||||
| check:rc==0 | ||||
| check:output=~1 | ||||
| cmd : rm -rf /tmp/xcattest.rinv_check_active_fw_count_verbose.output | ||||
| check:rc==0 | ||||
| end | ||||
		Reference in New Issue
	
	Block a user