On 04/02/2013 11:06 PM, Daniel Dunbar wrote:> On Tue, Apr 2, 2013 at 11:46 AM, Renato Golin <renato.golin at linaro.org <mailto:renato.golin at linaro.org>> wrote: > > On 2 April 2013 19:20, Daniel Dunbar <daniel at zuster.org <mailto:daniel at zuster.org>> wrote: > > What is it that makes the output of the program asynchronous? The output is deterministic on Darwin, so it seems like it should be possible to make it more stable. > > > This is a virus scan and, AFAICS, depends on the order in which the INODEs are laid out in the directory. I'm not sure there is a way to sort the files before, I'll look into that. > > > Ok, that seems ideal if possible.You can pass all the filenames from the inputs/ directory directly on the command-line, instead of specifying -r inputs/. That way the order of scanning will be exactly the one specified on the command-line. Otherwise clamscan just does a readdir, so the order is entirely FS-dependent, similarly with clamd which does a sort by inode.> > Looping in Edvin who wrote Clamscan. :)Thats an overstatement, although I wrote a fair amount of libclamav :) Best regards, --Edwin
On 2 April 2013 21:20, Török Edwin <edwin+ml-debian at etorok.net> wrote:> You can pass all the filenames from the inputs/ directory directly on the > command-line, instead of specifying -r inputs/. > That way the order of scanning will be exactly the one specified on the > command-line. >Hum, I think I can fix that with Make... --renato -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130402/d733dd27/attachment.html>
Hi Torok,
I've used a hard-coded list on the input parameter and still got some
output (slightly) scrambled between two different bots...
INPUT = $(PROJ_SRC_DIR)/inputs/clam.cab \
$(PROJ_SRC_DIR)/inputs/clamdoc.tar.gz \
$(PROJ_SRC_DIR)/inputs/clam.exe \
$(PROJ_SRC_DIR)/inputs/clam.exe.bz2 \
$(PROJ_SRC_DIR)/inputs/clam-v2.rar \
$(PROJ_SRC_DIR)/inputs/clam-v3.rar \
$(PROJ_SRC_DIR)/inputs/clam.zip \
$(PROJ_SRC_DIR)/inputs/README \
$(PROJ_SRC_DIR)/inputs/rtf-test/Doc11.rtf \
$(PROJ_SRC_DIR)/inputs/rtf-test/Doc1.rtf \
$(PROJ_SRC_DIR)/inputs/rtf-test/Doc22.rtf \
$(PROJ_SRC_DIR)/inputs/rtf-test/Doc2.rtf \
$(PROJ_SRC_DIR)/inputs/rtf-test/doc3.rtf \
$(PROJ_SRC_DIR)/inputs/rtf-test/docCLAMexe.rtf \
$(PROJ_SRC_DIR)/inputs/rtf-test/rtf1.rtf \
$(PROJ_SRC_DIR)/inputs/rtf-test/rtf-novirus.rtf
RUN_OPTIONS = --debug --exclude-dir .svn --verbose -d$(PROJ_SRC_DIR)/dbdir
-r $(INPUT)
This is what Make generated for me on both machines:
Output/clamscan.simple --debug --exclude-dir .svn --verbose \
-d/home/user/devel/llvm/test/test-suite/MultiSource/Applications/ClamAV/dbdir
\
-r \
/home/user/devel/llvm/test/test-suite/MultiSource/Applications/ClamAV/inputs/clam.cab
\
/home/user/devel/llvm/test/test-suite/MultiSource/Applications/ClamAV/inputs/clamdoc.tar.gz
\
/home/user/devel/llvm/test/test-suite/MultiSource/Applications/ClamAV/inputs/clam.exe
\
/home/user/devel/llvm/test/test-suite/MultiSource/Applications/ClamAV/inputs/clam.exe.bz2
\
/home/user/devel/llvm/test/test-suite/MultiSource/Applications/ClamAV/inputs/clam-v2.rar
\
/home/user/devel/llvm/test/test-suite/MultiSource/Applications/ClamAV/inputs/clam-v3.rar
\
/home/user/devel/llvm/test/test-suite/MultiSource/Applications/ClamAV/inputs/clam.zip
\
/home/user/devel/llvm/test/test-suite/MultiSource/Applications/ClamAV/inputs/README
\
/home/user/devel/llvm/test/test-suite/MultiSource/Applications/ClamAV/inputs/rtf-test/Doc11.rtf
\
/home/user/devel/llvm/test/test-suite/MultiSource/Applications/ClamAV/inputs/rtf-test/Doc1.rtf
\
/home/user/devel/llvm/test/test-suite/MultiSource/Applications/ClamAV/inputs/rtf-test/Doc22.rtf
\
/home/user/devel/llvm/test/test-suite/MultiSource/Applications/ClamAV/inputs/rtf-test/Doc2.rtf
\
/home/user/devel/llvm/test/test-suite/MultiSource/Applications/ClamAV/inputs/rtf-test/doc3.rtf
\
/home/user/devel/llvm/test/test-suite/MultiSource/Applications/ClamAV/inputs/rtf-test/docCLAMexe.rtf
\
/home/user/devel/llvm/test/test-suite/MultiSource/Applications/ClamAV/inputs/rtf-test/rtf1.rtf
\
/home/user/devel/llvm/test/test-suite/MultiSource/Applications/ClamAV/inputs/rtf-test/rtf-novirus.rtf
I though the dbdir could be the culprit, but it has only one file. Attached
is the output of both.
cheers,
--renato
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20130402/1b21eaf0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ClamAV-output.zip
Type: application/zip
Size: 5376 bytes
Desc: not available
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20130402/1b21eaf0/attachment.zip>