1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
3
<!--Converted with LaTeX2HTML 2008 (1.71)
3
<!--Converted with LaTeX2HTML 99.2beta8 (1.46)
4
4
original version by: Nikos Drakos, CBLU, University of Leeds
5
5
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
6
6
* with significant contributions from:
7
7
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
10
<TITLE>Running unit tests</TITLE>
11
<META NAME="description" CONTENT="Running unit tests">
10
<TITLE>On-access scanning</TITLE>
11
<META NAME="description" CONTENT="On-access scanning">
12
12
<META NAME="keywords" CONTENT="clamdoc">
13
13
<META NAME="resource-type" CONTENT="document">
14
14
<META NAME="distribution" CONTENT="global">
16
<META NAME="Generator" CONTENT="LaTeX2HTML v2008">
16
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
17
<META NAME="Generator" CONTENT="LaTeX2HTML v99.2beta8">
17
18
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
19
20
<LINK REL="STYLESHEET" HREF="clamdoc.css">
21
<LINK REL="next" HREF="node18.html">
22
22
<LINK REL="previous" HREF="node16.html">
23
<LINK REL="up" HREF="node11.html">
23
<LINK REL="up" HREF="node16.html">
24
24
<LINK REL="next" HREF="node18.html">
29
<DIV CLASS="navigation"><!--Navigation Panel-->
28
<!--Navigation Panel-->
31
30
HREF="node18.html">
32
31
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
35
34
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
37
36
HREF="node16.html">
38
37
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
41
40
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
43
<B> Next:</B> <A NAME="tex2html427"
44
HREF="node18.html">Reporting a unit test</A>
45
<B> Up:</B> <A NAME="tex2html423"
46
HREF="node11.html">Installation</A>
47
<B> Previous:</B> <A NAME="tex2html417"
48
HREF="node16.html">Compilation with clamav-milter enabled</A>
49
<B> <A NAME="tex2html425"
42
<B> Next:</B> <A NAME="tex2html411"
43
HREF="node18.html">clamav-milter</A>
44
<B> Up:</B> <A NAME="tex2html407"
45
HREF="node16.html">clamd</A>
46
<B> Previous:</B> <A NAME="tex2html403"
47
HREF="node16.html">clamd</A>
48
  <B> <A NAME="tex2html409"
50
49
HREF="node1.html">Contents</A></B>
53
<!--End of Navigation Panel-->
55
<H2><A NAME="SECTION00046000000000000000"></A><A NAME="unit-testing"></A>
59
ClamAV includes unit tests that allow you to test that the compiled binaries work correctly on your platform.
62
The first step is to use your OS's package manager to install the <code>check</code> package.
63
If your OS doesn't have that package, you can download it from <TT><A NAME="tex2html11"
64
HREF="http://check.sourceforge.net/">http://check.sourceforge.net/</A></TT>,
65
build it and install it.
68
To help clamav's configure script locate <code>check</code>, it is recommended that you install <code>pkg-config</code>, preferably
69
using your OS's package manager, or from <TT><A NAME="tex2html12"
70
HREF="http://pkg-config.freedesktop.org">http://pkg-config.freedesktop.org</A></TT>.
73
The recommended way to run unit-tests is the following, which ensures you will get an error if unit tests cannot be built:
75
HREF="footnode.html#foot165"><SUP><SPAN CLASS="arabic">7</SPAN></SUP></A> <PRE>
76
$ ./configure --enable-check
82
When <code>make check</code> is finished, you should get a message similar to this:
90
If a unit test fails, you get a message similar to the following.
91
See the next section on how to report a bug when a unit test fails.
93
========================================
95
Please report to http://bugs.clamav.net/
96
========================================
100
If unit tests are disabled (and you didn't use -enable-check), you will get this message:
102
*** Unit tests disabled in this build
103
*** Use ./configure --enable-check to enable them
107
PASS: check_freshclam.sh
108
PASS: check_sigtool.sh
109
PASS: check_clamscan.sh
110
======================
112
(1 tests were not run)
113
======================
115
Running <code>./configure --enable-check</code> should tell you why.
119
<DIV CLASS="navigation"><HR>
120
<!--Navigation Panel-->
121
<A NAME="tex2html426"
123
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
124
<A NAME="tex2html422"
126
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
127
<A NAME="tex2html416"
129
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
130
<A NAME="tex2html424"
132
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
134
<B> Next:</B> <A NAME="tex2html427"
135
HREF="node18.html">Reporting a unit test</A>
136
<B> Up:</B> <A NAME="tex2html423"
137
HREF="node11.html">Installation</A>
138
<B> Previous:</B> <A NAME="tex2html417"
139
HREF="node16.html">Compilation with clamav-milter enabled</A>
140
<B> <A NAME="tex2html425"
141
HREF="node1.html">Contents</A></B> </DIV>
142
<!--End of Navigation Panel-->
52
<!--End of Navigation Panel-->
54
<H3><A NAME="SECTION00051100000000000000">
55
On-access scanning</A>
57
One of the interesting features of <code>clamd</code> is on-access scanning
58
based on the Dazuko module, available from <TT><A NAME="tex2html8"
59
HREF="http://dazuko.org/">http://dazuko.org/</A></TT>.
60
<B>This module is not required to run clamd - furthermore, you
61
shouldn't run Dazuko on production systems</B>. At the moment Dazuko is
62
avaliable for Linux and FreeBSD, but the following information only covers
65
$ tar zxpvf dazuko-a.b.c.tar.gz
69
$ make dazuko-smp (for smp kernels)
72
# cp dazuko.o /lib/modules/`uname -r`/misc
75
Depending on your Linux distribution you may need to add a "dazuko" entry to
76
<I>/etc/modules</I> or run the module during system's startup by adding
80
to some startup file. You must also create a new device:
82
$ cat /proc/devices | grep dazuko
84
$ su -c "mknod -m 600 /dev/dazuko c 254 0"
86
Now configure Clamuko in <code>clamd.conf</code> and read the <A HREF="node25.html#clamuko">5.3</A>