From e1f781a21a240562ea642f07e81430d36094d11c Mon Sep 17 00:00:00 2001 From: Omkar Jadhav Date: Wed, 4 Nov 2020 22:00:56 +0530 Subject: [PATCH] [oss-fuzz] Enable msan for fuzz tests (#734) * Disable openssl as we're not using it in fuzz tests * Increase timeout in ClientStop test --- test/fuzzing/Makefile | 3 ++- test/test.cc | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/fuzzing/Makefile b/test/fuzzing/Makefile index b39a8b4..d6a3e21 100644 --- a/test/fuzzing/Makefile +++ b/test/fuzzing/Makefile @@ -19,7 +19,8 @@ all : server_fuzzer # Fuzz target, so that you can choose which $(LIB_FUZZING_ENGINE) to use. server_fuzzer : server_fuzzer.cc ../../httplib.h - $(CXX) $(CXXFLAGS) -o $@ $< -Wl,-Bstatic $(OPENSSL_SUPPORT) -Wl,-Bdynamic -ldl $(ZLIB_SUPPORT) $(LIB_FUZZING_ENGINE) -pthread +# $(CXX) $(CXXFLAGS) -o $@ $< -Wl,-Bstatic $(OPENSSL_SUPPORT) -Wl,-Bdynamic -ldl $(ZLIB_SUPPORT) $(LIB_FUZZING_ENGINE) -pthread + $(CXX) $(CXXFLAGS) -o $@ $< $(ZLIB_SUPPORT) $(LIB_FUZZING_ENGINE) -pthread zip -q -r server_fuzzer_seed_corpus.zip corpus clean: diff --git a/test/test.cc b/test/test.cc index 0543881..773cf65 100644 --- a/test/test.cc +++ b/test/test.cc @@ -1974,8 +1974,7 @@ TEST_F(ServerTest, ClientStop) { })); } - std::this_thread::sleep_for(std::chrono::seconds(1)); - + std::this_thread::sleep_for(std::chrono::seconds(2)); while (cli_.is_socket_open()) { cli_.stop(); std::this_thread::sleep_for(std::chrono::milliseconds(10));