Patchwork [5,of,5] check-code: update test IP address enforcement checks

mail settings
Submitter Augie Fackler
Date April 3, 2017, 10:58 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/19942/
State Accepted
Headers show


Augie Fackler - April 3, 2017, 10:58 p.m.
# HG changeset patch
# User Augie Fackler <>
# Date 1491260280 14400
#      Mon Apr 03 18:58:00 2017 -0400
# Node ID c86271708a0634615648fbd737fe4f00ef143aff
# Parent  73790eb84eb70a4fd061c8ae4b80e7650cb3f7d4
check-code: update test IP address enforcement checks

Instead of mentioning, 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/ b/contrib/
--- a/contrib/
+++ b/contrib/
@@ -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 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',