Browse code

some more portabiility fixes

git-svn: trunk@4195

Török Edvin authored on 2008/09/22 20:03:55
Showing 3 changed files
... ...
@@ -214,7 +214,7 @@ exitcode1=$?
214 214
 wait $pid2
215 215
 exitcode2=$?
216 216
 rm -rf clamdtest$CLAMD_TEST_UNIQ1 clamdtest$CLAMD_TEST_UNIQ2 test-db
217
-if test $exitcode1 -ne 0 -o $exitcode2 -ne 0; then
217
+if test $exitcode1 -ne 0 || test $exitcode2 -ne 0; then
218 218
 	exit 1
219 219
 fi
220 220
 exit 0
... ...
@@ -15,7 +15,7 @@ EF_FREE_WIPES=1
15 15
 LIBPRELOAD="$LIBEFENCE"
16 16
 export EF_FREE_WIPES LIBPRELOAD EF_DISABLE_BANNER
17 17
 VALGRIND=`which ${VALGRIND-valgrind}`
18
-if test ! -n "$VALGRIND" -o ! -x "$VALGRIND"; then
18
+if test ! -n "$VALGRIND" || test ! -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 21
 	CK_FORK=no ../libtool --mode=execute $abs_srcdir/preload_run.sh ./check_clamav
... ...
@@ -17,7 +17,7 @@ parse_valgrindlog()
17 17
 		echo "*** Logfile $1 not found. Valgrind failed to run?"
18 18
 	fi
19 19
 	NRUNS=`grep "ERROR SUMMARY" $1 | wc -l`
20
-	if test $NRUNS -eq `grep "ERROR SUMMARY: 0 errors" $1 | wc -l` -a `grep "FATAL:" $1|wc -l ` -eq 0; then
20
+	if test $NRUNS -eq `grep "ERROR SUMMARY: 0 errors" $1 | wc -l` && test `grep "FATAL:" $1|wc -l ` -eq 0; then
21 21
 		if test "$1" = "valgrind-race.log" || 
22 22
 			test $NRUNS -eq `grep "no leaks are possible" $1 | wc -l` ||
23 23
 			test `grep "lost:" $1 | grep -v "0 bytes" | wc -l` -eq 0; then 
... ...
@@ -74,7 +74,7 @@ parse_valgrindlog valgrind-check.log
74 74
 parse_valgrindlog valgrind-clamd.log
75 75
 parse_valgrindlog valgrind-race.log
76 76
 
77
-if test -f valgrind-check.log -o -f valgrind-race.log -o -f valgrind-clamd.log; then
77
+if test -f valgrind-check.log || test -f valgrind-race.log || test -f valgrind-clamd.log; then
78 78
 	exit 1;
79 79
 fi
80 80
 exit 0