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

Simon Glass sjg at chromium.org
Tue May 19 22:00:41 CEST 2026


Hi Heinrich,

On 2026-05-18T05:57:19, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> 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 <heinrich.schuchardt at canonical.com>
>
> 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


More information about the U-Boot mailing list