Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Mar 2021 10:27:39 GMT
From:      Alex Richardson <arichardson@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 5ccad26529e3 - stable/13 - Don't include libarchive fuzz tests by default
Message-ID:  <202103171027.12HARdJV095958@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by arichardson:

URL: https://cgit.FreeBSD.org/src/commit/?id=5ccad26529e3e9c698e1b98962e79bbe8a185901

commit 5ccad26529e3e9c698e1b98962e79bbe8a185901
Author:     Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
AuthorDate: 2021-01-25 14:03:17 +0000
Commit:     Alex Richardson <arichardson@FreeBSD.org>
CommitDate: 2021-03-17 09:54:07 +0000

    Don't include libarchive fuzz tests by default
    
    These tests are basic fuzz tests that permute input to trigger crashes
    rather than regression or unit tests. Additionally, some of them take a
    rather long time to run and should probably be run on a dedicated fuzzing
    job instead. Moreover, these simple tests use rand() instead of a real
    fuzzing tool that generates interesting inputs (e.g. LLVM libFuzzer) so are
    unlikely to find anything interesting when run in CI.
    
    This allows removing one BROKEN_TESTS case due to timeouts and speeds up
    running tests on emulated platforms such as QEMU.
    
    Reviewed By:    lwhsu, mm
    Differential Revision: https://reviews.freebsd.org/D27153
    
    (cherry picked from commit 3454fa118c41a588e2dad20614325297c989c60b)
---
 lib/libarchive/tests/Makefile | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/lib/libarchive/tests/Makefile b/lib/libarchive/tests/Makefile
index fcb22af5021a..ae78eaf70826 100644
--- a/lib/libarchive/tests/Makefile
+++ b/lib/libarchive/tests/Makefile
@@ -90,7 +90,6 @@ TESTS_SRCS= \
 	test_entry_strmode.c			\
 	test_extattr_freebsd.c			\
 	test_filter_count.c			\
-	test_fuzz.c				\
 	test_gnutar_filename_encoding.c		\
 	test_link_resolver.c			\
 	test_open_fd.c				\
@@ -303,9 +302,18 @@ TESTS_SRCS= \
 # Fails with `test_read_disk_directory_traversals.c:1094: File at has atime 886622, 1443306049 seconds ago`
 BROKEN_TESTS+=			test_read_disk_directory_traversals
 
+.if 0
+# test_fuzz.c is not a real test, but rather a simple fuzz-test using random().
+# Since this is not a regression/unit test, we don't include it by default.
+# If you would still like to include it, comment out the `.if 0`.
+TEST_SCRCS+=	test_fuzz.c
+${PACKAGE}FILES+=	test_fuzz.cab.uu
+${PACKAGE}FILES+=	test_fuzz.lzh.uu
+${PACKAGE}FILES+=	test_fuzz_1.iso.Z.uu
 # Non-deterministic failures:
 # (Times out?) [and] crashes
 BROKEN_TESTS+=			test_fuzz_rar
+.endif
 
 # https://bugs.freebsd.org/240683
 BROKEN_TESTS+=			test_write_filter_zstd
@@ -383,9 +391,6 @@ ${PACKAGE}FILES+=	test_compat_zip_7.xps.uu
 ${PACKAGE}FILES+=	test_compat_zip_8.zip.uu
 ${PACKAGE}FILES+=	test_compat_zstd_1.tar.zst.uu
 ${PACKAGE}FILES+=	test_compat_zstd_2.tar.zst.uu
-${PACKAGE}FILES+=	test_fuzz.cab.uu
-${PACKAGE}FILES+=	test_fuzz.lzh.uu
-${PACKAGE}FILES+=	test_fuzz_1.iso.Z.uu
 ${PACKAGE}FILES+=	test_pax_filename_encoding.tar.uu
 ${PACKAGE}FILES+=	test_pax_xattr_header_all.tar.uu
 ${PACKAGE}FILES+=	test_pax_xattr_header_libarchive.tar.uu



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103171027.12HARdJV095958>