Browse code

fix duma timeouts (thanks Nigel!).

git-svn: trunk@4859

Török Edvin authored on 2009/02/25 06:27:38
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Wed Feb 25 00:00:25 EET 2009 (edwin)
2
+------------------------------------
3
+ * unit_tests/duma_tests.sh: fix duma timeouts (thanks Nigel!).
4
+
1 5
 Tue Feb 24 22:50:21 EET 2009 (edwin)
2 6
 ------------------------------------
3 7
  * clamd/others.c: force alignment of ancillary data buffer (bb
... ...
@@ -16,34 +16,27 @@ DUMA_OUTPUT_FILE=duma.log
16 16
 DUMA_DISABLE_BANNER=1
17 17
 LIBPRELOAD="$LIBDUMA"
18 18
 rm -f duma.log
19
+export CK_DEFAULT_TIMEOUT=40
19 20
 export DUMA_FILL DUMA_MALLOC_0_STRATEGY DUMA_OUTPUT_FILE DUMA_DISABLE_BANNER LIBPRELOAD
20 21
 echo "--- starting clamd under duma to detect overruns"
21
-CLAMD_WRAPPER=$abs_srcdir/preload_run.sh $abs_srcdir/check_clamd.sh &
22
-pid1=$!
22
+CLAMD_WRAPPER=$abs_srcdir/preload_run.sh $abs_srcdir/check_clamd.sh
23
+if test $? -ne 0; then
24
+	echo "*** DUMA has detected errors"
25
+	cat duma.log
26
+	rm -f duma.log duma2.log
27
+	exit 1
28
+fi
23 29
 
24 30
 echo "--- starting clamd under duma to detect underruns"
25 31
 DUMA_OUTPUT_FILE=duma2.log
26 32
 DUMA_PROTECT_BELOW=1
27 33
 export DUMA_PROTECT_BELOW
28 34
 rm -f duma2.log
29
-CLAMD_TEST_UNIQ1=3 CLAMD_TEST_UNIQ2=4 CLAMD_WRAPPER=$abs_srcdir/preload_run.sh $abs_srcdir/check_clamd.sh&
30
-pid2=$!
31
-
32
-wait $pid1
33
-exitcode1=$?
34
-wait $pid2
35
-exitcode2=$?
36
-if test $exitcode1 -ne 0; then
37
-	echo "*** DUMA has detected errors"
38
-	cat duma.log
39
-	rm -f duma.log duma2.log
40
-	exit 1
41
-fi
42
-if test $exitcode2 -ne 0; then
35
+CLAMD_TEST_UNIQ1=3 CLAMD_TEST_UNIQ2=4 CLAMD_WRAPPER=$abs_srcdir/preload_run.sh $abs_srcdir/check_clamd.sh
36
+if test $? -ne 0; then
43 37
 	echo "*** DUMA has detected errors"
44 38
 	cat duma2.log
45 39
 	rm -f duma.log duma2.log
46 40
 	exit 1
47 41
 fi
48 42
 exit 0
49
-