Commit Graph

6 Commits

Author SHA1 Message Date
Livia Medeiros
966e3d3493
test: use tmpdir.resolve()
PR-URL: https://github.com/nodejs/node/pull/49128
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-08-15 13:45:44 +00:00
Michaël Zasso
d0a41c99c0
test: skip macos sandbox test with builtin modules path
Refs: https://github.com/nodejs/node/issues/40605

PR-URL: https://github.com/nodejs/node/pull/40607
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2021-11-08 08:43:06 +01:00
Tobias Nießen
6a6cdfad03
test: fix skip message for test-macos-app-sandbox
PR-URL: https://github.com/nodejs/node/pull/38114
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2021-04-07 11:25:50 -07:00
Rich Trott
330f25ef82 test: prepare for consistent comma-dangle lint rule
Make changes so that tests will pass when the comma-dangle settings
applied to the rest of the code base are also applied to tests.

PR-URL: https://github.com/nodejs/node/pull/37930
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
2021-04-01 23:14:29 -07:00
cjihrig
e7ed066782
test: force resigning of app
In the GitHub Actions CI, test-macos-app-sandbox.js can fail due
to the application already being signed. This commit updates
the test to handle that condition.

Refs: https://github.com/nodejs/node/pull/33944
PR-URL: https://github.com/nodejs/node/pull/34331
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2020-07-22 15:09:24 -04:00
patr0nus
cb2c8106a7
src: tolerate EPERM returned from tcsetattr
macOS app sandbox makes tcsetattr return EPERM. The CHECK_EQ(0, err)
here would fail when a sandboxed Node.js process is exiting. This commit
fixes this issue.

* test: add test for running in macOS app sandbox

Bare-bone command-line executables cannot run directly in the app sandbox.
To test that Node.js is able to run in the sandbox (and to test the fix in
317621b4a1), this commit creates a typical
Cocoa app bundle, puts the node executable in it and calles Apple's codesign
command to enable sandbox.

* test: use process.execPath to get path of testing node

PR-URL: https://github.com/nodejs/node/pull/33944
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-06-25 10:56:34 -07:00