build: run sanitizers on macos ci (#4189)

Skip three fs_event tests that time out under Thread Sanitizer.
This commit is contained in:
Ben Noordhuis 2023-10-28 15:05:42 +02:00 committed by GitHub
parent a389393ffa
commit 56fca44a4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 43 additions and 2 deletions

View File

@ -13,7 +13,7 @@ on:
- master
jobs:
sanitizers:
sanitizers-linux:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
@ -60,3 +60,38 @@ jobs:
- name: UBSAN Test
run: |
./build-ubsan/uv_run_tests_a
sanitizers-macos:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- name: Envinfo
run: npx envinfo
- name: ASAN Build
run: |
mkdir build-asan
(cd build-asan && cmake .. -DBUILD_TESTING=ON -DASAN=ON -DCMAKE_BUILD_TYPE=Debug)
cmake --build build-asan
- name: ASAN Test
run: |
./build-asan/uv_run_tests_a
- name: TSAN Build
run: |
mkdir build-tsan
(cd build-tsan && cmake .. -DBUILD_TESTING=ON -DTSAN=ON -DCMAKE_BUILD_TYPE=Release)
cmake --build build-tsan
- name: TSAN Test
run: |
./build-tsan/uv_run_tests_a
- name: UBSAN Build
run: |
mkdir build-ubsan
(cd build-ubsan && cmake .. -DBUILD_TESTING=ON -DUBSAN=ON -DCMAKE_BUILD_TYPE=Debug)
cmake --build build-ubsan
- name: UBSAN Test
run: |
./build-ubsan/uv_run_tests_a

View File

@ -405,6 +405,8 @@ TEST_IMPL(fs_event_watch_dir) {
RETURN_SKIP(NO_FS_EVENTS);
#elif defined(__MVS__)
RETURN_SKIP("Directory watching not supported on this platform.");
#elif defined(__APPLE__) && defined(__TSAN__)
RETURN_SKIP("Times out under TSAN.");
#endif
uv_loop_t* loop = uv_default_loop();
@ -443,7 +445,9 @@ TEST_IMPL(fs_event_watch_dir) {
TEST_IMPL(fs_event_watch_dir_recursive) {
#if defined(__APPLE__) || defined(_WIN32)
#if defined(__APPLE__) && defined(__TSAN__)
RETURN_SKIP("Times out under TSAN.");
#elif defined(__APPLE__) || defined(_WIN32)
uv_loop_t* loop;
int r;
uv_fs_event_t fs_event_root;
@ -946,6 +950,8 @@ TEST_IMPL(fs_event_close_in_callback) {
RETURN_SKIP(NO_FS_EVENTS);
#elif defined(__MVS__)
RETURN_SKIP("Directory watching not supported on this platform.");
#elif defined(__APPLE__) && defined(__TSAN__)
RETURN_SKIP("Times out under TSAN.");
#endif
uv_loop_t* loop;
int r;