# HG changeset patch # User Augie Fackler # Date 2017-04-03 22:58:00 # Node ID 2a865df042b7f469e6023fe763942bf9ead5767f # Parent 7937dabb5447e377046dc81a2f3c45dd23ba4ee6 check-code: update test IP address enforcement checks Instead of mentioning 127.0.0.1, we should use $LOCALIP. Anytime $LOCALIP appears in output, we should make sure we use (glob) on that line of output so that weird environments that do remapping jiggery pokery (such as our FreeBSD buildbot that's in a jail) don't get spurious test failures. diff --git a/contrib/check-code.py b/contrib/check-code.py --- a/contrib/check-code.py +++ b/contrib/check-code.py @@ -190,8 +190,10 @@ utestpats = [ (r'^ .*: largefile \S+ not available from file:.*/.*[^)]$', winglobmsg), (r'^ .*file://\$TESTTMP', 'write "file:/*/$TESTTMP" + (glob) to match on windows too'), - (r'^ [^$>].*27\.0\.0\.1.*[^)]$', - 'use (glob) to match localhost IP on hosts without 127.0.0.1 too'), + (r'^ [^$>].*27\.0\.0\.1', + 'use $LOCALIP not an explicit loopback address'), + (r'^ [^$>].*\$LOCALIP.*[^)]$', + 'mark $LOCALIP output lines with (glob) to help tests in BSD jails'), (r'^ (cat|find): .*: No such file or directory', 'use test -f to test for file existence'), (r'^ diff -[^ -]*p',