Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 458671d

Browse filesBrowse files
RaisinTentargos
authored andcommitted
doc,test: extend the list of platforms supported by single-executables
Now that #46934 has landed, we can extend the list of platforms and architectures where we can run the single-executable test. Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: #47026 Reviewed-By: Debadree Chatterjee <debadree333@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent 0f1ecbc commit 458671d
Copy full SHA for 458671d

File tree

Expand file treeCollapse file tree

3 files changed

+18
-13
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+18
-13
lines changed
Open diff view settings
Collapse file

‎doc/api/single-executable-applications.md‎

Copy file name to clipboardExpand all lines: doc/api/single-executable-applications.md
+3-1Lines changed: 3 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ platforms:
153153

154154
* Windows
155155
* macOS
156-
* Linux (AMD64 only)
156+
* Linux (all distributions [supported by Node.js][] except Alpine and all
157+
architectures [supported by Node.js][] except s390x and ppc64)
157158

158159
This is due to a lack of better tools to generate single-executables that can be
159160
used to test this feature on other platforms.
@@ -174,3 +175,4 @@ to help us document them.
174175
[postject]: https://github.com/nodejs/postject
175176
[signtool]: https://learn.microsoft.com/en-us/windows/win32/seccrypto/signtool
176177
[single executable applications]: https://github.com/nodejs/single-executable
178+
[supported by Node.js]: https://github.com/nodejs/node/blob/main/BUILDING.md#platform-list
Collapse file

‎doc/contributing/maintaining-single-executable-application-support.md‎

Copy file name to clipboardExpand all lines: doc/contributing/maintaining-single-executable-application-support.md
+3-1Lines changed: 3 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ for the following features are in the list of work we'd like to get to:
5454
* Running an archive of multiple files.
5555
* Embedding [Node.js CLI options][] into the binary.
5656
* [XCOFF][] executable format.
57-
* Run tests on Linux architectures/distributions other than AMD64 Ubuntu.
57+
* Run tests on Alpine Linux.
58+
* Run tests on s390x Linux.
59+
* Run tests on ppc64 Linux.
5860

5961
## Disabling single executable application support
6062

Collapse file

‎test/parallel/test-single-executable-application.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-single-executable-application.js
+12-11Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ if (!process.config.variables.single_executable_application)
1616
if (!['darwin', 'win32', 'linux'].includes(process.platform))
1717
common.skip(`Unsupported platform ${process.platform}.`);
1818

19-
if (process.platform === 'linux' && process.config.variables.asan)
20-
common.skip('Running the resultant binary fails with `Segmentation fault (core dumped)`.');
19+
if (process.platform === 'linux' && process.config.variables.asan) {
20+
// Source of the memory leak - https://github.com/nodejs/node/blob/da0bc6db98cef98686122ea1e2cd2dbd2f52d123/src/node_sea.cc#L94.
21+
common.skip('Running the resultant binary fails because of a memory leak ASAN error.');
22+
}
2123

2224
if (process.platform === 'linux' && process.config.variables.is_debug === 1)
2325
common.skip('Running the resultant binary fails with `Couldn\'t read target executable"`.');
@@ -39,17 +41,16 @@ if (process.config.variables.want_separate_host_toolset !== 0)
3941
common.skip('Running the resultant binary fails with `Segmentation fault (core dumped)`.');
4042

4143
if (process.platform === 'linux') {
42-
try {
43-
const osReleaseText = readFileSync('/etc/os-release', { encoding: 'utf-8' });
44-
if (!/^NAME="Ubuntu"/m.test(osReleaseText)) {
45-
throw new Error('Not Ubuntu.');
46-
}
47-
} catch {
48-
common.skip('Only supported Linux distribution is Ubuntu.');
44+
const osReleaseText = readFileSync('/etc/os-release', { encoding: 'utf-8' });
45+
const isAlpine = /^NAME="Alpine Linux"/m.test(osReleaseText);
46+
if (isAlpine) common.skip('Alpine Linux is not supported.');
47+
48+
if (process.arch === 's390x') {
49+
common.skip('On s390x, postject fails with `memory access out of bounds`.');
4950
}
5051

51-
if (process.arch !== 'x64') {
52-
common.skip(`Unsupported architecture for Linux - ${process.arch}.`);
52+
if (process.arch === 'ppc64') {
53+
common.skip('On ppc64, this test times out.');
5354
}
5455
}
5556

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.