Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.104.3 test failure on ppc64le #598

Open
opoplawski opened this issue May 27, 2022 · 1 comment
Open

0.104.3 test failure on ppc64le #598

opoplawski opened this issue May 27, 2022 · 1 comment

Comments

@opoplawski
Copy link
Contributor

Describe the bug

With Fedora package we are seeing the attached test failure, but can't really determine what the failure is.

+ /usr/bin/ctest --output-on-failure --force-new-ctest-process -j8 -- -v -j1
Test project /builddir/build/BUILD/clamav-0.104.3/redhat-linux-build
      Start  1: libclamav
 1/10 Test  #1: libclamav ........................   Passed    8.18 sec
      Start  2: libclamav_valgrind
 2/10 Test  #2: libclamav_valgrind ...............   Passed  168.56 sec
      Start  3: clamscan
 3/10 Test  #3: clamscan .........................   Passed    3.92 sec
      Start  4: clamscan_valgrind
 4/10 Test  #4: clamscan_valgrind ................   Passed   76.25 sec
      Start  5: clamd
 5/10 Test  #5: clamd ............................   Passed   12.88 sec
      Start  6: clamd_valgrind
 6/10 Test  #6: clamd_valgrind ...................   Passed   78.33 sec
      Start  7: freshclam
 7/10 Test  #7: freshclam ........................   Passed   17.58 sec
      Start  8: freshclam_valgrind
 8/10 Test  #8: freshclam_valgrind ...............***Failed   36.63 sec
============================= test session starts ==============================
platform linux -- Python 3.10.4, pytest-7.1.2, pluggy-1.0.0 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /builddir/build/BUILD/clamav-0.104.3/unit_tests
collecting ... collected 10 items
freshclam_test.py::TC::test_freshclam_00_version PASSED                  [ 10%]
freshclam_test.py::TC::test_freshclam_01_file_copy PASSED                [ 20%]
freshclam_test.py::TC::test_freshclam_02_http_403 PASSED                 [ 30%]
freshclam_test.py::TC::test_freshclam_03_http_403_daemonized PASSED      [ 40%]
freshclam_test.py::TC::test_freshclam_04_http_429 PASSED                 [ 50%]
freshclam_test.py::TC::test_freshclam_05_cdiff_update FAILED             [ 60%]
freshclam_test.py::TC::test_freshclam_05_cdiff_update_UNC SKIPPED (T...) [ 70%]
freshclam_test.py::TC::test_freshclam_06_cdiff_partial_minus_1 FAILED    [ 80%]
freshclam_test.py::TC::test_freshclam_07_cdiff_partial_minus_2 FAILED    [ 90%]
freshclam_test.py::TC::test_freshclam_07_no_cdiff_out_of_date_cvd FAILED [100%]
=================================== FAILURES ===================================
______________________ TC.test_freshclam_05_cdiff_update _______________________
self = <freshclam_test.TC testMethod=test_freshclam_05_cdiff_update>
    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 8 == 0
E        +  where 8 = CmdResult(ec=8, out='Thu May 26 23:36:17 2022 -> *Current working dir is /builddir/build/BUILD/clamav-0.104.3/redhat-linux-build/unit_tests/TC-hwlvqfl3/database/\nThu May 26 23:36:17 2022 -> *Can\'t open freshclam.dat in /builddir/build/BUILD/clamav-0.104.3/redhat-linux-build/unit_tests/TC-hwlvqfl3/database\nThu May 26 23:36:17 2022 -> *It probably doesn\'t exist yet. That\'s ok.\nThu May 26 23:36:17 2022 -> *Failed to load freshclam.dat; will create a new freshclam.dat\nThu May 26 23:36:17 2022 -> *Creating new freshclam.dat\nThu May 26 23:36:17 2022 -> *Saved freshclam.dat\nThu May 26 23:36:17 2022 -> ClamAV update process started at Thu May 26 23:36:17 2022\nThu May 26 23:36:17 2022 -> *Querying no\nThu May 26 23:36:17 2022 -> ^Can\'t query no\nThu May 26 23:36:17 2022 -> ^Invalid DNS reply. Falling back to HTTP mode.\nThu May 26 23:36:17 2022 -> *Current working dir is /builddir/build/BUILD/clamav-0.104.3/redhat-linux-build/unit_tests/TC-hwlvqfl3/database/\nThu May 26 23:36:17 2022 -> *check_for_new_database_version: Local copy of test found: test.cvd.\nThu May 26 23:36:17 2022 -> Trying to retrieve CVD header from http://localhost:8001/test.cvd\n*   Trying 127.0.0.1:8001...\...text->bTestDatabases   : 1\nThu May 26 23:36:18 2022 -> *download_complete_callback:   fc_context->bBytecodeEnabled : 1\nThu May 26 23:36:18 2022 -> Testing database: \'/builddir/build/BUILD/clamav-0.104.3/redhat-linux-build/unit_tests/TC-hwlvqfl3/database/tmp.da3d6939bf/clamav-e4731222019802b2fadf9618541fe53a.tmp-test.cld\' ...\nThu May 26 23:36:18 2022 -> *Loading signatures from /builddir/build/BUILD/clamav-0.104.3/redhat-linux-build/unit_tests/TC-hwlvqfl3/database/tmp.da3d6939bf/clamav-e4731222019802b2fadf9618541fe53a.tmp-test.cld\nThu May 26 23:36:19 2022 -> *Properly loaded 14 signatures from /builddir/build/BUILD/clamav-0.104.3/redhat-linux-build/unit_tests/TC-hwlvqfl3/database/tmp.da3d6939bf/clamav-e4731222019802b2fadf9618541fe53a.tmp-test.cld\nThu May 26 23:36:19 2022 -> ^Database load exited with "Unknown libfreshclam error code!"\nThu May 26 23:36:19 2022 -> !Database test FAILED.\nThu May 26 23:36:19 2022 -> *updatedb: callback failed: Test failed (8)\nThu May 26 23:36:19 2022 -> !Unexpected error when attempting to update test: Test failed\nThu May 26 23:36:19 2022 -> !Database update process failed: Test failed\nThu May 26 23:36:19 2022 -> !Update failed.\n', err='').ec
/builddir/build/BUILD/clamav-0.104.3/unit_tests/freshclam_test.py:318: AssertionError

build.log

@micahsnyder
Copy link
Contributor

@opoplawski sorry we never replied. We don't have test systems for PPC on-hand, although we've since had luck building for ppc64le with docker buildx.

Anyways... I came across this looking for a different bug report and wonder if you still have issues with clamav's freshclam tests on newer versions on ppc64le.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants