~ubuntu-branches/ubuntu/saucy/maradns/saucy

« back to all changes in this revision

Viewing changes to sqa/franky.hosts.test.openbsd

  • Committer: Bazaar Package Importer
  • Author(s): Kai Hendry
  • Date: 2006-10-09 17:44:21 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20061009174421-yb151elg3m4t5shl
Tags: 1.2.12.03-1
* New upstream release with many new doc tweaks. Though most of the changes
  are with the webpages which I have chosen not to distribute as you can
  read them all rather online at http://maradns.org/
* The diffs in the Makefiles are due to upstream's configure script
* Added bind2csv2.py as an example from upstream's tools/
  There is a lot of little scripts in tools/ which can probably join this

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/ksh
 
2
 
 
3
# This script is a recursive stress test; we run a large number of queries
 
4
# against MaraDNS and make sure MaraDNS doesn't crash nor become unable to
 
5
# resolve hostnames.  We also make sure that Mara doesn't leak memory.
 
6
 
 
7
NUM=1
 
8
ASKMARA=../tools/$ASKMARA
 
9
HOSTFILE=hosts3
 
10
 
 
11
while : ; do
 
12
        echo Test round $NUM
 
13
        NUM=$(( $NUM + 1 ))
 
14
        echo >> sqa.output
 
15
        echo >> sqa.output
 
16
        echo >> sqa.output
 
17
        date >> sqa.output
 
18
        ps auxw | grep maradns >> sqa.output
 
19
        cat $HOSTFILE | sed 's/[^A-Za-z0-9\-\.\n]//g' | awk '
 
20
            BEGIN{srand();}
 
21
            { a++; b++
 
22
            if(a % 7 == 0) { b++
 
23
                    print "./sendudp Awww.google.com. 127.0.0.4 > /dev/null"}
 
24
            if(a % 11 == 0) { b++
 
25
                    print "./sendudp Ayahoo.com. 127.0.0.4 > /dev/null"}
 
26
            if(a % 13 == 0) { b++
 
27
                    print "./sendudp Awww.msn.com. 127.0.0.4 > /dev/null"}
 
28
            if(a % 83 == 0) { b++
 
29
                    print "./sendudp Awww.myspace.com. 127.0.0.4 > /dev/null"}
 
30
            if(a % 17 == 0) { b++
 
31
            w = int(rand() * 256);
 
32
            x = int(rand() * 256);
 
33
            y = int(rand() * 256);
 
34
            z = int(rand() * 256);
 
35
 print "./sendudp P" w "." x "." y "." z ".in-addr.arpa. 127.0.0.4 > /dev/null"
 
36
               }
 
37
            print "./sendudp A"$0". 127.0.0.4 > /dev/null"
 
38
            if(b > 10) {print "sleep 1"; b = 0} }' | sh
 
39
        sleep 10
 
40
        # Make sure we'll still able to resolve host names
 
41
        $ASKMARA 1:www.google.com. 127.0.0.4 >> sqa.output
 
42
        $ASKMARA 1:www.yahoo.com. 127.0.0.4 >> sqa.output
 
43
        $ASKMARA 1:www.msn.com. 127.0.0.4 >> sqa.output
 
44
        $ASKMARA 1:www.microsoft.com. 127.0.0.4 >> sqa.output
 
45
        $ASKMARA 1:www.redhat.com. 127.0.0.4 >> sqa.output
 
46
        $ASKMARA 1:www.distrowatch.com. 127.0.0.4 >> sqa.output
 
47
        $ASKMARA 1:www.myspace.com. 127.0.0.4 >> sqa.output
 
48
        $ASKMARA 1:www.maradns.org. 127.0.0.4 >> sqa.output
 
49
        $ASKMARA 1:www.samiam.org. 127.0.0.4 >> sqa.output
 
50
done
 
51