Skip to content

tests fail after 2027-03-26 #1663

@bmwiedemann

Description

@bmwiedemann

Describe the bug

While working on reproducible builds for openSUSE, I found that
our clamav-1.5.1 package fails tests when built after 2027-03-26

Either certificates+signatures need to remain valid for 20+ years or the current time needs to be mocked to ensure certs are not considered expired during tests.

How to reproduce the problem

Use kvm's -rtc base=2042-09-16T14:33:55 option (did not test, but libfaketime could also help trigger this issue)

in openSUSE, I use

osc checkout openSUSE:Factory/clamav && cd $_
osc build --vm-type=kvm --noservice --clean --build-opt=--vm-custom-opt="-rtc base=2042-09-16T14:33:55" standard

Attachments

here is an extract from the build log

rootdir: /home/abuild/rpmbuild/BUILD/clamav-1.5.1-build/clamav-1.5.1/unit_tests
collecting ... collected 1 item

libclamav_test.py::TC::test_libclamav_00_unit_test FAILED                [100%]

=================================== FAILURES ===================================
________________________ TC.test_libclamav_00_unit_test ________________________

--
--------------------------- Captured stdout teardown ---------------------------

[INFO]: Removed tmp directory: /home/abuild/rpmbuild/BUILD/clamav-1.5.1-build/clamav-1.5.1/build/unit_tests/TC-wudjw6a7
=========================== short test summary info ============================
FAILED libclamav_test.py::TC::test_libclamav_00_unit_test - assert 1 == 0
============================== 1 failed in 14.90s ==============================
    
    Start 2: libclamav_rust
2/6 Test #2: libclamav_rust ...................   Passed   58.13 sec
--
clamscan/alz_test.py::TC::test_deflate PASSED                            [ 17%]
clamscan/alz_test.py::TC::test_uncompressed PASSED                       [ 18%]
clamscan/alz_test.py::TC::test_uncompressed_with_binary PASSED           [ 19%]
clamscan/assorted_test.py::TC::test_00_version PASSED                    [ 20%]
clamscan/assorted_test.py::TC::test_cvdload_no_sign_fips_limits FAILED   [ 20%]
clamscan/assorted_test.py::TC::test_iso_missing_joliet PASSED            [ 21%]
clamscan/assorted_test.py::TC::test_onenote_disabled PASSED              [ 22%]
clamscan/assorted_test.py::TC::test_pe_cert_block PASSED                 [ 23%]
clamscan/assorted_test.py::TC::test_pe_cert_trust PASSED                 [ 24%]
--
ERROR: Can't verify database integrity


=========================== short test summary info ============================
FAILED clamscan/assorted_test.py::TC::test_cvdload_no_sign_fips_limits - asse...
======================== 1 failed, 104 passed in 10.47s ========================
    
    Start 4: clamd  
4/6 Test #4: clamd ............................   Passed   26.05 sec
--
freshclam_test.py::TC::test_freshclam_01_file_copy PASSED                [ 18%]
freshclam_test.py::TC::test_freshclam_02_http_403 PASSED                 [ 27%]
freshclam_test.py::TC::test_freshclam_03_http_403_daemonized PASSED      [ 36%]
freshclam_test.py::TC::test_freshclam_04_http_429 PASSED                 [ 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_05_cdiff_update _______________________

--

--------------------------- Captured stdout teardown ---------------------------

[INFO]: Removed tmp directory: /home/abuild/rpmbuild/BUILD/clamav-1.5.1-build/clamav-1.5.1/build/unit_tests/TC-n1rs1o5v
=========================== short test summary info ============================
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...
=================== 5 failed, 5 passed, 1 skipped in 47.03s ====================

    Start 6: sigtool
6/6 Test #6: sigtool ..........................***Failed    1.17 sec
--
rootdir: /home/abuild/rpmbuild/BUILD/clamav-1.5.1-build/clamav-1.5.1/unit_tests
collecting ... collected 6 items

sigtool_test.py::TC::test_sigtool_00_version PASSED                      [ 16%]
sigtool_test.py::TC::test_sigtool_01_run_cdiff FAILED                    [ 33%]
sigtool_test.py::TC::test_sigtool_02_rust_logs_messages_work FAILED      [ 50%]
sigtool_test.py::TC::test_sigtool_03_sign_and_verify FAILED              [ 66%]
sigtool_test.py::TC::test_sigtool_04_diff PASSED                         [ 83%]
sigtool_test.py::TC::test_sigtool_05_build FAILED                        [100%]

=================================== FAILURES ===================================
_________________________ TC.test_sigtool_01_run_cdiff _________________________

--
--------------------------- Captured stdout teardown ---------------------------

[INFO]: Removed tmp directory: /home/abuild/rpmbuild/BUILD/clamav-1.5.1-build/clamav-1.5.1/build/unit_tests/TC-w5kp7q3s
=========================== short test summary info ============================
FAILED sigtool_test.py::TC::test_sigtool_01_run_cdiff - assert 1 == 0
FAILED sigtool_test.py::TC::test_sigtool_02_rust_logs_messages_work - assert ...
FAILED sigtool_test.py::TC::test_sigtool_03_sign_and_verify - assert 1 == 0
FAILED sigtool_test.py::TC::test_sigtool_05_build - assert 1 == 0
========================= 4 failed, 2 passed in 0.46s ==========================


33% tests passed, 4 tests failed out of 6

Total Test time (real) = 159.84 sec

The following tests FAILED:
          1 - libclamav (Failed)
          3 - clamscan (Failed)
          5 - freshclam (Failed)
          6 - sigtool (Failed)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions