Re: [PATCH v6 5/5] selftests/mm: add UFFDIO_MOVE ioctl test

From: John Hubbard
Date: Wed Dec 13 2023 - 00:52:57 EST


On 12/12/23 19:58, Muhammad Usama Anjum wrote:
...
Oh, this sounds like it would work nicely. No more "make headers"
required (hooray!). Instead, the new approach would be "selftests are
allowed to include from tools/include", and then we can just start
copying the files that we need to that location, and gradually fix up
all the selftests.
No, this wouldn't work.
* The selftests are applications which include default header files. The
application don't care from where the header files are picked up at compile
time. We should be able to build the application on normal system with
latest headers installed without any changes.
* The header files cannot be included directly as they need to be processed
first which is done by `make headers`. Here is a diff between kernel fs.h
and processed header file to be used by applications:

Well, that's not the proposal. The idea is to snapshot various uapi/ headers
into tools/include, just like what is already being done:

$ diff ./include/uapi/linux/fs.h ./tools/include/uapi/linux/fs.h
$


thanks,
--
John Hubbard
NVIDIA