2021-09-02 08:44:24 +03:00
|
|
|
set(TEST_SOURCES
|
|
|
|
bind-local-socket-to-symlink.cpp
|
|
|
|
bxvga-mmap-kernel-into-userspace.cpp
|
|
|
|
crash-fcntl-invalid-cmd.cpp
|
|
|
|
elf-execve-mmap-race.cpp
|
|
|
|
elf-symbolication-kernel-read-exploit.cpp
|
|
|
|
fuzz-syscalls.cpp
|
|
|
|
kill-pidtid-confusion.cpp
|
|
|
|
mmap-write-into-running-programs-executable-file.cpp
|
|
|
|
mprotect-multi-region-mprotect.cpp
|
|
|
|
munmap-multi-region-unmapping.cpp
|
|
|
|
nanosleep-race-outbuf-munmap.cpp
|
|
|
|
null-deref-close-during-select.cpp
|
|
|
|
null-deref-crash-during-pthread_join.cpp
|
|
|
|
path-resolution-race.cpp
|
|
|
|
pthread-cond-timedwait-example.cpp
|
|
|
|
setpgid-across-sessions-without-leader.cpp
|
|
|
|
stress-truncate.cpp
|
|
|
|
stress-writeread.cpp
|
|
|
|
uaf-close-while-blocked-in-read.cpp
|
|
|
|
unveil-symlinks.cpp
|
|
|
|
)
|
2020-08-01 22:18:32 +03:00
|
|
|
|
2021-04-25 08:53:23 +03:00
|
|
|
# FIXME: These tests do not use LibTest
|
2021-09-02 08:44:24 +03:00
|
|
|
foreach(source IN LISTS TEST_SOURCES)
|
|
|
|
get_filename_component(test_name "${source}" NAME_WE)
|
|
|
|
add_executable("${test_name}" "${source}")
|
|
|
|
target_link_libraries("${test_name}" LibCore)
|
|
|
|
install(TARGETS "${test_name}" RUNTIME DESTINATION usr/Tests/Kernel/Legacy)
|
2020-08-01 22:18:32 +03:00
|
|
|
endforeach()
|
|
|
|
|
2021-09-02 08:44:24 +03:00
|
|
|
set(LIBTEST_BASED_SOURCES
|
|
|
|
TestEFault.cpp
|
|
|
|
TestKernelAlarm.cpp
|
|
|
|
TestKernelFilePermissions.cpp
|
|
|
|
TestKernelPledge.cpp
|
|
|
|
TestKernelUnveil.cpp
|
|
|
|
TestMunMap.cpp
|
|
|
|
TestProcFS.cpp
|
|
|
|
)
|
2021-04-27 12:39:32 +03:00
|
|
|
|
2021-09-02 08:44:24 +03:00
|
|
|
foreach(libtest_source IN LISTS LIBTEST_BASED_SOURCES)
|
|
|
|
serenity_test("${libtest_source}" Kernel)
|
2021-04-27 12:39:32 +03:00
|
|
|
endforeach()
|
|
|
|
|
2020-08-01 22:18:32 +03:00
|
|
|
target_link_libraries(elf-execve-mmap-race LibPthread)
|
2020-08-09 11:31:18 +03:00
|
|
|
target_link_libraries(kill-pidtid-confusion LibPthread)
|
2020-08-01 22:18:32 +03:00
|
|
|
target_link_libraries(nanosleep-race-outbuf-munmap LibPthread)
|
|
|
|
target_link_libraries(null-deref-close-during-select LibPthread)
|
|
|
|
target_link_libraries(null-deref-crash-during-pthread_join LibPthread)
|
|
|
|
target_link_libraries(uaf-close-while-blocked-in-read LibPthread)
|
|
|
|
target_link_libraries(pthread-cond-timedwait-example LibPthread)
|