"Das U-Boot" Source Tree
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

test/py: tests: gpt: add test_gpt_write_part_type

Add sandbox test on gpt command with partition type for known type.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>

authored by

Patrick Delaunay and committed by
Tom Rini
7a598e63 a3a5179b

+27
+27
test/py/tests/test_gpt.py
··· 330 330 output = ubman.run_command('gpt guid host 0') 331 331 assert '375a56f7-d6c9-4e81-b5f0-09d41ca89efe' in output 332 332 333 + @pytest.mark.boardspec('sandbox') 334 + @pytest.mark.buildconfigspec('cmd_gpt') 335 + @pytest.mark.buildconfigspec('cmd_part') 336 + @pytest.mark.buildconfigspec('partition_type_guid') 337 + @pytest.mark.requiredtool('sgdisk') 338 + def test_gpt_write_part_type(state_disk_image, ubman): 339 + """Test the gpt command with part type uuid.""" 340 + 341 + output = ubman.run_command('gpt write host 0 "name=part1,type=data,size=1M;name=part2,size=512K,type=system;name=part3,size=65536,type=u-boot-env;name=part4,size=65536,type=375a56f7-d6c9-4e81-b5f0-09d41ca89efe;name=part5,size=-,type=linux"') 342 + assert 'Writing GPT: success!' in output 343 + output = ubman.run_command('part list host 0') 344 + assert '1\t0x00000022\t0x00000821\t"part1"' in output 345 + assert 'ebd0a0a2-b9e5-4433-87c0-68b6b72699c7' in output 346 + assert '(data)' in output 347 + assert '2\t0x00000822\t0x00000c21\t"part2"' in output 348 + assert 'c12a7328-f81f-11d2-ba4b-00a0c93ec93b' in output 349 + assert '(EFI System Partition)' in output 350 + assert '3\t0x00000c22\t0x00000ca1\t"part3"' in output 351 + assert '3de21764-95bd-54bd-a5c3-4abe786f38a8' in output 352 + assert '(u-boot-env)' in output 353 + assert '4\t0x00000ca2\t0x00000d21\t"part4"' in output 354 + assert 'ebd0a0a2-b9e5-4433-87c0-68b6b72699c7' in output 355 + assert '(375a56f7-d6c9-4e81-b5f0-09d41ca89efe)' in output 356 + assert '5\t0x00000d22\t0x00001fde\t"part5"' in output 357 + assert '0fc63daf-8483-4772-8e79-3d69d8477de4' in output 358 + assert '(linux)' in output 359 + 333 360 @pytest.mark.buildconfigspec('cmd_gpt') 334 361 @pytest.mark.buildconfigspec('cmd_gpt_rename') 335 362 @pytest.mark.buildconfigspec('cmd_part')