Mark is correct. Clamdscan evaluates the real-path for scans so clamd is 
returning the real path for the scan results.  The test needs to be fixed to 
either not care about the full path and just use the filename, or to evaluate 
the realpath. 

It looked like there may be a second failure in the log Frans attached to his 
earlier email.  The Exclude feature may not be working correctly because of the 
symlink:

E           AssertionError: Unexpected item `b_excluded: 
ClamAV-Test-File.UNOFFICIAL FOUND` which should be absent found in output:
E           
/mnt/data/fdb-data/projects/linux/security/clamav/clamav-build/unit_tests/TC-gkz19pfu/reload-testfile:
 ClamAV-RELOAD-TestFile.UNOFFICIAL FOUND
E           
/mnt/data/fdb-data/projects/linux/security/clamav/clamav-build/unit_tests/TC-gkz19pfu/database/reload-test.ndb:
 ClamAV-RELOAD-TestFile.UNOFFICIAL FOUND
E           
/mnt/data/fdb-data/projects/linux/security/clamav/clamav-build/unit_tests/TC-gkz19pfu/a/a_found:
 ClamAV-Test-File.UNOFFICIAL FOUND
E           
/mnt/data/fdb-data/projects/linux/security/clamav/clamav-build/unit_tests/TC-gkz19pfu/b/b_excluded:
 ClamAV-Test-File.UNOFFICIAL FOUND
E           
/mnt/data/fdb-data/projects/linux/security/clamav/clamav-build/unit_tests/TC-gkz19pfu/c/c_found:
 ClamAV-Test-File.UNOFFICIAL FOUND

This is a new test in 0.104 after we fixed a different issue with the Exclude 
feature. I'm not sure though if this is a clamav bug or a test suite bug.  Will 
have to investigate.

-Micah

> -----Original Message-----
> From: clamav-users <clamav-users-boun...@lists.clamav.net> On Behalf Of
> Mark Fortescue via clamav-users
> Sent: Monday, July 26, 2021 4:42 AM
> To: clamav-users@lists.clamav.net
> Cc: Mark Fortescue <mark.li...@thurning-instruments.co.uk>
> Subject: Re: [clamav-users] ClamAV® blog: ClamAV 0.104.0 Release Candidate
> is here!
> 
> Hi Andrew,
> 
> My reading of this small section of the log is that the tests failed because 
> the
> response was not as expected:
> 
>    'Wrong reply for command'
> 
> The error seems to be due to the use of a symlink /home/frans/tw/data to
> /mnt/data/fdb-data.
> 
> The tests scripts need to do more work if they are to work properly in the
> presence of symlinks.
> 
> It should be reported as a test suite bug.
> 
> Regards
>       Mark.
> 
> On 26/07/2021 09:43, Andrew C Aitchison via clamav-users wrote:
> > On Mon, 26 Jul 2021, Frans de Boer wrote:
> >
> >>> Here's your problem:
> >>>
> >>> 8<------------------------------------------------------------------
> >>> ----
> >>> [DEBUG]: Exit code: 1
> >>> [DEBUG]: stdout: Running suite(s): clamd
> >>> 90%: Checks: 77, Failures: 7, Errors: 0
> >>> /home/frans/tw/data/projects/linux/security/clamav/clamav-0.104.0-rc
> >>> -org/unit_tests/check_clamd.c:303:F:clamd
> >>> commands:test_basic_commands:15: Wrong reply for command nSCAN
> >>> /home/frans/tw/data/projects/linux/security/clamav/cla
> >>> .
> >>> Received:
> >>> /mnt/data/fdb-data/projects/linux/security/clamav/clamav-
> build/unit_tests/accdenied:
> >>> Access denied. ERROR
> >>>
> >>> Expected:
> >>> /home/frans/tw/data/projects/linux/security/clamav/clamav-
> build/unit_tests/accdenied:
> >>> Access denied. ERROR
> >>>
> >>>
> >>> /home/frans/tw/data/projects/linux/security/clamav/clamav-0.104.0-rc
> >>> -org/unit_tests/check_clamd.c:303:F:clamd
> >>> commands:test_basic_commands:16: Wrong reply for command
> nCONTSCAN
> >>> /home/frans/tw/data/projects/linux/security/clamav
> >>> .
> >>> Received:
> >>> /mnt/data/fdb-data/projects/linux/security/clamav/clamav-
> build/unit_tests/accdenied:
> >>> Access denied. ERROR
> >>>
> >>> Expected:
> >>> /home/frans/tw/data/projects/linux/security/clamav/clamav-
> build/unit_tests/accdenied:
> >>> Access denied. ERROR
> >>> 8<------------------------------------------------------------------
> >>> ----
> >>>
> >>> Are you doing something clever with mount paths, or has the test
> >>> script just not noticed?
> >>>
> >> Nope, nothing 'clever' and doing it already for 20+ years without
> >> problem.
> >> The accdenied file does have the 'r' flag unset, so the error report
> >> is correct.
> >
> > No. IIUC the *test* failed not because the command failed, but because
> > the error message reported the wrong filename.
> >
> 
> _______________________________________________
> 
> clamav-users mailing list
> clamav-users@lists.clamav.net
> https://lists.clamav.net/mailman/listinfo/clamav-users
> 
> 
> Help us build a comprehensive ClamAV guide:
> https://github.com/vrtadmin/clamav-faq
> 
> http://www.clamav.net/contact.html#ml

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml

Reply via email to