On Tue, Jul 19, 2022 at 12:56:26PM -0700, Axel Rasmussen wrote: > We clearly want to ensure both userfaultfd(2) and /dev/userfaultfd keep > working into the future, so just run the test twice, using each > interface. > > Instead of always testing both userfaultfd(2) and /dev/userfaultfd, > let the user choose which to test. > > As with other test features, change the behavior based on a new > command line flag. Introduce the idea of "test mods", which are > generic (not specific to a test type) modifications to the behavior of > the test. This is sort of borrowed from this RFC patch series [1], but > simplified a bit. > > The benefit is, in "typical" configurations this test is somewhat slow > (say, 30sec or something). Testing both clearly doubles it, so it may > not always be desirable, as users are likely to use one or the other, > but never both, in the "real world". > > [1]: https://patchwork.kernel.org/project/linux-mm/patch/20201129004548.1619714-14-namit@xxxxxxxxxx/ > > Signed-off-by: Axel Rasmussen <axelrasmussen@xxxxxxxxxx> Acked-by: Peter Xu <peterx@xxxxxxxxxx> -- Peter Xu