Re: [PATCH 8/9] test: env: allow optional date field in ls output assertion

2026-05-19 Thread Simon Glass
Hi Heinrich,

On 2026-05-18T05:57:19, Heinrich Schuchardt
 wrote:
> test: env: allow optional date field in ls output assertion
>
> fs_ls_generic() now prints a date between the file size and filename
> when the filesystem sets FS_CAP_DATE (currently FAT and ext4).
>
> Adjust the assert in test_env.py().
>
> Signed-off-by: Heinrich Schuchardt 
>
> test/py/tests/test_env.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

> diff --git a/test/py/tests/test_env.py b/test/py/tests/test_env.py
> @@ -523,7 +523,7 @@ def test_env_ext4(state_test_env):
>  assert 'Loading Environment from EXT4... OK' in response
>
>  response = c.run_command('ext4ls host 0:0')
> -assert '8192   uboot.env' in response
> +assert(re.search('8192 .*uboot.env', ''.join(response)))

run_command() returns a string, not a list. So ''.join(response)
iterates the characters and rebuilds the string; it is a no-op. Please
drop the join() and pass response directly. Also, the trailing '.' in
uboot.env is a regex metacharacter - escape it as uboot\\.env.

Regards,
Simon


[PATCH 8/9] test: env: allow optional date field in ls output assertion

2026-05-17 Thread Heinrich Schuchardt
fs_ls_generic() now prints a date between the file size and filename
when the filesystem sets FS_CAP_DATE (currently FAT and ext4).

Adjust the assert in test_env.py().

Signed-off-by: Heinrich Schuchardt 
---
 test/py/tests/test_env.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/py/tests/test_env.py b/test/py/tests/test_env.py
index f8713a59ba9..e9d502148bc 100644
--- a/test/py/tests/test_env.py
+++ b/test/py/tests/test_env.py
@@ -523,7 +523,7 @@ def test_env_ext4(state_test_env):
 assert 'Loading Environment from EXT4... OK' in response
 
 response = c.run_command('ext4ls host 0:0')
-assert '8192   uboot.env' in response
+assert(re.search('8192 .*uboot.env', ''.join(response)))
 
 response = c.run_command('env info')
 assert 'env_valid = valid' in response
-- 
2.53.0