Patchwork D3247: tests: load showstack in test-pull-http.t so network hangs are easier to find

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

Comments

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

REVISION SUMMARY
  This also gives us some minimal "it loads" coverage on showstack,
  which I rather like.
  
  I added this in service of debugging a hang introduced on Python 3 by
  revision https://phab.mercurial-scm.org/rHGa88d68dc3ee82993597f3f90527eed8d9c270fdd. I'm still not sure what the problem there is,
  but this at least gives us a little bit of a chance to figure out
  what's going on.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-pull-http.t

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel
phabricator - April 12, 2018, 2:56 p.m.
mharbison72 added a comment.


  It doesn't load on Windows:
  
    $ ../hg id --config extensions.showstack=../contrib/showstack.py --config extensions.evolve=!
    Traceback (most recent call last):
      File "e:\Projects\hg\mercurial\extensions.py", line 215, in _runextsetup
        extsetup(ui)
      File "../contrib/showstack.py", line 18, in extsetup
        signal.signal(signal.SIGQUIT, sigshow)
    AttributeError: 'module' object has no attribute 'SIGQUIT'
    *** failed to set up extension showstack: 'module' object has no attribute 'SIGQUIT'

REPOSITORY
  rHG Mercurial

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

To: durin42, #hg-reviewers
Cc: mharbison72, mercurial-devel
phabricator - April 12, 2018, 3:03 p.m.
durin42 added a comment.


  In https://phab.mercurial-scm.org/D3247#52450, @mharbison72 wrote:
  
  > It doesn't load on Windows:
  >
  >   $ ../hg id --config extensions.showstack=../contrib/showstack.py --config extensions.evolve=!
  >   Traceback (most recent call last):
  >     File "e:\Projects\hg\mercurial\extensions.py", line 215, in _runextsetup
  >       extsetup(ui)
  >     File "../contrib/showstack.py", line 18, in extsetup
  >       signal.signal(signal.SIGQUIT, sigshow)
  >   AttributeError: 'module' object has no attribute 'SIGQUIT'
  >   *** failed to set up extension showstack: 'module' object has no attribute 'SIGQUIT'
  >
  
  
  I should have known. Now guarded by a no-windows.

REPOSITORY
  rHG Mercurial

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

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

Patch

diff --git a/tests/test-pull-http.t b/tests/test-pull-http.t
--- a/tests/test-pull-http.t
+++ b/tests/test-pull-http.t
@@ -1,5 +1,14 @@ 
 #require killdaemons
 
+For debugging: this is a pretty simple test that is a good candidate
+for tracking down network-related bugs. Sometimes a command in this
+hangs, so having showstack pre-loaded is sometimes helpful. This also
+gives us a test that at least proves showstack can be loaded.
+  $ cat >> $HGRCPATH <<EOF
+  > [extensions]
+  > showstack = $TESTDIR/../contrib/showstack.py
+  > EOF
+
   $ hg init test
   $ cd test
   $ echo a > a