<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/fs/tests/fdtable_kunit.c, branch stable</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/fs/tests/fdtable_kunit.c?h=stable</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/fs/tests/fdtable_kunit.c?h=stable'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2026-09-11T12:47:49Z</updated>
<entry>
<title>vfs: use __struct_size() in the fdtable KUnit test</title>
<updated>2026-09-11T12:47:49Z</updated>
<author>
<name>Christian Brauner</name>
<email>brauner@kernel.org</email>
</author>
<published>2026-09-11T12:47:49Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=07d35cec28c6a33d7714da6eebcf5c69644f530e'/>
<id>urn:sha1:07d35cec28c6a33d7714da6eebcf5c69644f530e</id>
<content type='text'>
sparse doesn't know __builtin_dynamic_object_size() and so the two size
checks in the fdtable test fall apart on every config where the compiler
has __counted_by_ptr:

  fs/tests/fdtable_kunit.c:25:9: sparse: undefined identifier '__builtin_dynamic_object_size'
  fs/tests/fdtable_kunit.c:25:9: sparse: incompatible types for operation (==):

Use __struct_size() instead. Every compiler that has __counted_by_ptr also
has __builtin_dynamic_object_size() so it expands to the same builtin and
the test checks the same thing. sparse lacks the builtin and gets the
__builtin_object_size() fallback which it does understand.

Fixes: 501cbbd276b7 ("vfs: Add KUnit tests for fdtable")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Closes: https://lore.kernel.org/oe-kbuild-all/202609111337.fBSfTIpR-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202609111828.SjerhPyO-lkp@intel.com/
Signed-off-by: Christian Brauner (Amutable) &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>vfs: Add KUnit tests for fdtable</title>
<updated>2026-09-10T07:32:48Z</updated>
<author>
<name>Bill Wendling</name>
<email>morbo@google.com</email>
</author>
<published>2026-08-27T04:17:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=501cbbd276b77d34af20ea3dd4f897c93630bac8'/>
<id>urn:sha1:501cbbd276b77d34af20ea3dd4f897c93630bac8</id>
<content type='text'>
This adds a KUnit test suite for fdtable to verify correct allocation,
max_fds initialization, and dynamic object size of the fd array under
__counted_by_ptr when CONFIG_CC_HAS_COUNTED_BY_PTR is enabled.

Signed-off-by: Bill Wendling &lt;morbo@google.com&gt;
Link: https://patch.msgid.link/20260827041732.188707-2-morbo@google.com
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Christian Brauner (Amutable) &lt;brauner@kernel.org&gt;
</content>
</entry>
</feed>
