Skip to content

Commit

Permalink
Merge pull request #327 from jiaqizhao122/add_new_configs
Browse files Browse the repository at this point in the history
kunit: add extra coverage
  • Loading branch information
rli9 authored Jan 12, 2024
2 parents 33f5365 + 9a7416f commit 756f964
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 12 deletions.
36 changes: 34 additions & 2 deletions etc/kconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ CRYPTO_SM3_GENERIC: v5.19-rc1
CRYPTO_SM4: v4.17-rc1
CRYPTO_SM4_GENERIC: v5.19-rc1
CRYPTO_XXHASH: v5.3-rc1
CRYPTO_MANAGER_EXTRA_TESTS: v5.1-rc1
CXL_BUS: v5.12-rc1
CXL_REGION: v6.0-rc1
CXL_REGION_INVALIDATION_TEST: v6.2-rc1
Expand All @@ -45,8 +46,11 @@ DAMON_DBGFS: v5.15-rc1
DAMON_DBGFS_KUNIT_TEST: v5.15-rc1
DAMON_LRU_SORT: v6.0-rc1
DAMON_PADDR: v5.16-rc1
DMAPOOL_TEST: v6.4-rc1
DAMON_RECLAIM: v5.16-rc1
DMABUF_SELFTESTS: v5.4-rc1
DAMON_SYSFS: v5.18-rc1
DAMON_KUNIT_TEST: v5.15-rc1
DAMON_VADDR: v5.15-rc1
DAMON_VADDR_KUNIT_TEST: v5.15-rc1
DEBUG_CREDENTIALS: <= v6.7-rc5
Expand All @@ -62,9 +66,11 @@ DMA_CMA: <= v4.8-rc8
DMA_MAP_BENCHMARK: v5.11-rc1
DRIVER_PE_KUNIT_TEST: v5.13-rc1
DRM_DEBUG_SELFTEST: v4.18-rc1, <= v6.0
DRM_VC4_KUNIT_TEST: v6.3-rc1
DRM_KUNIT_TEST: v6.0-rc1
EDAC_ATOMIC_SCRUB: v4.2-rc1
EMBEDDED: <= v6.5
EVENT_TRACE_STARTUP_TEST: v5.3-rc1
EXT4_ENCRYPTION: <= v5.0
EXT4_KUNIT_TESTS: v5.5-rc1
F2FS_FS_ENCRYPTION: <= v5.0
Expand Down Expand Up @@ -94,6 +100,7 @@ HASH_KUNIT_TEST: v5.17-rc1
HID_KUNIT_TEST: v6.1-rc1
HID_SUPPORT: v6.3-rc1
HIST_TRIGGERS: v4.7-rc1
HTE_TEGRA194_TEST: v5.19-rc1
HW_BREAKPOINT_KUNIT_TEST: v6.1-rc1
IGC: v4.20-rc1
IIO_FORMAT_KUNIT_TEST: v6.0-rc1
Expand All @@ -120,7 +127,9 @@ IR_IMON_DECODER: v4.17-rc1
IS_SIGNED_TYPE_KUNIT_TEST: v6.1-rc1
KALLSYMS_SELFTEST: v6.2-rc1
KASAN: v4.0-rc1, x86_64
KCSAN_SELFTEST: v5.8-rc1
KASAN_KUNIT_TEST: v5.10-rc1, x86_64
KCSAN_KUNIT_TEST: v5.13-rc1
KFENCE: v5.12-rc1
KFENCE_KUNIT_TEST: v5.12-rc1
KMSAN_KUNIT_TEST: v6.1-rc1
Expand All @@ -130,14 +139,16 @@ KUNIT_DEBUGFS: v5.7-rc1
KUNIT_DEFAULT_ENABLED: v6.1-rc1
KUNIT_EXAMPLE_TEST: v5.5-rc1
KUNIT_TEST: v5.5-rc1
KPROBE_EVENT_GEN_TEST: v5.6-rc1
KPROBES_SANITY_TEST: v5.16-rc1
LEDS_CLASS_MULTICOLOR: v5.9-rc1
LIBNVDIMM: v4.2-rc1
LINEAR_RANGES_TEST: v5.8-rc1
LIST_KUNIT_TEST: v5.5-rc1
LIVEPATCH: v4.0-rc1, x86_64
LWTUNNEL: v4.3-rc1
MEMCPY_KUNIT_TEST: v5.16-rc1
MEMCPY_SLOW_KUNIT_TEST: v6.2-rc1
MEMCPY_SLOW_KUNIT_TEST: v6.2-rc6
MEMORY_HOTPLUG: x86_64
MEMORY_HOTPLUG_SPARSE: <= v5.15
MEMORY_HOTREMOVE: x86_64
Expand All @@ -147,6 +158,8 @@ MPLS_ROUTING: v4.1-rc1
MPTCP: v5.6-rc1
MPTCP_IPV6: v5.6-rc1
MPTCP_KUNIT_TEST: v5.13-rc1
MCTP_TEST: v5.16-rc1
MMC_SDHCI_OF_ASPEED_TEST: v5.12-rc1
ND_BLK: <= v5.17
NETDEVSIM: v4.16-rc1
NETDEV_ADDR_LIST_TEST: v5.17-rc1
Expand Down Expand Up @@ -198,6 +211,8 @@ NF_TABLES_INET: v4.17-rc1
NF_TABLES_IPV4: v4.17-rc1
NF_TABLES_IPV6: v4.17-rc1
NF_TABLES_NETDEV: v4.17-rc1
NITRO_ENCLAVES_MISC_DEV_TEST: v5.17-rc1
NTB_MSI_TEST: v5.3-rc1
NUMA: v5.6-rc1
NVDIMM_KEYS: v5.0-rc1
NVDIMM_PFN: v4.3-rc1, x86_64
Expand All @@ -207,6 +222,7 @@ OVERFLOW_KUNIT_TEST: v5.18-rc1
PM_QOS_KUNIT_TEST: v5.5-rc1
POSIX_TIMERS: v4.10-rc1
PREEMPTIRQ_DELAY_TEST: v5.6-rc1
REED_SOLOMON_TEST: v5.3-rc1
PREEMPT_VOLUNTARY_BEHAVIOUR: v5.16-rc1, <= v5.16-rc1
PRIME_NUMBERS: v5.2-rc1
PTP_1588_CLOCK_MOCK: v6.6-rc1
Expand All @@ -223,6 +239,7 @@ RESOURCE_KUNIT_TEST: v5.11-rc1
RTC_LIB_KUNIT_TEST: v5.15-rc1
RUNTIME_TESTING_MENU: v4.16-rc1
SAMPLE_FTRACE_DIRECT: v5.5-rc1, x86_64
SCF_TORTURE_TEST: v5.10-rc1
SECURITY_APPARMOR_KUNIT_TEST: v6.2-rc1 # type: tristate is supported
SECURITY_LANDLOCK: v5.13-rc1
SECURITY_LOADPIN_ENABLED: <= v4.19
Expand All @@ -231,16 +248,21 @@ SECURITY_LOCKDOWN_LSM: v5.4-rc1
SIPHASH_KUNIT_TEST: v6.2-rc1
SLAB_FREELIST_HARDENED: v5.14-rc1
SLUB_KUNIT_TEST: v5.14-rc1
SND_SOC_TOPOLOGY_KUNIT_TEST: v5.13-rc1
SND_SOC_INTEL_AVS: v5.18-rc1
SND_TEST_COMPONENT: v5.16-rc1
SND_SOC_INTEL_AVS_MACH_I2S_TEST: v6.0-rc1
SND_SOC_UTILS_KUNIT_TEST: v5.19-rc1
STACKINIT_KUNIT_TEST: v5.18-rc1
STATIC_CALL_SELFTEST: v5.10-rc1
STM: v4.4-rc1
STM_DUMMY: v4.4-rc1
STM_SOURCE_CONSOLE: v4.4-rc1
STMMAC_SELFTESTS: v5.3-rc1
STM_SOURCE_FTRACE: v4.6-rc1
STM_SOURCE_HEARTBEAT: v4.6-rc1
STRSCPY_KUNIT_TEST: v6.2-rc1
SYNTH_EVENT_GEN_TEST: v5.6-rc1
SYNC: <= v4.7
SYSCTL_KUNIT_TEST: v5.5-rc1
TASKS_RUDE_RCU: v5.8-rc1
Expand All @@ -263,26 +285,36 @@ TEST_MIN_HEAP: v5.7-rc1
TEST_OVERFLOW: <= v5.17
TEST_PRINTF: v4.4-rc1
TEST_SCANF: v5.14-rc1
TEST_REF_TRACKER: v5.17-rc1
TEST_OBJAGG: v5.0-rc1
TEST_LOCKUP: v5.7-rc1
TEST_IRQ_TIMINGS: v5.3-rc1
TEST_DHRY: v6.3-rc1
TEST_CLOCKSOURCE_WATCHDOG: v5.14-rc1
TEST_STRSCPY: v5.2-rc1, <= v6.1
TEST_VMALLOC: v5.1-rc1
TEST_XARRAY: v4.20-rc1
TSNEP_SELFTESTS: v5.17-rc1
TIME_KUNIT_TEST: v5.14-rc1
TIME_NS: v5.6-rc1
TLS: v4.13-rc1
UBSAN_BOUNDS: v5.15-rc1
UDMABUF: v4.20-rc1
USB4: v5.6-rc1
USB4_DMA_TEST: v5.11-rc1
UNICODE_NORMALIZATION_SELFTEST: v5.2-rc1
USB4_KUNIT_TEST: v5.9-rc1
USER_EVENTS: v5.18-rc1
USERFAULTFD: v4.3-rc1
VALIDATE_FS_PARSER: v5.1-rc1
VCAP_KUNIT_TEST: v6.2-rc1
VIDEO_V4L2: <= v5.17
WATCH_QUEUE: v5.8-rc1
WW_MUTEX_SELFTEST: v4.11-rc1
X86_CPU_RESCTRL: v5.0-rc1
X86_INTEL_TSX_MODE_AUTO: v5.4-rc1
X86_INTEL_TSX_MODE_OFF: v5.4-rc1
X86_INTEL_TSX_MODE_ON:: v5.4-rc1
X86_INTEL_TSX_MODE_ON: v5.4-rc1
X86_MCELOG_LEGACY: v4.12-rc1
X86_RESCTRL: v5.0-rc2, <= v5.0-rc4
X86_SGX: v5.11-rc1, x86_64
Expand Down
59 changes: 56 additions & 3 deletions include/kunit
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ need_kconfig:
- HASH_KUNIT_TEST: m
- KUNIT_EXAMPLE_TEST: n
- KUNIT_TEST: n
- DRM_VC4_KUNIT_TEST: m
- LINEAR_RANGES_TEST: m
- LIST_KUNIT_TEST: m
- MEMCPY_KUNIT_TEST: m
- SND_SOC_TOPOLOGY_KUNIT_TEST: m
# disable slow memcpy kunit test which are also part of MEMCPY_KUNIT_TEST but exhaustive
- MEMCPY_SLOW_KUNIT_TEST: n
- NETDEV_ADDR_LIST_TEST: m
Expand All @@ -38,7 +40,7 @@ need_kconfig:

- KASAN: y
- KASAN_KUNIT_TEST: m

- KCSAN_KUNIT_TEST: m
- TRACEPOINTS: y
- KFENCE: y
- KFENCE_KUNIT_TEST: m
Expand Down Expand Up @@ -92,6 +94,9 @@ need_kconfig:
- FAT_KUNIT_TEST: m

# below are kunit test configs of bool type
- DAMON_KUNIT_TEST: y
- VCAP_KUNIT_TEST: y
- VCAP: y
- PM_QOS_KUNIT_TEST: y
- USB4: y
- USB4_KUNIT_TEST: y
Expand All @@ -112,6 +117,7 @@ need_kconfig:
- DAMON_DBGFS_KUNIT_TEST: y
% elsif ___.group == "group-01"
# below are not kunit test
- KPROBE_EVENT_GEN_TEST: m
- STRING_SELFTEST: m
- TEST_DIV64: m
- TEST_BPF: m
Expand All @@ -131,6 +137,7 @@ need_kconfig:
- TEST_MEMCAT_P: m
- TEST_UDELAY: m
- TEST_VMALLOC: m
- DMAPOOL_TEST: m
- DYNAMIC_DEBUG: y
- DYNAMIC_FTRACE_WITH_REGS: y
- LIVEPATCH: y
Expand All @@ -140,31 +147,77 @@ need_kconfig:
- MEMORY_HOTPLUG: y
- MEMORY_HOTREMOVE: y
- ZONE_DEVICE: y
- DMABUF_SELFTESTS: m
- DEVICE_PRIVATE: y
- TEST_HMM: m
- TEST_FREE_PAGES: m
- KCOV_INSTRUMENT_ALL: n
- TEST_FPU: m
- TEST_BITOPS: m
- TEST_BLACKHOLE_DEV: m
- TEST_ASYNC_DRIVER_PROBE: m
- SPI: y
- SPI_MASTER: y
- SPI_LOOPBACK_TEST: m
- GLOB_SELFTEST: m
- PREEMPTIRQ_DELAY_TEST: m
- KPROBES_SANITY_TEST: m
- MCTP_TEST: y
- MCTP: y
- MMC_SDHCI_OF_ASPEED_TEST: y
- MMC_SDHCI_OF_ASPEED: m

- CRC32: y
- CRC32_SELFTEST: m
- ATOMIC64_SELFTEST: m
- TEST_MAPLE_TREE: m

- HTE_TEGRA194_TEST: m
- HTE_TEGRA194: m
- SND: m
- SND_SOC: m
- SND_SOC_INTEL_AVS: m
- SND_SOC_INTEL_AVS_MACH_I2S_TEST: m

- NTB_MSI_TEST: m
- NTB_MSI: y
- KALLSYMS: y
- USB4_DMA_TEST: m
- UNICODE_NORMALIZATION_SELFTEST: m
- UNICODE: m
- TSNEP: m
- PTP_1588_CLOCK_OPTIONAL: m
- TEST_REF_TRACKER: m
- TEST_OBJAGG: m
- OBJAGG: m
- TEST_LOCKUP: m
- TEST_DHRY: m
- TEST_CLOCKSOURCE_WATCHDOG: m
- SYNTH_EVENT_GEN_TEST: m
- SYNTH_EVENTS: y
- STMMAC_SELFTESTS: y
- STMMAC_ETH: m
- SND_TEST_COMPONENT: m
- SCF_TORTURE_TEST: m
- REED_SOLOMON_TEST: m
- NITRO_ENCLAVES: m

# below are kunit test configs of bool type
- TSNEP
- PTP_1588_CLOCK_OPTIONAL
- TSNEP_SELFTESTS: y

- PCI: y
- HAVE_PCI: y
- NITRO_ENCLAVES_MISC_DEV_TEST: y

- EVENT_TRACE_STARTUP_TEST: y
- GUP_TEST: y
- CRYPTO_MANAGER_EXTRA_TESTS: y
- KCSAN_SELFTEST: y

- HAVE_STATIC_CALL: y
- STATIC_CALL_SELFTEST: y

- TEST_IRQ_TIMINGS: y
- FUNCTION_TRACER: y
- DYNAMIC_FTRACE: y
- BUILDTIME_MCOUNT_SORT: y
Expand Down
15 changes: 8 additions & 7 deletions programs/kunit/run
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,22 @@ arch=$(get_system_arch)
if [[ "$group" = "group-00" ]]; then
test_array=("bitfield_kunit" "test_bits" "cmdline_kunit" "ext4-inode-test" "test_hash" \
"test_linear_ranges" "list-test" "memcpy_kunit" "dev_addr_lists_test" "resource_kunit" \
"lib_test" "sysctl-test" "time_test" "test_list_sort" "test_sort" "kasan_test" \
"lib_test" "sysctl-test" "time_test" "test_list_sort" "test_sort" "kasan_test" "kcsan_test" \
"kfence_test" "mptcp_crypto_test" "mptcp_token_test" "rational-test" "slub_kunit" \
"apparmor_policy_unpack_test" "fortify_kunit" "property-entry-test" \
"drm_cmdline_parser_test" "drm_damage_helper_test" "drm_dp_mst_helper_test" "drm_mm_test" \
"drm_format_helper_test" "drm_format_test" "drm_framebuffer_test" "drm_plane_helper_test" "drm_rect_test"\
"clk-gate_test" "clk_test" "cpumask_kunit" "cros_kunit_proto_test" "hid-uclogic-test" "iio-test-format" \
"iio-test-rescale" "overflow_kunit" "soc-utils-test" "stackinit_kunit" "is_signed_type_kunit" \
"siphash_kunit" "strscpy_kunit" "fat_test")
"siphash_kunit" "strscpy_kunit" "soc-topology-test" "fat_test")
elif [[ "$group" = "group-01" ]]; then
test_array=("test_string" "test_div64" "test_bpf" "test_min_heap" "test_user_copy" "test_static_key_base" \
"test_scanf" "test_bitmap" "test_uuid" "test_xarray" "test_rhashtable" "test_memcat_p" \
"test_udelay" "test_klp_livepatch" "test_klp_shadow_vars" "test_hmm" "test_free_pages" "test_fpu" \
"test_bitops" "test_async_driver_probe" "spi-loopback-test" "globtest" \
"test_kstrtox" "test_string_helpers" "test_overflow" "test_ida" "udelay_test" \
"test_vmalloc" "test_klp_state" "test_meminit" "test_printf" "test_maple_tree" \
"test_scanf" "test_bitmap" "test_uuid" "test_xarray" "test_rhashtable" "test_memcat_p" "dmabuf_selftests" "test_kprobes" "dmapool_test" \
"test_udelay" "test_klp_livepatch" "test_klp_shadow_vars" "test_hmm" "test_free_pages" "test_fpu" "test_rslib" "ntb_msi_test" "kprobe_event_gen_test" \
"test_bitops" "test_async_driver_probe" "spi-loopback-test" "globtest" "test_ref_tracker" "test_objagg" "test_lockup" "scftorture" \
"vc4_mock" "vc4_mock_crtc" "vc4_mock_output" "vc4_mock_plane" "vc4_test_pv_muxing" "hte-tegra194-test" "preemptirq_delay_test" "test_blackhole_dev" \
"test_kstrtox" "test_string_helpers" "test_overflow" "test_ida" "udelay_test" "utf8-selftest" "test_dhry" "synth_event_gen_test" "snd-soc-test-component" \
"test_vmalloc" "test_klp_state" "test_meminit" "test_printf" "test_maple_tree" "thunderbolt_dma_test" "clocksource-wdtest" \
"crc32test" "atomic64_test" "snd-soc-avs-i2s-test" "test_dynamic_debug" "raid6test" "backtracetest")
elif [[ "$group" = "group-03" ]]; then
test_array=("drm_buddy_test")
Expand Down

0 comments on commit 756f964

Please sign in to comment.