From 9815ca0338b47c6ea4e82f2fbd39d70e3456aca1 Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Thu, 24 Oct 2019 21:05:38 +0330 Subject: [PATCH] [ci] Use custom subset fuzzer timeout for failing sanitizer bots --- .circleci/config.yml | 8 ++++---- test/fuzzing/run-shape-fuzzer-tests.py | 3 ++- test/fuzzing/run-subset-fuzzer-tests.py | 3 ++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 045171fee..1610d8d3e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,7 +4,7 @@ jobs: macos-10.12.6-aat-fonts: macos: - xcode: "9.2.0" + xcode: "9.0.1" steps: - checkout - run: HOMEBREW_NO_AUTO_UPDATE=1 brew install wget autoconf automake libtool pkg-config ragel freetype glib cairo @@ -113,7 +113,7 @@ jobs: - run: make -j32 # run-shape-fuzzer-tests.py automatically runs valgrind if see available # but test/api runs it by request, we probably should normalize the approaches - - run: RUN_VALGRIND=1 make check && make -Ctest/api check-valgrind || .ci/fail.sh + - run: HB_TEST_SHAPE_FUZZER_TIMEOUT=3 HB_TEST_SUBSET_FUZZER_TIMEOUT=30 RUN_VALGRIND=1 make check && make -Ctest/api check-valgrind || .ci/fail.sh # informational for now - run: make -Ctest/api check-symbols || true @@ -165,7 +165,7 @@ jobs: - run: wget https://ftp.gnome.org/pub/gnome/sources/glib/2.58/glib-2.58.1.tar.xz && tar xf glib-2.58.1.tar.xz && cd glib-2.58.1 && ./autogen.sh --with-pcre CPPFLAGS="-fsanitize=memory" LDFLAGS="-fsanitize=memory" CFLAGS="-fsanitize=memory" CXXFLAGS="-fsanitize=memory" LD=ld.lld CC=clang CXX=clang++ && make -j32 && make install && cd .. - run: wget http://download.savannah.gnu.org/releases/freetype/freetype-2.9.tar.bz2 && tar xf freetype-2.9.tar.bz2 && cd freetype-2.9 && ./autogen.sh && ./configure CPPFLAGS="-fsanitize=memory" LDFLAGS="-fsanitize=memory -O1 -g -fno-omit-frame-pointer" CFLAGS="-fsanitize=memory -O1 -g -fno-omit-frame-pointer" CXXFLAGS="-fsanitize=memory -O1 -g -fno-omit-frame-pointer" LD=ld.lld CC=clang CXX=clang++ && make -j32 && make install && cd .. - run: CPPFLAGS="-fsanitize=memory -fsanitize-memory-track-origins" LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins -O1 -g -fno-omit-frame-pointer" CFLAGS="-fsanitize=memory -fsanitize-memory-track-origins -O1 -g -fno-omit-frame-pointer" CXXFLAGS="-fsanitize=memory -fsanitize-memory-track-origins -O1 -g -fno-omit-frame-pointer" LD=ld.lld CC=clang CXX=clang++ ./autogen.sh --with-freetype --with-glib --without-icu - - run: make -j32 && MSAN_OPTIONS=exitcode=42 make check || .ci/fail.sh | asan_symbolize | c++filt + - run: make -j32 && MSAN_OPTIONS=exitcode=42 HB_TEST_SUBSET_FUZZER_TIMEOUT=12 make check || .ci/fail.sh | asan_symbolize | c++filt clang-tsan: docker: @@ -181,7 +181,7 @@ jobs: - run: pip install fonttools - run: CPPFLAGS="-fsanitize=thread" LDFLAGS="-fsanitize=thread -O1 -g -fno-omit-frame-pointer" CFLAGS="-fsanitize=thread -O1 -g -fno-omit-frame-pointer" CXXFLAGS="-fsanitize=thread -O1 -g -fno-omit-frame-pointer" LD=ld.lld CC=clang CXX=clang++ ./autogen.sh --with-freetype --with-glib --with-cairo --with-icu --with-graphite2 - run: make -j32 - - run: make check || .ci/fail.sh | asan_symbolize | c++filt + - run: HB_TEST_SUBSET_FUZZER_TIMEOUT=40 make check || .ci/fail.sh | asan_symbolize | c++filt clang-ubsan: docker: diff --git a/test/fuzzing/run-shape-fuzzer-tests.py b/test/fuzzing/run-shape-fuzzer-tests.py index a2f8b5c97..94fc877d1 100755 --- a/test/fuzzing/run-shape-fuzzer-tests.py +++ b/test/fuzzing/run-shape-fuzzer-tests.py @@ -33,7 +33,8 @@ def cmd (command): def timeout (p, is_killed): is_killed['value'] = True p.kill () - timer = threading.Timer (2, timeout, [p, is_killed]) + timeout_seconds = int (os.environ.get ("HB_TEST_SHAPE_FUZZER_TIMEOUT", "2")) + timer = threading.Timer (timeout_seconds, timeout, [p, is_killed]) try: timer.start() diff --git a/test/fuzzing/run-subset-fuzzer-tests.py b/test/fuzzing/run-subset-fuzzer-tests.py index 297398ce3..f290e6e6e 100755 --- a/test/fuzzing/run-subset-fuzzer-tests.py +++ b/test/fuzzing/run-subset-fuzzer-tests.py @@ -33,7 +33,8 @@ def cmd(command): def timeout(p, is_killed): is_killed['value'] = True p.kill() - timer = threading.Timer (16, timeout, [p, is_killed]) + timeout_seconds = int (os.environ.get ("HB_TEST_SUBSET_FUZZER_TIMEOUT", "8")) + timer = threading.Timer (timeout_seconds, timeout, [p, is_killed]) try: timer.start()