<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/lib/kunit, branch v6.17</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.17</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.17'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-07-31T11:51:34Z</updated>
<entry>
<title>kunit: test: Drop CONFIG_MODULE ifdeffery</title>
<updated>2025-07-31T11:51:34Z</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2025-07-11T13:31:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=768da2eae8662ca51102794c32d37c17410acbf5'/>
<id>urn:sha1:768da2eae8662ca51102794c32d37c17410acbf5</id>
<content type='text'>
The function stubs exposed by module.h allow the code to compile properly
without the ifdeffery. The generated object code stays the same, as the
compiler can optimize away all the dead code.
As the code is still typechecked developer errors can be detected faster.

Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Acked-by: David Gow &lt;davidgow@google.com&gt;
Reviewed-by: Daniel Gomez &lt;da.gomez@samsung.com&gt;
Link: https://lore.kernel.org/r/20250711-kunit-ifdef-modules-v2-3-39443decb1f8@linutronix.de
Signed-off-by: Daniel Gomez &lt;da.gomez@samsung.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'linux_kselftest-kunit-6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest</title>
<updated>2025-07-29T19:43:10Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-07-29T19:43:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6f46e6fb4e267acf8741cb2c29d368b4de7b6c15'/>
<id>urn:sha1:6f46e6fb4e267acf8741cb2c29d368b4de7b6c15</id>
<content type='text'>
Pull kunit updates from Shuah Khan:
 "Correct MODULE_IMPORT_NS() syntax documentation, make kunit_test
  timeout configurable via a module parameter and a Kconfig option, fix
  longest symbol length test, add a test for static stub, and adjust
  kunit_test timeout based on test_{suite,case} speed"

* tag 'linux_kselftest-kunit-6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
  kunit: fix longest symbol length test
  kunit: Make default kunit_test timeout configurable via both a module parameter and a Kconfig option
  kunit: Adjust kunit_test timeout based on test_{suite,case} speed
  kunit: Add test for static stub
  Documentation: kunit: Correct MODULE_IMPORT_NS() syntax
</content>
</entry>
<entry>
<title>kunit: test: Export kunit_attach_mm()</title>
<updated>2025-07-16T12:11:58Z</updated>
<author>
<name>Tiffany Yang</name>
<email>ynaffit@google.com</email>
</author>
<published>2025-07-14T18:53:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bdfa89c489296f092751fcee23b5d171c9fdc7f5'/>
<id>urn:sha1:bdfa89c489296f092751fcee23b5d171c9fdc7f5</id>
<content type='text'>
Tests can allocate from virtual memory using kunit_vm_mmap(), which
transparently creates and attaches an mm_struct to the test runner if
one is not already attached. This is suitable for most cases, except for
when the code under test must access a task's mm before performing an
mmap. Expose kunit_attach_mm() as part of the interface for those
cases. This does not change the existing behavior.

Cc: David Gow &lt;davidgow@google.com&gt;
Signed-off-by: Tiffany Yang &lt;ynaffit@google.com&gt;
Reviewed-by: Carlos Llamas &lt;cmllamas@google.com&gt;
Link: https://lore.kernel.org/r/20250714185321.2417234-4-ynaffit@google.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kunit: Make default kunit_test timeout configurable via both a module parameter and a Kconfig option</title>
<updated>2025-06-27T21:00:05Z</updated>
<author>
<name>Marie Zhussupova</name>
<email>marievic@google.com</email>
</author>
<published>2025-06-26T17:17:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5ac244b9cc8f49c945c5be67ed7d6f8ac6ed9321'/>
<id>urn:sha1:5ac244b9cc8f49c945c5be67ed7d6f8ac6ed9321</id>
<content type='text'>
To accommodate varying hardware performance and use cases,
the default kunit test case timeout (currently 300 seconds)
is now configurable. Users can adjust the timeout by
either setting the 'timeout' module parameter or the
KUNIT_DEFAULT_TIMEOUT Kconfig option to their desired
timeout in seconds.

Link: https://lore.kernel.org/r/20250626171730.1765004-1-marievic@google.com
Signed-off-by: Marie Zhussupova &lt;marievic@google.com&gt;
Reviewed-by: David Gow &lt;davidgow@google.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kunit: Adjust kunit_test timeout based on test_{suite,case} speed</title>
<updated>2025-06-25T02:47:39Z</updated>
<author>
<name>Ujwal Jain</name>
<email>ujwaljain@google.com</email>
</author>
<published>2025-06-14T08:47:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=63d0a9123120a2e10861ac7f6dc474bee653d3b2'/>
<id>urn:sha1:63d0a9123120a2e10861ac7f6dc474bee653d3b2</id>
<content type='text'>
Currently, the in-kernel kunit test case timeout is 300 seconds. (There
is a separate timeout mechanism for the whole test execution in
kunit.py, but that's unrelated.) However, tests marked 'slow' or 'very
slow' may timeout, particularly on slower machines.

Implement a multiplier to the test-case timeout, so that slower tests
have longer to complete:
- DEFAULT -&gt; 1x default timeout
- KUNIT_SPEED_SLOW -&gt; 3x default timeout
- KUNIT_SPEED_VERY_SLOW -&gt; 12x default timeout

A further change is planned to allow user configuration of the
default/base timeout to allow people with faster or slower machines to
adjust these to their use-cases.

Link: https://lore.kernel.org/r/20250614084711.2654593-2-davidgow@google.com
Signed-off-by: Ujwal Jain &lt;ujwaljain@google.com&gt;
Co-developed-by: David Gow &lt;davidgow@google.com&gt;
Signed-off-by: David Gow &lt;davidgow@google.com&gt;
Reviewed-by: Rae Moar &lt;rmoar@google.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kunit: Add test for static stub</title>
<updated>2025-06-18T18:56:18Z</updated>
<author>
<name>Tzung-Bi Shih</name>
<email>tzungbi@kernel.org</email>
</author>
<published>2025-06-12T08:48:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e42ad39318dffbe46b05337759654c6436f723e8'/>
<id>urn:sha1:e42ad39318dffbe46b05337759654c6436f723e8</id>
<content type='text'>
__kunit_activate_static_stub() works effectively as
kunit_deactivate_static_stub() if `replacement_addr` is NULL.

Add a test case to catch the issue discovered in
commit 772e50a76ee6 ("kunit: Fix wrong parameter to kunit_deactivate_static_stub()").

For running the test:

$ ./tools/testing/kunit/kunit.py run \
        --arch=x86_64 \
        kunit_stub

Fixed change log:
Shuah Khan &lt;skhan@linuxfoundation.org&gt;

Link: https://lore.kernel.org/r/20250612084834.587576-1-tzungbi@kernel.org
Signed-off-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kunit: Fix wrong parameter to kunit_deactivate_static_stub()</title>
<updated>2025-05-21T15:51:23Z</updated>
<author>
<name>Tzung-Bi Shih</name>
<email>tzungbi@kernel.org</email>
</author>
<published>2025-05-20T08:20:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=772e50a76ee664e75581624f512df4e45582605a'/>
<id>urn:sha1:772e50a76ee664e75581624f512df4e45582605a</id>
<content type='text'>
kunit_deactivate_static_stub() accepts real_fn_addr instead of
replacement_addr.  In the case, it always passes NULL to
kunit_deactivate_static_stub().

Fix it.

Link: https://lore.kernel.org/r/20250520082050.2254875-1-tzungbi@kernel.org
Fixes: e047c5eaa763 ("kunit: Expose 'static stub' API to redirect functions")
Signed-off-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Reviewed-by: David Gow &lt;davidgow@google.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kunit: executor: Remove const from kunit_filter_suites() allocation type</title>
<updated>2025-04-29T18:48:27Z</updated>
<author>
<name>Kees Cook</name>
<email>kees@kernel.org</email>
</author>
<published>2025-04-26T06:24:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c2493384e8110d5a4792fff4b9d46e47b78ea10a'/>
<id>urn:sha1:c2493384e8110d5a4792fff4b9d46e47b78ea10a</id>
<content type='text'>
In preparation for making the kmalloc family of allocators type aware,
we need to make sure that the returned type from the allocation matches
the type of the variable being assigned. (Before, the allocator would
always return "void *", which can be implicitly cast to any pointer type.)

The assigned type is "struct kunit_suite **" but the returned type will
be "struct kunit_suite * const *". Since it isn't generally possible
to remove the const qualifier, adjust the allocation type to match
the assignment.

Link: https://lore.kernel.org/r/20250426062433.work.124-kees@kernel.org
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
Reviewed-by: David Gow &lt;davidgow@google.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'linux_kselftest-kunit-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest</title>
<updated>2025-01-22T20:32:39Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-01-22T20:32:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e8f17cb6f5abd4e52e89b5768c7016b7dab1e6fe'/>
<id>urn:sha1:e8f17cb6f5abd4e52e89b5768c7016b7dab1e6fe</id>
<content type='text'>
Pull kunit updates from Shuah Khan:

 - fix struct completion warning

 - introduce autorun option

 - add fallback for os.sched_getaffinity

 - enable hardware acceleration when available

* tag 'linux_kselftest-kunit-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
  kunit: Introduce autorun option
  kunit: enable hardware acceleration when available
  kunit: add fallback for os.sched_getaffinity
  kunit: platform: Resolve 'struct completion' warning
</content>
</entry>
<entry>
<title>kunit: Introduce autorun option</title>
<updated>2025-01-15T16:04:06Z</updated>
<author>
<name>Stanislav Kinsburskii</name>
<email>skinsburskii@linux.microsoft.com</email>
</author>
<published>2024-10-28T21:54:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=31691914c392675bdc65d1e72dd8d129a1f0014f'/>
<id>urn:sha1:31691914c392675bdc65d1e72dd8d129a1f0014f</id>
<content type='text'>
The new option controls tests run on boot or module load. With the new
debugfs "run" dentry allowing to run tests on demand, an ability to disable
automatic tests run becomes a useful option in case of intrusive tests.

The option is set to true by default to preserve the existent behavior. It
can be overridden by either the corresponding module option or by the
corresponding config build option.

Link: https://lore.kernel.org/r/173015245931.4747.16419517391658830640.stgit@skinsburskii-cloud-desktop.internal.cloudapp.net
Signed-off-by: Stanislav Kinsburskii &lt;skinsburskii@linux.microsoft.com&gt;
Reviewed-by: Rae Moar &lt;rmoar@google.com&gt;
Acked-by: David Gow &lt;davidgow@google.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
</feed>
