From eb0e3c98bb8b0e2117b1a523e20bce7bf213cbaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B6r=C3=B6k=20Edvin?= Date: Mon, 22 Sep 2008 11:03:55 +0000 Subject: [PATCH] some more portabiility fixes git-svn: trunk@4195 --- unit_tests/check_clamd.sh | 2 +- unit_tests/efence_tests.sh | 2 +- unit_tests/valgrind_tests.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/unit_tests/check_clamd.sh b/unit_tests/check_clamd.sh index 7b0971dba..de76d09c7 100755 --- a/unit_tests/check_clamd.sh +++ b/unit_tests/check_clamd.sh @@ -214,7 +214,7 @@ exitcode1=$? wait $pid2 exitcode2=$? rm -rf clamdtest$CLAMD_TEST_UNIQ1 clamdtest$CLAMD_TEST_UNIQ2 test-db -if test $exitcode1 -ne 0 -o $exitcode2 -ne 0; then +if test $exitcode1 -ne 0 || test $exitcode2 -ne 0; then exit 1 fi exit 0 diff --git a/unit_tests/efence_tests.sh b/unit_tests/efence_tests.sh index 6f7d038f8..e7dcf89cb 100755 --- a/unit_tests/efence_tests.sh +++ b/unit_tests/efence_tests.sh @@ -15,7 +15,7 @@ EF_FREE_WIPES=1 LIBPRELOAD="$LIBEFENCE" export EF_FREE_WIPES LIBPRELOAD EF_DISABLE_BANNER VALGRIND=`which ${VALGRIND-valgrind}` -if test ! -n "$VALGRIND" -o ! -x "$VALGRIND"; then +if test ! -n "$VALGRIND" || test ! -x "$VALGRIND"; then # run check_clamav under efence only if we don't have valgrind installed echo "--- Running check_clamav under electric-fence" CK_FORK=no ../libtool --mode=execute $abs_srcdir/preload_run.sh ./check_clamav diff --git a/unit_tests/valgrind_tests.sh b/unit_tests/valgrind_tests.sh index 6d2b5f5b9..58ed2ddef 100755 --- a/unit_tests/valgrind_tests.sh +++ b/unit_tests/valgrind_tests.sh @@ -17,7 +17,7 @@ parse_valgrindlog() echo "*** Logfile $1 not found. Valgrind failed to run?" fi NRUNS=`grep "ERROR SUMMARY" $1 | wc -l` - if test $NRUNS -eq `grep "ERROR SUMMARY: 0 errors" $1 | wc -l` -a `grep "FATAL:" $1|wc -l ` -eq 0; then + if test $NRUNS -eq `grep "ERROR SUMMARY: 0 errors" $1 | wc -l` && test `grep "FATAL:" $1|wc -l ` -eq 0; then if test "$1" = "valgrind-race.log" || test $NRUNS -eq `grep "no leaks are possible" $1 | wc -l` || test `grep "lost:" $1 | grep -v "0 bytes" | wc -l` -eq 0; then @@ -74,7 +74,7 @@ parse_valgrindlog valgrind-check.log parse_valgrindlog valgrind-clamd.log parse_valgrindlog valgrind-race.log -if test -f valgrind-check.log -o -f valgrind-race.log -o -f valgrind-clamd.log; then +if test -f valgrind-check.log || test -f valgrind-race.log || test -f valgrind-clamd.log; then exit 1; fi exit 0