<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/testing/selftests/nolibc, branch linux-7.0.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.0.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.0.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-05-23T11:08:32+00:00</updated>
<entry>
<title>selftests/nolibc: Fix build with host headers and libc</title>
<updated>2026-05-23T11:08:32+00:00</updated>
<author>
<name>David Laight</name>
<email>david.laight.linux@gmail.com</email>
</author>
<published>2026-02-23T10:17:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8e7f0e341e929b340a7e653711cdeecf6a4d43a8'/>
<id>urn:sha1:8e7f0e341e929b340a7e653711cdeecf6a4d43a8</id>
<content type='text'>
[ Upstream commit 27532c645e61da541173d43fbe03d234f68232f9 ]

Many systems don't have strlcpy() or strlcat() and readdir_r() is
deprecated. This makes the tests fail to build with the host headers.
Disable the 'directories' test and define strlcpy(), strlcat() and
readdir_r() using #defines so that the code compiles.

Fixes: 6fe8360b16acb ("selftests/nolibc: also test libc-test through regular selftest framework")
Signed-off-by: David Laight &lt;david.laight.linux@gmail.com&gt;
Link: https://patch.msgid.link/20260223101735.2922-4-david.laight.linux@gmail.com
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/nolibc: fix test_file_stream() on musl libc</title>
<updated>2026-05-23T11:08:32+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2026-03-18T17:00:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=57ce8a81d05f00029cb3d520a09f8d4499523b94'/>
<id>urn:sha1:57ce8a81d05f00029cb3d520a09f8d4499523b94</id>
<content type='text'>
[ Upstream commit 8ba600aa577f73cc551747fdf121afc7d04afcea ]

fwrite() modifying errno is non-standard.

Only validate this behavior on those libc implementations which
implement it.

Fixes: a5f00be9b3b0 ("tools/nolibc: Add a simple test for writing to a FILE and reading it back")
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools/nolibc: Add a simple test for writing to a FILE and reading it back</title>
<updated>2026-01-11T11:47:47+00:00</updated>
<author>
<name>Daniel Palmer</name>
<email>daniel@thingy.jp</email>
</author>
<published>2026-01-05T02:36:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a5f00be9b3b07d92c6689997403851a32e1874cc'/>
<id>urn:sha1:a5f00be9b3b07d92c6689997403851a32e1874cc</id>
<content type='text'>
Add a test that exercises create-&gt;write-&gt;seek-&gt;read to check that using the
stream functions (fwrite() etc) is not totally broken.

The only edge cases this is testing for are:
- Reading the file after writing but without rewinding reads nothing.
- Trying to read more items than the file contains returns the count of
  fully read items.

Signed-off-by: Daniel Palmer &lt;daniel@thingy.jp&gt;
Link: https://patch.msgid.link/20260105023629.1502801-4-daniel@thingy.jp
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
</content>
</entry>
<entry>
<title>selftests/nolibc: also test libc-test through regular selftest framework</title>
<updated>2026-01-11T10:17:15+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2026-01-06T11:44:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6fe8360b16acbfb50c703f52568cad46759be2ed'/>
<id>urn:sha1:6fe8360b16acbfb50c703f52568cad46759be2ed</id>
<content type='text'>
Hook up libc-test to the regular selftest build to make sure
nolibc-test.c stays compatible with a normal libc.

As the pattern rule from lib.mk does not handle compiling a target from
a differently named source file, add an explicit rule definition.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://patch.msgid.link/20260106-nolibc-selftests-v1-3-f82101c2c505@weissschuh.net
</content>
</entry>
<entry>
<title>selftests/nolibc: scope custom flags to the nolibc-test target</title>
<updated>2026-01-11T10:17:12+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2026-01-06T11:44:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=20c72de1f8a9e338531579bd784371aba4b7dd2c'/>
<id>urn:sha1:20c72de1f8a9e338531579bd784371aba4b7dd2c</id>
<content type='text'>
A new target for 'libc-test' is going to be added which should not be
affected by these options.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://patch.msgid.link/20260106-nolibc-selftests-v1-2-f82101c2c505@weissschuh.net
</content>
</entry>
<entry>
<title>selftests/nolibc: try to read from stdin in readv_zero test</title>
<updated>2026-01-11T10:17:07+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2026-01-06T11:44:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4203c6fb5e9d2e4fb9a48b421d92efd4429a4d55'/>
<id>urn:sha1:4203c6fb5e9d2e4fb9a48b421d92efd4429a4d55</id>
<content type='text'>
When stdout is redirected to a file this test fails.
This happens when running through the kselftest runner since
commit d9e6269e3303 ("selftests/run_kselftest.sh: exit with
error if tests fail").

For consistency with other tests that read from a file descriptor,
switch to stdin over stdout. The tests are still brittle against
a redirected stdin, but at least they are now consistently so.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://patch.msgid.link/20260106-nolibc-selftests-v1-1-f82101c2c505@weissschuh.net
</content>
</entry>
<entry>
<title>selftests/nolibc: always build sparc32 tests with -mcpu=v8</title>
<updated>2026-01-06T11:30:16+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2026-01-06T10:39:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6b6dbf3e4ecfd7d1086bd7cd8b31ca8e45d4dc1f'/>
<id>urn:sha1:6b6dbf3e4ecfd7d1086bd7cd8b31ca8e45d4dc1f</id>
<content type='text'>
Since LLVM commit 39e30508a7f6 ("[Driver][Sparc] Default to -mcpu=v9 for
32-bit Linux/sparc64 (#109278)"), clang defaults to -mcpu=v9 for 32-bit
SPARC builds. -mcpu=v9 generates instructions which are not recognized
by qemu-sparc and qemu-system-sparc.

Explicitly enforce -mcpu=v8 to generate compatible code.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://patch.msgid.link/20260106-nolibc-sparc32-fix-v2-1-7c5cd6b175c2@weissschuh.net
</content>
</entry>
<entry>
<title>selftests/nolibc: drop NOLIBC_SYSROOT=0 logic</title>
<updated>2026-01-06T11:08:09+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2026-01-04T14:57:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=03139924859f7930cd1667a278a560b5d4c6a672'/>
<id>urn:sha1:03139924859f7930cd1667a278a560b5d4c6a672</id>
<content type='text'>
This logic was added in commit 850fad7de827 ("selftests/nolibc: allow
test -include /path/to/nolibc.h") to allow the testing of -include
/path/to/nolibc.h. As it requires as special variable to activate, this
code is nearly never used. Furthermore it complicates the logic a bit.

Since commit a6a054c8ad32 ("tools/nolibc: add target to check header
usability") and commit 443c6467fcd6 ("selftests/nolibc: always run
nolibc header check") the usability of -include /path/to/nolibc.h is
always checked anyways, making NOLIBC_SYSROOT=0 pointless.

Drop the special logic.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://patch.msgid.link/20260104-nolibc-nolibc_sysroot-v1-1-98025ad99add@weissschuh.net
</content>
</entry>
<entry>
<title>selftests/nolibc: test compatibility of nolibc and kernel time types</title>
<updated>2026-01-06T11:08:04+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2025-12-20T13:55:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ca7206b6ad029d2c35e64f1ea81dba385496e630'/>
<id>urn:sha1:ca7206b6ad029d2c35e64f1ea81dba385496e630</id>
<content type='text'>
Keeping 'struct timespec' and 'struct __kernel_timespec' compatible
allows the source code to stay simple.

Validate that the types stay compatible.

The test is specific to nolibc and does not compile on other libcs, so
skip it there.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Link: https://patch.msgid.link/20251220-nolibc-uapi-types-v3-10-c662992f75d7@weissschuh.net
</content>
</entry>
<entry>
<title>tools/nolibc: add ptrace support</title>
<updated>2026-01-04T09:28:44+00:00</updated>
<author>
<name>Benjamin Berg</name>
<email>benjamin.berg@intel.com</email>
</author>
<published>2025-09-24T14:20:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ec4bb8e8dfa060c699b548f62e4d56133aafbbec'/>
<id>urn:sha1:ec4bb8e8dfa060c699b548f62e4d56133aafbbec</id>
<content type='text'>
Add ptrace support, as it will be useful in UML.

Signed-off-by: Benjamin Berg &lt;benjamin.berg@intel.com&gt;
[Thomas: drop va_args usage and linux/uio.h inclusion]
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
</content>
</entry>
</feed>
