Patchwork D3251: tests: glob away fqdn wherever we print it

login
register
mail settings
Submitter phabricator
Date April 11, 2018, 9:12 p.m.
Message ID <differential-rev-PHID-DREV-mlylnjwtphul5r2leulp-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30743/
State Superseded
Headers show

Comments

phabricator - April 11, 2018, 9:12 p.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  These localhost instances are actually from a getfqdn call, which
  means on some of my test systems it comes out as localhost.localdomain
  or
  1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa. I'm
  tired of this, so let's glob it away.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3251

AFFECTED FILES
  tests/test-pull-bundle.t
  tests/test-push-http.t

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel
phabricator - April 11, 2018, 10:39 p.m.
mharbison72 added a comment.


  Is this something where a substitution pattern would work (so that it is automatic)?  I looked at subbing in $LOCALIP$ instead of having to glob $LOCALIP lines manually, but I didn't because all I could tell was that the glob helped FreeBSD jails in some way that I probably wouldn't be able to test.  These seem somewhat related, maybe.  (And I just started hitting this too on CentOS 7.4 for some reason, so +1.)

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3251

To: durin42, #hg-reviewers
Cc: mharbison72, mercurial-devel
phabricator - April 11, 2018, 10:40 p.m.
durin42 added a comment.


  In https://phab.mercurial-scm.org/D3251#52130, @mharbison72 wrote:
  
  > Is this something where a substitution pattern would work (so that it is automatic)?  I looked at subbing in $LOCALIP$ instead of having to glob $LOCALIP lines manually, but I didn't because all I could tell was that the glob helped FreeBSD jails in some way that I probably wouldn't be able to test.  These seem somewhat related, maybe.  (And I just started hitting this too on CentOS 7.4 for some reason, so +1.)
  
  
  I think this only shows up in --debug server output, which we didn't have until recently.
  
  I tried *super hard* to get this to work using a replacement mechanism, and failed. This was my "the heck with it, I want to be done" solution.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3251

To: durin42, #hg-reviewers
Cc: mharbison72, mercurial-devel
phabricator - April 11, 2018, 10:50 p.m.
mharbison72 added a comment.


  In https://phab.mercurial-scm.org/D3251#52132, @durin42 wrote:
  
  > In https://phab.mercurial-scm.org/D3251#52130, @mharbison72 wrote:
  >
  > > Is this something where a substitution pattern would work (so that it is automatic)?  I looked at subbing in $LOCALIP$ instead of having to glob $LOCALIP lines manually, but I didn't because all I could tell was that the glob helped FreeBSD jails in some way that I probably wouldn't be able to test.  These seem somewhat related, maybe.  (And I just started hitting this too on CentOS 7.4 for some reason, so +1.)
  >
  >
  > I think this only shows up in --debug server output, which we didn't have until recently.
  >
  > I tried *super hard* to get this to work using a replacement mechanism, and failed. This was my "the heck with it, I want to be done" solution.
  
  
  Seems reasonable, there aren't too many here.  I'm more interested in switching $LOCALIP, because I keep hitting that.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3251

To: durin42, #hg-reviewers
Cc: mharbison72, mercurial-devel
phabricator - April 12, 2018, 3:26 p.m.
indygreg accepted this revision.
indygreg added a comment.
This revision is now accepted and ready to land.


  I think `$LOCALIP$` is the proper place for this fix. But it sounds like there were issues implementing that. Perfect is the enemy of done.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3251

To: durin42, #hg-reviewers, indygreg
Cc: indygreg, mharbison72, mercurial-devel

Patch

diff --git a/tests/test-push-http.t b/tests/test-push-http.t
--- a/tests/test-push-http.t
+++ b/tests/test-push-http.t
@@ -79,7 +79,7 @@ 
   > txnclose-phase.test = sh $TESTTMP/hook.sh 
   > EOF
   $ req "--debug --config extensions.blackbox="
-  listening at http://localhost:$HGPORT/ (bound to $LOCALIP:$HGPORT) (?)
+  listening at http://*:$HGPORT/ (bound to $LOCALIP:$HGPORT) (glob) (?)
   pushing to http://localhost:$HGPORT/
   searching for changes
   remote: redirecting incoming bundle to */hg-unbundle-* (glob)
@@ -100,7 +100,7 @@ 
   $ hg rollback
   repository tip rolled back to revision 0 (undo serve)
   $ req "--debug --config server.streamunbundle=True --config extensions.blackbox="
-  listening at http://localhost:$HGPORT/ (bound to $LOCALIP:$HGPORT) (?)
+  listening at http://*:$HGPORT/ (bound to $LOCALIP:$HGPORT) (glob) (?)
   pushing to http://localhost:$HGPORT/
   searching for changes
   remote: adding changesets
diff --git a/tests/test-pull-bundle.t b/tests/test-pull-bundle.t
--- a/tests/test-pull-bundle.t
+++ b/tests/test-pull-bundle.t
@@ -49,7 +49,7 @@ 
   > 0.hg heads=bbd179dfa0a71671c253b3ae0aa1513b60d199fa
   > EOF
   $ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid
-  listening at http://localhost:$HGPORT2/ (bound to $LOCALIP:$HGPORT2) (?)
+  listening at http://*:$HGPORT2/ (bound to $LOCALIP:$HGPORT2) (glob) (?)
   $ cat ../repo.pid >> $DAEMON_PIDS
   $ cd ..
   $ hg clone -r 0 http://localhost:$HGPORT2/ repo.pullbundle
@@ -91,7 +91,7 @@ 
 
   $ cd repo
   $ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid
-  listening at http://localhost:$HGPORT2/ (bound to $LOCALIP:$HGPORT2) (?)
+  listening at http://*:$HGPORT2/ (bound to $LOCALIP:$HGPORT2) (glob) (?)
   $ cat ../repo.pid >> $DAEMON_PIDS
   $ cd ..
   $ hg clone http://localhost:$HGPORT2/ repo.pullbundle2
@@ -126,7 +126,7 @@ 
   > 0.hg heads=bbd179dfa0a71671c253b3ae0aa1513b60d199fa
   > EOF
   $ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid
-  listening at http://localhost:$HGPORT2/ (bound to $LOCALIP:$HGPORT2) (?)
+  listening at http://*:$HGPORT2/ (bound to $LOCALIP:$HGPORT2) (glob) (?)
   $ cat ../repo.pid >> $DAEMON_PIDS
   $ cd ..
   $ hg clone -r 0 http://localhost:$HGPORT2/ repo.pullbundle3