acl test36 dst 127.0.0.1-127.0.0.128 127.0.0.0-127.1.0.0/16
acl test37 dst 127.1.0.0-127.2.0.0/16 127.1.0.1-127.1.0.128
-# TODO: make configurable depending on USE_IPV6
-# acl test41 src bad::1 bad::0-bad::f
-# acl test42 src dead::0-dead::0 dead::0
-# acl test43 src bad::0/64 bad::0/128
-# acl test44 src beef::0/16 beef:bad::/64
+acl test41 src bad::1 bad::0-bad::f
+acl test42 src dead::0-dead::0 dead::0
+acl test43 src bad::0/64 bad::0/128
+acl test44 src beef::0/16 beef:bad::/64
+skip-unless-autoconf-defines USE_IPV6 1
expect-messages <<END
WARNING: Ignoring earlier 127.0.0.1 because it is covered by 127.0.0.0-127.0.0.255
advice: Remove value 127.0.0.1 from the ACL
WARNING: Ignoring 127.1.0.1-127.1.0.128 because it is already covered by 127.1.0.0-127.2.0.0/16
advice: Remove value 127.1.0.1-127.1.0.128 from the ACL
acl name: test37
-END
-# TODO: skip-unless-autoconf-defines USE_IPV6 1
-# WARNING: Ignoring earlier bad::1 because it is covered by bad::-bad::f
-# advice: Remove value bad::1 from the ACL
-# acl name: test41
-#
-# WARNING: Ignoring dead:: because it is already covered by dead::-dead::
-# advice: Remove value dead:: from the ACL
-# acl name: test42
-#
-# WARNING: Ignoring bad:: because it is already covered by bad::/64
-# advice: Remove value bad:: from the ACL
-# acl name: test43
-#
-# WARNING: Ignoring beef:bad::/64 because it is already covered by beef::/16
-# advice: Remove value beef:bad::/64 from the ACL
-# acl name: test44
+WARNING: Ignoring earlier bad::1 because it is covered by bad::-bad::f
+ advice: Remove value bad::1 from the ACL
+ acl name: test41
+
+WARNING: Ignoring dead:: because it is already covered by dead::-dead::
+ advice: Remove value dead:: from the ACL
+ acl name: test42
+
+WARNING: Ignoring bad:: because it is already covered by bad::/64
+ advice: Remove value bad:: from the ACL
+ acl name: test43
+
+WARNING: Ignoring beef:bad::/64 because it is already covered by beef::/16
+ advice: Remove value beef:bad::/64 from the ACL
+ acl name: test44
+END
then
# Skip test unless the given macro is #defined in autoconf.h
defineName=$p1
-
- if test -n "$p2"
- then
- echo "$here: ERROR: Bad $instructionName instruction: Unexpected second parameter: $p2";
- exit 1;
- fi
+ defineValue=$p2
autoconfHeader="$top_builddir/include/autoconf.h"
if ! grep -q -w "$defineName" $autoconfHeader
echo "$here: ERROR: Cannot determine status of $defineName macro";
exit 1;
fi
+
+ if test -n "$defineValue"
+ then
+ if ! grep -q "# *define *\b$defineName *$defineValue\b" $autoconfHeader
+ then
+ echo "$here: WARNING: Skipping $configFile test because $defineName is not $defineValue in $autoconfHeader";
+ exit 0;
+ fi
+ fi
+
else
echo "$here: ERROR: Unknown test-squid-conf.sh instruction name: $instructionName";
exit 1;