<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/test/py/tests/test_fs/conftest.py, branch v2025.04</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/test/py/tests/test_fs/conftest.py?h=v2025.04</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/test/py/tests/test_fs/conftest.py?h=v2025.04'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2024-11-29T20:41:46Z</updated>
<entry>
<title>test_fs: Rename mount dir to scratch</title>
<updated>2024-11-29T20:41:46Z</updated>
<author>
<name>Richard Weinberger</name>
<email>richard@nod.at</email>
</author>
<published>2024-11-21T22:32:08Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c6504372c6d93228227ee75b1a869551934b3897'/>
<id>urn:sha1:c6504372c6d93228227ee75b1a869551934b3897</id>
<content type='text'>
Since no mounting happens anymore, rename the "mnt"
directory to "scratch" and the related variables.

Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
Reviewed-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>test_fs: Allow running unprivileged</title>
<updated>2024-11-29T20:41:46Z</updated>
<author>
<name>Richard Weinberger</name>
<email>richard@nod.at</email>
</author>
<published>2024-11-21T22:32:07Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=463bc7b82e7b3e8298d9cb81b5d03af8b48b2148'/>
<id>urn:sha1:463bc7b82e7b3e8298d9cb81b5d03af8b48b2148</id>
<content type='text'>
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 &lt;richard@nod.at&gt;
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
</content>
</entry>
<entry>
<title>test/py: Disable error E0611 in two cases for pylint</title>
<updated>2023-12-09T20:59:13Z</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2023-12-09T19:52:46Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3a2b6ba5cf1ad46e3684ee0c4175b3ea8d7c1280'/>
<id>urn:sha1:3a2b6ba5cf1ad46e3684ee0c4175b3ea8d7c1280</id>
<content type='text'>
Recently pylint has started to complain about:
No name 'fs_helper' in module 'tests' (no-name-in-module)

Due to:
from tests import fs_helper

However, we have:
test/py/tests/fs_helper.py

And since we do not want to add a dummy test/py/tests/__init__.py to
silence this warning we instead just disable it as needed.

Cc: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>test: fs: Add test to detect fat type</title>
<updated>2023-11-29T01:10:25Z</updated>
<author>
<name>Christian Taedcke</name>
<email>christian.taedcke@weidmueller.com</email>
</author>
<published>2023-11-15T12:44:24Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8154ac16136489b19e1f1ec717611232cba249db'/>
<id>urn:sha1:8154ac16136489b19e1f1ec717611232cba249db</id>
<content type='text'>
Ensure that a large FAT12 filesystem and a small FAT16 filesystem are
detected correctly.

Signed-off-by: Christian Taedcke &lt;christian.taedcke@weidmueller.com&gt;
</content>
</entry>
<entry>
<title>test: fs: Add fat12 to supported fs of some tests</title>
<updated>2023-11-29T01:10:25Z</updated>
<author>
<name>Christian Taedcke</name>
<email>christian.taedcke@weidmueller.com</email>
</author>
<published>2023-11-15T12:44:22Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1e85b66212036ee3d34fae6e4adb45572fc57c12'/>
<id>urn:sha1:1e85b66212036ee3d34fae6e4adb45572fc57c12</id>
<content type='text'>
The tests fs_ext, fs_mkdir and fs_unlink support fat12 without
modifications.
The fs_basic test uses a partition that is too large for fat12, so it
is omitted here.

Signed-off-by: Christian Taedcke &lt;christian.taedcke@weidmueller.com&gt;
</content>
</entry>
<entry>
<title>global: Use proper project name U-Boot</title>
<updated>2023-06-12T11:24:31Z</updated>
<author>
<name>Michal Simek</name>
<email>michal.simek@amd.com</email>
</author>
<published>2023-05-17T07:17:16Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1be82afa807cc3cfacab29e3de0975d2cd99fa5d'/>
<id>urn:sha1:1be82afa807cc3cfacab29e3de0975d2cd99fa5d</id>
<content type='text'>
Use proper project name in comments, Kconfig, readmes.

Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Acked-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
Reviewed-by: Qu Wenruo &lt;wqu@suse.com&gt;
Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
Link: https://lore.kernel.org/r/0dbdf0432405c1c38ffca55703b6737a48219e79.1684307818.git.michal.simek@amd.com
</content>
</entry>
<entry>
<title>test: Split out mk_fs function into a helper</title>
<updated>2022-11-07T23:24:30Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2022-10-30T01:47:05Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4349ba5977cdc00ff0398353c33ba04fcd9dd762'/>
<id>urn:sha1:4349ba5977cdc00ff0398353c33ba04fcd9dd762</id>
<content type='text'>
This function is useful for other tests. Move it into common code.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>test/py: Wait for guestmount worker to exit after running guestunmount</title>
<updated>2021-07-05T19:28:32Z</updated>
<author>
<name>Alper Nebi Yasak</name>
<email>alpernebiyasak@gmail.com</email>
</author>
<published>2021-06-04T19:04:46Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=99f5303c8b857320b00a63dca81d1f6f7c75c636'/>
<id>urn:sha1:99f5303c8b857320b00a63dca81d1f6f7c75c636</id>
<content type='text'>
Some filesystem tests are failing when their image is prepared with
guestmount, but succeeding if loop mounts are used instead. The reason
seems to be a race condition the guestmount(1) manual page explains:

    When guestunmount(1)/fusermount(1) exits, guestmount may still be
    running and cleaning up the mountpoint.  The disk image will not be
    fully finalized.

    This means that scripts like the following have a nasty race condition:

     guestmount -a disk.img -i /mnt
     # copy things into /mnt
     guestunmount /mnt
     # immediately try to use 'disk.img' ** UNSAFE **

    The solution is to use the --pid-file option to write the guestmount
    PID to a file, then after guestunmount spin waiting for this PID to
    exit.

The Python standard library has an os.waitpid() function for waiting a
child to terminate, but it cannot wait on non-child processes. Implement
a utility function that can do this by polling the process repeatedly
for a given duration, optionally killing the process if it won't
terminate on its own. Apply the suggested solution with this utility
function, which makes the failing tests succeed again.

Signed-off-by: Alper Nebi Yasak &lt;alpernebiyasak@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>test/py: Use loop mounts if guestmount fails in filesystem tests</title>
<updated>2021-07-05T19:28:32Z</updated>
<author>
<name>Alper Nebi Yasak</name>
<email>alpernebiyasak@gmail.com</email>
</author>
<published>2021-06-04T19:04:45Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8f5f5d3a4593f26f0a755f5ecfaa7299e42edeeb'/>
<id>urn:sha1:8f5f5d3a4593f26f0a755f5ecfaa7299e42edeeb</id>
<content type='text'>
If guestmount isn't available on the system, filesystem test setup falls
back to using loop mounts to prepare its disk images. If guestmount is
available but fails to work, the tests are immediately skipped. Instead
of giving up on a guestmount failure, try using loop mounts as an
attempt to keep tests running.

Also stop checking if guestmount is in PATH, as trying to run a missing
guestmount can now follow the same failure codepath and fall back to
loop mounts anyway.

Signed-off-by: Alper Nebi Yasak &lt;alpernebiyasak@gmail.com&gt;
</content>
</entry>
<entry>
<title>test: Include /sbin to the PATH when creating file system</title>
<updated>2021-06-23T12:45:03Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2021-06-10T15:08:42Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b2710faf82998d7be9e4eef554063a5e27e88ec9'/>
<id>urn:sha1:b2710faf82998d7be9e4eef554063a5e27e88ec9</id>
<content type='text'>
On some distributions the mkfs is under /sbin and /sbin is not set
for mere users. Include /sbin to the PATH when creating file system,
so that users won't get a scary traceback from Python.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
</content>
</entry>
</feed>
