Browse code

use abs_scrdir run clamd tests in parallel by using a different test subdir for each

git-svn: trunk@4181

Török Edvin authored on 2008/09/16 19:32:25
Showing 8 changed files
... ...
@@ -9,6 +9,7 @@ $(FILES) :
9 9
 programs = check_clamav
10 10
 scripts = check_clamd.sh check_freshclam.sh check_sigtool.sh check_clamscan.sh\
11 11
 	 valgrind_tests.sh efence_tests.sh duma_tests.sh
12
+TESTS_ENVIRONMENT=export abs_srcdir=$(abs_srcdir);
12 13
 TESTS = $(programs) $(scripts)
13 14
 check_PROGRAMS = $(programs)
14 15
 check_SCRIPTS = $(scripts)
... ...
@@ -27,7 +28,7 @@ check_clamscan.sh: $(top_builddir)/test/clam.exe
27 27
 $(top_builddir)/test/clam.exe:
28 28
 	(cd $(top_builddir)/test && $(MAKE))
29 29
 
30
-CLEANFILES=lcov.out *.gcno *.gcda *.log clamd-test.socket /tmp/clamd-test.log $(FILES) test-stderr.log clamscan.log valgrind-*.log clamdscan.log clamdscan-multiscan.log duma.log
30
+CLEANFILES=lcov.out *.gcno *.gcda *.log $(FILES) test-stderr.log clamscan.log valgrind-*.log duma.log duma2.log
31 31
 EXTRA_DIST=.split input test-clamd.conf test-freshclam.conf valgrind.supp virusaction-test.sh $(scripts)/preload_run.sh
32 32
 if ENABLE_COVERAGE
33 33
 LCOV_OUTPUT = lcov.out
... ...
@@ -231,13 +231,14 @@ programs = check_clamav
231 231
 scripts = check_clamd.sh check_freshclam.sh check_sigtool.sh check_clamscan.sh\
232 232
 	 valgrind_tests.sh efence_tests.sh duma_tests.sh
233 233
 
234
+TESTS_ENVIRONMENT = export abs_srcdir=$(abs_srcdir);
234 235
 check_SCRIPTS = $(scripts)
235 236
 @HAVE_LIBCHECK_FALSE@check_clamav_SOURCES = check_clamav_skip.c
236 237
 @HAVE_LIBCHECK_TRUE@check_clamav_SOURCES = check_clamav.c check_jsnorm.c check_str.c check_regex.c checks.h $(top_builddir)/libclamav/clamav.h check_disasm.c check_uniq.c check_matchers.c
237 238
 @HAVE_LIBCHECK_TRUE@check_clamav_CPPFLAGS = @CHECK_CPPFLAGS@ -DSRCDIR=\"$(abs_srcdir)\"
238 239
 @HAVE_LIBCHECK_TRUE@check_clamav_LDADD = $(top_builddir)/libclamav/libclamav.la @THREAD_LIBS@ @CHECK_LIBS@
239
-CLEANFILES = lcov.out *.gcno *.gcda *.log clamd-test.socket /tmp/clamd-test.log $(FILES) test-stderr.log clamscan.log valgrind-*.log clamdscan.log clamdscan-multiscan.log duma.log
240
-EXTRA_DIST = .split input test-clamd.conf test-freshclam.conf valgrind.supp virusaction-test.sh $(scripts)
240
+CLEANFILES = lcov.out *.gcno *.gcda *.log $(FILES) test-stderr.log clamscan.log valgrind-*.log duma.log duma2.log
241
+EXTRA_DIST = .split input test-clamd.conf test-freshclam.conf valgrind.supp virusaction-test.sh $(scripts)/preload_run.sh
241 242
 @ENABLE_COVERAGE_TRUE@LCOV_OUTPUT = lcov.out
242 243
 @ENABLE_COVERAGE_TRUE@LCOV_HTML = lcov_html
243 244
 @ENABLE_COVERAGE_TRUE@LCOV_LCOV = @LCOV@
... ...
@@ -1,8 +1,12 @@
1 1
 #!/bin/sh 
2 2
 CLAMD_WRAPPER=${CLAMD_WRAPPER-}
3
+CLAMD_TEST_UNIQ1=${CLAMD_TEST_UNIQ1-1}
4
+CLAMD_TEST_UNIQ2=${CLAMD_TEST_UNIQ2-2}
5
+TOP="../.."
6
+LTEXEC="$TOP/libtool --mode=execute"
3 7
 killclamd() {
4
-	test -f /tmp/clamd-test.pid || return
5
-	pid=`cat /tmp/clamd-test.pid 2>/dev/null`
8
+	test -f clamd-test.pid || return
9
+	pid=`cat clamd-test.pid 2>/dev/null`
6 10
 	if test "X$pid" = "X"; then
7 11
 		# file can be removed between the 'test' and 'cat',
8 12
 		# it happened a few times for me
... ...
@@ -18,12 +22,12 @@ killclamd() {
18 18
 			kill -KILL $pid
19 19
 		fi
20 20
 	done
21
-	rm -f /tmp/clamd-test.pid
21
+	rm -f clamd-test.pid
22 22
 }
23 23
 
24
-die() {
24
+die()
25
+{
25 26
 	killclamd
26
-	rm -rf test-db test-clamd1.conf test-clamd2.conf test-clamd.log	clamd-test.socket reload-testfile
27 27
 	exit $1
28 28
 }
29 29
 
... ...
@@ -37,27 +41,26 @@ error()
37 37
 
38 38
 start_clamd()
39 39
 {
40
-	rm -f /tmp/clamd-test.log
41
-	../libtool --mode=execute $CLAMD_WRAPPER ../clamd/clamd -c $1 || 
42
-		{ error "Failed to start clamd!"; die 1;}
40
+	rm -f clamd-test.log
41
+	$LTEXEC $CLAMD_WRAPPER $TOP/clamd/clamd -c $1 || 
42
+		{ error "Failed to start clamd!"; die 1; }
43 43
 }
44 44
 
45 45
 run_clamdscan() {
46
-	conf_file=$1
47
-	shift
48 46
 	rm -f clamdscan.log clamdscan-multiscan.log
49
-	../clamdscan/clamdscan --version --config-file $conf_file 2>&1|grep "^ClamAV" >/dev/null || 
50
-		{ error "clamdscan can't get version of clamd!"; die 2;}
51
-	../clamdscan/clamdscan --quiet --config-file $conf_file $* --log=clamdscan.log
47
+	$TOP/clamdscan/clamdscan --version --config-file test-clamd.conf 2>&1|grep "^ClamAV" >/dev/null || 
48
+		{ error "clamdscan can't get version of clamd!"; die 1;}
49
+	$TOP/clamdscan/clamdscan --quiet --config-file test-clamd.conf $* --log=clamdscan.log
52 50
 	if test $? = 2; then 
53 51
 		error "Failed to run clamdscan!"
54 52
 		cat clamdscan.log
55
-		die 3;	
53
+		die 1
56 54
 	fi
57
-	../clamdscan/clamdscan --quiet --config-file $conf_file $* -m --log=clamdscan-multiscan.log
55
+	$TOP/clamdscan/clamdscan --quiet --config-file test-clamd.conf $* -m --log=clamdscan-multiscan.log
58 56
 	if test $? = 2; then 
59 57
 		error "Failed to run clamdscan (multiscan)!"
60
-		die 3;	
58
+		cat clamdscan-multiscan.log
59
+		die 1
61 60
 	fi
62 61
 }
63 62
 
... ...
@@ -70,125 +73,142 @@ run_reload_test()
70 70
 	fi
71 71
 	rm -f reload-testfile
72 72
 	echo "ClamAV-RELOAD-Test" >reload-testfile
73
-	run_clamdscan test-clamd1.conf reload-testfile
73
+	run_clamdscan reload-testfile
74 74
 	grep "ClamAV-RELOAD-TestFile" clamdscan.log >/dev/null 2>/dev/null;
75 75
 	if test $? -eq 0; then
76 76
 		# it is not supposed to detect until we actually put the
77 77
 		# signature there and reload!
78 78
 		error "RELOAD test failed!"
79 79
 		cat clamdscan.log
80
-		die 7;
81 80
 	fi
82 81
 	echo "ClamAV-RELOAD-TestFile:0:0:436c616d41562d52454c4f41442d54657374" >test-db/new.ndb
83
-	echo RELOAD | nc -q 0 -n 127.0.0.1 3311
84
-	run_clamdscan test-clamd1.conf reload-testfile
82
+	echo RELOAD | nc -q 0 -n 127.0.0.1 331$CLAMD_TEST_UNIQ2
83
+	run_clamdscan reload-testfile
85 84
 	grep "ClamAV-RELOAD-TestFile" clamdscan.log >/dev/null 2>/dev/null;
86 85
 	if test $? -ne 0; then
87 86
 		error "RELOAD test failed! (after reload)"
88 87
 		cat clamdscan.log
89
-		die 8;
90 88
 	fi
91 89
 	grep "ClamAV-RELOAD-TestFile" clamdscan-multiscan.log >/dev/null 2>/dev/null;
92 90
 	if test $? -ne 0; then
93 91
 		error "RELOAD test failed! (after reload, multiscan)"
94
-		die 9;
92
+		cat clamdscan-multiscan.log
95 93
 	fi
96 94
 	rm -f reload-testfile
97 95
 }
98 96
 
99 97
 run_clamdscan_fdpass() {
100
-	conf_file=$1
101
-	shift
102 98
 	rm -f clamdscan.log
103
-	../clamdscan/clamdscan --quiet --fdpass --config-file $conf_file - <$1 --log=clamdscan.log
99
+	$TOP/clamdscan/clamdscan --quiet --fdpass --config-file test-clamd.conf - <$1 --log=clamdscan.log
104 100
 	if test $? = 2; then
105
-		error "Failed to run clamdscan!"
106
-		die 9;
101
+		error "Failed to run clamdscan (fdpass)!"
102
+		cat clamdscan.log
107 103
 	fi
108 104
 }
109 105
 
106
+# We run multiple clamd tests in parallel, each in its own directory
107
+rm -rf clamdtest$CLAMD_TEST_UNIQ1 clamdtest$CLAMD_TEST_UNIQ2
108
+mkdir clamdtest$CLAMD_TEST_UNIQ1 clamdtest$CLAMD_TEST_UNIQ2 || 
109
+	{ echo "Unable to create temporary directories!"; exit 1; }
110 110
 # Set up test DBdir
111 111
 rm -rf test-db
112 112
 mkdir -p test-db
113 113
 cat <<EOF >test-db/test.hdb
114 114
 aa15bcf478d165efd2065190eb473bcb:544:ClamAV-Test-File
115 115
 EOF
116
-cp $srcdir/input/daily.ftm test-db/
117
-cp $srcdir/input/daily.pdb test-db/
118
-
119
-# Prepare for clamd #1
120
-cat <$srcdir/test-clamd.conf >test-clamd1.conf
121
-#  Use absolute path to dbdir, so that RELOAD works
122
-echo "DatabaseDirectory `pwd`/test-db" >>test-clamd1.conf
123
-
124
-# Start clamd #1
125
-start_clamd test-clamd1.conf
116
+cp $abs_srcdir/input/daily.ftm test-db/
117
+cp $abs_srcdir/input/daily.pdb test-db/
118
+
119
+# Prepare configuration for clamd #1 and #2
120
+awk "{ sub(/X/,\"$CLAMD_TEST_UNIQ1\"); sub(/CWD/,\"`pwd`/clamdtest$CLAMD_TEST_UNIQ1\"); print }" $abs_srcdir/test-clamd.conf >clamdtest$CLAMD_TEST_UNIQ1/test-clamd.conf
121
+awk "{ sub(/X/,\"$CLAMD_TEST_UNIQ2\"); sub(/CWD/,\"`pwd`/clamdtest$CLAMD_TEST_UNIQ2\"); print }" $abs_srcdir/test-clamd.conf >clamdtest$CLAMD_TEST_UNIQ2/test-clamd.conf
122
+# Add clamd #2 specific configuration
123
+echo "VirusEvent $abs_srcdir/virusaction-test.sh `pwd`/clamdtest$CLAMD_TEST_UNIQ2 \"Virus found: %v\"" >>clamdtest$CLAMD_TEST_UNIQ2/test-clamd.conf
124
+echo "HeuristicScanPrecedence yes" >>clamdtest$CLAMD_TEST_UNIQ2/test-clamd.conf
125
+# Duplicate dbdirs
126
+cp -R test-db clamdtest$CLAMD_TEST_UNIQ1/
127
+cp -R test-db clamdtest$CLAMD_TEST_UNIQ2/
128
+
129
+# Start clamd #1 tests
130
+(cd clamdtest$CLAMD_TEST_UNIQ1 
131
+start_clamd test-clamd.conf
126 132
 
127 133
 # Test that all testfiles are detected
128
-FILES=../test/clam*
129
-run_clamdscan test-clamd1.conf $FILES
134
+FILES=$TOP/test/clam*
135
+run_clamdscan $FILES
130 136
 NFILES=`ls -1 $FILES | wc -l`
131 137
 NINFECTED=`grep "Infected files" clamdscan.log | cut -f2 -d:|sed -e 's/ //g'`
132 138
 NINFECTED_MULTI=`grep "Infected files" clamdscan-multiscan.log | cut -f2 -d:|sed -e 's/ //g'`
133 139
 if test "$NFILES" -ne "0$NINFECTED"; then
134 140
 	error "clamd did not detect all testfiles correctly!"
135 141
 	grep OK clamdscan.log
136
-	die 4;
142
+	die 2
137 143
 fi
138 144
 if test "$NFILES" -ne "0$NINFECTED_MULTI"; then
139 145
 	error "clamd did not detect all testfiles correctly in multiscan mode!"
140 146
 	grep OK clamdscan-multiscan.log
141
-	die 5;
147
+	die 3
142 148
 fi
143 149
 
144 150
 # Test HeuristicScanPrecedence off feature
145
-run_clamdscan test-clamd1.conf clam-phish-exe
151
+run_clamdscan ../clam-phish-exe
146 152
 grep "ClamAV-Test-File" clamdscan.log >/dev/null 2>/dev/null;
147 153
 if test $? -ne 0; then
148 154
 	error "HeuristicScanPrecedence off test failed!"
149 155
 	cat clamdscan.log
150
-	die 6;
156
+	die 4
151 157
 fi
158
+die 0
159
+)&
160
+pid1=$!
152 161
 
153
-# Test RELOAD command
154
-run_reload_test
155
-killclamd 
156
-
157
-# Prepare configuration for clamd #2
158
-cat <test-clamd1.conf >test-clamd2.conf
159
-echo "VirusEvent `pwd`/$srcdir/virusaction-test.sh `pwd` \"Virus found: %v\"" >>test-clamd2.conf
160
-echo "HeuristicScanPrecedence yes" >>test-clamd2.conf
161
-
162
-# Start clamd #2
163
-start_clamd test-clamd2.conf
162
+# Start clamd #2 tests
163
+(cd clamdtest$CLAMD_TEST_UNIQ2
164
+start_clamd test-clamd.conf
164 165
 
165 166
 # Test VirusEvent feature
166
-run_clamdscan test-clamd2.conf ../test/clam.exe
167
+run_clamdscan $TOP/test/clam.exe
167 168
 grep "Virus found: ClamAV-Test-File.UNOFFICIAL" test-clamd.log >/dev/null 2>/dev/null; 
168 169
 if test $? -ne 0; then
169 170
 	error "Virusaction test failed!" 
170 171
 	cat test-clamd.log
171
-	die 10;
172
+	die 2
172 173
 fi
173 174
 
174 175
 # Test HeuristicScanPrecedence feature
175
-run_clamdscan test-clamd2.conf clam-phish-exe
176
+run_clamdscan ../clam-phish-exe
176 177
 grep "Phishing.Heuristics.Email.SpoofedDomain" clamdscan.log >/dev/null 2>/dev/null;
177 178
 if test $? -ne 0; then
178 179
 	error "HeuristicScanPrecedence on test failed!"
179 180
 	cat clamdscan.log
180
-	die 11;
181
+	die 3
181 182
 fi
182 183
 
183
-if grep "^#define HAVE_FD_PASSING 1" ../clamav-config.h >/dev/null; then
184
-	run_clamdscan_fdpass test-clamd2.conf ../test/clam.exe
184
+if grep "^#define HAVE_FD_PASSING 1" $TOP/clamav-config.h >/dev/null; then
185
+	run_clamdscan_fdpass $TOP/test/clam.exe
185 186
 	grep "ClamAV-Test-File" clamdscan.log >/dev/null 2>/dev/null;
186 187
 	if test $? -ne 0; then
187 188
 		error "FDpassing test failed!"
188 189
 		cat clamdscan.log;
189
-		die 12;
190
+		die 4
190 191
 	fi
191 192
 else
192 193
 	echo "*** No file descriptor passing support, skipping test"
193 194
 fi
194
-die 0;
195
+
196
+# Test RELOAD command
197
+run_reload_test
198
+
199
+die 0
200
+)&
201
+pid2=$!
202
+
203
+wait $pid1
204
+exitcode1=$?
205
+wait $pid2
206
+exitcode2=$?
207
+rm -rf clamdtest$CLAMD_TEST_UNIQ1 clamdtest$CLAMD_TEST_UNIQ2 test-db
208
+if test $exitcode1 -ne 0 -o $exitcode2 -ne 0; then
209
+	exit 1
210
+fi
211
+exit 0
... ...
@@ -16,22 +16,33 @@ DUMA_DISABLE_BANNER=1
16 16
 LIBPRELOAD="$LIBDUMA"
17 17
 rm -f duma.log
18 18
 export DUMA_FILL DUMA_MALLOC_0_STRATEGY DUMA_OUTPUT_FILE DUMA_DISABLE_BANNER LIBPRELOAD
19
-echo "--- running clamd under duma to detect underruns"
20
-CLAMD_WRAPPER=$srcdir/preload_run.sh $srcdir/check_clamd.sh
21
-if test ! $?; then
22
-	echo "*** DUMA has detected errors"
23
-	cat duma.log
24
-	exit 3
25
-fi
19
+echo "--- starting clamd under duma to detect underruns"
20
+CLAMD_WRAPPER=$abs_srcdir/preload_run.sh $abs_srcdir/check_clamd.sh &
21
+pid1=$!
22
+
23
+echo "--- starting clamd under duma to detect underruns"
24
+DUMA_OUTPUT_FILE=duma2.log
26 25
 DUMA_PROTECT_BELOW=1
27 26
 export DUMA_PROTECT_BELOW
28
-echo "--- running clamd under duma to detect underruns"
29
-rm -f duma.log
30
-CLAMD_WRAPPER=$srcdir/preload_run.sh $srcdir/check_clamd.sh
31
-if test ! $?; then
27
+rm -f duma2.log
28
+CLAMD_TEST_UNIQ1=3 CLAMD_TEST_UNIQ2=4 CLAMD_WRAPPER=$abs_srcdir/preload_run.sh $abs_srcdir/check_clamd.sh&
29
+pid2=$!
30
+
31
+wait $pid1
32
+exitcode1=$?
33
+wait $pid2
34
+exitcode2=$?
35
+if test $exitcode1 -ne 0; then
32 36
 	echo "*** DUMA has detected errors"
33 37
 	cat duma.log
34
-	exit 3
38
+	rm -f duma.log duma2.log
39
+	exit 1
35 40
 fi
36
-rm -f duma.log
41
+if test $exitcode2 -ne 0; then
42
+	echo "*** DUMA has detected errors"
43
+	cat duma2.log
44
+	rm -f duma.log duma2.log
45
+	exit 1
46
+fi
47
+exit 0
37 48
 
... ...
@@ -18,7 +18,7 @@ VALGRIND=`which ${VALGRIND-valgrind}`
18 18
 if test ! -n "$VALGRIND" -o ! -x "$VALGRIND"; then
19 19
 	# run check_clamav under efence only if we don't have valgrind installed
20 20
 	echo "--- Running check_clamav under electric-fence"
21
-	CK_FORK=no ../libtool --mode=execute $srcdir/preload_run.sh ./check_clamav
21
+	CK_FORK=no ../libtool --mode=execute $abs_srcdir/preload_run.sh ./check_clamav
22 22
 	if test ! $?; then
23 23
 		echo "*** Electric-fence has detected errors"
24 24
 		exit 1
... ...
@@ -27,7 +27,7 @@ fi
27 27
 # we don't run clamd under electric-fence, it always crashes in free(),
28 28
 # probably doesn't work well with libpthread.
29 29
 echo "--- running clamscan under electric-fence to detect overruns"
30
-CLAMSCAN_WRAPPER=$srcdir/preload_run.sh $srcdir/check_clamscan.sh
30
+CLAMSCAN_WRAPPER=$abs_srcdir/preload_run.sh $abs_srcdir/check_clamscan.sh
31 31
 if test ! $?; then
32 32
 	echo "*** Electric-fence has detected errors"
33 33
 	exit 2
... ...
@@ -35,7 +35,7 @@ fi
35 35
 EF_PROTECT_BELOW=1
36 36
 export EF_PROTECT_BELOW
37 37
 echo "--- running clamscan under electric-fence to detect underruns"
38
-CLAMSCAN_WRAPPER=$srcdir/preload_run.sh $srcdir/check_clamscan.sh
38
+CLAMSCAN_WRAPPER=$abs_srcdir/preload_run.sh $abs_srcdir/check_clamscan.sh
39 39
 if test ! $?; then
40 40
 	echo "*** Electric-fence has detected errors"
41 41
 	exit 3
... ...
@@ -1,14 +1,14 @@
1
-LogFile /tmp/clamd-test.log
1
+# script will fill in CWD and X
2
+LogFile CWD/clamd-test.log
2 3
 LogTime yes
3 4
 LogClean yes
4 5
 LogVerbose yes
5
-PidFile /tmp/clamd-test.pid
6
-# We need to use absolute path for RELOAD, the script will fill this in
7
-# DatabaseDirectory test-db
6
+PidFile CWD/clamd-test.pid
7
+DatabaseDirectory CWD/test-db
8 8
 LocalSocket clamd-test.socket
9 9
 TCPAddr 127.0.0.1
10 10
 # using different port here to avoid conflicts with system clamd daemon
11
-TCPSocket 3311
11
+TCPSocket 331X
12 12
 ExitOnOOM yes
13 13
 DetectPUA yes
14 14
 ScanPDF yes
... ...
@@ -56,20 +56,23 @@ parse_valgrindlog()
56 56
 }
57 57
 
58 58
 
59
-VALGRIND_FLAGS="-v --trace-children=yes --track-fds=yes --leak-check=full --suppressions=$srcdir/valgrind.supp"
60
-VALGRIND_FLAGS_RACE="-v --tool=helgrind --trace-children=yes --suppressions=$srcdir/valgrind.supp"
59
+VALGRIND_FLAGS="-v --trace-children=yes --track-fds=yes --leak-check=full --suppressions=$abs_srcdir/valgrind.supp"
60
+VALGRIND_FLAGS_RACE="-v --tool=helgrind --trace-children=yes --suppressions=$abs_srcdir/valgrind.supp"
61 61
 
62 62
 echo "--- Starting check_clamav under valgrind/memcheck"
63 63
 rm -f valgrind-check.log valgrind-clamd.log valgrind-race.log
64 64
 CK_FORK=no ../libtool --mode=execute $VALGRIND $VALGRIND_FLAGS ./check_clamav >valgrind-check.log 2>&1 &
65
-pid=$!
65
+pid1=$!
66
+
66 67
 echo "--- Starting clamd under valgrind/memcheck"
67
-CLAMD_WRAPPER="$VALGRIND $VALGRIND_FLAGS" $srcdir/check_clamd.sh >valgrind-clamd.log 2>&1
68
+CLAMD_WRAPPER="$VALGRIND $VALGRIND_FLAGS" $abs_srcdir/check_clamd.sh >valgrind-clamd.log 2>&1 &
69
+pid2=$!
68 70
 
69 71
 echo "--- Starting clamd under valgrind/helgrind"
70
-CLAMD_WRAPPER="$VALGRIND $VALGRIND_FLAGS_RACE" $srcdir/check_clamd.sh >valgrind-race.log 2>&1
72
+CLAMD_TEST_UNIQ1=3 CLAMD_TEST_UNIQ2=4 CLAMD_WRAPPER="$VALGRIND $VALGRIND_FLAGS_RACE" $abs_srcdir/check_clamd.sh >valgrind-race.log 2>&1 &
73
+pid3=$!
71 74
 
72
-wait $pid
75
+wait $pid1 $pid2 $pid3
73 76
 parse_valgrindlog valgrind-check.log
74 77
 parse_valgrindlog valgrind-clamd.log
75 78
 parse_valgrindlog valgrind-race.log
... ...
@@ -1,5 +1,5 @@
1 1
 #!/bin/sh
2
-if test ! "x$CLAM_VIRUSEVENT_FILENAME" = "x$1/../test/clam.exe"; then
2
+if test ! "x$CLAM_VIRUSEVENT_FILENAME" = "x$1/../../test/clam.exe"; then
3 3
 	echo "VirusEvent incorrect: $CLAM_VIRUSEVENT_FILENAME" >$1/test-clamd.log
4 4
 	exit 1
5 5
 fi