Re: [PATCH 5/6] test: py: gpt: Bind the disk image in test_gpt_write_part_type()

Ilias Apalodimas <[email protected]>
Newsgroups org.u-boot-project.lists.u-boot
Message-ID <CAC_iWjKDyyKBGgfXWyaBB5Qz_bHCncTOzKsgP3_GfU8ffBnvKw@mail.gmail.com>
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
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.