Commit 92f3c5a
lib/test_kmod: do not hardcode/depend on any filesystem
Right now test_kmod has hardcoded dependencies on btrfs/xfs. That is not
optimal since you end up needing to select/build them, but it is not
really required since other fs could be selected for the testing. Also,
we can't change the default/driver module used for testing on
initialization.
Thus make it more generic: introduce two module parameters (start_driver
and start_test_fs), which allow to select which modules/fs to use for the
testing on test_kmod initialization. Then it's up to the user to select
which modules/fs to use for testing based on his config. However, keep
test_module as required default.
This way, config/modules becomes selectable as when the testing is done
from selftests (userspace).
While at it, also change trigger_config_run_type, since at module
initialization we already set the defaults at __kmod_config_init and
should not need to do it again in test_kmod_init(), thus we can avoid to
again set test_driver/test_fs.
Link: https://lkml.kernel.org/r/20250418165047.702487-1-herton@redhat.com
Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
Reviewed-by: Luis Chambelrain <mcgrof@kernel.org>
Cc: Daniel Gomez <da.gomez@samsung.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Petr Pavlu <petr.pavlu@suse.com>
Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent 2a1c615 commit 92f3c5a
File tree
3 files changed
+34
-41
lines changed- lib
- tools/testing/selftests/kmod
3 files changed
+34
-41
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2983 | 2983 | | |
2984 | 2984 | | |
2985 | 2985 | | |
2986 | | - | |
2987 | | - | |
2988 | | - | |
2989 | 2986 | | |
2990 | | - | |
2991 | | - | |
2992 | | - | |
2993 | 2987 | | |
2994 | 2988 | | |
2995 | 2989 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | 31 | | |
33 | 32 | | |
34 | | - | |
35 | 33 | | |
36 | | - | |
| 34 | + | |
37 | 35 | | |
38 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
39 | 45 | | |
40 | 46 | | |
41 | 47 | | |
| |||
508 | 514 | | |
509 | 515 | | |
510 | 516 | | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
511 | 522 | | |
512 | 523 | | |
513 | 524 | | |
| |||
721 | 732 | | |
722 | 733 | | |
723 | 734 | | |
724 | | - | |
725 | | - | |
| 735 | + | |
726 | 736 | | |
727 | | - | |
728 | 737 | | |
729 | 738 | | |
730 | 739 | | |
731 | 740 | | |
732 | 741 | | |
733 | 742 | | |
734 | | - | |
735 | | - | |
736 | | - | |
737 | | - | |
738 | 743 | | |
739 | 744 | | |
740 | | - | |
741 | | - | |
742 | | - | |
743 | | - | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
744 | 749 | | |
745 | 750 | | |
746 | 751 | | |
| |||
751 | 756 | | |
752 | 757 | | |
753 | 758 | | |
754 | | - | |
755 | | - | |
756 | | - | |
757 | | - | |
758 | | - | |
759 | 759 | | |
760 | 760 | | |
761 | 761 | | |
| |||
800 | 800 | | |
801 | 801 | | |
802 | 802 | | |
| 803 | + | |
| 804 | + | |
803 | 805 | | |
804 | 806 | | |
805 | 807 | | |
806 | 808 | | |
807 | | - | |
808 | | - | |
809 | | - | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
810 | 812 | | |
811 | 813 | | |
812 | | - | |
813 | | - | |
814 | | - | |
815 | | - | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
816 | 821 | | |
817 | 822 | | |
818 | 823 | | |
| |||
1178 | 1183 | | |
1179 | 1184 | | |
1180 | 1185 | | |
1181 | | - | |
1182 | | - | |
| 1186 | + | |
1183 | 1187 | | |
1184 | 1188 | | |
1185 | | - | |
1186 | | - | |
| 1189 | + | |
| 1190 | + | |
1187 | 1191 | | |
1188 | 1192 | | |
1189 | 1193 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
0 commit comments