~yolanda.robla/ubuntu/saucy/clamav/dep-8-tests

« back to all changes in this revision

Viewing changes to unit_tests/duma_tests.sh

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2009-11-02 23:27:19 UTC
  • mfrom: (0.35.9 sid)
  • Revision ID: james.westby@ubuntu.com-20091102232719-61ay35095dhbuxfm
Tags: 0.95.3+dfsg-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Drop build-dep on electric-fence (in Universe)
  - Build-dep on libltdl3-dev instead of libltdl-dev for updating earlier
    releases more easily
  - Add apparmor profiles for clamd and freshclam along with maintainer
    script changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
# Run under duma
3
 
test "x$RUNDUMA" = "x1" || { echo "*** duma tests skipped by default, use 'make check RUNDUMA=1' to activate (but don't report bugs about timeouts!)"; exit 77; }
4
 
LIBDIRS=`../libtool --config | grep sys_lib_search_path_spec | sed -e 's/.*"\(.*\)"/\1/'`
5
 
if test -z "$LIBDUMA"; then
6
 
        for i in $LIBDIRS; do
7
 
                if test -f "$i/libduma.so"; then
8
 
                        LIBDUMA="$i/libduma.so"
9
 
                        break;
10
 
                fi
11
 
        done
12
 
fi
13
 
test -f "$LIBDUMA" || { echo "*** duma not found, skipping test"; exit 77;}
14
 
DUMA_FILL=90
15
 
DUMA_MALLOC_0_STRATEGY=1
16
 
DUMA_OUTPUT_FILE=duma.log
17
 
DUMA_DISABLE_BANNER=1
18
 
LIBPRELOAD="$LIBDUMA"
19
 
rm -f duma.log
20
 
export CK_DEFAULT_TIMEOUT=40
21
 
export DUMA_FILL DUMA_MALLOC_0_STRATEGY DUMA_OUTPUT_FILE DUMA_DISABLE_BANNER LIBPRELOAD
22
 
echo "--- starting clamd under duma to detect overruns"
23
 
CLAMD_WRAPPER=$abs_srcdir/preload_run.sh $abs_srcdir/check_clamd.sh
24
 
if test $? -ne 0; then
25
 
        echo "*** DUMA has detected errors"
26
 
        cat duma.log
27
 
        rm -f duma.log duma2.log
28
 
        exit 1
29
 
fi
30
 
 
31
 
echo "--- starting clamd under duma to detect underruns"
32
 
DUMA_OUTPUT_FILE=duma2.log
33
 
DUMA_PROTECT_BELOW=1
34
 
export DUMA_PROTECT_BELOW
35
 
rm -f duma2.log
36
 
CLAMD_TEST_UNIQ1=3 CLAMD_TEST_UNIQ2=4 CLAMD_WRAPPER=$abs_srcdir/preload_run.sh $abs_srcdir/check_clamd.sh
37
 
if test $? -ne 0; then
38
 
        echo "*** DUMA has detected errors"
39
 
        cat duma2.log
40
 
        rm -f duma.log duma2.log
41
 
        exit 1
42
 
fi
43
 
exit 0