Start testing: Mar 06 17:41 UTC ---------------------------------------------------------- 6/6 Testing: sigtool 6/6 Test: sigtool Command: "/var/tmp/portage/app-antivirus/clamav-1.0.1/temp/python3.11/bin/python3" "-m" "pytest" "-v" "sigtool_test.py" Directory: /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/unit_tests "sigtool" start time: Mar 06 17:41 UTC Output: ---------------------------------------------------------- ============================= test session starts ============================== platform linux -- Python 3.11.2, pytest-7.2.2, pluggy-1.0.0 -- /usr/bin/python3.11 cachedir: .pytest_cache rootdir: /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/unit_tests collecting ... collected 1 item sigtool_test.py::TC::test_sigtool_00_version PASSED [100%] ============================== 1 passed in 0.06s =============================== Test time = 0.69 sec ---------------------------------------------------------- Test Passed. "sigtool" end time: Mar 06 17:41 UTC "sigtool" time elapsed: 00:00:00 ---------------------------------------------------------- 3/6 Testing: clamscan 3/6 Test: clamscan Command: "/var/tmp/portage/app-antivirus/clamav-1.0.1/temp/python3.11/bin/python3" "-m" "pytest" "-v" "clamscan" Directory: /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/unit_tests "clamscan" start time: Mar 06 17:41 UTC Output: ---------------------------------------------------------- ============================= test session starts ============================== platform linux -- Python 3.11.2, pytest-7.2.2, pluggy-1.0.0 -- /usr/bin/python3.11 cachedir: .pytest_cache rootdir: /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/unit_tests collecting ... collected 49 items clamscan/_basic_test.py::TC::test_00_version PASSED [ 2%] clamscan/_basic_test.py::TC::test_01_all_testfiles PASSED [ 4%] clamscan/_basic_test.py::TC::test_02_all_testfiles_ign2 PASSED [ 6%] clamscan/allmatch_test.py::TC::test_exe_imphash_plus_zipsfx PASSED [ 8%] clamscan/allmatch_test.py::TC::test_exe_pattern_plus_zipsfx PASSED [ 10%] clamscan/allmatch_test.py::TC::test_many_sigs PASSED [ 12%] clamscan/allmatch_test.py::TC::test_many_sigs_no_allmatch PASSED [ 14%] clamscan/allmatch_test.py::TC::test_pe_allmatch PASSED [ 16%] clamscan/allmatch_test.py::TC::test_regression_cbc_and_ndb PASSED [ 18%] clamscan/allmatch_test.py::TC::test_regression_imphash_nosize PASSED [ 20%] clamscan/allmatch_test.py::TC::test_txt_plus_clam_zipsfx PASSED [ 22%] clamscan/assorted_test.py::TC::test_00_version PASSED [ 24%] clamscan/assorted_test.py::TC::test_pe_cert_block PASSED [ 26%] clamscan/assorted_test.py::TC::test_pe_cert_trust PASSED [ 28%] clamscan/assorted_test.py::TC::test_weak_indicator_icon PASSED [ 30%] clamscan/bytecode_test.py::TC::test_pdf_hook PASSED [ 32%] clamscan/container_sigs_test.py::TC::test_clamscan_container_cache PASSED [ 34%] clamscan/container_sigs_test.py::TC::test_container PASSED [ 36%] clamscan/container_sigs_test.py::TC::test_intermediates PASSED [ 38%] clamscan/container_sigs_test.py::TC::test_intermediates_cache PASSED [ 40%] clamscan/fp_check_test.py::TC::test_alerts_on_normalized PASSED [ 42%] clamscan/fp_check_test.py::TC::test_alerts_on_zip PASSED [ 44%] clamscan/fp_check_test.py::TC::test_fp_for_nonnormalized PASSED [ 46%] clamscan/fp_check_test.py::TC::test_fp_for_nonnormalized_wild PASSED [ 48%] clamscan/fp_check_test.py::TC::test_fp_for_normalized PASSED [ 51%] clamscan/fp_check_test.py::TC::test_fp_for_normalized_wild PASSED [ 53%] clamscan/fp_check_test.py::TC::test_fp_for_zipped_file PASSED [ 55%] clamscan/fp_check_test.py::TC::test_fp_for_zipped_file_wild PASSED [ 57%] clamscan/fuzzy_img_hash_test.py::TC::test_sigs_bad_algorithm PASSED [ 59%] clamscan/fuzzy_img_hash_test.py::TC::test_sigs_bad_hamming PASSED [ 61%] clamscan/fuzzy_img_hash_test.py::TC::test_sigs_bad_hash PASSED [ 63%] clamscan/fuzzy_img_hash_test.py::TC::test_sigs_good_allmatch PASSED [ 65%] clamscan/heuristics_test.py::TC::test_allmatch PASSED [ 67%] clamscan/heuristics_test.py::TC::test_allmatch_precedence PASSED [ 69%] clamscan/heuristics_test.py::TC::test_hidden_by_strong_indicator PASSED [ 71%] clamscan/heuristics_test.py::TC::test_only_heur PASSED [ 73%] clamscan/heuristics_test.py::TC::test_precedence PASSED [ 75%] clamscan/image_extraction_test.py::TC::test_xls_jpeg_png PASSED [ 77%] clamscan/image_extraction_test.py::TC::test_xls_with_detection PASSED [ 79%] clamscan/match_offsets_test.py::TC::test_LDB_VI PASSED [ 81%] clamscan/match_offsets_test.py::TC::test_yara_at_offset PASSED [ 83%] clamscan/match_offsets_test.py::TC::test_yara_in_range PASSED [ 85%] clamscan/phishing_test.py::TC::test_not_enabled PASSED [ 87%] clamscan/phishing_test.py::TC::test_ssl_and_cloak PASSED [ 89%] clamscan/regex_test.py::TC::test_ldb_multi_pcre PASSED [ 91%] clamscan/regex_test.py::TC::test_ldb_offset_pcre PASSED [ 93%] clamscan/regex_test.py::TC::test_pcre_flag PASSED [ 95%] clamscan/regex_test.py::TC::test_slash_colon PASSED [ 97%] clamscan/regex_test.py::TC::test_yara PASSED [100%] ============================== 49 passed in 3.49s ============================== Test time = 4.13 sec ---------------------------------------------------------- Test Passed. "clamscan" end time: Mar 06 17:41 UTC "clamscan" time elapsed: 00:00:04 ---------------------------------------------------------- 1/6 Testing: libclamav 1/6 Test: libclamav Command: "/var/tmp/portage/app-antivirus/clamav-1.0.1/temp/python3.11/bin/python3" "-m" "pytest" "-v" "libclamav_test.py" Directory: /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/unit_tests "libclamav" start time: Mar 06 17:41 UTC Output: ---------------------------------------------------------- ============================= test session starts ============================== platform linux -- Python 3.11.2, pytest-7.2.2, pluggy-1.0.0 -- /usr/bin/python3.11 cachedir: .pytest_cache rootdir: /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/unit_tests collecting ... collected 1 item libclamav_test.py::TC::test_libclamav_00_unit_test PASSED [100%] ============================== 1 passed in 6.06s =============================== Test time = 6.68 sec ---------------------------------------------------------- Test Passed. "libclamav" end time: Mar 06 17:41 UTC "libclamav" time elapsed: 00:00:06 ---------------------------------------------------------- 4/6 Testing: clamd 4/6 Test: clamd Command: "/var/tmp/portage/app-antivirus/clamav-1.0.1/temp/python3.11/bin/python3" "-m" "pytest" "-v" "clamd_test.py" Directory: /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/unit_tests "clamd" start time: Mar 06 17:41 UTC Output: ---------------------------------------------------------- ============================= test session starts ============================== platform linux -- Python 3.11.2, pytest-7.2.2, pluggy-1.0.0 -- /usr/bin/python3.11 cachedir: .pytest_cache rootdir: /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/unit_tests collecting ... collected 11 items clamd_test.py::TC::test_clamd_00_version PASSED [ 9%] clamd_test.py::TC::test_clamd_01_ping_pong PASSED [ 18%] clamd_test.py::TC::test_clamd_02_clamdscan_version PASSED [ 27%] clamd_test.py::TC::test_clamd_03_reload PASSED [ 36%] clamd_test.py::TC::test_clamd_04_all_testfiles PASSED [ 45%] clamd_test.py::TC::test_clamd_05_check_clamd PASSED [ 54%] clamd_test.py::TC::test_clamd_06_HeuristicScanPrecedence_off PASSED [ 63%] clamd_test.py::TC::test_clamd_07_HeuristicScanPrecedence_on PASSED [ 72%] clamd_test.py::TC::test_clamd_08_VirusEvent PASSED [ 81%] clamd_test.py::TC::test_clamd_09_clamdscan_ExcludePath PASSED [ 90%] clamd_test.py::TC::test_clamd_10_allmatch_not_sticky PASSED [100%] ============================= 11 passed in 10.76s ============================== Test time = 11.38 sec ---------------------------------------------------------- Test Passed. "clamd" end time: Mar 06 17:42 UTC "clamd" time elapsed: 00:00:11 ---------------------------------------------------------- 2/6 Testing: libclamav_rust 2/6 Test: libclamav_rust Command: "/usr/bin/cmake" "-E" "env" "CARGO_CMD=test" "CARGO_TARGET_DIR=/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build" "RUSTFLAGS=-g" "/usr/bin/cargo" "test" "--target" "x86_64-unknown-linux-musl" "--release" "--target-dir" "/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build" "--color" "always" Directory: /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/libclamav_rust "libclamav_rust" start time: Mar 06 17:41 UTC Output: ----------------------------------------------------------  Fresh autocfg v1.1.0  Fresh unicode-ident v1.0.6  Fresh scopeguard v1.1.0  Fresh version_check v0.9.4  Fresh cfg-if v1.0.0  Fresh glob v0.3.1  Fresh proc-macro2 v1.0.51  Fresh libc v0.2.139  Fresh num-traits v0.2.15  Fresh memchr v2.5.0  Fresh crossbeam-utils v0.8.14  Fresh memoffset v0.7.1  Fresh unicode-width v0.1.10  Fresh quote v1.0.23  Fresh num_cpus v1.15.0  Fresh crossbeam-epoch v0.9.13  Fresh atty v0.2.14  Fresh num-integer v0.1.45  Fresh adler v1.0.2  Fresh typenum v1.16.0  Fresh aho-corasick v0.7.20  Fresh crossbeam-channel v0.5.6  Fresh textwrap v0.11.0  Fresh syn v1.0.107  Fresh crossbeam-deque v0.8.2  Fresh miniz_oxide v0.6.2  Fresh ansi_term v0.12.1  Fresh vec_map v0.8.2  Fresh strsim v0.8.0  Fresh minimal-lexical v0.2.1  Fresh regex-syntax v0.6.28  Fresh crc32fast v1.3.2  Fresh lock_api v0.4.9  Fresh generic-array v0.14.6  Fresh getrandom v0.2.8  Fresh serde_derive v1.0.152  Fresh regex v1.7.1  Fresh nom v7.1.3  Fresh pin-project-internal v1.0.12  Fresh clap v2.34.0  Fresh rayon-core v1.10.2  Fresh libloading v0.7.4  Fresh ryu v1.0.12  Fresh humantime v2.1.0  Fresh itoa v1.0.5  Fresh serde v1.0.152  Fresh either v1.8.1  Fresh unicode-segmentation v1.10.1  Fresh hashbrown v0.12.3  Fresh termcolor v1.2.0  Fresh futures-core v0.3.26  Fresh which v4.4.0  Fresh pin-project v1.0.12  Fresh clang-sys v1.4.0  Fresh cexpr v0.6.0  Fresh spin v0.9.5  Fresh flate2 v1.0.25  Fresh nanorand v0.7.0  Fresh toml v0.5.11  Fresh serde_json v1.0.93  Fresh rayon v1.6.1  Fresh env_logger v0.9.3  Fresh heck v0.3.3  Fresh indexmap v1.9.2  Fresh lazycell v1.3.0  Fresh simd-adler32 v0.3.4  Fresh shlex v1.1.0  Fresh strength_reduce v0.2.4  Fresh weezl v0.1.7  Fresh rustc-hash v1.1.0  Fresh lazy_static v1.4.0  Fresh futures-sink v0.3.26  Fresh peeking_take_while v0.1.2  Fresh jpeg-decoder v0.3.0  Fresh cbindgen v0.20.0  Fresh zune-inflate v0.2.50  Fresh transpose v0.2.2  Fresh crypto-common v0.1.6  Fresh block-buffer v0.10.3  Fresh threadpool v1.8.1  Fresh primal-check v0.3.3  Fresh num-complex v0.4.3  Fresh color_quant v1.1.0  Fresh bit_field v0.10.1  Fresh flume v0.10.14  Fresh bindgen v0.59.2  Fresh bitflags v1.3.2  Fresh smallvec v1.10.0  Fresh half v2.2.1  Fresh lebe v0.5.2  Fresh num-rational v0.4.1  Fresh tiff v0.8.1  Fresh rustfft v6.1.0  Fresh digest v0.10.6  Fresh gif v0.11.4  Fresh thiserror-impl v1.0.38  Fresh byteorder v1.4.3  Fresh scoped_threadpool v0.1.9  Fresh png v0.17.7  Fresh exr v1.5.3  Fresh bytemuck v1.13.0  Fresh cpufeatures v0.2.5  Fresh remove_dir_all v0.5.3  Fresh fastrand v1.9.0  Fresh log v0.4.17  Fresh rustdct v0.7.1  Fresh hex v0.4.3  Fresh image v0.24.5  Fresh thiserror v1.0.38  Compiling clamav_rust v0.0.1 (/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/libclamav_rust)  Fresh sha2 v0.10.6  Fresh tempfile v3.3.0  Running `/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/release/build/clamav_rust-d555a34566608949/build-script-build`  Running `rustc --crate-name clamav_rust --edition=2018 libclamav_rust/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --emit=dep-info,link -C opt-level=3 -C embed-bitcode=no --test -C metadata=69cfeef03c908b24 -C extra-filename=-69cfeef03c908b24 --out-dir /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/x86_64-unknown-linux-musl/release/deps --target x86_64-unknown-linux-musl -L dependency=/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/x86_64-unknown-linux-musl/release/deps -L dependency=/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/release/deps --extern flate2=/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/x86_64-unknown-linux-musl/release/deps/libflate2-e3cb501cd9d9e49e.rlib --extern hex=/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/x86_64-unknown-linux-musl/release/deps/libhex-face828ba201ffdb.rlib --extern image=/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/x86_64-unknown-linux-musl/release/deps/libimage-8f25b0ff70a371b1.rlib --extern libc=/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/x86_64-unknown-linux-musl/release/deps/liblibc-84352971f39f27e9.rlib --extern log=/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/x86_64-unknown-linux-musl/release/deps/liblog-623f406f1382fe49.rlib --extern num_traits=/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/x86_64-unknown-linux-musl/release/deps/libnum_traits-edcedc79b8a3fbdf.rlib --extern rustdct=/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/x86_64-unknown-linux-musl/release/deps/librustdct-e177527e02047260.rlib --extern sha2=/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/x86_64-unknown-linux-musl/release/deps/libsha2-c35d86e39f41b95f.rlib --extern tempfile=/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/x86_64-unknown-linux-musl/release/deps/libtempfile-c85538ada141e4ca.rlib --extern thiserror=/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/x86_64-unknown-linux-musl/release/deps/libthiserror-a225b8d8db5bc8f7.rlib --extern transpose=/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/x86_64-unknown-linux-musl/release/deps/libtranspose-e7af69b5a5ce529f.rlib -g -L /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/libclamav -L /usr/lib -L /usr/lib -L /usr/lib -L /usr/lib -L /usr/lib -L /usr/lib -L /usr/lib -L /usr/lib -L /usr/lib -l clamav -l ssl -l crypto -l z -l bz2 -l pcre2-8 -l xml2 -l curl -l json-c -l mspack -l stdc++`  Finished release [optimized] target(s) in 32.02s  Running `/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/x86_64-unknown-linux-musl/release/deps/clamav_rust-69cfeef03c908b24` running 18 tests test cdiff::tests::parse_move_fail_eof ... ok test cdiff::tests::parse_move_fail_int ... ok test cdiff::tests::parse_move_works ... ok test cdiff::tests::script2cdiff_missing_hyphen ... ok test ffi_util::tests::basic ... ok test ffi_util::tests::size ... ok test logging::tests::parse_move_works ... ok test cdiff::tests::delete_out_of_bounds ... ok test cdiff::tests::add_delete_exchange ... ok test cdiff::tests::exchange_out_of_bounds ... ok test cdiff::tests::exchange_last_line ... ok test cdiff::tests::delete_first_line ... ok test cdiff::tests::delete_last_line ... ok test cdiff::tests::delete_line_not_match ... ok test cdiff::tests::delete_second_line ... ok test cdiff::tests::exchange_second_line ... ok test cdiff::tests::exchange_first_line ... ok test cdiff::tests::move_db ... ok test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Test time = 32.05 sec ---------------------------------------------------------- Test Passed. "libclamav_rust" end time: Mar 06 17:42 UTC "libclamav_rust" time elapsed: 00:00:32 ---------------------------------------------------------- 5/6 Testing: freshclam 5/6 Test: freshclam Command: "/var/tmp/portage/app-antivirus/clamav-1.0.1/temp/python3.11/bin/python3" "-m" "pytest" "-v" "freshclam_test.py" Directory: /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/unit_tests "freshclam" start time: Mar 06 17:41 UTC Output: ---------------------------------------------------------- ============================= test session starts ============================== platform linux -- Python 3.11.2, pytest-7.2.2, pluggy-1.0.0 -- /usr/bin/python3.11 cachedir: .pytest_cache rootdir: /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/unit_tests collecting ... collected 11 items freshclam_test.py::TC::test_freshclam_00_version PASSED [ 9%] freshclam_test.py::TC::test_freshclam_01_file_copy PASSED [ 18%] freshclam_test.py::TC::test_freshclam_02_http_403 FAILED [ 27%] freshclam_test.py::TC::test_freshclam_03_http_403_daemonized FAILED [ 36%] freshclam_test.py::TC::test_freshclam_04_http_429 FAILED [ 45%] freshclam_test.py::TC::test_freshclam_05_cdiff_update FAILED [ 54%] freshclam_test.py::TC::test_freshclam_05_cdiff_update_UNC SKIPPED (T...) [ 63%] freshclam_test.py::TC::test_freshclam_06_cdiff_partial_minus_1 FAILED [ 72%] freshclam_test.py::TC::test_freshclam_07_cdiff_partial_minus_2 FAILED [ 81%] freshclam_test.py::TC::test_freshclam_07_no_cdiff_out_of_date_cvd FAILED [ 90%] freshclam_test.py::TC::test_freshclam_08_cdiff_update_twice FAILED [100%] =================================== FAILURES =================================== ________________________ TC.test_freshclam_02_http_403 _________________________ self = def test_freshclam_02_http_403(self): self.step_name('Verify correct behavior when receiving 403 (forbidden)') # Start our mock database mirror. TC.mock_mirror = Process(target=mock_database_mirror, args=(WebServerHandler_02,)) TC.mock_mirror.start() if TC.freshclam_config.exists(): os.remove(str(TC.freshclam_config)) TC.freshclam_config.write_text(''' DatabaseMirror http://localhost:{port} DNSDatabaseInfo no PidFile {freshclam_pid} LogVerbose yes LogFileMaxSize 0 LogTime yes DatabaseDirectory {path_db} DatabaseOwner {user} '''.format( freshclam_pid=TC.freshclam_pid, path_db=TC.path_db, port=TC.mock_mirror_port, user=getpass.getuser(), )) command = '{valgrind} {valgrind_args} {freshclam} --config-file={freshclam_config} --update-db=daily'.format( valgrind=TC.valgrind, valgrind_args=TC.valgrind_args, freshclam=TC.freshclam, freshclam_config=TC.freshclam_config ) output = self.execute_command(command) > assert output.ec == 17 # forbidden E assert 11 == 17 E + where 11 = CmdResult(ec=11, out='Mon Mar 6 17:41:51 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/\nMon Mar 6 17:41:51 2023 -> Can\'t open freshclam.dat in /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database\nMon Mar 6 17:41:51 2023 -> It probably doesn\'t exist yet. That\'s ok.\nMon Mar 6 17:41:51 2023 -> Failed to load freshclam.dat; will create a new freshclam.dat\nMon Mar 6 17:41:51 2023 -> Creating new freshclam.dat\nMon Mar 6 17:41:51 2023 -> Saved freshclam.dat\nMon Mar 6 17:41:51 2023 -> ClamAV update process started at Mon Mar 6 17:41:51 2023\nMon Mar 6 17:41:51 2023 -> Querying no\nMon Mar 6 17:41:51 2023 -> ^Can\'t query no\nMon Mar 6 17:41:51 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/\nMon Mar 6 17:41:51 2023 -> check_for_new_database_version: No local copy of "daily" database.\nMon Mar 6 17:41:51 2023 -> Trying to retrieve CVD header from http://localhost:8001/daily.cvd\n* Trying 127.0.0.1:8001...\n* Connected to localhost (...ost:8001/daily.cvd\nWARNING: Mon Mar 6 17:41:51 2023 -> Failed to get daily database version information from server: http://localhost:8001\nERROR: Mon Mar 6 17:41:51 2023 -> check_for_new_database_version: Failed to find daily database using server http://localhost:8001.\nWARNING: Mon Mar 6 17:41:56 2023 -> remote_cvdhead: file not found: http://localhost:8001/daily.cvd\nWARNING: Mon Mar 6 17:41:56 2023 -> Failed to get daily database version information from server: http://localhost:8001\nERROR: Mon Mar 6 17:41:56 2023 -> check_for_new_database_version: Failed to find daily database using server http://localhost:8001.\nWARNING: Mon Mar 6 17:42:02 2023 -> remote_cvdhead: file not found: http://localhost:8001/daily.cvd\nWARNING: Mon Mar 6 17:42:02 2023 -> Failed to get daily database version information from server: http://localhost:8001\nERROR: Mon Mar 6 17:42:02 2023 -> check_for_new_database_version: Failed to find daily database using server http://localhost:8001.\nERROR: Mon Mar 6 17:42:02 2023 -> Update failed for database: daily\nERROR: Mon Mar 6 17:42:02 2023 -> Database update process failed: HTTP GET failed\nERROR: Mon Mar 6 17:42:02 2023 -> Update failed.\n').ec /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/unit_tests/freshclam_test.py:182: AssertionError ----------------------------- Captured stdout call ----------------------------- [INFO]: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [INFO]: Verify correct behavior when receiving 403 (forbidden) [INFO]: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [DEBUG]: Run command: /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/freshclam/freshclam --config-file=/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/freshclam-test.conf --update-db=daily [DEBUG]: Exit code: 11 [DEBUG]: stdout: Mon Mar 6 17:41:51 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/ Mon Mar 6 17:41:51 2023 -> Can't open freshclam.dat in /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database Mon Mar 6 17:41:51 2023 -> It probably doesn't exist yet. That's ok. Mon Mar 6 17:41:51 2023 -> Failed to load freshclam.dat; will create a new freshclam.dat Mon Mar 6 17:41:51 2023 -> Creating new freshclam.dat Mon Mar 6 17:41:51 2023 -> Saved freshclam.dat Mon Mar 6 17:41:51 2023 -> ClamAV update process started at Mon Mar 6 17:41:51 2023 Mon Mar 6 17:41:51 2023 -> Querying no Mon Mar 6 17:41:51 2023 -> ^Can't query no Mon Mar 6 17:41:51 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/ Mon Mar 6 17:41:51 2023 -> check_for_new_database_version: No local copy of "daily" database. Mon Mar 6 17:41:51 2023 -> Trying to retrieve CVD header from http://localhost:8001/daily.cvd * Trying 127.0.0.1:8001... * Connected to localhost (127.0.0.1) port 8001 (#0) > GET /daily.cvd HTTP/1.1 Host: localhost:8001 Range: bytes=0-511 User-Agent: ClamAV/1.0.1 (OS: Linux, ARCH: x86_64, CPU: x86_64, UUID: a47e9f72-015e-46a4-9298-fc59c7e6e700) Accept: */* Connection: close < HTTP/1.1 404 NOT FOUND < Server: Werkzeug/2.2.2 Python/3.10.9 < Date: Mon, 06 Mar 2023 17:41:51 GMT < Content-Type: text/html; charset=utf-8 < Content-Length: 207 < Connection: close < * Closing connection 0 Mon Mar 6 17:41:51 2023 -> updatedb: daily database update failed. Mon Mar 6 17:41:51 2023 -> Trying again in 5 secs... Mon Mar 6 17:41:56 2023 -> check_for_new_database_version: No local copy of "daily" database. Mon Mar 6 17:41:56 2023 -> Trying to retrieve CVD header from http://localhost:8001/daily.cvd * Trying 127.0.0.1:8001... * Connected to localhost (127.0.0.1) port 8001 (#0) > GET /daily.cvd HTTP/1.1 Host: localhost:8001 Range: bytes=0-511 User-Agent: ClamAV/1.0.1 (OS: Linux, ARCH: x86_64, CPU: x86_64, UUID: a47e9f72-015e-46a4-9298-fc59c7e6e700) Accept: */* Connection: close < HTTP/1.1 404 NOT FOUND < Server: Werkzeug/2.2.2 Python/3.10.9 < Date: Mon, 06 Mar 2023 17:41:56 GMT < Content-Type: text/html; charset=utf-8 < Content-Length: 207 < Connection: close < * Closing connection 0 Mon Mar 6 17:41:56 2023 -> updatedb: daily database update failed. Mon Mar 6 17:41:56 2023 -> Trying again in 5 secs... Mon Mar 6 17:42:01 2023 -> check_for_new_database_version: No local copy of "daily" database. Mon Mar 6 17:42:01 2023 -> Trying to retrieve CVD header from http://localhost:8001/daily.cvd * Trying 127.0.0.1:8001... * Connected to localhost (127.0.0.1) port 8001 (#0) > GET /daily.cvd HTTP/1.1 Host: localhost:8001 Range: bytes=0-511 User-Agent: ClamAV/1.0.1 (OS: Linux, ARCH: x86_64, CPU: x86_64, UUID: a47e9f72-015e-46a4-9298-fc59c7e6e700) Accept: */* Connection: close < HTTP/1.1 404 NOT FOUND < Server: Werkzeug/2.2.2 Python/3.10.9 < Date: Mon, 06 Mar 2023 17:42:02 GMT < Content-Type: text/html; charset=utf-8 < Content-Length: 207 < Connection: close < * Closing connection 0 Mon Mar 6 17:42:02 2023 -> updatedb: daily database update failed. Mon Mar 6 17:42:02 2023 -> Giving up on http://localhost:8001... [DEBUG]: stderr: WARNING: Mon Mar 6 17:41:51 2023 -> Invalid DNS reply. Falling back to HTTP mode. WARNING: Mon Mar 6 17:41:51 2023 -> remote_cvdhead: file not found: http://localhost:8001/daily.cvd WARNING: Mon Mar 6 17:41:51 2023 -> Failed to get daily database version information from server: http://localhost:8001 ERROR: Mon Mar 6 17:41:51 2023 -> check_for_new_database_version: Failed to find daily database using server http://localhost:8001. WARNING: Mon Mar 6 17:41:56 2023 -> remote_cvdhead: file not found: http://localhost:8001/daily.cvd WARNING: Mon Mar 6 17:41:56 2023 -> Failed to get daily database version information from server: http://localhost:8001 ERROR: Mon Mar 6 17:41:56 2023 -> check_for_new_database_version: Failed to find daily database using server http://localhost:8001. WARNING: Mon Mar 6 17:42:02 2023 -> remote_cvdhead: file not found: http://localhost:8001/daily.cvd WARNING: Mon Mar 6 17:42:02 2023 -> Failed to get daily database version information from server: http://localhost:8001 ERROR: Mon Mar 6 17:42:02 2023 -> check_for_new_database_version: Failed to find daily database using server http://localhost:8001. ERROR: Mon Mar 6 17:42:02 2023 -> Update failed for database: daily ERROR: Mon Mar 6 17:42:02 2023 -> Database update process failed: HTTP GET failed ERROR: Mon Mar 6 17:42:02 2023 -> Update failed. ----------------------------- Captured stderr call ----------------------------- Process Process-1: Traceback (most recent call last): File "/usr/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap self.run() File "/usr/lib/python3.11/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/unit_tests/freshclam_test.py", line 779, in mock_database_mirror server = HTTPServer(('', port), handler) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/socketserver.py", line 456, in __init__ self.server_bind() File "/usr/lib/python3.11/http/server.py", line 136, in server_bind socketserver.TCPServer.server_bind(self) File "/usr/lib/python3.11/socketserver.py", line 472, in server_bind self.socket.bind(self.server_address) OSError: [Errno 98] Address in use ___________________ TC.test_freshclam_03_http_403_daemonized ___________________ self = def test_freshclam_03_http_403_daemonized(self): self.step_name('Verify correct behavior when receiving 403 (forbidden) and daemonized') # Start our mock database mirror. TC.mock_mirror = Process(target=mock_database_mirror, args=(WebServerHandler_02,)) TC.mock_mirror.start() if TC.freshclam_config.exists(): os.remove(str(TC.freshclam_config)) TC.freshclam_config.write_text(''' DatabaseMirror http://localhost:{port} DNSDatabaseInfo no PidFile {freshclam_pid} LogVerbose yes LogFileMaxSize 0 LogTime yes DatabaseDirectory {path_db} DatabaseOwner {user} '''.format( freshclam_pid=TC.freshclam_pid, path_db=TC.path_db, port=TC.mock_mirror_port, user=getpass.getuser(), )) command = '{valgrind} {valgrind_args} {freshclam} --config-file={freshclam_config} --update-db=daily --daemon -F'.format( valgrind=TC.valgrind, valgrind_args=TC.valgrind_args, freshclam=TC.freshclam, freshclam_config=TC.freshclam_config ) output = self.execute_command(command) > assert output.ec == 17 # forbidden E assert 111 == 17 E + where 111 = CmdResult(ec=111, out='Mon Mar 6 17:42:02 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/\nMon Mar 6 17:42:02 2023 -> Can\'t open freshclam.dat in /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database\nMon Mar 6 17:42:02 2023 -> It probably doesn\'t exist yet. That\'s ok.\nMon Mar 6 17:42:02 2023 -> Failed to load freshclam.dat; will create a new freshclam.dat\nMon Mar 6 17:42:02 2023 -> Creating new freshclam.dat\nMon Mar 6 17:42:02 2023 -> Saved freshclam.dat\nMon Mar 6 17:42:02 2023 -> ClamAV update process started at Mon Mar 6 17:42:02 2023\nMon Mar 6 17:42:02 2023 -> Querying no\nMon Mar 6 17:42:02 2023 -> ^Can\'t query no\nMon Mar 6 17:42:02 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/\nMon Mar 6 17:42:02 2023 -> check_for_new_database_version: No local copy of "daily" database.\nMon Mar 6 17:42:02 2023 -> Trying to retrieve CVD header from http://localhost:8001/daily.cvd\n* Trying 127.0.0.1:8001...\n* Connected to localhost ..._new_database_version: No local copy of "daily" database.\nMon Mar 6 17:42:12 2023 -> Trying to retrieve CVD header from http://localhost:8001/daily.cvd\n* Trying 127.0.0.1:8001...\n* Connected to localhost (127.0.0.1) port 8001 (#0)\n> GET /daily.cvd HTTP/1.1\r\nHost: localhost:8001\r\nRange: bytes=0-511\r\nUser-Agent: ClamAV/1.0.1 (OS: Linux, ARCH: x86_64, CPU: x86_64, UUID: 6a4017eb-4366-4489-b29d-7e6c0c0d3556)\r\nAccept: */*\r\nConnection: close\r\n\r\n< HTTP/1.1 404 NOT FOUND\r\n< Server: Werkzeug/2.2.2 Python/3.10.9\r\n< Date: Mon, 06 Mar 2023 17:42:12 GMT\r\n< Content-Type: text/html; charset=utf-8\r\n< Content-Length: 207\r\n< Connection: close\r\n< \r\n* Closing connection 0\nMon Mar 6 17:42:12 2023 -> updatedb: daily database update failed.\nMon Mar 6 17:42:12 2023 -> Giving up on http://localhost:8001...\nMon Mar 6 17:52:02 2023 -> Update process terminated\n', err='Execution timeout exceeded for " /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/freshclam/freshclam --config-file=/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/freshclam-test.conf --update-db=daily --daemon -F " command.').ec /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/unit_tests/freshclam_test.py:237: AssertionError ----------------------------- Captured stdout call ----------------------------- [INFO]: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [INFO]: Verify correct behavior when receiving 403 (forbidden) and daemonized [INFO]: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [DEBUG]: Run command: /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/freshclam/freshclam --config-file=/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/freshclam-test.conf --update-db=daily --daemon -F [DEBUG]: Exit code: 111 [DEBUG]: stdout: Mon Mar 6 17:42:02 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/ Mon Mar 6 17:42:02 2023 -> Can't open freshclam.dat in /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database Mon Mar 6 17:42:02 2023 -> It probably doesn't exist yet. That's ok. Mon Mar 6 17:42:02 2023 -> Failed to load freshclam.dat; will create a new freshclam.dat Mon Mar 6 17:42:02 2023 -> Creating new freshclam.dat Mon Mar 6 17:42:02 2023 -> Saved freshclam.dat Mon Mar 6 17:42:02 2023 -> ClamAV update process started at Mon Mar 6 17:42:02 2023 Mon Mar 6 17:42:02 2023 -> Querying no Mon Mar 6 17:42:02 2023 -> ^Can't query no Mon Mar 6 17:42:02 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/ Mon Mar 6 17:42:02 2023 -> check_for_new_database_version: No local copy of "daily" database. Mon Mar 6 17:42:02 2023 -> Trying to retrieve CVD header from http://localhost:8001/daily.cvd * Trying 127.0.0.1:8001... * Connected to localhost (127.0.0.1) port 8001 (#0) > GET /daily.cvd HTTP/1.1 Host: localhost:8001 Range: bytes=0-511 User-Agent: ClamAV/1.0.1 (OS: Linux, ARCH: x86_64, CPU: x86_64, UUID: 6a4017eb-4366-4489-b29d-7e6c0c0d3556) Accept: */* Connection: close < HTTP/1.1 404 NOT FOUND < Server: Werkzeug/2.2.2 Python/3.10.9 < Date: Mon, 06 Mar 2023 17:42:02 GMT < Content-Type: text/html; charset=utf-8 < Content-Length: 207 < Connection: close < * Closing connection 0 Mon Mar 6 17:42:02 2023 -> updatedb: daily database update failed. Mon Mar 6 17:42:02 2023 -> Trying again in 5 secs... Mon Mar 6 17:42:07 2023 -> check_for_new_database_version: No local copy of "daily" database. Mon Mar 6 17:42:07 2023 -> Trying to retrieve CVD header from http://localhost:8001/daily.cvd * Trying 127.0.0.1:8001... * Connected to localhost (127.0.0.1) port 8001 (#0) > GET /daily.cvd HTTP/1.1 Host: localhost:8001 Range: bytes=0-511 User-Agent: ClamAV/1.0.1 (OS: Linux, ARCH: x86_64, CPU: x86_64, UUID: 6a4017eb-4366-4489-b29d-7e6c0c0d3556) Accept: */* Connection: close < HTTP/1.1 404 NOT FOUND < Server: Werkzeug/2.2.2 Python/3.10.9 < Date: Mon, 06 Mar 2023 17:42:07 GMT < Content-Type: text/html; charset=utf-8 < Content-Length: 207 < Connection: close < * Closing connection 0 Mon Mar 6 17:42:07 2023 -> updatedb: daily database update failed. Mon Mar 6 17:42:07 2023 -> Trying again in 5 secs... Mon Mar 6 17:42:12 2023 -> check_for_new_database_version: No local copy of "daily" database. Mon Mar 6 17:42:12 2023 -> Trying to retrieve CVD header from http://localhost:8001/daily.cvd * Trying 127.0.0.1:8001... * Connected to localhost (127.0.0.1) port 8001 (#0) > GET /daily.cvd HTTP/1.1 Host: localhost:8001 Range: bytes=0-511 User-Agent: ClamAV/1.0.1 (OS: Linux, ARCH: x86_64, CPU: x86_64, UUID: 6a4017eb-4366-4489-b29d-7e6c0c0d3556) Accept: */* Connection: close < HTTP/1.1 404 NOT FOUND < Server: Werkzeug/2.2.2 Python/3.10.9 < Date: Mon, 06 Mar 2023 17:42:12 GMT < Content-Type: text/html; charset=utf-8 < Content-Length: 207 < Connection: close < * Closing connection 0 Mon Mar 6 17:42:12 2023 -> updatedb: daily database update failed. Mon Mar 6 17:42:12 2023 -> Giving up on http://localhost:8001... Mon Mar 6 17:52:02 2023 -> Update process terminated [DEBUG]: stderr: Execution timeout exceeded for " /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/freshclam/freshclam --config-file=/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/freshclam-test.conf --update-db=daily --daemon -F " command. ----------------------------- Captured stderr call ----------------------------- Process Process-2: Traceback (most recent call last): File "/usr/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap self.run() File "/usr/lib/python3.11/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/unit_tests/freshclam_test.py", line 779, in mock_database_mirror server = HTTPServer(('', port), handler) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/socketserver.py", line 456, in __init__ self.server_bind() File "/usr/lib/python3.11/http/server.py", line 136, in server_bind socketserver.TCPServer.server_bind(self) File "/usr/lib/python3.11/socketserver.py", line 472, in server_bind self.socket.bind(self.server_address) OSError: [Errno 98] Address in use ________________________ TC.test_freshclam_04_http_429 _________________________ self = def test_freshclam_04_http_429(self): self.step_name('Verify correct behavior when receiving 429 (too-many-requests)') # Start our mock database mirror. TC.mock_mirror = Process(target=mock_database_mirror, args=(WebServerHandler_04,TC.mock_mirror_port)) TC.mock_mirror.start() if TC.freshclam_config.exists(): os.remove(str(TC.freshclam_config)) TC.freshclam_config.write_text(''' DatabaseMirror http://localhost:{port} DNSDatabaseInfo no PidFile {freshclam_pid} LogVerbose yes LogFileMaxSize 0 LogTime yes DatabaseDirectory {path_db} DatabaseOwner {user} '''.format( freshclam_pid=TC.freshclam_pid, path_db=TC.path_db, port=TC.mock_mirror_port, user=getpass.getuser(), )) command = '{valgrind} {valgrind_args} {freshclam} --config-file={freshclam_config} --update-db=daily'.format( valgrind=TC.valgrind, valgrind_args=TC.valgrind_args, freshclam=TC.freshclam, freshclam_config=TC.freshclam_config ) output = self.execute_command(command) > assert output.ec == 0 # success E assert 11 == 0 E + where 11 = CmdResult(ec=11, out='Mon Mar 6 17:52:02 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/\nMon Mar 6 17:52:02 2023 -> Can\'t open freshclam.dat in /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database\nMon Mar 6 17:52:02 2023 -> It probably doesn\'t exist yet. That\'s ok.\nMon Mar 6 17:52:02 2023 -> Failed to load freshclam.dat; will create a new freshclam.dat\nMon Mar 6 17:52:02 2023 -> Creating new freshclam.dat\nMon Mar 6 17:52:02 2023 -> Saved freshclam.dat\nMon Mar 6 17:52:02 2023 -> ClamAV update process started at Mon Mar 6 17:52:02 2023\nMon Mar 6 17:52:02 2023 -> Querying no\nMon Mar 6 17:52:02 2023 -> ^Can\'t query no\nMon Mar 6 17:52:02 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/\nMon Mar 6 17:52:02 2023 -> check_for_new_database_version: No local copy of "daily" database.\nMon Mar 6 17:52:02 2023 -> Trying to retrieve CVD header from http://localhost:8001/daily.cvd\n* Trying 127.0.0.1:8001...\n* Connected to localhost (...ost:8001/daily.cvd\nWARNING: Mon Mar 6 17:52:02 2023 -> Failed to get daily database version information from server: http://localhost:8001\nERROR: Mon Mar 6 17:52:02 2023 -> check_for_new_database_version: Failed to find daily database using server http://localhost:8001.\nWARNING: Mon Mar 6 17:52:07 2023 -> remote_cvdhead: file not found: http://localhost:8001/daily.cvd\nWARNING: Mon Mar 6 17:52:07 2023 -> Failed to get daily database version information from server: http://localhost:8001\nERROR: Mon Mar 6 17:52:07 2023 -> check_for_new_database_version: Failed to find daily database using server http://localhost:8001.\nWARNING: Mon Mar 6 17:52:12 2023 -> remote_cvdhead: file not found: http://localhost:8001/daily.cvd\nWARNING: Mon Mar 6 17:52:12 2023 -> Failed to get daily database version information from server: http://localhost:8001\nERROR: Mon Mar 6 17:52:12 2023 -> check_for_new_database_version: Failed to find daily database using server http://localhost:8001.\nERROR: Mon Mar 6 17:52:12 2023 -> Update failed for database: daily\nERROR: Mon Mar 6 17:52:12 2023 -> Database update process failed: HTTP GET failed\nERROR: Mon Mar 6 17:52:12 2023 -> Update failed.\n').ec /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/unit_tests/freshclam_test.py:277: AssertionError ----------------------------- Captured stdout call ----------------------------- [INFO]: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [INFO]: Verify correct behavior when receiving 429 (too-many-requests) [INFO]: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [DEBUG]: Run command: /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/freshclam/freshclam --config-file=/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/freshclam-test.conf --update-db=daily [DEBUG]: Exit code: 11 [DEBUG]: stdout: Mon Mar 6 17:52:02 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/ Mon Mar 6 17:52:02 2023 -> Can't open freshclam.dat in /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database Mon Mar 6 17:52:02 2023 -> It probably doesn't exist yet. That's ok. Mon Mar 6 17:52:02 2023 -> Failed to load freshclam.dat; will create a new freshclam.dat Mon Mar 6 17:52:02 2023 -> Creating new freshclam.dat Mon Mar 6 17:52:02 2023 -> Saved freshclam.dat Mon Mar 6 17:52:02 2023 -> ClamAV update process started at Mon Mar 6 17:52:02 2023 Mon Mar 6 17:52:02 2023 -> Querying no Mon Mar 6 17:52:02 2023 -> ^Can't query no Mon Mar 6 17:52:02 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/ Mon Mar 6 17:52:02 2023 -> check_for_new_database_version: No local copy of "daily" database. Mon Mar 6 17:52:02 2023 -> Trying to retrieve CVD header from http://localhost:8001/daily.cvd * Trying 127.0.0.1:8001... * Connected to localhost (127.0.0.1) port 8001 (#0) > GET /daily.cvd HTTP/1.1 Host: localhost:8001 Range: bytes=0-511 User-Agent: ClamAV/1.0.1 (OS: Linux, ARCH: x86_64, CPU: x86_64, UUID: 201b130d-f11f-4a91-830c-9fec4e9fb2a2) Accept: */* Connection: close < HTTP/1.1 404 NOT FOUND < Server: Werkzeug/2.2.2 Python/3.10.9 < Date: Mon, 06 Mar 2023 17:52:02 GMT < Content-Type: text/html; charset=utf-8 < Content-Length: 207 < Connection: close < * Closing connection 0 Mon Mar 6 17:52:02 2023 -> updatedb: daily database update failed. Mon Mar 6 17:52:02 2023 -> Trying again in 5 secs... Mon Mar 6 17:52:07 2023 -> check_for_new_database_version: No local copy of "daily" database. Mon Mar 6 17:52:07 2023 -> Trying to retrieve CVD header from http://localhost:8001/daily.cvd * Trying 127.0.0.1:8001... * Connected to localhost (127.0.0.1) port 8001 (#0) > GET /daily.cvd HTTP/1.1 Host: localhost:8001 Range: bytes=0-511 User-Agent: ClamAV/1.0.1 (OS: Linux, ARCH: x86_64, CPU: x86_64, UUID: 201b130d-f11f-4a91-830c-9fec4e9fb2a2) Accept: */* Connection: close < HTTP/1.1 404 NOT FOUND < Server: Werkzeug/2.2.2 Python/3.10.9 < Date: Mon, 06 Mar 2023 17:52:07 GMT < Content-Type: text/html; charset=utf-8 < Content-Length: 207 < Connection: close < * Closing connection 0 Mon Mar 6 17:52:07 2023 -> updatedb: daily database update failed. Mon Mar 6 17:52:07 2023 -> Trying again in 5 secs... Mon Mar 6 17:52:12 2023 -> check_for_new_database_version: No local copy of "daily" database. Mon Mar 6 17:52:12 2023 -> Trying to retrieve CVD header from http://localhost:8001/daily.cvd * Trying 127.0.0.1:8001... * Connected to localhost (127.0.0.1) port 8001 (#0) > GET /daily.cvd HTTP/1.1 Host: localhost:8001 Range: bytes=0-511 User-Agent: ClamAV/1.0.1 (OS: Linux, ARCH: x86_64, CPU: x86_64, UUID: 201b130d-f11f-4a91-830c-9fec4e9fb2a2) Accept: */* Connection: close < HTTP/1.1 404 NOT FOUND < Server: Werkzeug/2.2.2 Python/3.10.9 < Date: Mon, 06 Mar 2023 17:52:12 GMT < Content-Type: text/html; charset=utf-8 < Content-Length: 207 < Connection: close < * Closing connection 0 Mon Mar 6 17:52:12 2023 -> updatedb: daily database update failed. Mon Mar 6 17:52:12 2023 -> Giving up on http://localhost:8001... [DEBUG]: stderr: WARNING: Mon Mar 6 17:52:02 2023 -> Invalid DNS reply. Falling back to HTTP mode. WARNING: Mon Mar 6 17:52:02 2023 -> remote_cvdhead: file not found: http://localhost:8001/daily.cvd WARNING: Mon Mar 6 17:52:02 2023 -> Failed to get daily database version information from server: http://localhost:8001 ERROR: Mon Mar 6 17:52:02 2023 -> check_for_new_database_version: Failed to find daily database using server http://localhost:8001. WARNING: Mon Mar 6 17:52:07 2023 -> remote_cvdhead: file not found: http://localhost:8001/daily.cvd WARNING: Mon Mar 6 17:52:07 2023 -> Failed to get daily database version information from server: http://localhost:8001 ERROR: Mon Mar 6 17:52:07 2023 -> check_for_new_database_version: Failed to find daily database using server http://localhost:8001. WARNING: Mon Mar 6 17:52:12 2023 -> remote_cvdhead: file not found: http://localhost:8001/daily.cvd WARNING: Mon Mar 6 17:52:12 2023 -> Failed to get daily database version information from server: http://localhost:8001 ERROR: Mon Mar 6 17:52:12 2023 -> check_for_new_database_version: Failed to find daily database using server http://localhost:8001. ERROR: Mon Mar 6 17:52:12 2023 -> Update failed for database: daily ERROR: Mon Mar 6 17:52:12 2023 -> Database update process failed: HTTP GET failed ERROR: Mon Mar 6 17:52:12 2023 -> Update failed. ----------------------------- Captured stderr call ----------------------------- Process Process-3: Traceback (most recent call last): File "/usr/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap self.run() File "/usr/lib/python3.11/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/unit_tests/freshclam_test.py", line 779, in mock_database_mirror server = HTTPServer(('', port), handler) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/socketserver.py", line 456, in __init__ self.server_bind() File "/usr/lib/python3.11/http/server.py", line 136, in server_bind socketserver.TCPServer.server_bind(self) File "/usr/lib/python3.11/socketserver.py", line 472, in server_bind self.socket.bind(self.server_address) OSError: [Errno 98] Address in use ______________________ TC.test_freshclam_05_cdiff_update _______________________ self = def test_freshclam_05_cdiff_update(self): self.step_name('Verify that freshclam can update from an older CVD to a newer with CDIFF patches') # start with this CVD shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-1.cvd'), str(TC.path_db / 'test.cvd')) # advertise this CVD (by sending the header response to Range requests) shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-6.cvd'), str(TC.path_www / 'test.cvd.advertised')) # using these CDIFFs shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-2.cdiff'), str(TC.path_www)) shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-3.cdiff'), str(TC.path_www)) shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-4.cdiff'), str(TC.path_www)) shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-5.cdiff'), str(TC.path_www)) shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-6.cdiff'), str(TC.path_www)) handler = partial(WebServerHandler_WWW, TC.path_www) TC.mock_mirror = Process(target=mock_database_mirror, args=(handler, TC.mock_mirror_port)) TC.mock_mirror.start() if TC.freshclam_config.exists(): os.remove(str(TC.freshclam_config)) TC.freshclam_config.write_text(''' DatabaseMirror http://localhost:{port} DNSDatabaseInfo no PidFile {freshclam_pid} LogVerbose yes LogFileMaxSize 0 LogTime yes DatabaseDirectory {path_db} DatabaseOwner {user} '''.format( freshclam_pid=TC.freshclam_pid, path_db=TC.path_db, port=TC.mock_mirror_port, user=getpass.getuser(), )) command = '{valgrind} {valgrind_args} {freshclam} --config-file={freshclam_config} --update-db=test'.format( valgrind=TC.valgrind, valgrind_args=TC.valgrind_args, freshclam=TC.freshclam, freshclam_config=TC.freshclam_config ) output = self.execute_command(command) > assert output.ec == 0 # success E assert 11 == 0 E + where 11 = CmdResult(ec=11, out="Mon Mar 6 17:52:12 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/\nMon Mar 6 17:52:12 2023 -> Can't open freshclam.dat in /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database\nMon Mar 6 17:52:12 2023 -> It probably doesn't exist yet. That's ok.\nMon Mar 6 17:52:12 2023 -> Failed to load freshclam.dat; will create a new freshclam.dat\nMon Mar 6 17:52:12 2023 -> Creating new freshclam.dat\nMon Mar 6 17:52:12 2023 -> Saved freshclam.dat\nMon Mar 6 17:52:12 2023 -> ClamAV update process started at Mon Mar 6 17:52:12 2023\nMon Mar 6 17:52:12 2023 -> Querying no\nMon Mar 6 17:52:12 2023 -> ^Can't query no\nMon Mar 6 17:52:12 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/\nMon Mar 6 17:52:12 2023 -> check_for_new_database_version: Local copy of test found: test.cvd.\nMon Mar 6 17:52:12 2023 -> Trying to retrieve CVD header from http://localhost:8001/test.cvd\n* Trying 127.0.0.1:8001...\n* Connected to localhost (127....p://localhost:8001/test.cvd\nWARNING: Mon Mar 6 17:52:12 2023 -> Failed to get test database version information from server: http://localhost:8001\nERROR: Mon Mar 6 17:52:12 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001.\nWARNING: Mon Mar 6 17:52:17 2023 -> remote_cvdhead: file not found: http://localhost:8001/test.cvd\nWARNING: Mon Mar 6 17:52:17 2023 -> Failed to get test database version information from server: http://localhost:8001\nERROR: Mon Mar 6 17:52:17 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001.\nWARNING: Mon Mar 6 17:52:22 2023 -> remote_cvdhead: file not found: http://localhost:8001/test.cvd\nWARNING: Mon Mar 6 17:52:22 2023 -> Failed to get test database version information from server: http://localhost:8001\nERROR: Mon Mar 6 17:52:22 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001.\nERROR: Mon Mar 6 17:52:22 2023 -> Update failed for database: test\nERROR: Mon Mar 6 17:52:22 2023 -> Database update process failed: HTTP GET failed\nERROR: Mon Mar 6 17:52:22 2023 -> Update failed.\n').ec /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/unit_tests/freshclam_test.py:330: AssertionError ----------------------------- Captured stdout call ----------------------------- [INFO]: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [INFO]: Verify that freshclam can update from an older CVD to a newer with CDIFF patches [INFO]: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [DEBUG]: Run command: /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/freshclam/freshclam --config-file=/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/freshclam-test.conf --update-db=test [DEBUG]: Exit code: 11 [DEBUG]: stdout: Mon Mar 6 17:52:12 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/ Mon Mar 6 17:52:12 2023 -> Can't open freshclam.dat in /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database Mon Mar 6 17:52:12 2023 -> It probably doesn't exist yet. That's ok. Mon Mar 6 17:52:12 2023 -> Failed to load freshclam.dat; will create a new freshclam.dat Mon Mar 6 17:52:12 2023 -> Creating new freshclam.dat Mon Mar 6 17:52:12 2023 -> Saved freshclam.dat Mon Mar 6 17:52:12 2023 -> ClamAV update process started at Mon Mar 6 17:52:12 2023 Mon Mar 6 17:52:12 2023 -> Querying no Mon Mar 6 17:52:12 2023 -> ^Can't query no Mon Mar 6 17:52:12 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/ Mon Mar 6 17:52:12 2023 -> check_for_new_database_version: Local copy of test found: test.cvd. Mon Mar 6 17:52:12 2023 -> Trying to retrieve CVD header from http://localhost:8001/test.cvd * Trying 127.0.0.1:8001... * Connected to localhost (127.0.0.1) port 8001 (#0) > GET /test.cvd HTTP/1.1 Host: localhost:8001 Range: bytes=0-511 User-Agent: ClamAV/1.0.1 (OS: Linux, ARCH: x86_64, CPU: x86_64, UUID: 54e5dd75-f2aa-412d-9b3c-44eb860218e6) Accept: */* If-Modified-Since: Tue, 22 Jun 2021 18:58:22 GMT Connection: close < HTTP/1.1 404 NOT FOUND < Server: Werkzeug/2.2.2 Python/3.10.9 < Date: Mon, 06 Mar 2023 17:52:12 GMT < Content-Type: text/html; charset=utf-8 < Content-Length: 207 < Connection: close < * Closing connection 0 Mon Mar 6 17:52:12 2023 -> updatedb: test database update failed. Mon Mar 6 17:52:12 2023 -> Trying again in 5 secs... Mon Mar 6 17:52:17 2023 -> check_for_new_database_version: Local copy of test found: test.cvd. Mon Mar 6 17:52:17 2023 -> Trying to retrieve CVD header from http://localhost:8001/test.cvd * Trying 127.0.0.1:8001... * Connected to localhost (127.0.0.1) port 8001 (#0) > GET /test.cvd HTTP/1.1 Host: localhost:8001 Range: bytes=0-511 User-Agent: ClamAV/1.0.1 (OS: Linux, ARCH: x86_64, CPU: x86_64, UUID: 54e5dd75-f2aa-412d-9b3c-44eb860218e6) Accept: */* If-Modified-Since: Tue, 22 Jun 2021 18:58:22 GMT Connection: close < HTTP/1.1 404 NOT FOUND < Server: Werkzeug/2.2.2 Python/3.10.9 < Date: Mon, 06 Mar 2023 17:52:17 GMT < Content-Type: text/html; charset=utf-8 < Content-Length: 207 < Connection: close < * Closing connection 0 Mon Mar 6 17:52:17 2023 -> updatedb: test database update failed. Mon Mar 6 17:52:17 2023 -> Trying again in 5 secs... Mon Mar 6 17:52:22 2023 -> check_for_new_database_version: Local copy of test found: test.cvd. Mon Mar 6 17:52:22 2023 -> Trying to retrieve CVD header from http://localhost:8001/test.cvd * Trying 127.0.0.1:8001... * Connected to localhost (127.0.0.1) port 8001 (#0) > GET /test.cvd HTTP/1.1 Host: localhost:8001 Range: bytes=0-511 User-Agent: ClamAV/1.0.1 (OS: Linux, ARCH: x86_64, CPU: x86_64, UUID: 54e5dd75-f2aa-412d-9b3c-44eb860218e6) Accept: */* If-Modified-Since: Tue, 22 Jun 2021 18:58:22 GMT Connection: close < HTTP/1.1 404 NOT FOUND < Server: Werkzeug/2.2.2 Python/3.10.9 < Date: Mon, 06 Mar 2023 17:52:22 GMT < Content-Type: text/html; charset=utf-8 < Content-Length: 207 < Connection: close < * Closing connection 0 Mon Mar 6 17:52:22 2023 -> updatedb: test database update failed. Mon Mar 6 17:52:22 2023 -> Giving up on http://localhost:8001... [DEBUG]: stderr: WARNING: Mon Mar 6 17:52:12 2023 -> Invalid DNS reply. Falling back to HTTP mode. WARNING: Mon Mar 6 17:52:12 2023 -> remote_cvdhead: file not found: http://localhost:8001/test.cvd WARNING: Mon Mar 6 17:52:12 2023 -> Failed to get test database version information from server: http://localhost:8001 ERROR: Mon Mar 6 17:52:12 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001. WARNING: Mon Mar 6 17:52:17 2023 -> remote_cvdhead: file not found: http://localhost:8001/test.cvd WARNING: Mon Mar 6 17:52:17 2023 -> Failed to get test database version information from server: http://localhost:8001 ERROR: Mon Mar 6 17:52:17 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001. WARNING: Mon Mar 6 17:52:22 2023 -> remote_cvdhead: file not found: http://localhost:8001/test.cvd WARNING: Mon Mar 6 17:52:22 2023 -> Failed to get test database version information from server: http://localhost:8001 ERROR: Mon Mar 6 17:52:22 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001. ERROR: Mon Mar 6 17:52:22 2023 -> Update failed for database: test ERROR: Mon Mar 6 17:52:22 2023 -> Database update process failed: HTTP GET failed ERROR: Mon Mar 6 17:52:22 2023 -> Update failed. ----------------------------- Captured stderr call ----------------------------- Process Process-4: Traceback (most recent call last): File "/usr/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap self.run() File "/usr/lib/python3.11/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/unit_tests/freshclam_test.py", line 779, in mock_database_mirror server = HTTPServer(('', port), handler) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/socketserver.py", line 456, in __init__ self.server_bind() File "/usr/lib/python3.11/http/server.py", line 136, in server_bind socketserver.TCPServer.server_bind(self) File "/usr/lib/python3.11/socketserver.py", line 472, in server_bind self.socket.bind(self.server_address) OSError: [Errno 98] Address in use __________________ TC.test_freshclam_06_cdiff_partial_minus_1 __________________ self = def test_freshclam_06_cdiff_partial_minus_1(self): self.step_name('Verify that freshclam will accept a partial update with 1 missing cdiff') # start with this CVD shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-3.cvd'), str(TC.path_db / 'test.cvd')) # advertise this CVD (by sending the header response to Range requests) shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-6.cvd'), str(TC.path_www / 'test.cvd.advertised')) # using these CDIFFs shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-4.cdiff'), str(TC.path_www)) shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-5.cdiff'), str(TC.path_www)) #shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-6.cdiff'), str(TC.path_www)) # <-- don't give them the last CDIFF handler = partial(WebServerHandler_WWW, TC.path_www) TC.mock_mirror = Process(target=mock_database_mirror, args=(handler, TC.mock_mirror_port)) TC.mock_mirror.start() if TC.freshclam_config.exists(): os.remove(str(TC.freshclam_config)) TC.freshclam_config.write_text(''' DatabaseMirror http://localhost:{port} DNSDatabaseInfo no PidFile {freshclam_pid} LogVerbose yes LogFileMaxSize 0 LogTime yes DatabaseDirectory {path_db} DatabaseOwner {user} '''.format( freshclam_pid=TC.freshclam_pid, path_db=TC.path_db, port=TC.mock_mirror_port, user=getpass.getuser(), )) command = '{valgrind} {valgrind_args} {freshclam} --config-file={freshclam_config} --update-db=test'.format( valgrind=TC.valgrind, valgrind_args=TC.valgrind_args, freshclam=TC.freshclam, freshclam_config=TC.freshclam_config ) output = self.execute_command(command) > assert output.ec == 0 # success E assert 11 == 0 E + where 11 = CmdResult(ec=11, out="Mon Mar 6 17:52:23 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/\nMon Mar 6 17:52:23 2023 -> Can't open freshclam.dat in /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database\nMon Mar 6 17:52:23 2023 -> It probably doesn't exist yet. That's ok.\nMon Mar 6 17:52:23 2023 -> Failed to load freshclam.dat; will create a new freshclam.dat\nMon Mar 6 17:52:23 2023 -> Creating new freshclam.dat\nMon Mar 6 17:52:23 2023 -> Saved freshclam.dat\nMon Mar 6 17:52:23 2023 -> ClamAV update process started at Mon Mar 6 17:52:23 2023\nMon Mar 6 17:52:23 2023 -> Querying no\nMon Mar 6 17:52:23 2023 -> ^Can't query no\nMon Mar 6 17:52:23 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/\nMon Mar 6 17:52:23 2023 -> check_for_new_database_version: Local copy of test found: test.cvd.\nMon Mar 6 17:52:23 2023 -> Trying to retrieve CVD header from http://localhost:8001/test.cvd\n* Trying 127.0.0.1:8001...\n* Connected to localhost (127....p://localhost:8001/test.cvd\nWARNING: Mon Mar 6 17:52:23 2023 -> Failed to get test database version information from server: http://localhost:8001\nERROR: Mon Mar 6 17:52:23 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001.\nWARNING: Mon Mar 6 17:52:28 2023 -> remote_cvdhead: file not found: http://localhost:8001/test.cvd\nWARNING: Mon Mar 6 17:52:28 2023 -> Failed to get test database version information from server: http://localhost:8001\nERROR: Mon Mar 6 17:52:28 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001.\nWARNING: Mon Mar 6 17:52:33 2023 -> remote_cvdhead: file not found: http://localhost:8001/test.cvd\nWARNING: Mon Mar 6 17:52:33 2023 -> Failed to get test database version information from server: http://localhost:8001\nERROR: Mon Mar 6 17:52:33 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001.\nERROR: Mon Mar 6 17:52:33 2023 -> Update failed for database: test\nERROR: Mon Mar 6 17:52:33 2023 -> Database update process failed: HTTP GET failed\nERROR: Mon Mar 6 17:52:33 2023 -> Update failed.\n').ec /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/unit_tests/freshclam_test.py:448: AssertionError ----------------------------- Captured stdout call ----------------------------- [INFO]: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [INFO]: Verify that freshclam will accept a partial update with 1 missing cdiff [INFO]: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [DEBUG]: Run command: /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/freshclam/freshclam --config-file=/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/freshclam-test.conf --update-db=test [DEBUG]: Exit code: 11 [DEBUG]: stdout: Mon Mar 6 17:52:23 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/ Mon Mar 6 17:52:23 2023 -> Can't open freshclam.dat in /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database Mon Mar 6 17:52:23 2023 -> It probably doesn't exist yet. That's ok. Mon Mar 6 17:52:23 2023 -> Failed to load freshclam.dat; will create a new freshclam.dat Mon Mar 6 17:52:23 2023 -> Creating new freshclam.dat Mon Mar 6 17:52:23 2023 -> Saved freshclam.dat Mon Mar 6 17:52:23 2023 -> ClamAV update process started at Mon Mar 6 17:52:23 2023 Mon Mar 6 17:52:23 2023 -> Querying no Mon Mar 6 17:52:23 2023 -> ^Can't query no Mon Mar 6 17:52:23 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/ Mon Mar 6 17:52:23 2023 -> check_for_new_database_version: Local copy of test found: test.cvd. Mon Mar 6 17:52:23 2023 -> Trying to retrieve CVD header from http://localhost:8001/test.cvd * Trying 127.0.0.1:8001... * Connected to localhost (127.0.0.1) port 8001 (#0) > GET /test.cvd HTTP/1.1 Host: localhost:8001 Range: bytes=0-511 User-Agent: ClamAV/1.0.1 (OS: Linux, ARCH: x86_64, CPU: x86_64, UUID: 9c0ebc83-1d5f-4140-9f46-8e9f65f4aa35) Accept: */* If-Modified-Since: Wed, 23 Jun 2021 00:40:09 GMT Connection: close < HTTP/1.1 404 NOT FOUND < Server: Werkzeug/2.2.2 Python/3.10.9 < Date: Mon, 06 Mar 2023 17:52:23 GMT < Content-Type: text/html; charset=utf-8 < Content-Length: 207 < Connection: close < * Closing connection 0 Mon Mar 6 17:52:23 2023 -> updatedb: test database update failed. Mon Mar 6 17:52:23 2023 -> Trying again in 5 secs... Mon Mar 6 17:52:28 2023 -> check_for_new_database_version: Local copy of test found: test.cvd. Mon Mar 6 17:52:28 2023 -> Trying to retrieve CVD header from http://localhost:8001/test.cvd * Trying 127.0.0.1:8001... * Connected to localhost (127.0.0.1) port 8001 (#0) > GET /test.cvd HTTP/1.1 Host: localhost:8001 Range: bytes=0-511 User-Agent: ClamAV/1.0.1 (OS: Linux, ARCH: x86_64, CPU: x86_64, UUID: 9c0ebc83-1d5f-4140-9f46-8e9f65f4aa35) Accept: */* If-Modified-Since: Wed, 23 Jun 2021 00:40:09 GMT Connection: close < HTTP/1.1 404 NOT FOUND < Server: Werkzeug/2.2.2 Python/3.10.9 < Date: Mon, 06 Mar 2023 17:52:28 GMT < Content-Type: text/html; charset=utf-8 < Content-Length: 207 < Connection: close < * Closing connection 0 Mon Mar 6 17:52:28 2023 -> updatedb: test database update failed. Mon Mar 6 17:52:28 2023 -> Trying again in 5 secs... Mon Mar 6 17:52:33 2023 -> check_for_new_database_version: Local copy of test found: test.cvd. Mon Mar 6 17:52:33 2023 -> Trying to retrieve CVD header from http://localhost:8001/test.cvd * Trying 127.0.0.1:8001... * Connected to localhost (127.0.0.1) port 8001 (#0) > GET /test.cvd HTTP/1.1 Host: localhost:8001 Range: bytes=0-511 User-Agent: ClamAV/1.0.1 (OS: Linux, ARCH: x86_64, CPU: x86_64, UUID: 9c0ebc83-1d5f-4140-9f46-8e9f65f4aa35) Accept: */* If-Modified-Since: Wed, 23 Jun 2021 00:40:09 GMT Connection: close < HTTP/1.1 404 NOT FOUND < Server: Werkzeug/2.2.2 Python/3.10.9 < Date: Mon, 06 Mar 2023 17:52:33 GMT < Content-Type: text/html; charset=utf-8 < Content-Length: 207 < Connection: close < * Closing connection 0 Mon Mar 6 17:52:33 2023 -> updatedb: test database update failed. Mon Mar 6 17:52:33 2023 -> Giving up on http://localhost:8001... [DEBUG]: stderr: WARNING: Mon Mar 6 17:52:23 2023 -> Invalid DNS reply. Falling back to HTTP mode. WARNING: Mon Mar 6 17:52:23 2023 -> remote_cvdhead: file not found: http://localhost:8001/test.cvd WARNING: Mon Mar 6 17:52:23 2023 -> Failed to get test database version information from server: http://localhost:8001 ERROR: Mon Mar 6 17:52:23 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001. WARNING: Mon Mar 6 17:52:28 2023 -> remote_cvdhead: file not found: http://localhost:8001/test.cvd WARNING: Mon Mar 6 17:52:28 2023 -> Failed to get test database version information from server: http://localhost:8001 ERROR: Mon Mar 6 17:52:28 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001. WARNING: Mon Mar 6 17:52:33 2023 -> remote_cvdhead: file not found: http://localhost:8001/test.cvd WARNING: Mon Mar 6 17:52:33 2023 -> Failed to get test database version information from server: http://localhost:8001 ERROR: Mon Mar 6 17:52:33 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001. ERROR: Mon Mar 6 17:52:33 2023 -> Update failed for database: test ERROR: Mon Mar 6 17:52:33 2023 -> Database update process failed: HTTP GET failed ERROR: Mon Mar 6 17:52:33 2023 -> Update failed. ----------------------------- Captured stderr call ----------------------------- Process Process-5: Traceback (most recent call last): File "/usr/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap self.run() File "/usr/lib/python3.11/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/unit_tests/freshclam_test.py", line 779, in mock_database_mirror server = HTTPServer(('', port), handler) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/socketserver.py", line 456, in __init__ self.server_bind() File "/usr/lib/python3.11/http/server.py", line 136, in server_bind socketserver.TCPServer.server_bind(self) File "/usr/lib/python3.11/socketserver.py", line 472, in server_bind self.socket.bind(self.server_address) OSError: [Errno 98] Address in use __________________ TC.test_freshclam_07_cdiff_partial_minus_2 __________________ self = def test_freshclam_07_cdiff_partial_minus_2(self): self.step_name('Verify that freshclam behavior with 2 missing cdiffs') # start with this CVD shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-3.cvd'), str(TC.path_db / 'test.cvd')) # advertise this CVD (by sending the header response to Range requests) shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-6.cvd'), str(TC.path_www / 'test.cvd.advertised')) # serve this CVD when requested instead of the advertised one shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-6.cvd'), str(TC.path_www / 'test.cvd.served')) # using these CDIFFs shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-4.cdiff'), str(TC.path_www)) # shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-5.cdiff'), str(TC.path_www)) <--- dont' give them the second to last, either! # shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-6.cdiff'), str(TC.path_www)) <--- don't give them the last CDIFF handler = partial(WebServerHandler_WWW, TC.path_www) TC.mock_mirror = Process(target=mock_database_mirror, args=(handler, TC.mock_mirror_port)) TC.mock_mirror.start() if TC.freshclam_config.exists(): os.remove(str(TC.freshclam_config)) TC.freshclam_config.write_text(''' DatabaseMirror http://localhost:{port} DNSDatabaseInfo no PidFile {freshclam_pid} LogVerbose yes LogFileMaxSize 0 LogTime yes DatabaseDirectory {path_db} DatabaseOwner {user} '''.format( freshclam_pid=TC.freshclam_pid, path_db=TC.path_db, port=TC.mock_mirror_port, user=getpass.getuser(), )) command = '{valgrind} {valgrind_args} {freshclam} --config-file={freshclam_config} --update-db=test'.format( valgrind=TC.valgrind, valgrind_args=TC.valgrind_args, freshclam=TC.freshclam, freshclam_config=TC.freshclam_config ) output = self.execute_command(command) > assert output.ec == 0 # success E assert 11 == 0 E + where 11 = CmdResult(ec=11, out="Mon Mar 6 17:52:33 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/\nMon Mar 6 17:52:33 2023 -> Can't open freshclam.dat in /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database\nMon Mar 6 17:52:33 2023 -> It probably doesn't exist yet. That's ok.\nMon Mar 6 17:52:33 2023 -> Failed to load freshclam.dat; will create a new freshclam.dat\nMon Mar 6 17:52:33 2023 -> Creating new freshclam.dat\nMon Mar 6 17:52:33 2023 -> Saved freshclam.dat\nMon Mar 6 17:52:33 2023 -> ClamAV update process started at Mon Mar 6 17:52:33 2023\nMon Mar 6 17:52:33 2023 -> Querying no\nMon Mar 6 17:52:33 2023 -> ^Can't query no\nMon Mar 6 17:52:33 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/\nMon Mar 6 17:52:33 2023 -> check_for_new_database_version: Local copy of test found: test.cvd.\nMon Mar 6 17:52:33 2023 -> Trying to retrieve CVD header from http://localhost:8001/test.cvd\n* Trying 127.0.0.1:8001...\n* Connected to localhost (127....p://localhost:8001/test.cvd\nWARNING: Mon Mar 6 17:52:33 2023 -> Failed to get test database version information from server: http://localhost:8001\nERROR: Mon Mar 6 17:52:33 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001.\nWARNING: Mon Mar 6 17:52:38 2023 -> remote_cvdhead: file not found: http://localhost:8001/test.cvd\nWARNING: Mon Mar 6 17:52:38 2023 -> Failed to get test database version information from server: http://localhost:8001\nERROR: Mon Mar 6 17:52:38 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001.\nWARNING: Mon Mar 6 17:52:43 2023 -> remote_cvdhead: file not found: http://localhost:8001/test.cvd\nWARNING: Mon Mar 6 17:52:43 2023 -> Failed to get test database version information from server: http://localhost:8001\nERROR: Mon Mar 6 17:52:43 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001.\nERROR: Mon Mar 6 17:52:43 2023 -> Update failed for database: test\nERROR: Mon Mar 6 17:52:43 2023 -> Database update process failed: HTTP GET failed\nERROR: Mon Mar 6 17:52:43 2023 -> Update failed.\n').ec /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/unit_tests/freshclam_test.py:534: AssertionError ----------------------------- Captured stdout call ----------------------------- [INFO]: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [INFO]: Verify that freshclam behavior with 2 missing cdiffs [INFO]: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [DEBUG]: Run command: /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/freshclam/freshclam --config-file=/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/freshclam-test.conf --update-db=test [DEBUG]: Exit code: 11 [DEBUG]: stdout: Mon Mar 6 17:52:33 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/ Mon Mar 6 17:52:33 2023 -> Can't open freshclam.dat in /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database Mon Mar 6 17:52:33 2023 -> It probably doesn't exist yet. That's ok. Mon Mar 6 17:52:33 2023 -> Failed to load freshclam.dat; will create a new freshclam.dat Mon Mar 6 17:52:33 2023 -> Creating new freshclam.dat Mon Mar 6 17:52:33 2023 -> Saved freshclam.dat Mon Mar 6 17:52:33 2023 -> ClamAV update process started at Mon Mar 6 17:52:33 2023 Mon Mar 6 17:52:33 2023 -> Querying no Mon Mar 6 17:52:33 2023 -> ^Can't query no Mon Mar 6 17:52:33 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/ Mon Mar 6 17:52:33 2023 -> check_for_new_database_version: Local copy of test found: test.cvd. Mon Mar 6 17:52:33 2023 -> Trying to retrieve CVD header from http://localhost:8001/test.cvd * Trying 127.0.0.1:8001... * Connected to localhost (127.0.0.1) port 8001 (#0) > GET /test.cvd HTTP/1.1 Host: localhost:8001 Range: bytes=0-511 User-Agent: ClamAV/1.0.1 (OS: Linux, ARCH: x86_64, CPU: x86_64, UUID: cc6dfffa-d066-4a29-9b0e-919bab92c10d) Accept: */* If-Modified-Since: Wed, 23 Jun 2021 00:40:09 GMT Connection: close < HTTP/1.1 404 NOT FOUND < Server: Werkzeug/2.2.2 Python/3.10.9 < Date: Mon, 06 Mar 2023 17:52:33 GMT < Content-Type: text/html; charset=utf-8 < Content-Length: 207 < Connection: close < * Closing connection 0 Mon Mar 6 17:52:33 2023 -> updatedb: test database update failed. Mon Mar 6 17:52:33 2023 -> Trying again in 5 secs... Mon Mar 6 17:52:38 2023 -> check_for_new_database_version: Local copy of test found: test.cvd. Mon Mar 6 17:52:38 2023 -> Trying to retrieve CVD header from http://localhost:8001/test.cvd * Trying 127.0.0.1:8001... * Connected to localhost (127.0.0.1) port 8001 (#0) > GET /test.cvd HTTP/1.1 Host: localhost:8001 Range: bytes=0-511 User-Agent: ClamAV/1.0.1 (OS: Linux, ARCH: x86_64, CPU: x86_64, UUID: cc6dfffa-d066-4a29-9b0e-919bab92c10d) Accept: */* If-Modified-Since: Wed, 23 Jun 2021 00:40:09 GMT Connection: close < HTTP/1.1 404 NOT FOUND < Server: Werkzeug/2.2.2 Python/3.10.9 < Date: Mon, 06 Mar 2023 17:52:38 GMT < Content-Type: text/html; charset=utf-8 < Content-Length: 207 < Connection: close < * Closing connection 0 Mon Mar 6 17:52:38 2023 -> updatedb: test database update failed. Mon Mar 6 17:52:38 2023 -> Trying again in 5 secs... Mon Mar 6 17:52:43 2023 -> check_for_new_database_version: Local copy of test found: test.cvd. Mon Mar 6 17:52:43 2023 -> Trying to retrieve CVD header from http://localhost:8001/test.cvd * Trying 127.0.0.1:8001... * Connected to localhost (127.0.0.1) port 8001 (#0) > GET /test.cvd HTTP/1.1 Host: localhost:8001 Range: bytes=0-511 User-Agent: ClamAV/1.0.1 (OS: Linux, ARCH: x86_64, CPU: x86_64, UUID: cc6dfffa-d066-4a29-9b0e-919bab92c10d) Accept: */* If-Modified-Since: Wed, 23 Jun 2021 00:40:09 GMT Connection: close < HTTP/1.1 404 NOT FOUND < Server: Werkzeug/2.2.2 Python/3.10.9 < Date: Mon, 06 Mar 2023 17:52:43 GMT < Content-Type: text/html; charset=utf-8 < Content-Length: 207 < Connection: close < * Closing connection 0 Mon Mar 6 17:52:43 2023 -> updatedb: test database update failed. Mon Mar 6 17:52:43 2023 -> Giving up on http://localhost:8001... [DEBUG]: stderr: WARNING: Mon Mar 6 17:52:33 2023 -> Invalid DNS reply. Falling back to HTTP mode. WARNING: Mon Mar 6 17:52:33 2023 -> remote_cvdhead: file not found: http://localhost:8001/test.cvd WARNING: Mon Mar 6 17:52:33 2023 -> Failed to get test database version information from server: http://localhost:8001 ERROR: Mon Mar 6 17:52:33 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001. WARNING: Mon Mar 6 17:52:38 2023 -> remote_cvdhead: file not found: http://localhost:8001/test.cvd WARNING: Mon Mar 6 17:52:38 2023 -> Failed to get test database version information from server: http://localhost:8001 ERROR: Mon Mar 6 17:52:38 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001. WARNING: Mon Mar 6 17:52:43 2023 -> remote_cvdhead: file not found: http://localhost:8001/test.cvd WARNING: Mon Mar 6 17:52:43 2023 -> Failed to get test database version information from server: http://localhost:8001 ERROR: Mon Mar 6 17:52:43 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001. ERROR: Mon Mar 6 17:52:43 2023 -> Update failed for database: test ERROR: Mon Mar 6 17:52:43 2023 -> Database update process failed: HTTP GET failed ERROR: Mon Mar 6 17:52:43 2023 -> Update failed. ----------------------------- Captured stderr call ----------------------------- Process Process-6: Traceback (most recent call last): File "/usr/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap self.run() File "/usr/lib/python3.11/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/unit_tests/freshclam_test.py", line 779, in mock_database_mirror server = HTTPServer(('', port), handler) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/socketserver.py", line 456, in __init__ self.server_bind() File "/usr/lib/python3.11/http/server.py", line 136, in server_bind socketserver.TCPServer.server_bind(self) File "/usr/lib/python3.11/socketserver.py", line 472, in server_bind self.socket.bind(self.server_address) OSError: [Errno 98] Address in use ________________ TC.test_freshclam_07_no_cdiff_out_of_date_cvd _________________ self = def test_freshclam_07_no_cdiff_out_of_date_cvd(self): self.step_name('Verify that freshclam will properly handle an out-of-date CVD update after a zero-byte CDIFF') # start with CVD 1 shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-1.cvd'), str(TC.path_db / 'test.cvd')) # advertise CVD 6 (by sending the header response to Range requests) shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-6.cvd'), str(TC.path_www / 'test.cvd.advertised')) # Serve the patches 2. shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-2.cdiff'), str(TC.path_www)) # Serve a zero-byte file instead of test-3.cdiff. This should trigger a whole CVD download. with (TC.path_www / 'test-3.cdiff').open('w') as fp: pass # Serve CVD 5 when test.cvd is requested instead of 6 (the advertised one). This should trigger an incremental update, starting a test-4.cvd + patches 5-6. shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-5.cvd'), str(TC.path_www / 'test.cvd.served')) # Serve the patches 5 - 6. Patch 4 should never be requested. shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-5.cdiff'), str(TC.path_www)) shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-6.cdiff'), str(TC.path_www)) handler = partial(WebServerHandler_WWW, TC.path_www) TC.mock_mirror = Process(target=mock_database_mirror, args=(handler, TC.mock_mirror_port)) TC.mock_mirror.start() if TC.freshclam_config.exists(): os.remove(str(TC.freshclam_config)) TC.freshclam_config.write_text(''' DatabaseMirror http://localhost:{port} DNSDatabaseInfo no PidFile {freshclam_pid} LogVerbose yes LogFileMaxSize 0 LogTime yes DatabaseDirectory {path_db} DatabaseOwner {user} '''.format( freshclam_pid=TC.freshclam_pid, path_db=TC.path_db, port=TC.mock_mirror_port, user=getpass.getuser(), )) # # 1st attempt # command = '{valgrind} {valgrind_args} {freshclam} --config-file={freshclam_config} --update-db=test'.format( valgrind=TC.valgrind, valgrind_args=TC.valgrind_args, freshclam=TC.freshclam, freshclam_config=TC.freshclam_config ) output = self.execute_command(command) > assert output.ec == 0 # success E assert 11 == 0 E + where 11 = CmdResult(ec=11, out="Mon Mar 6 17:52:43 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/\nMon Mar 6 17:52:43 2023 -> Can't open freshclam.dat in /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database\nMon Mar 6 17:52:43 2023 -> It probably doesn't exist yet. That's ok.\nMon Mar 6 17:52:43 2023 -> Failed to load freshclam.dat; will create a new freshclam.dat\nMon Mar 6 17:52:43 2023 -> Creating new freshclam.dat\nMon Mar 6 17:52:43 2023 -> Saved freshclam.dat\nMon Mar 6 17:52:43 2023 -> ClamAV update process started at Mon Mar 6 17:52:43 2023\nMon Mar 6 17:52:43 2023 -> Querying no\nMon Mar 6 17:52:43 2023 -> ^Can't query no\nMon Mar 6 17:52:43 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/\nMon Mar 6 17:52:43 2023 -> check_for_new_database_version: Local copy of test found: test.cvd.\nMon Mar 6 17:52:43 2023 -> Trying to retrieve CVD header from http://localhost:8001/test.cvd\n* Trying 127.0.0.1:8001...\n* Connected to localhost (127....p://localhost:8001/test.cvd\nWARNING: Mon Mar 6 17:52:44 2023 -> Failed to get test database version information from server: http://localhost:8001\nERROR: Mon Mar 6 17:52:44 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001.\nWARNING: Mon Mar 6 17:52:49 2023 -> remote_cvdhead: file not found: http://localhost:8001/test.cvd\nWARNING: Mon Mar 6 17:52:49 2023 -> Failed to get test database version information from server: http://localhost:8001\nERROR: Mon Mar 6 17:52:49 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001.\nWARNING: Mon Mar 6 17:52:54 2023 -> remote_cvdhead: file not found: http://localhost:8001/test.cvd\nWARNING: Mon Mar 6 17:52:54 2023 -> Failed to get test database version information from server: http://localhost:8001\nERROR: Mon Mar 6 17:52:54 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001.\nERROR: Mon Mar 6 17:52:54 2023 -> Update failed for database: test\nERROR: Mon Mar 6 17:52:54 2023 -> Database update process failed: HTTP GET failed\nERROR: Mon Mar 6 17:52:54 2023 -> Update failed.\n').ec /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/unit_tests/freshclam_test.py:625: AssertionError ----------------------------- Captured stdout call ----------------------------- [INFO]: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [INFO]: Verify that freshclam will properly handle an out-of-date CVD update after a zero-byte CDIFF [INFO]: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [DEBUG]: Run command: /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/freshclam/freshclam --config-file=/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/freshclam-test.conf --update-db=test [DEBUG]: Exit code: 11 [DEBUG]: stdout: Mon Mar 6 17:52:43 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/ Mon Mar 6 17:52:43 2023 -> Can't open freshclam.dat in /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database Mon Mar 6 17:52:43 2023 -> It probably doesn't exist yet. That's ok. Mon Mar 6 17:52:43 2023 -> Failed to load freshclam.dat; will create a new freshclam.dat Mon Mar 6 17:52:43 2023 -> Creating new freshclam.dat Mon Mar 6 17:52:43 2023 -> Saved freshclam.dat Mon Mar 6 17:52:43 2023 -> ClamAV update process started at Mon Mar 6 17:52:43 2023 Mon Mar 6 17:52:43 2023 -> Querying no Mon Mar 6 17:52:43 2023 -> ^Can't query no Mon Mar 6 17:52:43 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/ Mon Mar 6 17:52:43 2023 -> check_for_new_database_version: Local copy of test found: test.cvd. Mon Mar 6 17:52:43 2023 -> Trying to retrieve CVD header from http://localhost:8001/test.cvd * Trying 127.0.0.1:8001... * Connected to localhost (127.0.0.1) port 8001 (#0) > GET /test.cvd HTTP/1.1 Host: localhost:8001 Range: bytes=0-511 User-Agent: ClamAV/1.0.1 (OS: Linux, ARCH: x86_64, CPU: x86_64, UUID: 7d05274b-ad3b-46e0-b0cc-6beec286ea30) Accept: */* If-Modified-Since: Tue, 22 Jun 2021 18:58:22 GMT Connection: close < HTTP/1.1 404 NOT FOUND < Server: Werkzeug/2.2.2 Python/3.10.9 < Date: Mon, 06 Mar 2023 17:52:44 GMT < Content-Type: text/html; charset=utf-8 < Content-Length: 207 < Connection: close < * Closing connection 0 Mon Mar 6 17:52:44 2023 -> updatedb: test database update failed. Mon Mar 6 17:52:44 2023 -> Trying again in 5 secs... Mon Mar 6 17:52:49 2023 -> check_for_new_database_version: Local copy of test found: test.cvd. Mon Mar 6 17:52:49 2023 -> Trying to retrieve CVD header from http://localhost:8001/test.cvd * Trying 127.0.0.1:8001... * Connected to localhost (127.0.0.1) port 8001 (#0) > GET /test.cvd HTTP/1.1 Host: localhost:8001 Range: bytes=0-511 User-Agent: ClamAV/1.0.1 (OS: Linux, ARCH: x86_64, CPU: x86_64, UUID: 7d05274b-ad3b-46e0-b0cc-6beec286ea30) Accept: */* If-Modified-Since: Tue, 22 Jun 2021 18:58:22 GMT Connection: close < HTTP/1.1 404 NOT FOUND < Server: Werkzeug/2.2.2 Python/3.10.9 < Date: Mon, 06 Mar 2023 17:52:49 GMT < Content-Type: text/html; charset=utf-8 < Content-Length: 207 < Connection: close < * Closing connection 0 Mon Mar 6 17:52:49 2023 -> updatedb: test database update failed. Mon Mar 6 17:52:49 2023 -> Trying again in 5 secs... Mon Mar 6 17:52:54 2023 -> check_for_new_database_version: Local copy of test found: test.cvd. Mon Mar 6 17:52:54 2023 -> Trying to retrieve CVD header from http://localhost:8001/test.cvd * Trying 127.0.0.1:8001... * Connected to localhost (127.0.0.1) port 8001 (#0) > GET /test.cvd HTTP/1.1 Host: localhost:8001 Range: bytes=0-511 User-Agent: ClamAV/1.0.1 (OS: Linux, ARCH: x86_64, CPU: x86_64, UUID: 7d05274b-ad3b-46e0-b0cc-6beec286ea30) Accept: */* If-Modified-Since: Tue, 22 Jun 2021 18:58:22 GMT Connection: close < HTTP/1.1 404 NOT FOUND < Server: Werkzeug/2.2.2 Python/3.10.9 < Date: Mon, 06 Mar 2023 17:52:54 GMT < Content-Type: text/html; charset=utf-8 < Content-Length: 207 < Connection: close < * Closing connection 0 Mon Mar 6 17:52:54 2023 -> updatedb: test database update failed. Mon Mar 6 17:52:54 2023 -> Giving up on http://localhost:8001... [DEBUG]: stderr: WARNING: Mon Mar 6 17:52:43 2023 -> Invalid DNS reply. Falling back to HTTP mode. WARNING: Mon Mar 6 17:52:44 2023 -> remote_cvdhead: file not found: http://localhost:8001/test.cvd WARNING: Mon Mar 6 17:52:44 2023 -> Failed to get test database version information from server: http://localhost:8001 ERROR: Mon Mar 6 17:52:44 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001. WARNING: Mon Mar 6 17:52:49 2023 -> remote_cvdhead: file not found: http://localhost:8001/test.cvd WARNING: Mon Mar 6 17:52:49 2023 -> Failed to get test database version information from server: http://localhost:8001 ERROR: Mon Mar 6 17:52:49 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001. WARNING: Mon Mar 6 17:52:54 2023 -> remote_cvdhead: file not found: http://localhost:8001/test.cvd WARNING: Mon Mar 6 17:52:54 2023 -> Failed to get test database version information from server: http://localhost:8001 ERROR: Mon Mar 6 17:52:54 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001. ERROR: Mon Mar 6 17:52:54 2023 -> Update failed for database: test ERROR: Mon Mar 6 17:52:54 2023 -> Database update process failed: HTTP GET failed ERROR: Mon Mar 6 17:52:54 2023 -> Update failed. ----------------------------- Captured stderr call ----------------------------- Process Process-7: Traceback (most recent call last): File "/usr/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap self.run() File "/usr/lib/python3.11/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/unit_tests/freshclam_test.py", line 779, in mock_database_mirror server = HTTPServer(('', port), handler) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/socketserver.py", line 456, in __init__ self.server_bind() File "/usr/lib/python3.11/http/server.py", line 136, in server_bind socketserver.TCPServer.server_bind(self) File "/usr/lib/python3.11/socketserver.py", line 472, in server_bind self.socket.bind(self.server_address) OSError: [Errno 98] Address in use ___________________ TC.test_freshclam_08_cdiff_update_twice ____________________ self = def test_freshclam_08_cdiff_update_twice(self): self.step_name('Verify that freshclam can update from an older CVD to a newer with CDIFF patches, and then update from an older CLD to the latest with more CDIFF patches') # start with this CVD shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-1.cvd'), str(TC.path_db / 'test.cvd')) # advertise this CVD FIRST (by sending the header response to Range requests) shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-3.cvd'), str(TC.path_www / 'test.cvd.advertised')) # using these CDIFFs shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-2.cdiff'), str(TC.path_www)) shutil.copy(str(TC.path_source / 'unit_tests' / 'input' / 'freshclam_testfiles' /'test-3.cdiff'), str(TC.path_www)) handler = partial(WebServerHandler_WWW, TC.path_www) TC.mock_mirror = Process(target=mock_database_mirror, args=(handler, TC.mock_mirror_port)) TC.mock_mirror.start() if TC.freshclam_config.exists(): os.remove(str(TC.freshclam_config)) TC.freshclam_config.write_text(''' DatabaseMirror http://localhost:{port} DNSDatabaseInfo no PidFile {freshclam_pid} LogVerbose yes LogFileMaxSize 0 LogTime yes DatabaseDirectory {path_db} DatabaseOwner {user} '''.format( freshclam_pid=TC.freshclam_pid, path_db=TC.path_db, port=TC.mock_mirror_port, user=getpass.getuser(), )) # # Now run the update for the first set up updates. # command = '{valgrind} {valgrind_args} {freshclam} --config-file={freshclam_config} --update-db=test'.format( valgrind=TC.valgrind, valgrind_args=TC.valgrind_args, freshclam=TC.freshclam, freshclam_config=TC.freshclam_config ) output = self.execute_command(command) > assert output.ec == 0 # success E assert 11 == 0 E + where 11 = CmdResult(ec=11, out="Mon Mar 6 17:52:54 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/\nMon Mar 6 17:52:54 2023 -> Can't open freshclam.dat in /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database\nMon Mar 6 17:52:54 2023 -> It probably doesn't exist yet. That's ok.\nMon Mar 6 17:52:54 2023 -> Failed to load freshclam.dat; will create a new freshclam.dat\nMon Mar 6 17:52:54 2023 -> Creating new freshclam.dat\nMon Mar 6 17:52:54 2023 -> Saved freshclam.dat\nMon Mar 6 17:52:54 2023 -> ClamAV update process started at Mon Mar 6 17:52:54 2023\nMon Mar 6 17:52:54 2023 -> Querying no\nMon Mar 6 17:52:54 2023 -> ^Can't query no\nMon Mar 6 17:52:54 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/\nMon Mar 6 17:52:54 2023 -> check_for_new_database_version: Local copy of test found: test.cvd.\nMon Mar 6 17:52:54 2023 -> Trying to retrieve CVD header from http://localhost:8001/test.cvd\n* Trying 127.0.0.1:8001...\n* Connected to localhost (127....p://localhost:8001/test.cvd\nWARNING: Mon Mar 6 17:52:54 2023 -> Failed to get test database version information from server: http://localhost:8001\nERROR: Mon Mar 6 17:52:54 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001.\nWARNING: Mon Mar 6 17:52:59 2023 -> remote_cvdhead: file not found: http://localhost:8001/test.cvd\nWARNING: Mon Mar 6 17:52:59 2023 -> Failed to get test database version information from server: http://localhost:8001\nERROR: Mon Mar 6 17:52:59 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001.\nWARNING: Mon Mar 6 17:53:04 2023 -> remote_cvdhead: file not found: http://localhost:8001/test.cvd\nWARNING: Mon Mar 6 17:53:04 2023 -> Failed to get test database version information from server: http://localhost:8001\nERROR: Mon Mar 6 17:53:04 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001.\nERROR: Mon Mar 6 17:53:04 2023 -> Update failed for database: test\nERROR: Mon Mar 6 17:53:04 2023 -> Database update process failed: HTTP GET failed\nERROR: Mon Mar 6 17:53:04 2023 -> Update failed.\n').ec /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/unit_tests/freshclam_test.py:732: AssertionError ----------------------------- Captured stdout call ----------------------------- [INFO]: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [INFO]: Verify that freshclam can update from an older CVD to a newer with CDIFF patches, and then update from an older CLD to the latest with more CDIFF patches [INFO]: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [DEBUG]: Run command: /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/freshclam/freshclam --config-file=/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/freshclam-test.conf --update-db=test [DEBUG]: Exit code: 11 [DEBUG]: stdout: Mon Mar 6 17:52:54 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/ Mon Mar 6 17:52:54 2023 -> Can't open freshclam.dat in /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database Mon Mar 6 17:52:54 2023 -> It probably doesn't exist yet. That's ok. Mon Mar 6 17:52:54 2023 -> Failed to load freshclam.dat; will create a new freshclam.dat Mon Mar 6 17:52:54 2023 -> Creating new freshclam.dat Mon Mar 6 17:52:54 2023 -> Saved freshclam.dat Mon Mar 6 17:52:54 2023 -> ClamAV update process started at Mon Mar 6 17:52:54 2023 Mon Mar 6 17:52:54 2023 -> Querying no Mon Mar 6 17:52:54 2023 -> ^Can't query no Mon Mar 6 17:52:54 2023 -> Current working dir is /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9/database/ Mon Mar 6 17:52:54 2023 -> check_for_new_database_version: Local copy of test found: test.cvd. Mon Mar 6 17:52:54 2023 -> Trying to retrieve CVD header from http://localhost:8001/test.cvd * Trying 127.0.0.1:8001... * Connected to localhost (127.0.0.1) port 8001 (#0) > GET /test.cvd HTTP/1.1 Host: localhost:8001 Range: bytes=0-511 User-Agent: ClamAV/1.0.1 (OS: Linux, ARCH: x86_64, CPU: x86_64, UUID: bbf42e80-2532-412e-8a81-38a2239cbe2a) Accept: */* If-Modified-Since: Tue, 22 Jun 2021 18:58:22 GMT Connection: close < HTTP/1.1 404 NOT FOUND < Server: Werkzeug/2.2.2 Python/3.10.9 < Date: Mon, 06 Mar 2023 17:52:54 GMT < Content-Type: text/html; charset=utf-8 < Content-Length: 207 < Connection: close < * Closing connection 0 Mon Mar 6 17:52:54 2023 -> updatedb: test database update failed. Mon Mar 6 17:52:54 2023 -> Trying again in 5 secs... Mon Mar 6 17:52:59 2023 -> check_for_new_database_version: Local copy of test found: test.cvd. Mon Mar 6 17:52:59 2023 -> Trying to retrieve CVD header from http://localhost:8001/test.cvd * Trying 127.0.0.1:8001... * Connected to localhost (127.0.0.1) port 8001 (#0) > GET /test.cvd HTTP/1.1 Host: localhost:8001 Range: bytes=0-511 User-Agent: ClamAV/1.0.1 (OS: Linux, ARCH: x86_64, CPU: x86_64, UUID: bbf42e80-2532-412e-8a81-38a2239cbe2a) Accept: */* If-Modified-Since: Tue, 22 Jun 2021 18:58:22 GMT Connection: close < HTTP/1.1 404 NOT FOUND < Server: Werkzeug/2.2.2 Python/3.10.9 < Date: Mon, 06 Mar 2023 17:52:59 GMT < Content-Type: text/html; charset=utf-8 < Content-Length: 207 < Connection: close < * Closing connection 0 Mon Mar 6 17:52:59 2023 -> updatedb: test database update failed. Mon Mar 6 17:52:59 2023 -> Trying again in 5 secs... Mon Mar 6 17:53:04 2023 -> check_for_new_database_version: Local copy of test found: test.cvd. Mon Mar 6 17:53:04 2023 -> Trying to retrieve CVD header from http://localhost:8001/test.cvd * Trying 127.0.0.1:8001... * Connected to localhost (127.0.0.1) port 8001 (#0) > GET /test.cvd HTTP/1.1 Host: localhost:8001 Range: bytes=0-511 User-Agent: ClamAV/1.0.1 (OS: Linux, ARCH: x86_64, CPU: x86_64, UUID: bbf42e80-2532-412e-8a81-38a2239cbe2a) Accept: */* If-Modified-Since: Tue, 22 Jun 2021 18:58:22 GMT Connection: close < HTTP/1.1 404 NOT FOUND < Server: Werkzeug/2.2.2 Python/3.10.9 < Date: Mon, 06 Mar 2023 17:53:04 GMT < Content-Type: text/html; charset=utf-8 < Content-Length: 207 < Connection: close < * Closing connection 0 Mon Mar 6 17:53:04 2023 -> updatedb: test database update failed. Mon Mar 6 17:53:04 2023 -> Giving up on http://localhost:8001... [DEBUG]: stderr: WARNING: Mon Mar 6 17:52:54 2023 -> Invalid DNS reply. Falling back to HTTP mode. WARNING: Mon Mar 6 17:52:54 2023 -> remote_cvdhead: file not found: http://localhost:8001/test.cvd WARNING: Mon Mar 6 17:52:54 2023 -> Failed to get test database version information from server: http://localhost:8001 ERROR: Mon Mar 6 17:52:54 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001. WARNING: Mon Mar 6 17:52:59 2023 -> remote_cvdhead: file not found: http://localhost:8001/test.cvd WARNING: Mon Mar 6 17:52:59 2023 -> Failed to get test database version information from server: http://localhost:8001 ERROR: Mon Mar 6 17:52:59 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001. WARNING: Mon Mar 6 17:53:04 2023 -> remote_cvdhead: file not found: http://localhost:8001/test.cvd WARNING: Mon Mar 6 17:53:04 2023 -> Failed to get test database version information from server: http://localhost:8001 ERROR: Mon Mar 6 17:53:04 2023 -> check_for_new_database_version: Failed to find test database using server http://localhost:8001. ERROR: Mon Mar 6 17:53:04 2023 -> Update failed for database: test ERROR: Mon Mar 6 17:53:04 2023 -> Database update process failed: HTTP GET failed ERROR: Mon Mar 6 17:53:04 2023 -> Update failed. ----------------------------- Captured stderr call ----------------------------- Process Process-8: Traceback (most recent call last): File "/usr/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap self.run() File "/usr/lib/python3.11/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/unit_tests/freshclam_test.py", line 779, in mock_database_mirror server = HTTPServer(('', port), handler) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/socketserver.py", line 456, in __init__ self.server_bind() File "/usr/lib/python3.11/http/server.py", line 136, in server_bind socketserver.TCPServer.server_bind(self) File "/usr/lib/python3.11/socketserver.py", line 472, in server_bind self.socket.bind(self.server_address) OSError: [Errno 98] Address in use --------------------------- Captured stdout teardown --------------------------- [INFO]: Removed tmp directory: /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1_build/unit_tests/TC-5l1ds3x9 =============================== warnings summary =============================== freshclam_test.py:20 /var/tmp/portage/app-antivirus/clamav-1.0.1/work/clamav-clamav-1.0.1/unit_tests/freshclam_test.py:20: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13 import cgi -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED freshclam_test.py::TC::test_freshclam_02_http_403 - assert 11 == 17 FAILED freshclam_test.py::TC::test_freshclam_03_http_403_daemonized - assert ... FAILED freshclam_test.py::TC::test_freshclam_04_http_429 - assert 11 == 0 FAILED freshclam_test.py::TC::test_freshclam_05_cdiff_update - assert 11 == 0 FAILED freshclam_test.py::TC::test_freshclam_06_cdiff_partial_minus_1 - asser... FAILED freshclam_test.py::TC::test_freshclam_07_cdiff_partial_minus_2 - asser... FAILED freshclam_test.py::TC::test_freshclam_07_no_cdiff_out_of_date_cvd - as... FAILED freshclam_test.py::TC::test_freshclam_08_cdiff_update_twice - assert 1... ======== 8 failed, 2 passed, 1 skipped, 1 warning in 673.29s (0:11:13) ========= Test time = 673.94 sec ---------------------------------------------------------- Test Failed. "freshclam" end time: Mar 06 17:53 UTC "freshclam" time elapsed: 00:11:13 ---------------------------------------------------------- End testing: Mar 06 17:53 UTC