Instead of explicitly running the compiler, add dependencies and take
advantage of implicit rules to build only as necessary.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>
Several C programs fail to include the headers declaring all the
functions they call, resulting in warnings or errors.
After this, memfd_test.c is still missing some function declarations
but can't easily get them because of a conflict between
<linux/fcntl.h> and <sys/fcntl.h>.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>
Include the default path for INSTALL_HDR_PATH to make it less intrusive when
cross building.
Signed-off-by: Tyler Baker <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>
Use the CC variable instead of hard coding gcc. Also clean up the compiler
options by creating a CFLAGS variable.
Signed-off-by: Tyler Baker <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>
This adds a Make include file which most selftests can then include to
get the run_tests logic.
On its own this has the advantage of some reduction in repetition, and
also means the pass/fail message is defined in fewer places.
However the key advantage is it will allow us to implement install very
simply in a subsequent patch.
The default implementation just executes each program in $(TEST_PROGS).
We use a variable to hold the default implementation of $(RUN_TESTS)
because that gives us a clean way to override it if necessary, ie. using
override. The mount, memory-hotplug and mqueue tests use that to provide
a different implementation.
Tests are not run via /bin/bash, so if they are scripts they must be
executable, we add a+x to several.
Signed-off-by: Michael Ellerman <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>
Remove the dependence on x86 to run the memfd test. Verfied on 32-bit powerpc.
Signed-off-by: Pranith Kumar <[email protected]>
Reviewed-by: David Herrmann <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>
This test currently fails on 32-bit systems since we use u64 type to pass the
flags to fcntl.
This commit changes this to use 'unsigned int' type for flags to fcntl making it
work on 32-bit systems.
Signed-off-by: Pranith Kumar <[email protected]>
Reviewed-by: David Herrmann <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>
Setting SEAL_WRITE is not possible if there're pending GUP users. This
commit adds selftests for memfd+sealing that use FUSE to create pending
page-references. FUSE is very helpful here in that it allows us to delay
direct-IO operations for an arbitrary amount of time. This way, we can
force the kernel to pin pages and then run our normal selftests.
Signed-off-by: David Herrmann <[email protected]>
Acked-by: Hugh Dickins <[email protected]>
Cc: Michael Kerrisk <[email protected]>
Cc: Ryan Lortie <[email protected]>
Cc: Lennart Poettering <[email protected]>
Cc: Daniel Mack <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>