On 11/15/2024 10:12 PM, Mark Brown wrote:
...
make -C tools/testing/selftests/livepatch/test_modules/
Ah, this one is actually using some framework support for building
modules - it's putting the modules in a separate directory and using
TEST_GEN_MODS_DIR. Crucially, though, it has guards which ensure that
we don't try to build the modules if KDIR doesn't exist - you should
follow that pattern.
Will add a checking whether to build the test modules around the
TEST_GEN_MODS_DIR setup to avoid rsync copy error when the test module
compiling need to be skipped.
in the main kernel tree and enabled by the config file for the mm tests.
As discussed in [1], this module is not really a vaild kernel module by
returning '-EAGAIN', which is the main reason that it is setup in the
selftests instead of the main kernel tree.
Sure, we have other test stuff in the main kernel.
As above, I am not sure if there is some elegant way to avoid the above error
in the selftest core, one possible way to avoid the above error is to skip
compiling like below as tools/testing/selftests/mm/test_page_frag.sh already
skip the testing for page_frag if the test module is not compiled:
Since the tests currently don't build the test systems are by and by
large not getting as far as trying to run anything, the entire mm suite
is just getting skipped.
I just sent a fix for above, it would be good if you can test it if it
fixes the above problem.
I tested it with both latest net-next main kernel and older host kernel,
it seems to work.
1.
https://lore.kernel.org/lkml/20241116042314.100400-1-yunshenglin0825@xxxxxxxxx/