[LTP] [PATCH v3] userfaultfd: Minor fixes

Petr Vorel pvorel@suse.cz
Mon Mar 30 12:42:37 CEST 2026


> Hi!
> > As a separate effort: Cyril raised a question if (as a separate effort) should
> > all test have some kconfig check (e.g. CONFIG_USERFAULTFD=y)

> > IMHO it's a question if we are ok with wide spread of needs_kconfig even if it's
> > not necessary (i.e. here SAFE_USERFAULTFD() check. In that case the benefit
> > would be 1) documentation of dependencies for testers in the test catalog 2)
> > check earlier that before running test code. And of course disadvantage to
> > really drag kconfig dependency, but we have accepted that already.

> > Ideally we'd decide on some policy (which may also includes .needs_drivers).
> > @all I planned to reword my original policy patch [1] to Li's suggestion +
> > Cyril's kconfig changes [2], but that still does not have "use kconfig to
> > document dependencies".

> I think that we can get rid of needs_drivers if we add more runtime
> checks.

> We have needs_drivers in:

> - kvm tests -> CONFIG_KVM + runtime check for kvm module
Maybe some of KVM might be more specific.

> - zram tests -> CONFIG_ZRAM + runtime check for zram module
> - squasfs tests -> CONFIG_SQUASHFS + runtime check for squashfs module
> - setxattr02 -> CONFIG_BLK_DEV_RAM + runtime check for brd module
> - ioctl08 -> has both filesystems and needs_drivers set to btrfs
>              likely we do not need the needs_drivers there
> - ioctl_loop tests -> CONFIG_BLK_DEV_LOOP + runtime check for loop module
> - madvise11 -> CONFIG_HWPOISON_INJECT + runtime check for hwpoison_inject module
> - quotactl tests -> CONFIG_QUOTA_V2 + runtime check for quota_v2 module
And quota_remount_test01.sh shell test.

> - uinput tests -> CONFIG_BLK_DEV_LOOP + CONFIG_TUN + CONFIG_INPUT_UINPUT
> - can tests -> CONFIG_CAN_VCAN + CONFIG_CAN_RAW + CONFIG_CAN_BCM

FYI a bit more, just few of them, but fortunately all for have config.
I'd be surprised if there was a kernel module without it.

testcases/cve/tcindex01.c dummy -> CONFIG_DUMMY

shell has more tests (fortunately already supports $TST_NEEDS_KCONFIGS):
tst_net.sh (if using nets) netns_lib.sh: veth -> CONFIG_VETH
binfmt_misc_lib.sh: binfmt_misc -> CONFIG_BINFMT_MISC + runtime check for binfmt_misc module
+ many more

> If we agree that we want to switch from needs_drivers to needs_kconfig +
> runtime checks I will add mappings from congfigs to module names into
> tst_kconfig and convert the tests..

+1

Kind regards,
Petr


More information about the ltp mailing list