On Fri, 31 Jul 2026 at 15:40, Alexey Charkov <[email protected]> wrote:
>
> Unlike every other test in this file, test_gpt_write_part_type() never
> binds the disk image it operates on. It has worked since it was added
> only because some test that ran before it left host 0 bound to the
> image this fixture provides.
>
> That breaks as soon as a test which binds something else is added
> above it, and it means the test silently depends on collection order
> rather than on its own fixture. Bind the image like the other tests do.
>
> Fixes: 7a598e633a53 ("test/py: tests: gpt: add test_gpt_write_part_type")
> Signed-off-by: Alexey Charkov <[email protected]>
> ---

Reviewed-by: Ilias Apalodimas <[email protected]>

>  test/py/tests/test_gpt.py | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/test/py/tests/test_gpt.py b/test/py/tests/test_gpt.py
> index e6d8792ac1fc..fb4c8ba67d48 100644
> --- a/test/py/tests/test_gpt.py
> +++ b/test/py/tests/test_gpt.py
> @@ -338,6 +338,7 @@ def test_gpt_write(state_disk_image, ubman):
>  def test_gpt_write_part_type(state_disk_image, ubman):
>      """Test the gpt command with part type uuid."""
>
> +    ubman.run_command('host bind 0 ' + state_disk_image.path)
>      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"')
>      assert 'Writing GPT: success!' in output
>      output = ubman.run_command('part list host 0')
>
> --
> 2.54.0
>

Reply via email to