skip failing test on linux #4663

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
7 participants
@robertkowalski
Member

robertkowalski commented Feb 12, 2014

The GNU shell returns a code and no signal if it gets a SIGSEGV
signal, so we have to skip this. Hat tip to @tjfontaine

This test fails on Linux and therefore travis. I first thought it would be a node code issue and created some test-code (https://github.com/robertkowalski/node-signal-debian), but happily TJ helped me to identify the issue with

var proc = spawn(sh, [shFlag, cmd], conf)
:

19:29:27 <@tjfontaine> robertkowalski: ok, I can explain what's going on here
19:29:34 <@tjfontaine> robertkowalski: we both just made the same mistake
19:29:54 <@tjfontaine> robertkowalski: the exit code and signal you're seeing are from 'sh' 
                                      but not from your node
19:38:24 <@tjfontaine> robertkowalski: does that make sense? iow change from spawn('sh'... 
                                      to spawn(process.execPath or execFile(process.execPath, and 
                                      you'll see the signal

After that commit every test for node 0.10 (0.8 still one missing) is running on travis, so we could start using travis for CI which could help us alot in daily work (e.g. pretesting PRs and giving automatic feedback, providing a single point of truth for tests). I tested it already with my github account, a run takes 7 minutes (including the old tests)

@tjfontaine

This comment has been minimized.

Show comment
Hide comment
@tjfontaine

tjfontaine Feb 12, 2014

can the tests be changed instead to merely invoke node and not use the shell instead?

If the goal is to accurately be notified when a process is signalled that's the preferred mechanism.

can the tests be changed instead to merely invoke node and not use the shell instead?

If the goal is to accurately be notified when a process is signalled that's the preferred mechanism.

@robertkowalski

This comment has been minimized.

Show comment
Hide comment
@robertkowalski

robertkowalski Feb 12, 2014

Member

@tjfontaine changing the tests doesn't work I think.

The problem already starts in lifecycle.js (where preinstall-hooks & co run):

var proc = spawn(sh, [shFlag, cmd], conf)

npm spawns a child already there with the shell of choice (sh -c for unix/linux and for cmd.exe windows) and in that sub-sub-shell the signal is sent

Member

robertkowalski commented Feb 12, 2014

@tjfontaine changing the tests doesn't work I think.

The problem already starts in lifecycle.js (where preinstall-hooks & co run):

var proc = spawn(sh, [shFlag, cmd], conf)

npm spawns a child already there with the shell of choice (sh -c for unix/linux and for cmd.exe windows) and in that sub-sub-shell the signal is sent

@rlidwka

This comment has been minimized.

Show comment
Hide comment
@rlidwka

rlidwka Feb 13, 2014

Contributor

+1, it's once single test that I have not been able to launch successfully

introduced in #4110

Contributor

rlidwka commented Feb 13, 2014

+1, it's once single test that I have not been able to launch successfully

introduced in #4110

@domenic

This comment has been minimized.

Show comment
Hide comment
@domenic

domenic Feb 13, 2014

Member

Wait, so we are already skipping this test on Windows; you are saying it fails on Linux too? So it only passes on Mac? This seems like pretty lame functionality.

Member

domenic commented Feb 13, 2014

Wait, so we are already skipping this test on Windows; you are saying it fails on Linux too? So it only passes on Mac? This seems like pretty lame functionality.

@robertkowalski

This comment has been minimized.

Show comment
Hide comment
@robertkowalski

robertkowalski Feb 13, 2014

Member

@tjfontaine does my explanation makes sense to you?

Member

robertkowalski commented Feb 13, 2014

@tjfontaine does my explanation makes sense to you?

@isaacs

This comment has been minimized.

Show comment
Hide comment
@isaacs

isaacs Feb 16, 2014

Member

@robertkowalski What code does linux die with?

The point of this test is to make sure that npm install fails if a lifecycle script is abruptly terminated. Ideally, it would pass the signal exit upwards, but if the GNU shell is thwarting that, then let's at least verify that we're getting the exit code we expect.

Member

isaacs commented Feb 16, 2014

@robertkowalski What code does linux die with?

The point of this test is to make sure that npm install fails if a lifecycle script is abruptly terminated. Ideally, it would pass the signal exit upwards, but if the GNU shell is thwarting that, then let's at least verify that we're getting the exit code we expect.

fix failing test on linux
The GNU shell returns a code and no signal if it gets a SIGSEGV
signal, so we have to skip this. Hat tip to @tjfontaine
@robertkowalski

This comment has been minimized.

Show comment
Hide comment
@robertkowalski

robertkowalski Feb 17, 2014

Member

@robertkowalski What code does linux die with?

Just a usual 1... I updated the test..

Member

robertkowalski commented Feb 17, 2014

@robertkowalski What code does linux die with?

Just a usual 1... I updated the test..

@bcoe

This comment has been minimized.

Show comment
Hide comment
@bcoe

bcoe Mar 18, 2014

Member

👍 having switched all the tap tests to using the mock registry, this is one of the last blockers with regards to running the tap tests on Travis.

Member

bcoe commented Mar 18, 2014

👍 having switched all the tap tests to using the mock registry, this is one of the last blockers with regards to running the tap tests on Travis.

@isaacs

This comment has been minimized.

Show comment
Hide comment
@isaacs

isaacs Apr 15, 2014

Member

Landed on ba38256. Thanks!

Member

isaacs commented Apr 15, 2014

Landed on ba38256. Thanks!

@isaacs isaacs closed this Apr 15, 2014

@robertkowalski

This comment has been minimized.

Show comment
Hide comment
Member

robertkowalski commented Apr 15, 2014

💜

@robertkowalski robertkowalski deleted the robertkowalski:disable-test-linux branch Apr 15, 2014

@othiym23 othiym23 added the bug label Sep 24, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment