Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix module loading error for AIX 7.1 #25418

Merged
merged 1 commit into from Jan 11, 2019

Conversation

@richardlau
Copy link
Member

commented Jan 9, 2019

Building the current master on AIX 7.1 and gcc 6.3.0 I get the following test failure:

not ok 1284 parallel/test-module-loading-error
  ---
  duration_ms: 0.782
  severity: fail
  exitcode: 1
  stack: |-
    assert.js:664
        throw actual;
        ^
    
    Error: Could not load module /home/riclau/sandbox/github/node/test/fixtures/module-loading-error.node.
    System error: Exec format error
        at Object.Module._extensions..node (internal/modules/cjs/loader.js:747:18)
        at Module.load (internal/modules/cjs/loader.js:617:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
        at Function.Module._load (internal/modules/cjs/loader.js:552:3)
        at Module.require (internal/modules/cjs/loader.js:654:17)
        at require (internal/modules/cjs/helpers.js:20:18)
        at assert.throws (/home/riclau/sandbox/github/node/test/parallel/test-module-loading-error.js:54:11)
        at getActual (assert.js:576:5)
        at Function.throws (assert.js:694:24)
        at Object.<anonymous> (/home/riclau/sandbox/github/node/test/parallel/test-module-loading-error.js:53:8)
  ...

I've verified using python (not all of the AIX machines that I have access to have the necessary environment set up to build/run Node.js) that the error message from dlopen is different on AIX 7.1 compared to AIX 6.1.

AIX 7.1:

bash-4.4$ python
Python 2.7.15 (default, Sep 28 2018, 03:58:41)
[GCC 6.3.0] on aix6
Type "help", "copyright", "credits" or "license" for more information.
>>> import dl
>>> dl.open("/home/riclau/sandbox/github/node/test/fixtures/module-loading-error.node")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
dl.error: Could not load module /home/riclau/sandbox/github/node/test/fixtures/module-loading-error.node.
System error: Exec format error
>>>

AIX 6.1:

-bash-4.4$ python
Python 2.7.13 (default, Oct 17 2017, 05:37:56) [C] on aix6
Type "help", "copyright", "credits" or "license" for more information.
>>> import dl
>>> dl.open("/home/riclau/sandbox/github/node/test/fixtures/module-loading-error.node")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
dl.error:       0509-022 Cannot load module /home/riclau/sandbox/github/node/test/fixtures/module-loading-error.node.
        0509-026 System error: Cannot run a file that does not have a valid format.
>>>

This PR adds another allowed error message for AIX to allow the test to pass.

Note that the CI AIX machines are currently AIX 6.1.

cc @nodejs/platform-aix

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

@richardlau richardlau added the aix label Jan 9, 2019

@richardlau

This comment has been minimized.

Copy link
Member Author

commented Jan 9, 2019

@cjihrig
cjihrig approved these changes Jan 9, 2019
@gdams
gdams approved these changes Jan 9, 2019
@richardlau

This comment has been minimized.

Copy link
Member Author

commented Jan 10, 2019

@mhdawson
Copy link
Member

left a comment

LGTM

test: fix module loading error for AIX 7.1
AIX 7.1 appears to return a different error message compared to AIX 6.1.

PR-URL: #25418
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

@richardlau richardlau force-pushed the richardlau:alternative-aix-message branch from e36a65d to fbab26f Jan 11, 2019

@richardlau richardlau merged commit fbab26f into nodejs:master Jan 11, 2019

1 of 2 checks passed

Travis CI - Pull Request Build Errored
Details
Travis CI - Branch Build Passed
Details
addaleax added a commit that referenced this pull request Jan 14, 2019
test: fix module loading error for AIX 7.1
AIX 7.1 appears to return a different error message compared to AIX 6.1.

PR-URL: #25418
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
@BridgeAR BridgeAR referenced this pull request Jan 16, 2019
BridgeAR added a commit to BridgeAR/node that referenced this pull request Jan 16, 2019
test: fix module loading error for AIX 7.1
AIX 7.1 appears to return a different error message compared to AIX 6.1.

PR-URL: nodejs#25418
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
@MylesBorins MylesBorins referenced this pull request Jan 24, 2019
BethGriggs added a commit that referenced this pull request Mar 15, 2019
test: fix module loading error for AIX 7.1
AIX 7.1 appears to return a different error message compared to AIX 6.1.

PR-URL: #25418
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
BethGriggs added a commit that referenced this pull request Mar 15, 2019
test: fix module loading error for AIX 7.1
AIX 7.1 appears to return a different error message compared to AIX 6.1.

PR-URL: #25418
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
@MylesBorins MylesBorins referenced this pull request Mar 26, 2019
@BethGriggs BethGriggs referenced this pull request May 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.