Skip to content

Commit ef4e5b1

Browse files
committed
WIP: added some changes necessary for debug macro
1 parent ceb009d commit ef4e5b1

File tree

5 files changed

+6
-16
lines changed

5 files changed

+6
-16
lines changed

src/advanced_examples/custom_mutator_example_checks_test.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
#include <zlib.h>
66

77
#include "explore_me.h"
8-
9-
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
108
#include <gtest/gtest.h>
119

1210
TEST(ExploreCompressedInputChecks, HI) {
@@ -37,8 +35,6 @@ TEST(ExploreCompressedInputChecks, HO) {
3735
EXPECT_NO_THROW(ExploreCompressedInputChecks(compressed, compressedLen));
3836
}
3937

40-
#endif
41-
4238
FUZZ_TEST(const uint8_t *data, size_t size) {
4339
ExploreCompressedInputChecks(data, size);
4440
}

src/advanced_examples/structured_input_checks_test.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#include <fuzzer/FuzzedDataProvider.h>
33

44
#include "explore_me.h"
5-
6-
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
75
#include <gtest/gtest.h>
86

97
TEST(ExploreStructuredInputChecks, DeveloperTest) {
@@ -16,8 +14,6 @@ TEST(ExploreStructuredInputChecks, MaintainerTest) {
1614
EXPECT_NO_THROW(ExploreStructuredInputChecks(inputStruct));
1715
}
1816

19-
#endif
20-
2117
FUZZ_TEST(const uint8_t *data, size_t size) {
2218
FuzzedDataProvider fdp(data, size);
2319
long a = fdp.ConsumeIntegral<long>();

src/simple_examples/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
set(OPENSSL_USE_STATIC_LIBS TRUE)
22
find_package(OpenSSL REQUIRED)
33

4+
add_compile_options(-fsanitize=address,undefined)
5+
add_link_options(-fsanitize=address,undefined)
6+
47
add_library(explore_me
58
explore_me.cpp
69
utils.cpp
@@ -37,6 +40,8 @@ foreach(TestType IN ITEMS
3740

3841
add_fuzz_test(${TestType}_fuzz_test
3942
${TestType}_test.cpp
43+
TEST_FRAMEWORK
44+
GTEST
4045
)
4146

4247
target_link_libraries(${TestType}_fuzz_test

src/simple_examples/complex_checks_test.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#include <fuzzer/FuzzedDataProvider.h>
33

44
#include "explore_me.h"
5-
6-
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
75
#include <gtest/gtest.h>
86

97
TEST(ExploreComplexChecksTests, DeveloperTest) {
@@ -14,8 +12,6 @@ TEST(ExploreComplexChecksTests, MaintainerTest) {
1412
EXPECT_NO_THROW(ExploreComplexChecks(20, -10, "Maintainer"));
1513
}
1614

17-
#endif
18-
1915
FUZZ_TEST(const uint8_t *data, size_t size) {
2016
FuzzedDataProvider fdp(data, size);
2117
long a = fdp.ConsumeIntegral<long>();

src/simple_examples/simple_checks_test.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
#include <fuzzer/FuzzedDataProvider.h>
33

44
#include "explore_me.h"
5-
6-
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
75
#include <gtest/gtest.h>
86

7+
98
TEST(ExploreSimpleChecksTests, DeveloperTest) {
109
EXPECT_NO_THROW(ExploreSimpleChecks(0, 10, "Developer"));
1110
}
@@ -14,8 +13,6 @@ TEST(ExploreSimpleChecksTests, MaintainerTest) {
1413
EXPECT_NO_THROW(ExploreSimpleChecks(20, -10, "Maintainer"));
1514
}
1615

17-
#endif
18-
1916
FUZZ_TEST(const uint8_t *data, size_t size) {
2017
FuzzedDataProvider fdp(data, size);
2118
int a = fdp.ConsumeIntegral<int>();

0 commit comments

Comments
 (0)