diff --git a/CMakeLists.txt b/CMakeLists.txt index 53183fa..f572e1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.20) -project(lib_rt_check) +project(rtcheck) set(CMAKE_CTEST_ARGUMENTS "--build-and-test;${CMAKE_SOURCE_DIR};${CMAKE_BINARY_DIR};--build-generator;${CMAKE_GENERATOR};--test-command;ctest") enable_testing() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d33d2b6..1296814 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,20 +1,20 @@ #cmake_minimum_required(VERSION 3.20) -#project(lib_rt_check) +#project(rtcheck) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) #====================================== -add_library(rt_check SHARED - lib_rt_check.cpp +add_library(rtcheck SHARED + rtcheck.cpp ) -target_include_directories(rt_check +target_include_directories(rtcheck PUBLIC . ) -target_link_libraries(rt_check +target_link_libraries(rtcheck pthread dl ) \ No newline at end of file diff --git a/src/lib_rt_check.cpp b/src/rtcheck.cpp similarity index 99% rename from src/lib_rt_check.cpp rename to src/rtcheck.cpp index cd68925..aa11aab 100644 --- a/src/lib_rt_check.cpp +++ b/src/rtcheck.cpp @@ -18,7 +18,7 @@ #include #endif -#include "lib_rt_check.h" +#include "rtcheck.h" #include "interception.h" namespace rtc @@ -637,6 +637,6 @@ INTERCEPTOR(void, os_unfair_lock_lock, os_unfair_lock_t lock) __attribute__((constructor)) void init() { - printf ("Hello librt_check!\n"); + printf ("Hello rtcheck!\n"); rtc::has_initialised = true; } diff --git a/src/lib_rt_check.h b/src/rtcheck.h similarity index 100% rename from src/lib_rt_check.h rename to src/rtcheck.h diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 71989e9..0371081 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -20,7 +20,7 @@ foreach(file ${test_files}) ) target_link_libraries(${test_name} - rt_check + rtcheck ) if (${CMAKE_SYSTEM_NAME} STREQUAL Linux) diff --git a/tests/fail_calloc.cpp b/tests/fail_calloc.cpp index 6aa20d9..c310fbe 100644 --- a/tests/fail_calloc.cpp +++ b/tests/fail_calloc.cpp @@ -1,4 +1,4 @@ -#include +#include #include int main() diff --git a/tests/fail_custom_function.cpp b/tests/fail_custom_function.cpp index 867c1a5..7b2c124 100644 --- a/tests/fail_custom_function.cpp +++ b/tests/fail_custom_function.cpp @@ -1,4 +1,4 @@ -#include +#include void my_func() { diff --git a/tests/fail_false_mutex_unique_lock_uncontended.cpp b/tests/fail_false_mutex_unique_lock_uncontended.cpp index 1251ff8..b7caca7 100644 --- a/tests/fail_false_mutex_unique_lock_uncontended.cpp +++ b/tests/fail_false_mutex_unique_lock_uncontended.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include void sleep_non_realtime() { diff --git a/tests/fail_false_mutex_unique_try_lock_uncontended.cpp b/tests/fail_false_mutex_unique_try_lock_uncontended.cpp index d764e93..891d92a 100644 --- a/tests/fail_false_mutex_unique_try_lock_uncontended.cpp +++ b/tests/fail_false_mutex_unique_try_lock_uncontended.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include void sleep_non_realtime() { diff --git a/tests/fail_file_size.cpp b/tests/fail_file_size.cpp index bdca9e6..481c98e 100644 --- a/tests/fail_file_size.cpp +++ b/tests/fail_file_size.cpp @@ -1,5 +1,5 @@ #include -#include +#include int main() diff --git a/tests/fail_free.cpp b/tests/fail_free.cpp index b211104..b256a02 100644 --- a/tests/fail_free.cpp +++ b/tests/fail_free.cpp @@ -1,4 +1,4 @@ -#include +#include #include int main() diff --git a/tests/fail_large_atomic.cpp b/tests/fail_large_atomic.cpp index 3dae619..85200e3 100644 --- a/tests/fail_large_atomic.cpp +++ b/tests/fail_large_atomic.cpp @@ -1,5 +1,5 @@ #include -#include +#include struct doubles { diff --git a/tests/fail_large_function.cpp b/tests/fail_large_function.cpp index 05492d6..d9523b9 100644 --- a/tests/fail_large_function.cpp +++ b/tests/fail_large_function.cpp @@ -1,5 +1,5 @@ #include -#include +#include struct doubles { diff --git a/tests/fail_large_thread_local.cpp b/tests/fail_large_thread_local.cpp index 07b8dd7..7acd9f8 100644 --- a/tests/fail_large_thread_local.cpp +++ b/tests/fail_large_thread_local.cpp @@ -1,5 +1,5 @@ #include -#include +#include #if __APPLE__ int main() diff --git a/tests/fail_malloc.cpp b/tests/fail_malloc.cpp index 1e9d40f..0a0ab27 100644 --- a/tests/fail_malloc.cpp +++ b/tests/fail_malloc.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/tests/fail_mmap.cpp b/tests/fail_mmap.cpp index 5afd689..72f2f7d 100644 --- a/tests/fail_mmap.cpp +++ b/tests/fail_mmap.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include int main() { diff --git a/tests/fail_munmap.cpp b/tests/fail_munmap.cpp index b6b2728..2af26e9 100644 --- a/tests/fail_munmap.cpp +++ b/tests/fail_munmap.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include int main() { diff --git a/tests/fail_mutex_lock.cpp b/tests/fail_mutex_lock.cpp index 7374a36..864bc8e 100644 --- a/tests/fail_mutex_lock.cpp +++ b/tests/fail_mutex_lock.cpp @@ -1,5 +1,5 @@ #include -#include +#include int main() diff --git a/tests/fail_mutex_unique_lock_contended.cpp b/tests/fail_mutex_unique_lock_contended.cpp index 159abf6..bf727b5 100644 --- a/tests/fail_mutex_unique_lock_contended.cpp +++ b/tests/fail_mutex_unique_lock_contended.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include void sleep_non_realtime() { diff --git a/tests/fail_mutex_unique_try_lock_contended.cpp b/tests/fail_mutex_unique_try_lock_contended.cpp index 69b3c35..b326f4e 100644 --- a/tests/fail_mutex_unique_try_lock_contended.cpp +++ b/tests/fail_mutex_unique_try_lock_contended.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include void sleep_non_realtime() { diff --git a/tests/fail_mutex_unlock.cpp b/tests/fail_mutex_unlock.cpp index 10d40e1..f138a14 100644 --- a/tests/fail_mutex_unlock.cpp +++ b/tests/fail_mutex_unlock.cpp @@ -1,5 +1,5 @@ #include -#include +#include int main() diff --git a/tests/fail_nanosleep.cpp b/tests/fail_nanosleep.cpp index efccde1..9a8b645 100644 --- a/tests/fail_nanosleep.cpp +++ b/tests/fail_nanosleep.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include int main() { diff --git a/tests/fail_posix_memalign.cpp b/tests/fail_posix_memalign.cpp index f3f4b6c..d21e364 100644 --- a/tests/fail_posix_memalign.cpp +++ b/tests/fail_posix_memalign.cpp @@ -1,5 +1,5 @@ #include -#include +#include int main() { diff --git a/tests/fail_read_file.cpp b/tests/fail_read_file.cpp index dad88bc..2dcc528 100644 --- a/tests/fail_read_file.cpp +++ b/tests/fail_read_file.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include int main() diff --git a/tests/fail_realloc.cpp b/tests/fail_realloc.cpp index 2b5b360..c44c9bd 100644 --- a/tests/fail_realloc.cpp +++ b/tests/fail_realloc.cpp @@ -1,4 +1,4 @@ -#include +#include #include int main() diff --git a/tests/fail_reallocf.cpp b/tests/fail_reallocf.cpp index f99c31b..f9ccce4 100644 --- a/tests/fail_reallocf.cpp +++ b/tests/fail_reallocf.cpp @@ -1,5 +1,5 @@ #include -#include +#include int main() { diff --git a/tests/fail_shared_mutex_shared_lock_contended.cpp b/tests/fail_shared_mutex_shared_lock_contended.cpp index 528efb4..7a01187 100644 --- a/tests/fail_shared_mutex_shared_lock_contended.cpp +++ b/tests/fail_shared_mutex_shared_lock_contended.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include void sleep_non_realtime() { diff --git a/tests/fail_shared_mutex_shared_lock_uncontended.cpp b/tests/fail_shared_mutex_shared_lock_uncontended.cpp index 93326d8..248590d 100644 --- a/tests/fail_shared_mutex_shared_lock_uncontended.cpp +++ b/tests/fail_shared_mutex_shared_lock_uncontended.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include void sleep_non_realtime() { diff --git a/tests/fail_sleep.cpp b/tests/fail_sleep.cpp index cef7f3e..d4f595a 100644 --- a/tests/fail_sleep.cpp +++ b/tests/fail_sleep.cpp @@ -1,5 +1,5 @@ #include -#include +#include int main() { diff --git a/tests/fail_stdsleep.cpp b/tests/fail_stdsleep.cpp index 6947e22..6f793a2 100644 --- a/tests/fail_stdsleep.cpp +++ b/tests/fail_stdsleep.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include int main() { diff --git a/tests/fail_syscall.cpp b/tests/fail_syscall.cpp index c14fa73..2950993 100644 --- a/tests/fail_syscall.cpp +++ b/tests/fail_syscall.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include int main() diff --git a/tests/fail_thread_create.cpp b/tests/fail_thread_create.cpp index f58c621..0f2828d 100644 --- a/tests/fail_thread_create.cpp +++ b/tests/fail_thread_create.cpp @@ -1,5 +1,5 @@ #include -#include +#include int main() { diff --git a/tests/fail_thread_join.cpp b/tests/fail_thread_join.cpp index 46f6814..4807860 100644 --- a/tests/fail_thread_join.cpp +++ b/tests/fail_thread_join.cpp @@ -1,5 +1,5 @@ #include -#include +#include int main() { diff --git a/tests/fail_throw_exception.cpp b/tests/fail_throw_exception.cpp index 0e46a97..6af39bd 100644 --- a/tests/fail_throw_exception.cpp +++ b/tests/fail_throw_exception.cpp @@ -1,5 +1,5 @@ #include -#include +#include int main() { diff --git a/tests/fail_usleep.cpp b/tests/fail_usleep.cpp index 375e7d2..cf9cf20 100644 --- a/tests/fail_usleep.cpp +++ b/tests/fail_usleep.cpp @@ -1,5 +1,5 @@ #include -#include +#include int main() { diff --git a/tests/fail_valloc.cpp b/tests/fail_valloc.cpp index 1b847f7..f524f13 100644 --- a/tests/fail_valloc.cpp +++ b/tests/fail_valloc.cpp @@ -1,5 +1,5 @@ #include -#include +#include int main() { diff --git a/tests/fail_vector.cpp b/tests/fail_vector.cpp index 1c13f16..26b9f63 100644 --- a/tests/fail_vector.cpp +++ b/tests/fail_vector.cpp @@ -1,6 +1,6 @@ #include -#include +#include int main() diff --git a/tests/ignoring/pass_malloc_ignore.cpp b/tests/ignoring/pass_malloc_ignore.cpp index 654023e..554f506 100644 --- a/tests/ignoring/pass_malloc_ignore.cpp +++ b/tests/ignoring/pass_malloc_ignore.cpp @@ -1,5 +1,5 @@ #include -#include +#include int main() { diff --git a/tests/ignoring/pass_memory_ignore.cpp b/tests/ignoring/pass_memory_ignore.cpp index 109fd4f..d96bebc 100644 --- a/tests/ignoring/pass_memory_ignore.cpp +++ b/tests/ignoring/pass_memory_ignore.cpp @@ -1,5 +1,5 @@ #include -#include +#include int main() { diff --git a/tests/pass_nothrow_exception.cpp b/tests/pass_nothrow_exception.cpp index 3c68109..e43a999 100644 --- a/tests/pass_nothrow_exception.cpp +++ b/tests/pass_nothrow_exception.cpp @@ -1,5 +1,5 @@ #include -#include +#include int main() { diff --git a/tests/pass_small_atomic.cpp b/tests/pass_small_atomic.cpp index cfe6c0f..b1eaf75 100644 --- a/tests/pass_small_atomic.cpp +++ b/tests/pass_small_atomic.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include int main() diff --git a/tests/pass_small_function.cpp b/tests/pass_small_function.cpp index e06e88b..52fc4a0 100644 --- a/tests/pass_small_function.cpp +++ b/tests/pass_small_function.cpp @@ -1,5 +1,5 @@ #include -#include +#include struct doubles {