Hi Andrew! On 7/16/26 6:02 PM, Sarthak Sharma wrote: > gup_test.c currently serves two distinct purposes: microbenchmarking > (GUP_FAST_BENCHMARK, PIN_FAST_BENCHMARK, PIN_LONGTERM_BENCHMARK) and > functional correctness testing (GUP_BASIC_TEST, PIN_BASIC_TEST, > DUMP_USER_PAGES_TEST). Mixing these in a single binary means that > functional tests cannot be run or reported individually, and > run_vmtests.sh must invoke the binary multiple times with different flag > combinations to cover all configurations. > > This series separates the two concerns: tools/mm/gup_bench handles > benchmarking, while tools/testing/selftests/mm/gup_test handles functional > testing. To avoid duplicating the HugeTLB and related file helpers, the > series first prepares the existing helpers for sharing, then moves the > common code to tools/lib/mm/ for use by both selftests and tools/mm. >
I went through Sashiko's review on this patchset [1]. There are two concerns that it raises: 1. Patch 4: gup_thread() does not print an error when the ioctl() fails. This is a valid point and it would be helpful to print it, but it is not a functional bug. 2. Patch 5: This concern is a false positive. ksefltest_harness keeps fixture teardown disabled while FIXTURE_SETUP() is running and enables it only when setup succeeds. Therefore, FIXTURE_TEARDOWN() won't run if setup fails. I'll wait for people to review this patchset and if nothing else comes up, I can send a fixup for the first concern. If there are other things to address, I can include everything in a v6. Please let me know if you require a different approach. [1] https://sashiko.dev/#/patchset/20260716123226.197736-1-sarthak.sharma%40arm.com

