clamav/unit_tests
Valerie Snyder ed3e1e55f6
Added additional ex_scan_callbacks test and fixed a couple related bugs
Improvements to the ex_scan_callbacks.c program:
- Print the verdict enum variant names to be more explicit.
- Add the file_props callback (aka metadata JSON) with --gen-json option.
- Add a --debug option.
- Use '-' in option names instead of '_' to be consistent with other programs.
- Add option to disable allmatch, which I named --one-match. :)

Tests: Add ex_scan_callbacks test where --allmatch is disabled.
Verify that CL_VIRUS is returned when a match occurs.
I found a few bugs and inconsistencies from this test and went and fixed
them, and improved the clamav.h function comments as well.
Largely this resulted in cleanup in `cli_magic_scan()` to make sure we
don't accidentally overwrite the return code.
But it also meant making sure that callback functions which are supposed
to trust a file actually clear the evidence/verdict and don't return
CL_VIRUS.
2025-08-14 22:40:47 -04:00
..
clamscan Tests: clamscan --fips-limits for CVD loading 2025-08-14 22:40:45 -04:00
examples Added additional ex_scan_callbacks test and fixed a couple related bugs 2025-08-14 22:40:47 -04:00
input Swap clean cache from MD5 to SHA2-256 2025-08-14 21:23:30 -04:00
check_bytecode.c libclamav: scan-layer callback API functions 2025-08-14 22:39:14 -04:00
check_clamav.c FIPS & FIPS-like limits on hash algs for cryptographic uses 2025-08-14 22:39:15 -04:00
check_clamav_skip.c bb12596: Fix build issue when libcheck missing 2020-08-24 15:11:07 -07:00
check_clamd.c Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
check_disasm.c Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
check_fpu_endian.c Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
check_htmlnorm.c Record unique object-id for each layer scanned 2025-08-14 21:23:33 -04:00
check_jsnorm.c Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
check_matchers.c libclamav: scan-layer callback API functions 2025-08-14 22:39:14 -04:00
check_regex.c libclamav: scan-layer callback API functions 2025-08-14 22:39:14 -04:00
check_str.c Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
check_uniq.c Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
checks.h CMake: Add CTest support to match Autotools checks 2021-02-25 11:41:26 -08:00
clamd_test.py Tests: Remove unecessary TCP options for non-Windows ClamD tests 2025-05-01 10:45:39 -04:00
CMakeLists.txt Windows: improved support for '/' path separators 2025-07-22 16:14:22 -04:00
freshclam_test.py Tests: clamscan --fips-limits for CVD loading 2025-08-14 22:40:45 -04:00
libclamav_test.py Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
Run-GetLibs.ctest Test: fix check_clamd failure on Windows 2021-03-22 19:50:48 -07:00
sigtool_test.py Windows: improved support for '/' path separators 2025-07-22 16:14:22 -04:00
testcase.py Swap clean cache from MD5 to SHA2-256 2025-08-14 21:23:30 -04:00
valgrind.supp Valgrind: Adjust statx suppressions 2024-04-09 10:35:22 -04:00