~ubuntu-branches/ubuntu/feisty/clamav/feisty

« back to all changes in this revision

Viewing changes to docs/html/node17.html

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2007-02-20 10:33:44 UTC
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: james.westby@ubuntu.com-20070220103344-zgcu2psnx9d98fpa
Tags: upstream-0.90
ImportĀ upstreamĀ versionĀ 0.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2
2
 
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 -->
8
8
<HTML>
9
9
<HEAD>
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">
15
15
 
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">
18
19
 
19
20
<LINK REL="STYLESHEET" HREF="clamdoc.css">
20
21
 
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">
25
25
</HEAD>
26
26
 
27
27
<BODY >
28
 
 
29
 
<DIV CLASS="navigation"><!--Navigation Panel-->
30
 
<A NAME="tex2html426"
 
28
<!--Navigation Panel-->
 
29
<A NAME="tex2html410"
31
30
  HREF="node18.html">
32
31
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
33
 
<A NAME="tex2html422"
34
 
  HREF="node11.html">
 
32
<A NAME="tex2html406"
 
33
  HREF="node16.html">
35
34
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
36
 
<A NAME="tex2html416"
 
35
<A NAME="tex2html402"
37
36
  HREF="node16.html">
38
37
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
39
 
<A NAME="tex2html424"
 
38
<A NAME="tex2html408"
40
39
  HREF="node1.html">
41
40
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>  
42
41
<BR>
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
 
 &nbsp; <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
 &nbsp <B>  <A NAME="tex2html409"
50
49
  HREF="node1.html">Contents</A></B> 
51
50
<BR>
52
 
<BR></DIV>
53
 
<!--End of Navigation Panel-->
54
 
 
55
 
<H2><A NAME="SECTION00046000000000000000"></A><A NAME="unit-testing"></A>
56
 
<BR>
57
 
Running unit tests
58
 
</H2>
59
 
        ClamAV includes unit tests that allow you to test that the compiled binaries work correctly on your platform.
60
 
 
61
 
<P>
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.
66
 
 
67
 
<P>
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>.
71
 
 
72
 
<P>
73
 
The recommended way to run unit-tests is the following, which ensures you will get an error if unit tests cannot be built:
74
 
        <A NAME="tex2html13"
75
 
  HREF="footnode.html#foot165"><SUP><SPAN CLASS="arabic">7</SPAN></SUP></A>     <PRE>
76
 
         $ ./configure --enable-check
77
 
         $ make
78
 
         $ make check
79
 
</PRE>
80
 
 
81
 
<P>
82
 
When <code>make check</code> is finished, you should get a message similar to this:
83
 
        <PRE>
84
 
==================
85
 
All 8 tests passed
86
 
==================
87
 
</PRE>
88
 
 
89
 
<P>
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.
92
 
        <PRE>
93
 
========================================
94
 
1 of 8 tests failed
95
 
Please report to http://bugs.clamav.net/
96
 
========================================
97
 
</PRE>
98
 
 
99
 
<P>
100
 
If unit tests are disabled (and you didn't use -enable-check), you will get this message:
101
 
        <PRE>
102
 
*** Unit tests disabled in this build
103
 
*** Use ./configure --enable-check to enable them
104
 
 
105
 
SKIP: check_clamav
106
 
PASS: check_clamd.sh
107
 
PASS: check_freshclam.sh
108
 
PASS: check_sigtool.sh
109
 
PASS: check_clamscan.sh
110
 
======================
111
 
All 4 tests passed
112
 
(1 tests were not run)
113
 
======================
114
 
</PRE>
115
 
        Running <code>./configure --enable-check</code> should tell you why.
116
 
 
117
 
<P>
118
 
 
119
 
<DIV CLASS="navigation"><HR>
120
 
<!--Navigation Panel-->
121
 
<A NAME="tex2html426"
122
 
  HREF="node18.html">
123
 
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
124
 
<A NAME="tex2html422"
125
 
  HREF="node11.html">
126
 
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
127
 
<A NAME="tex2html416"
128
 
  HREF="node16.html">
129
 
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
130
 
<A NAME="tex2html424"
131
 
  HREF="node1.html">
132
 
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>  
133
 
<BR>
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
 
 &nbsp; <B>  <A NAME="tex2html425"
141
 
  HREF="node1.html">Contents</A></B> </DIV>
142
 
<!--End of Navigation Panel-->
 
51
<BR>
 
52
<!--End of Navigation Panel-->
 
53
 
 
54
<H3><A NAME="SECTION00051100000000000000">
 
55
On-access scanning</A>
 
56
</H3>
 
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
 
63
    Linux.
 
64
    <PRE>
 
65
        $ tar zxpvf dazuko-a.b.c.tar.gz
 
66
        $ cd dazuko-a.b.c
 
67
        $ make dazuko
 
68
        or
 
69
        $ make dazuko-smp (for smp kernels)
 
70
        $ su
 
71
        # insmod dazuko.o
 
72
        # cp dazuko.o /lib/modules/`uname -r`/misc
 
73
        # depmod -a
 
74
</PRE>
 
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
 
77
    <PRE>
 
78
        /sbin/modprobe dazuko
 
79
</PRE>
 
80
    to some startup file. You must also create a new device:
 
81
    <PRE>
 
82
        $ cat /proc/devices | grep dazuko
 
83
        254 dazuko
 
84
        $ su -c "mknod -m 600 /dev/dazuko c 254 0"
 
85
</PRE>
 
86
    Now configure Clamuko in <code>clamd.conf</code> and read the <A HREF="node25.html#clamuko">5.3</A>
 
87
    section.
 
88
 
 
89
<P>
 
90
<BR><HR>
143
91
<ADDRESS>
144
92
Tomasz Kojm
145
 
2010-08-12
 
93
2007-02-12
146
94
</ADDRESS>
147
95
</BODY>
148
96
</HTML>