<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/test/py/tests/fs_helper.py, branch next</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>test: fs_helper: Skip empty srcdir when creating a filesystem</title>
<updated>2026-04-21T21:30:38+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2026-04-04T14:03:06+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4e1793b1fb21e3896cf018fc35fc2c9c3e202138'/>
<id>4e1793b1fb21e3896cf018fc35fc2c9c3e202138</id>
<content type='text'>
FsHelper.mk_fs() always creates a srcdir via setup(), then passes it
to the module-level mk_fs(). This fails for filesystem types like ext2
that do not support the -d flag, raising ValueError even when no files
need to be copied.

Pass None for src_dir when the srcdir is empty, so that creating an
empty filesystem works for all supported types.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
FsHelper.mk_fs() always creates a srcdir via setup(), then passes it
to the module-level mk_fs(). This fails for filesystem types like ext2
that do not support the -d flag, raising ValueError even when no files
need to be copied.

Pass None for src_dir when the srcdir is empty, so that creating an
empty filesystem works for all supported types.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Add a helper class to create disk images</title>
<updated>2026-04-21T21:30:38+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2026-04-04T14:03:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7c69117337412d2477bc3f72e4042bca4a4e66b3'/>
<id>7c69117337412d2477bc3f72e4042bca4a4e66b3</id>
<content type='text'>
Provide a way to create disk images which consist of multiple filesystem
images.

Include a cur_dir option to place the disk image in the current
directory rather than in the persistent-data directory. This matches the
behaviour of setup_image() which places disk images in source_dir where
sandbox expects to find them. This flag is a temporary feature and
should be removed once all tests are migrated to use the persistent-data
directory instead.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Provide a way to create disk images which consist of multiple filesystem
images.

Include a cur_dir option to place the disk image in the current
directory rather than in the persistent-data directory. This matches the
behaviour of setup_image() which places disk images in source_dir where
sandbox expects to find them. This flag is a temporary feature and
should be removed once all tests are migrated to use the persistent-data
directory instead.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Convert fs_helper to use a class</title>
<updated>2026-03-23T15:18:30+00:00</updated>
<author>
<name>Simon Glass</name>
<email>simon.glass@canonical.com</email>
</author>
<published>2026-03-09T15:13:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3691b1e4ce07425dfe3a32c10cfcaf989be57734'/>
<id>3691b1e4ce07425dfe3a32c10cfcaf989be57734</id>
<content type='text'>
Create a class around mk_fs() (and later setup_image()) to handle the
common tasks of image creation. Many callers of fs_helper.mk_fs()
create their own scratch directories while users of
fs_helper.setup_image() rely on one being returned. Unify this by
adding 'srcdir' as a field while converting to a class.

The class delegates to the existing mk_fs() function for the actual
filesystem creation, adding lifecycle management for scratch
directories and the image file.

Signed-off-by: Simon Glass &lt;simon.glass@canonical.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Create a class around mk_fs() (and later setup_image()) to handle the
common tasks of image creation. Many callers of fs_helper.mk_fs()
create their own scratch directories while users of
fs_helper.setup_image() rely on one being returned. Unify this by
adding 'srcdir' as a field while converting to a class.

The class delegates to the existing mk_fs() function for the actual
filesystem creation, adding lifecycle management for scratch
directories and the image file.

Signed-off-by: Simon Glass &lt;simon.glass@canonical.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: fs_helper: Drop the size_gran argument</title>
<updated>2026-03-23T15:18:30+00:00</updated>
<author>
<name>Simon Glass</name>
<email>simon.glass@canonical.com</email>
</author>
<published>2026-03-09T15:13:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d030dc34d67acaa51742d549cb83a81256fefac2'/>
<id>d030dc34d67acaa51742d549cb83a81256fefac2</id>
<content type='text'>
Nothing uses this argument, so make it a constant for now.

Signed-off-by: Simon Glass &lt;simon.glass@canonical.com&gt;
Reviewed-by: Christian Taedcke &lt;christian.taedcke@weidmueller.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Nothing uses this argument, so make it a constant for now.

Signed-off-by: Simon Glass &lt;simon.glass@canonical.com&gt;
Reviewed-by: Christian Taedcke &lt;christian.taedcke@weidmueller.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Update comment for fs_helper.setup_image()</title>
<updated>2026-03-23T15:18:30+00:00</updated>
<author>
<name>Simon Glass</name>
<email>simon.glass@canonical.com</email>
</author>
<published>2026-03-09T15:13:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ffaa324c895fc37d73f7ea070e0a8feda9da4174'/>
<id>ffaa324c895fc37d73f7ea070e0a8feda9da4174</id>
<content type='text'>
This function actually allows creating two partitions now, so update its
comment to match that.

Signed-off-by: Simon Glass &lt;simon.glass@canonical.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This function actually allows creating two partitions now, so update its
comment to match that.

Signed-off-by: Simon Glass &lt;simon.glass@canonical.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: fs_helper: Add a quiet flag to mk_fs()</title>
<updated>2026-03-23T15:18:29+00:00</updated>
<author>
<name>Simon Glass</name>
<email>simon.glass@canonical.com</email>
</author>
<published>2026-03-09T15:13:01+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=23e9906192b86f3a0bddf02ef4ef6bfd2e6fa104'/>
<id>23e9906192b86f3a0bddf02ef4ef6bfd2e6fa104</id>
<content type='text'>
In many cases callers only want to see warnings and errors from the
filesystem-creation tools, not their normal output.

Add a quiet parameter to mk_fs() that suppresses the output of mkfs
and switches mcopy from verbose to quiet mode.

Signed-off-by: Simon Glass &lt;simon.glass@canonical.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In many cases callers only want to see warnings and errors from the
filesystem-creation tools, not their normal output.

Add a quiet parameter to mk_fs() that suppresses the output of mkfs
and switches mcopy from verbose to quiet mode.

Signed-off-by: Simon Glass &lt;simon.glass@canonical.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: fs_helper: Allow passing the image filename</title>
<updated>2026-03-23T15:18:29+00:00</updated>
<author>
<name>Simon Glass</name>
<email>simon.glass@canonical.com</email>
</author>
<published>2026-03-09T15:13:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=fade4112dad0fcb4c4c5610582ef1edec8d70ddc'/>
<id>fade4112dad0fcb4c4c5610582ef1edec8d70ddc</id>
<content type='text'>
The mk_fs() function always generates its own image filename from the
prefix and fs_type. Some callers need to specify a custom leaf name
while still keeping the image under the persistent-data directory.

Add an fs_img parameter that accepts a leaf filename. When provided,
it is joined with persistent_data_dir instead of the default name.

Signed-off-by: Simon Glass &lt;simon.glass@canonical.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The mk_fs() function always generates its own image filename from the
prefix and fs_type. Some callers need to specify a custom leaf name
while still keeping the image under the persistent-data directory.

Add an fs_img parameter that accepts a leaf filename. When provided,
it is joined with persistent_data_dir instead of the default name.

Signed-off-by: Simon Glass &lt;simon.glass@canonical.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge patch series "Improve pytest runtime"</title>
<updated>2025-04-08T19:54:50+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2025-04-08T19:54:50+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a30b54462825843a9dcc46a17df6d57099f7b61a'/>
<id>a30b54462825843a9dcc46a17df6d57099f7b61a</id>
<content type='text'>
Tom Rini &lt;trini@konsulko.com&gt; says:

One thing that Simon Glass has noted is that our pytest run time keeps
getting longer. Looking at:
https://source.denx.de/u-boot/u-boot/-/pipelines/25011/test_report?job_name=sandbox%20test.py%3A%20%5Bfast%20amd64%5D
we can see that some of the longest running tests are a little puzzling.
It turns out that we have two ways of making filesystem images without
requiring root access and one of them is significantly slower than the
other. This series changes us from using virt-make-fs to only using the
mk_fs helper that currently resides in test_ut.py which uses standard
userspace tools. The final result can be seen at:
https://source.denx.de/u-boot/u-boot/-/pipelines/25015/test_report?job_name=sandbox%20test.py%3A%20%5Bfast%20amd64%5D
and the tests changed here now run much quicker.

Link: https://lore.kernel.org/r/20250320140030.2052434-1-trini@konsulko.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Tom Rini &lt;trini@konsulko.com&gt; says:

One thing that Simon Glass has noted is that our pytest run time keeps
getting longer. Looking at:
https://source.denx.de/u-boot/u-boot/-/pipelines/25011/test_report?job_name=sandbox%20test.py%3A%20%5Bfast%20amd64%5D
we can see that some of the longest running tests are a little puzzling.
It turns out that we have two ways of making filesystem images without
requiring root access and one of them is significantly slower than the
other. This series changes us from using virt-make-fs to only using the
mk_fs helper that currently resides in test_ut.py which uses standard
userspace tools. The final result can be seen at:
https://source.denx.de/u-boot/u-boot/-/pipelines/25015/test_report?job_name=sandbox%20test.py%3A%20%5Bfast%20amd64%5D
and the tests changed here now run much quicker.

Link: https://lore.kernel.org/r/20250320140030.2052434-1-trini@konsulko.com
</pre>
</div>
</content>
</entry>
<entry>
<title>test/py: Fix a problem with setup_image</title>
<updated>2025-04-08T19:51:09+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2025-03-20T13:59:25+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2c092875abfd9269a34b3cc03930066fda53a476'/>
<id>2c092875abfd9269a34b3cc03930066fda53a476</id>
<content type='text'>
While we can be passed an image size to use, we always called qemu-img
with 20M as the size. Fix this by using the size parameter.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While we can be passed an image size to use, we always called qemu-img
with 20M as the size. Fix this by using the size parameter.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test/py/tests: Move "setup_image" from test_ut.py to fs_helper.py</title>
<updated>2025-04-08T19:51:09+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2025-03-20T13:59:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=fce92e304fcd8bdba522a43aeef12cc3b0b2df56'/>
<id>fce92e304fcd8bdba522a43aeef12cc3b0b2df56</id>
<content type='text'>
The generic function in test_ut.py to create a disk image with partition
table can be useful outside of test_ut.py so move it to be available
more clearly.

To make this a bit more easily used library function, make use of
check_call directly rather than calling things though u_boot_utils. In
turn, to more easily handle stdin here, use the shell "printf" utility
to pass sfdisk the specification to create as we do not have an actual
file descriptor to use here.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The generic function in test_ut.py to create a disk image with partition
table can be useful outside of test_ut.py so move it to be available
more clearly.

To make this a bit more easily used library function, make use of
check_call directly rather than calling things though u_boot_utils. In
turn, to more easily handle stdin here, use the shell "printf" utility
to pass sfdisk the specification to create as we do not have an actual
file descriptor to use here.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
