test_fs: Allow running unprivileged
authorRichard Weinberger <richard@nod.at>
Thu, 21 Nov 2024 22:32:07 +0000 (15:32 -0700)
committerTom Rini <trini@konsulko.com>
Fri, 29 Nov 2024 20:41:46 +0000 (14:41 -0600)
commit463bc7b82e7b3e8298d9cb81b5d03af8b48b2148
tree7eccd94978c7508a5c0e767d69325b449c9ea943
parentdc1859f8d2ac3faaa5e2e1d465ec4bd8980520a5
test_fs: Allow running unprivileged

There is no need to mount the filesystem on the host side.
All filesystem tools offer some way to fill the fs without mounting.

So, create the content on the host side, create and fill the fs
without mounting.
No more sudo or guestmount needed.

This new approach works because the tests don't care about user IDs
and no device files are needed.
If user IDs start to matter it's still possible to use wrapper
tools like fakeroot in future while filling the fs.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
test/py/tests/fs_helper.py
test/py/tests/test_fs/conftest.py
test/py/tests/test_ut.py