<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in Makefile</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>ec8f24b7 - treewide: Add SPDX license identifier - Makefile/Kconfig</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/testing/selftests/kmod/Makefile#ec8f24b7</link>
        <description>treewide: Add SPDX license identifier - Makefile/KconfigAdd SPDX license identifiers to all Make/Kconfig files which: - Have no license information of any formThese files fall under the project license, GPL v2 only. The resulting SPDXlicense identifier is:  GPL-2.0-onlySigned-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

            List of files:
            /linux-6.15/tools/testing/selftests/kmod/Makefile</description>
        <pubDate>Sun, 19 May 2019 12:07:45 +0000</pubDate>
        <dc:creator>Thomas Gleixner &lt;tglx@linutronix.de&gt;</dc:creator>
    </item>
<item>
        <title>d9c6a72d - kmod: add test driver to stress test the module loader</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/testing/selftests/kmod/Makefile#d9c6a72d</link>
        <description>kmod: add test driver to stress test the module loaderThis adds a new stress test driver for kmod: the kernel module loader.The new stress test driver, test_kmod, is only enabled as a module rightnow.  It should be possible to load this as built-in and load testsearly (refer to the force_init_test module parameter), however since alot of test can get a system out of memory fast we leave this disabledfor now.Using a system with 1024 MiB of RAM can *easily* get your kernel OOMfast with this test driver.The test_kmod driver exposes API knobs for us to fine tune simplerequest_module() and get_fs_type() calls.  Since these API calls onlyallow each one parameter a test driver for these is rather simple.Other factors that can help out test driver though are the number ofcalls we issue and knowing current limitations of each.  This exposesconfiguration as much as possible through userspace to be able to buildtests directly from userspace.Since it allows multiple misc devices its will eventually (once we add aknob to let us create new devices at will) also be possible to performmore tests in parallel, provided you have enough memory.We only enable tests we know work as of right now.Demo screenshots: # tools/testing/selftests/kmod/kmod.shkmod_test_0001_driver: OK! - loading kmod testkmod_test_0001_driver: OK! - Return value: 256 (MODULE_NOT_FOUND), expected MODULE_NOT_FOUNDkmod_test_0001_fs: OK! - loading kmod testkmod_test_0001_fs: OK! - Return value: -22 (-EINVAL), expected -EINVALkmod_test_0002_driver: OK! - loading kmod testkmod_test_0002_driver: OK! - Return value: 256 (MODULE_NOT_FOUND), expected MODULE_NOT_FOUNDkmod_test_0002_fs: OK! - loading kmod testkmod_test_0002_fs: OK! - Return value: -22 (-EINVAL), expected -EINVALkmod_test_0003: OK! - loading kmod testkmod_test_0003: OK! - Return value: 0 (SUCCESS), expected SUCCESSkmod_test_0004: OK! - loading kmod testkmod_test_0004: OK! - Return value: 0 (SUCCESS), expected SUCCESSkmod_test_0005: OK! - loading kmod testkmod_test_0005: OK! - Return value: 0 (SUCCESS), expected SUCCESSkmod_test_0006: OK! - loading kmod testkmod_test_0006: OK! - Return value: 0 (SUCCESS), expected SUCCESSkmod_test_0005: OK! - loading kmod testkmod_test_0005: OK! - Return value: 0 (SUCCESS), expected SUCCESSkmod_test_0006: OK! - loading kmod testkmod_test_0006: OK! - Return value: 0 (SUCCESS), expected SUCCESSXXX: add test restult for 0007Test completedYou can also request for specific tests: # tools/testing/selftests/kmod/kmod.sh -t 0001kmod_test_0001_driver: OK! - loading kmod testkmod_test_0001_driver: OK! - Return value: 256 (MODULE_NOT_FOUND), expected MODULE_NOT_FOUNDkmod_test_0001_fs: OK! - loading kmod testkmod_test_0001_fs: OK! - Return value: -22 (-EINVAL), expected -EINVALTest completedLastly, the current available number of tests: # tools/testing/selftests/kmod/kmod.sh --helpUsage: tools/testing/selftests/kmod/kmod.sh [ -t &lt;4-number-digit&gt; ]Valid tests: 0001-00090001 - Simple test - 1 thread  for empty string0002 - Simple test - 1 thread  for modules/filesystems that do not exist0003 - Simple test - 1 thread  for get_fs_type() only0004 - Simple test - 2 threads for get_fs_type() only0005 - multithreaded tests with default setup - request_module() only0006 - multithreaded tests with default setup - get_fs_type() only0007 - multithreaded tests with default setup test request_module() and get_fs_type()0008 - multithreaded - push kmod_concurrent over max_modprobes for request_module()0009 - multithreaded - push kmod_concurrent over max_modprobes for get_fs_type()The following test cases currently fail, as such they are not currentlyenabled by default: # tools/testing/selftests/kmod/kmod.sh -t 0008 # tools/testing/selftests/kmod/kmod.sh -t 0009To be sure to run them as intended please unload both of the modules:  o test_module  o xfsAnd ensure they are not loaded on your system prior to testing them.  Ifyou use these paritions for your rootfs you can change the default testdriver used for get_fs_type() by exporting it into your environment.  Forexample of other test defaults you can override refer to kmod.shallow_user_defaults().Behind the scenes this is how we fine tune at a test case prior tohitting a trigger to run it:cat /sys/devices/virtual/misc/test_kmod0/configecho -n &quot;2&quot; &gt; /sys/devices/virtual/misc/test_kmod0/config_test_caseecho -n &quot;ext4&quot; &gt; /sys/devices/virtual/misc/test_kmod0/config_test_fsecho -n &quot;80&quot; &gt; /sys/devices/virtual/misc/test_kmod0/config_num_threadscat /sys/devices/virtual/misc/test_kmod0/configecho -n &quot;1&quot; &gt; /sys/devices/virtual/misc/test_kmod0/config_num_threadsFinally to trigger:echo -n &quot;1&quot; &gt; /sys/devices/virtual/misc/test_kmod0/trigger_configThe kmod.sh script uses the above constructs to build different test cases.A bit of interpretation of the current failures follows, first twopremises:a) When request_module() is used userspace figures out an optimized   version of module order for us.  Once it finds the modules it needs, as   per depmod symbol dep map, it will finit_module() the respective   modules which are needed for the original request_module() request.b) We have an optimization in place whereby if a kernel uses   request_module() on a module already loaded we never bother userspace   as the module already is loaded.  This is all handled by kernel/kmod.c.A few things to consider to help identify root causes of issues:0) kmod 19 has a broken heuristic for modules being assumed to be   built-in to your kernel and will return 0 even though request_module()   failed.  Upgrade to a newer version of kmod.1) A get_fs_type() call for &quot;xfs&quot; will request_module() for &quot;fs-xfs&quot;,   not for &quot;xfs&quot;.  The optimization in kernel described in b) fails to   catch if we have a lot of consecutive get_fs_type() calls.  The reason   is the optimization in place does not look for aliases.  This means two   consecutive get_fs_type() calls will bump kmod_concurrent, whereas   request_module() will not.This one explanation why test case 0009 fails at least once forget_fs_type().2) If a module fails to load --- for whatever reason (kmod_concurrent   limit reached, file not yet present due to rootfs switch, out of   memory) we have a period of time during which module request for the   same name either with request_module() or get_fs_type() will *also*   fail to load even if the file for the module is ready.This explains why *multiple* NULLs are possible on test 0009.3) finit_module() consumes quite a bit of memory.4) Filesystems typically also have more dependent modules than other   modules, its important to note though that even though a get_fs_type()   call does not incur additional kmod_concurrent bumps, since userspace   loads dependencies it finds it needs via finit_module_fd(), it *will*   take much more memory to load a module with a lot of dependencies.Because of 3) and 4) we will easily run into out of memory failures withcertain tests.  For instance test 0006 fails on qemu with 1024 MiB of RAM.It panics a box after reaping all userspace processes and still nothaving enough memory to reap.[arnd@arndb.de: add dependencies for test module]  Link: http://lkml.kernel.org/r/20170630154834.3689272-1-arnd@arndb.deLink: http://lkml.kernel.org/r/20170628223155.26472-3-mcgrof@kernel.orgSigned-off-by: Luis R. Rodriguez &lt;mcgrof@kernel.org&gt;Cc: Jessica Yu &lt;jeyu@redhat.com&gt;Cc: Shuah Khan &lt;shuah@kernel.org&gt;Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;Cc: Michal Marek &lt;mmarek@suse.com&gt;Cc: Petr Mladek &lt;pmladek@suse.com&gt;Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/tools/testing/selftests/kmod/Makefile</description>
        <pubDate>Fri, 14 Jul 2017 21:50:08 +0000</pubDate>
        <dc:creator>Luis R. Rodriguez &lt;mcgrof@kernel.org&gt;</dc:creator>
    </item>
</channel>
</rss>
