diff mbox series

usb: Fix test dependency on ext4write command

Message ID 20241015141737.1170669-1-andrew.goodbody@linaro.org
State New
Headers show
Series usb: Fix test dependency on ext4write command | expand

Commit Message

Andrew Goodbody Oct. 15, 2024, 2:17 p.m. UTC
The tests test_usb_ext4load_ext4write, test_usb_ext2load and
test_usb_load depend on the command ext4write being present not just
the feature of being able to write to an ext4 file system. So update
their dependencies to include the ext4write command itself. This will
prevent spurious test failures when running the USB tests against USB
storage with an ext2/ext4 partition but no ext4write command available.

Fixes: 1c5b6edad381 ("test/py: usb: Add tests for USB device")
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
---

 test/py/tests/test_usb.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Marek Vasut Oct. 15, 2024, 3:41 p.m. UTC | #1
On 10/15/24 4:17 PM, Andrew Goodbody wrote:
> The tests test_usb_ext4load_ext4write, test_usb_ext2load and
> test_usb_load depend on the command ext4write being present not just
> the feature of being able to write to an ext4 file system. So update
> their dependencies to include the ext4write command itself. This will
> prevent spurious test failures when running the USB tests against USB
> storage with an ext2/ext4 partition but no ext4write command available.
> 
> Fixes: 1c5b6edad381 ("test/py: usb: Add tests for USB device")
> Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
> ---
> 
>   test/py/tests/test_usb.py | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/test/py/tests/test_usb.py b/test/py/tests/test_usb.py
> index fb3d20f082..b86fc290c7 100644
> --- a/test/py/tests/test_usb.py
> +++ b/test/py/tests/test_usb.py
> @@ -382,7 +382,7 @@ def test_usb_ext4ls(u_boot_console):
>   
>   @pytest.mark.buildconfigspec('cmd_usb')
>   @pytest.mark.buildconfigspec('cmd_ext4')
> -@pytest.mark.buildconfigspec('ext4_write')
> +@pytest.mark.buildconfigspec('cmd_ext4_write')
>   @pytest.mark.buildconfigspec('cmd_memory')
>   def test_usb_ext4load_ext4write(u_boot_console):
>       devices, controllers, storage_device = test_usb_part(u_boot_console)
> @@ -469,7 +469,7 @@ def test_usb_ext2ls(u_boot_console):
>   @pytest.mark.buildconfigspec('cmd_usb')
>   @pytest.mark.buildconfigspec('cmd_ext2')
>   @pytest.mark.buildconfigspec('cmd_ext4')
> -@pytest.mark.buildconfigspec('ext4_write')
> +@pytest.mark.buildconfigspec('cmd_ext4_write')
>   @pytest.mark.buildconfigspec('cmd_memory')
>   def test_usb_ext2load(u_boot_console):
>       devices, controllers, storage_device = test_usb_part(u_boot_console)
> @@ -543,6 +543,7 @@ def test_usb_ls(u_boot_console):
>           pytest.skip('No partition detected')
>   
>   @pytest.mark.buildconfigspec('cmd_usb')
> +@pytest.mark.buildconfigspec('cmd_ext4_write')
>   @pytest.mark.buildconfigspec('cmd_fs_generic')
>   def test_usb_load(u_boot_console):
>       devices, controllers, storage_device = test_usb_part(u_boot_console)

+CC test expert Simon
Kumar, Love Oct. 16, 2024, 6:33 a.m. UTC | #2
Reviewed-by: Love Kumar <love.kumar@amd.com>

On 15/10/24, 10:25 PM, Marek Vasut <marex@denx.de> wrote:

On 10/15/24 4:17 PM, Andrew Goodbody wrote:
> The tests test_usb_ext4load_ext4write, test_usb_ext2load and
> test_usb_load depend on the command ext4write being present not just
> the feature of being able to write to an ext4 file system. So update
> their dependencies to include the ext4write command itself. This will
> prevent spurious test failures when running the USB tests against USB
> storage with an ext2/ext4 partition but no ext4write command available.
>
> Fixes: 1c5b6edad381 ("test/py: usb: Add tests for USB device")
> Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
> ---
>
>   test/py/tests/test_usb.py | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/test/py/tests/test_usb.py b/test/py/tests/test_usb.py
> index fb3d20f082..b86fc290c7 100644
> --- a/test/py/tests/test_usb.py
> +++ b/test/py/tests/test_usb.py
> @@ -382,7 +382,7 @@ def test_usb_ext4ls(u_boot_console):
>
>   @pytest.mark.buildconfigspec('cmd_usb')
>   @pytest.mark.buildconfigspec('cmd_ext4')
> -@pytest.mark.buildconfigspec('ext4_write')
> +@pytest.mark.buildconfigspec('cmd_ext4_write')
>   @pytest.mark.buildconfigspec('cmd_memory')
>   def test_usb_ext4load_ext4write(u_boot_console):
>       devices, controllers, storage_device = test_usb_part(u_boot_console)
> @@ -469,7 +469,7 @@ def test_usb_ext2ls(u_boot_console):
>   @pytest.mark.buildconfigspec('cmd_usb')
>   @pytest.mark.buildconfigspec('cmd_ext2')
>   @pytest.mark.buildconfigspec('cmd_ext4')
> -@pytest.mark.buildconfigspec('ext4_write')
> +@pytest.mark.buildconfigspec('cmd_ext4_write')
>   @pytest.mark.buildconfigspec('cmd_memory')
>   def test_usb_ext2load(u_boot_console):
>       devices, controllers, storage_device = test_usb_part(u_boot_console)
> @@ -543,6 +543,7 @@ def test_usb_ls(u_boot_console):
>           pytest.skip('No partition detected')
>
>   @pytest.mark.buildconfigspec('cmd_usb')
> +@pytest.mark.buildconfigspec('cmd_ext4_write')
>   @pytest.mark.buildconfigspec('cmd_fs_generic')
>   def test_usb_load(u_boot_console):
>       devices, controllers, storage_device = test_usb_part(u_boot_console)

+CC test expert Simon
Andrew Goodbody Oct. 31, 2024, 11:20 a.m. UTC | #3
On 16/10/2024 07:33, Kumar, Love wrote:
> Reviewed-by: Love Kumar <love.kumar@amd.com>
> 
> On 15/10/24, 10:25 PM, Marek Vasut <marex@denx.de> wrote:
> 
> On 10/15/24 4:17 PM, Andrew Goodbody wrote:
>> The tests test_usb_ext4load_ext4write, test_usb_ext2load and
>> test_usb_load depend on the command ext4write being present not just
>> the feature of being able to write to an ext4 file system. So update
>> their dependencies to include the ext4write command itself. This will
>> prevent spurious test failures when running the USB tests against USB
>> storage with an ext2/ext4 partition but no ext4write command available.
>> 
>> Fixes: 1c5b6edad381 ("test/py: usb: Add tests for USB device")
>> Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
>> ---
>> 
>>   test/py/tests/test_usb.py | 5 +++--
>>   1 file changed, 3 insertions(+), 2 deletions(-)
>> 
>> diff --git a/test/py/tests/test_usb.py b/test/py/tests/test_usb.py
>> index fb3d20f082..b86fc290c7 100644
>> --- a/test/py/tests/test_usb.py
>> +++ b/test/py/tests/test_usb.py
>> @@ -382,7 +382,7 @@ def test_usb_ext4ls(u_boot_console):
>>   
>>   @pytest.mark.buildconfigspec('cmd_usb')
>>   @pytest.mark.buildconfigspec('cmd_ext4')
>> -@pytest.mark.buildconfigspec('ext4_write')
>> +@pytest.mark.buildconfigspec('cmd_ext4_write')
>>   @pytest.mark.buildconfigspec('cmd_memory')
>>   def test_usb_ext4load_ext4write(u_boot_console):
>>       devices, controllers, storage_device = test_usb_part(u_boot_console)
>> @@ -469,7 +469,7 @@ def test_usb_ext2ls(u_boot_console):
>>   @pytest.mark.buildconfigspec('cmd_usb')
>>   @pytest.mark.buildconfigspec('cmd_ext2')
>>   @pytest.mark.buildconfigspec('cmd_ext4')
>> -@pytest.mark.buildconfigspec('ext4_write')
>> +@pytest.mark.buildconfigspec('cmd_ext4_write')
>>   @pytest.mark.buildconfigspec('cmd_memory')
>>   def test_usb_ext2load(u_boot_console):
>>       devices, controllers, storage_device = test_usb_part(u_boot_console)
>> @@ -543,6 +543,7 @@ def test_usb_ls(u_boot_console):
>>           pytest.skip('No partition detected')
>>   
>>   @pytest.mark.buildconfigspec('cmd_usb')
>> +@pytest.mark.buildconfigspec('cmd_ext4_write')
>>   @pytest.mark.buildconfigspec('cmd_fs_generic')
>>   def test_usb_load(u_boot_console):
>>       devices, controllers, storage_device = test_usb_part(u_boot_console)
> 
> +CC test expert Simon
> 

Ping
Marek Vasut Oct. 31, 2024, 1:26 p.m. UTC | #4
On 10/31/24 12:20 PM, Andrew Goodbody wrote:
> On 16/10/2024 07:33, Kumar, Love wrote:
>> Reviewed-by: Love Kumar <love.kumar@amd.com>
>>
>> On 15/10/24, 10:25 PM, Marek Vasut <marex@denx.de> wrote:
>>
>> On 10/15/24 4:17 PM, Andrew Goodbody wrote:
>>> The tests test_usb_ext4load_ext4write, test_usb_ext2load and
>>> test_usb_load depend on the command ext4write being present not just
>>> the feature of being able to write to an ext4 file system. So update
>>> their dependencies to include the ext4write command itself. This will
>>> prevent spurious test failures when running the USB tests against USB
>>> storage with an ext2/ext4 partition but no ext4write command available.
>>>
>>> Fixes: 1c5b6edad381 ("test/py: usb: Add tests for USB device")
>>> Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
>>> ---
>>>
>>>    test/py/tests/test_usb.py | 5 +++--
>>>    1 file changed, 3 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/test/py/tests/test_usb.py b/test/py/tests/test_usb.py
>>> index fb3d20f082..b86fc290c7 100644
>>> --- a/test/py/tests/test_usb.py
>>> +++ b/test/py/tests/test_usb.py
>>> @@ -382,7 +382,7 @@ def test_usb_ext4ls(u_boot_console):
>>>    @pytest.mark.buildconfigspec('cmd_usb')
>>>    @pytest.mark.buildconfigspec('cmd_ext4')
>>> -@pytest.mark.buildconfigspec('ext4_write')
>>> +@pytest.mark.buildconfigspec('cmd_ext4_write')
>>>    @pytest.mark.buildconfigspec('cmd_memory')
>>>    def test_usb_ext4load_ext4write(u_boot_console):
>>>        devices, controllers, storage_device = 
>>> test_usb_part(u_boot_console)
>>> @@ -469,7 +469,7 @@ def test_usb_ext2ls(u_boot_console):
>>>    @pytest.mark.buildconfigspec('cmd_usb')
>>>    @pytest.mark.buildconfigspec('cmd_ext2')
>>>    @pytest.mark.buildconfigspec('cmd_ext4')
>>> -@pytest.mark.buildconfigspec('ext4_write')
>>> +@pytest.mark.buildconfigspec('cmd_ext4_write')
>>>    @pytest.mark.buildconfigspec('cmd_memory')
>>>    def test_usb_ext2load(u_boot_console):
>>>        devices, controllers, storage_device = 
>>> test_usb_part(u_boot_console)
>>> @@ -543,6 +543,7 @@ def test_usb_ls(u_boot_console):
>>>            pytest.skip('No partition detected')
>>>    @pytest.mark.buildconfigspec('cmd_usb')
>>> +@pytest.mark.buildconfigspec('cmd_ext4_write')
>>>    @pytest.mark.buildconfigspec('cmd_fs_generic')
>>>    def test_usb_load(u_boot_console):
>>>        devices, controllers, storage_device = 
>>> test_usb_part(u_boot_console)
>>
>> +CC test expert Simon
>>
> 
> Ping

Simon ?
Tom Rini Nov. 5, 2024, 1:07 a.m. UTC | #5
On Tue, 15 Oct 2024 15:17:37 +0100, Andrew Goodbody wrote:

> The tests test_usb_ext4load_ext4write, test_usb_ext2load and
> test_usb_load depend on the command ext4write being present not just
> the feature of being able to write to an ext4 file system. So update
> their dependencies to include the ext4write command itself. This will
> prevent spurious test failures when running the USB tests against USB
> storage with an ext2/ext4 partition but no ext4write command available.
> 
> [...]

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/test/py/tests/test_usb.py b/test/py/tests/test_usb.py
index fb3d20f082..b86fc290c7 100644
--- a/test/py/tests/test_usb.py
+++ b/test/py/tests/test_usb.py
@@ -382,7 +382,7 @@  def test_usb_ext4ls(u_boot_console):
 
 @pytest.mark.buildconfigspec('cmd_usb')
 @pytest.mark.buildconfigspec('cmd_ext4')
-@pytest.mark.buildconfigspec('ext4_write')
+@pytest.mark.buildconfigspec('cmd_ext4_write')
 @pytest.mark.buildconfigspec('cmd_memory')
 def test_usb_ext4load_ext4write(u_boot_console):
     devices, controllers, storage_device = test_usb_part(u_boot_console)
@@ -469,7 +469,7 @@  def test_usb_ext2ls(u_boot_console):
 @pytest.mark.buildconfigspec('cmd_usb')
 @pytest.mark.buildconfigspec('cmd_ext2')
 @pytest.mark.buildconfigspec('cmd_ext4')
-@pytest.mark.buildconfigspec('ext4_write')
+@pytest.mark.buildconfigspec('cmd_ext4_write')
 @pytest.mark.buildconfigspec('cmd_memory')
 def test_usb_ext2load(u_boot_console):
     devices, controllers, storage_device = test_usb_part(u_boot_console)
@@ -543,6 +543,7 @@  def test_usb_ls(u_boot_console):
         pytest.skip('No partition detected')
 
 @pytest.mark.buildconfigspec('cmd_usb')
+@pytest.mark.buildconfigspec('cmd_ext4_write')
 @pytest.mark.buildconfigspec('cmd_fs_generic')
 def test_usb_load(u_boot_console):
     devices, controllers, storage_device = test_usb_part(u_boot_console)