diff options
author | van Hauser <vh@thc.org> | 2020-06-17 15:05:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-17 15:05:14 +0200 |
commit | 0dc9967984df3f9c250d4c27b6de1cbd4cac3eb3 (patch) | |
tree | ca6096f1d22ba87c262bdeaf57455520ef3143e2 /test | |
parent | 12bdefe00e38cdc3dd8cb028eeac325ab2e94e16 (diff) | |
parent | 889e54eab858b1928f74a8c179b32275b62f2286 (diff) | |
download | afl++-0dc9967984df3f9c250d4c27b6de1cbd4cac3eb3.tar.gz |
Merge pull request #403 from AFLplusplus/dev
push to master
Diffstat (limited to 'test')
-rwxr-xr-x | test/test.sh | 2 | ||||
-rw-r--r-- | test/unittests/unit_list.c | 4 | ||||
-rw-r--r-- | test/unittests/unit_maybe_alloc.c | 4 | ||||
-rw-r--r-- | test/unittests/unit_preallocable.c | 4 |
4 files changed, 10 insertions, 4 deletions
diff --git a/test/test.sh b/test/test.sh index 95aa6159..921e2087 100755 --- a/test/test.sh +++ b/test/test.sh @@ -1121,7 +1121,7 @@ test "1" = "`../afl-fuzz | grep -i 'without python' >/dev/null; echo $?`" && { $ECHO "$BLUE[*] Execution cmocka Unit-Tests $GREY" unset AFL_CC -make -C .. unit || "$CODE" = "1" +make -C .. unit || CODE=1 INCOMPLETE=1 : $ECHO "$GREY[*] all test cases completed.$RESET" test "$INCOMPLETE" = "0" && $ECHO "$GREEN[+] all test cases executed" diff --git a/test/unittests/unit_list.c b/test/unittests/unit_list.c index 86d4748b..4c2063b6 100644 --- a/test/unittests/unit_list.c +++ b/test/unittests/unit_list.c @@ -126,6 +126,8 @@ int main(int argc, char **argv) { }; //return cmocka_run_group_tests (tests, setup, teardown); - return cmocka_run_group_tests (tests, NULL, NULL); + __real_exit( cmocka_run_group_tests (tests, NULL, NULL) ); + // fake return for dumb compilers + return 0; } diff --git a/test/unittests/unit_maybe_alloc.c b/test/unittests/unit_maybe_alloc.c index 4e093cfe..429d38ed 100644 --- a/test/unittests/unit_maybe_alloc.c +++ b/test/unittests/unit_maybe_alloc.c @@ -156,6 +156,8 @@ int main(int argc, char **argv) { }; //return cmocka_run_group_tests (tests, setup, teardown); - return cmocka_run_group_tests (tests, NULL, NULL); + __real_exit( cmocka_run_group_tests (tests, NULL, NULL) ); + // fake return for dumb compilers + return 0; } diff --git a/test/unittests/unit_preallocable.c b/test/unittests/unit_preallocable.c index 888bb485..b0963a15 100644 --- a/test/unittests/unit_preallocable.c +++ b/test/unittests/unit_preallocable.c @@ -109,6 +109,8 @@ int main(int argc, char **argv) { }; //return cmocka_run_group_tests (tests, setup, teardown); - return cmocka_run_group_tests (tests, NULL, NULL); + __real_exit( cmocka_run_group_tests (tests, NULL, NULL) ); + // fake return for dumb compilers + return 0; } |