]> The Tcpdump Group git mirrors - tcpdump/commitdiff
LMPv1: make the "-v" test GCC-specific (GH #333)
authorDenis Ovsienko <[email protected]>
Mon, 20 Jan 2014 11:38:08 +0000 (15:38 +0400)
committerDenis Ovsienko <[email protected]>
Mon, 20 Jan 2014 11:48:28 +0000 (15:48 +0400)
tests/TESTLIST
tests/lmp-v.sh [new file with mode: 0755]

index 8a1c5f784166152a0185811e8164f5f4474280ed..f2ab95b908b1a764dbf95b421398fcdeef845967 100644 (file)
@@ -40,7 +40,7 @@ isakmp4 isakmp4500.pcap             isakmp4.out -t -E "file esp-secrets.txt"
 
 # Link Management Protocol tests
 lmp            lmp.pcap                lmp.out -t -T lmp
-lmp-v          lmp.pcap                lmp-v.out -t -T lmp -v
+# lmp-v is now conditionally handled by lmp-v.sh
 
 # MPLS tests
 mpls-ldp-hello mpls-ldp-hello.pcap     mpls-ldp-hello.out -t -v
diff --git a/tests/lmp-v.sh b/tests/lmp-v.sh
new file mode 100755 (executable)
index 0000000..ac52326
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# The "verbose" Link Management Protocol test involves a float calculation that
+# may produce a slightly different result depending on the architecture and the
+# compiler (see GitHub issue #333). The reference output was produced using a
+# GCC build and must reproduce correctly on any other GCC build regardless of
+# the architecture.
+
+if ! grep -qe '^CC = gcc$' ../Makefile
+then
+       printf '%-30s: TEST SKIPPED (compiler is not GCC)\n' 'lmp-v'
+       exit 0
+fi
+
+./TESTonce lmp-v lmp.pcap lmp-v.out '-t -T lmp -v'