]> The Tcpdump Group git mirrors - tcpdump/commitdiff
ISOCLNS: Manage a test as GCC-specific
authorFrancois-Xavier Le Bail <[email protected]>
Sat, 16 Jul 2016 15:14:53 +0000 (17:14 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Wed, 18 Jan 2017 08:16:39 +0000 (09:16 +0100)
tests/TESTLIST
tests/isis-seg-fault-1-v.sh [new file with mode: 0755]

index e84551773a71240b8315b7e19e3c06ad4841df9f..17098efe7740114ebf9b07af62b90cb47002b411 100644 (file)
@@ -249,7 +249,7 @@ isis_2-v    ISIS_level1_adjacency.pcap      isis_2-v.out    -t -v
 isis_3-v       ISIS_level2_adjacency.pcap      isis_3-v.out    -t -v
 isis_4-v       ISIS_p2p_adjacency.pcap         isis_4-v.out    -t -v
 # fuzzed pcap
-isis-seg-fault-1-v isis-seg-fault-1.pcap isis-seg-fault-1-v.out -t -v
+# isis-seg-fault-1-v is now conditionally handled by isis-seg-fault-1-v.sh
 isis-seg-fault-2-v isis-seg-fault-2.pcap isis-seg-fault-2-v.out -t -v
 isis-seg-fault-3-v isis-seg-fault-3.pcap isis-seg-fault-3-v.out -t -v
 
diff --git a/tests/isis-seg-fault-1-v.sh b/tests/isis-seg-fault-1-v.sh
new file mode 100755 (executable)
index 0000000..4de76c7
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# This "verbose" ISIS protocol test involves a float calculation that
+# may produce a slightly different result if the compiler is not GCC.
+# Test only with GCC (similar to GitHub issue #333).
+
+test_name=isis-seg-fault-1-v
+
+if [ ! -f ../Makefile ]
+then
+       printf '    %-30s: TEST SKIPPED (no Makefile)\n' $test_name
+elif grep '^CC = .*gcc' ../Makefile >/dev/null
+then
+  ./TESTonce $test_name isis-seg-fault-1.pcap isis-seg-fault-1-v.out '-t -v'
+else
+       printf '    %-30s: TEST SKIPPED (compiler is not GCC)\n' $test_name
+fi