summaryrefslogtreecommitdiffstats
path: root/src/test/test3.sh
blob: 4b6512189101d22acc9d3810489f8f8c6855c28a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh -xe

../dnscap -g -f -r frags.pcap-dist -o use_layers=yes -o defrag_ipv4=yes -o max_ipv4_fragments_per_packet=64 2>frags.out

# remove timestamp
sed -i -e 's%^\(\[[0-9]*\]\)[^\[]*\[%\1 [%g' frags.out

# create gold file
cp "$srcdir/dns.gold" frags.gold
sed -i -e 's%^\(\[[0-9]*\]\)[^\[]*\[%\1 [%g' frags.gold
sed -i -e 's%dns.pcap-dist%frags.pcap-dist%g' frags.gold

diff frags.out frags.gold