It sounds like you are suggesting this:
$(OUTPUT)/uffd-stress: uffd-common.c uffd-test-common.c
$(OUTPUT)/uffd-unit-tests: uffd-common.c uffd-test-common.c
$(OUTPUT)/hugepage-mremap: uffd-test-common.c
$(OUTPUT)/write_to_hugetlbfs: uffd-test-common.c
$(OUTPUT)/ksm_functional_tests: uffd-test-common.c
...approximately. Do I have that correct? I can arrange it that way
if you feel it's a better end result. (And it's better than leaving
uffd*() helpers in vm_utils, imho.)
Yes, as long as we don't link (especially) the uffd test specific globals
into non-uffd test programs I'll have no issue. Thanks.