]> The Tcpdump Group git mirrors - tcpdump/blob - tests/isis-seg-fault-1-v.sh
VRRP: Add a test capture file
[tcpdump] / tests / isis-seg-fault-1-v.sh
1 #!/bin/sh
2
3 # This "verbose" ISIS protocol test involves a float calculation that
4 # may produce a slightly different result if the compiler is not GCC.
5 # Test only with GCC (similar to GitHub issue #333).
6
7 #
8 # Get the tests directory from $0.
9 #
10 testsdir=`dirname "$0"`
11
12 exitcode=0
13 test_name=isis-seg-fault-1-v
14
15 if [ ! -f ../Makefile ]
16 then
17 printf ' %-35s: TEST SKIPPED (no Makefile)\n' $test_name
18 elif grep '^CC = .*gcc' ../Makefile >/dev/null
19 then
20 passed=`cat .passed`
21 failed=`cat .failed`
22 if ${testsdir}/TESTonce $test_name ${testsdir}/isis-seg-fault-1.pcapng ${testsdir}/isis-seg-fault-1-v.out '-v'
23 then
24 passed=`expr $passed + 1`
25 echo $passed >.passed
26 else
27 failed=`expr $failed + 1`
28 echo $failed >.failed
29 exitcode=1
30 fi
31 else
32 printf ' %-35s: TEST SKIPPED (compiler is not GCC)\n' $test_name
33 fi
34
35 exit $exitcode