Re: [PATCH 8/9] test: env: allow optional date field in ls output assertion
Simon Glass <[email protected]>
| Newsgroups | org.ozlabs.lists.linux-erofs,org.u-boot-project.lists.u-boot |
|---|---|
| Message-ID | <CAFLszThSuXELXXsdkz09FOtmL+XwE0gz-J8qeWR-MyAranzMxA@mail.gmail.com> |
Hi Heinrich, On 2026-05-18T05:57:19, Heinrich Schuchardt <[email protected]> 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 <[email protected]> > > 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