]> The Tcpdump Group git mirrors - tcpdump/commitdiff
amend recent changes to fix tests on Solaris
authorDenis Ovsienko <[email protected]>
Thu, 8 Jan 2015 11:02:30 +0000 (11:02 +0000)
committerDenis Ovsienko <[email protected]>
Thu, 8 Jan 2015 11:08:57 +0000 (11:08 +0000)
Solaris /bin/sh does not support the "!" operator, I forgot about it
again (see commits 9ac4b76 and f4252a1). Now should be OK.

tests/crypto.sh
tests/lmp-v.sh

index 7f74eb0a8d9b8495b987f76b76d224c409b1915e..bd41921397ca8e4468a2b422d19f695b42fb35f5 100755 (executable)
@@ -8,20 +8,20 @@ then
        ./TESTonce esp2 08-sunrise-sunset-esp2.pcap esp2.out '-t -E "[email protected] 3des-cbc-hmac96:0x43434545464649494a4a4c4c4f4f51515252545457575840,[email protected] 3des-cbc-hmac96:0x434545464649494a4a4c4c4f4f5151525254545757584043"'
        ./TESTonce esp3 02-sunrise-sunset-esp.pcap esp1.out '-t -E "3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758"'
        # Reading the secret(s) from a file does not work with Capsicum.
-       if grep '^#define HAVE_CAPSICUM 1$' ../config.h >/dev/null
+       if grep '^#define HAVE_CAPSICUM 1$' ../config.h >/dev/null
        then
-               ./TESTonce esp4 08-sunrise-sunset-esp2.pcap esp2.out '-t -E "file esp-secrets.txt"'
-               ./TESTonce esp5 08-sunrise-sunset-aes.pcap esp5.out '-t -E "file esp-secrets.txt"'
-               ./TESTonce espudp1 espudp1.pcap espudp1.out '-nnnn -t -E "file esp-secrets.txt"'
-               ./TESTonce ikev2pI2 ikev2pI2.pcap ikev2pI2.out '-t -E "file ikev2pI2-secrets.txt" -v -v -v -v'
-               ./TESTonce isakmp4 isakmp4500.pcap isakmp4.out '-t -E "file esp-secrets.txt"'
-       else
                FORMAT='    %-30s: TEST SKIPPED (compiled w/Capsicum)\n'
                printf "$FORMAT" esp4
                printf "$FORMAT" esp5
                printf "$FORMAT" espudp1
                printf "$FORMAT" ikev2pI2
                printf "$FORMAT" isakmp4
+       else
+               ./TESTonce esp4 08-sunrise-sunset-esp2.pcap esp2.out '-t -E "file esp-secrets.txt"'
+               ./TESTonce esp5 08-sunrise-sunset-aes.pcap esp5.out '-t -E "file esp-secrets.txt"'
+               ./TESTonce espudp1 espudp1.pcap espudp1.out '-nnnn -t -E "file esp-secrets.txt"'
+               ./TESTonce ikev2pI2 ikev2pI2.pcap ikev2pI2.out '-t -E "file ikev2pI2-secrets.txt" -v -v -v -v'
+               ./TESTonce isakmp4 isakmp4500.pcap isakmp4.out '-t -E "file esp-secrets.txt"'
        fi
 else
        FORMAT='    %-30s: TEST SKIPPED (compiled w/o OpenSSL)\n'
index 6b5d1f214a1c47e0f57b865e2fdb9bc95e5ecdb6..138a0cd292adac6159d4860627b2eac7cf4bea7c 100755 (executable)
@@ -8,7 +8,7 @@
 
 # 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 ]
+if [ ! -f ../Makefile ]
 then
        printf '    %-30s: TEST SKIPPED (no Makefile)\n' 'lmp-v'
 elif grep '^CC = .*gcc' ../Makefile >/dev/null