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

@richardlau richardlau 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

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Jan 9, 2019
@richardlau richardlau added the aix Issues and PRs related to the AIX platform. label Jan 9, 2019
@richardlau
Copy link
Member Author

@richardlau richardlau added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 9, 2019
@richardlau
Copy link
Member Author

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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>
@richardlau richardlau merged commit fbab26f into nodejs:master Jan 11, 2019
addaleax pushed a commit that referenced this pull request Jan 14, 2019
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 mentioned this pull request Jan 16, 2019
BridgeAR pushed a commit to BridgeAR/node that referenced this pull request Jan 16, 2019
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 mentioned this pull request Jan 24, 2019
BethGriggs pushed a commit that referenced this pull request Mar 15, 2019
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 pushed a commit that referenced this pull request Mar 15, 2019
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 mentioned this pull request Mar 26, 2019
@BethGriggs BethGriggs mentioned this pull request May 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aix Issues and PRs related to the AIX platform. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants