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>
Tue, 26 Nov 2024 17:13:39 +0000 (11:13 -0600)
commit5b2ea71eaf13694b77545c5df9ec80d25d0e2f14
tree6c8839127740ce75f6ffb229d59e71ef7fb5c8f8
parent62224280d9e89648ae90346c0aede76f9b7e7610
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