#!/bin/sh
+exitcode=0
+
# Only attempt OpenSSL-specific tests when compiled with the library.
if grep '^#define HAVE_LIBCRYPTO 1$' ../config.h >/dev/null
then
./TESTonce esp1 02-sunrise-sunset-esp.pcap esp1.out '-E "
[email protected] 3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758"'
+ [ $? -eq 0 ] || exitcode=1
./TESTonce esp2 08-sunrise-sunset-esp2.pcap esp2.out '-E "
[email protected] 3des-cbc-hmac96:0x43434545464649494a4a4c4c4f4f51515252545457575840,
[email protected] 3des-cbc-hmac96:0x434545464649494a4a4c4c4f4f5151525254545757584043"'
+ [ $? -eq 0 ] || exitcode=1
./TESTonce esp3 02-sunrise-sunset-esp.pcap esp1.out '-E "3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758"'
+ [ $? -eq 0 ] || exitcode=1
# Reading the secret(s) from a file does not work with Capsicum.
if grep '^#define HAVE_CAPSICUM 1$' ../config.h >/dev/null
then
printf "$FORMAT" isakmp4
else
./TESTonce esp4 08-sunrise-sunset-esp2.pcap esp2.out '-E "file esp-secrets.txt"'
+ [ $? -eq 0 ] || exitcode=1
./TESTonce esp5 08-sunrise-sunset-aes.pcap esp5.out '-E "file esp-secrets.txt"'
+ [ $? -eq 0 ] || exitcode=1
./TESTonce espudp1 espudp1.pcap espudp1.out '-nnnn -E "file esp-secrets.txt"'
+ [ $? -eq 0 ] || exitcode=1
./TESTonce ikev2pI2 ikev2pI2.pcap ikev2pI2.out '-E "file ikev2pI2-secrets.txt" -v -v -v -v'
+ [ $? -eq 0 ] || exitcode=1
./TESTonce isakmp4 isakmp4500.pcap isakmp4.out '-E "file esp-secrets.txt"'
+ [ $? -eq 0 ] || exitcode=1
fi
else
FORMAT=' %-35s: TEST SKIPPED (compiled w/o OpenSSL)\n'
printf "$FORMAT" ikev2pI2
printf "$FORMAT" isakmp4
fi
+
+exit $exitcode
# may produce a slightly different result if the compiler is not GCC.
# Test only with GCC (similar to GitHub issue #333).
+exitcode=0
test_name=isis-seg-fault-1-v
if [ ! -f ../Makefile ]
printf ' %-35s: 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 '-v'
+ ./TESTonce $test_name isis-seg-fault-1.pcap isis-seg-fault-1-v.out '-v'
+ [ $? -eq 0 ] || exitcode=1
else
printf ' %-35s: TEST SKIPPED (compiler is not GCC)\n' $test_name
fi
+
+exit $exitcode
# GCC build and must reproduce correctly on any other GCC build regardless of
# the architecture.
+exitcode=0
+
# A Windows build may have no file named Makefile and also a version of grep
# that won't return an error when the file does not exist. Work around.
if [ ! -f ../Makefile ]
printf ' %-35s: TEST SKIPPED (no Makefile)\n' 'lmp-v'
elif grep '^CC = .*gcc' ../Makefile >/dev/null
then
- ./TESTonce lmp-v lmp.pcap lmp-v.out '-T lmp -v'
+ ./TESTonce lmp-v lmp.pcap lmp-v.out '-T lmp -v'
+ [ $? -eq 0 ] || exitcode=1
else
printf ' %-35s: TEST SKIPPED (compiler is not GCC)\n' 'lmp-v'
fi
+
+exit $exitcode
#!/bin/sh
+exitcode=0
+
# NFLOG support depends on both DLT_NFLOG and working <pcap/nflog.h>
if grep '^#define HAVE_PCAP_NFLOG_H 1$' ../config.h >/dev/null
then
- ./TESTonce nflog-e nflog.pcap nflog-e.out '-e'
+ ./TESTonce nflog-e nflog.pcap nflog-e.out '-e'
+ [ $? -eq 0 ] || exitcode=1
else
printf ' %-35s: TEST SKIPPED (compiled w/o NFLOG)\n' 'nflog-e'
fi
+
+exit $exitcode