Skip to content

Commit

Permalink
src,test: further cleanup references to osx
Browse files Browse the repository at this point in the history
PR-URL: #53820
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
  • Loading branch information
danielbayley authored and marco-ippolito committed Aug 19, 2024
1 parent e352a4e commit 2eea850
Show file tree
Hide file tree
Showing 36 changed files with 48 additions and 48 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ else
BINARYNAME=$(TARNAME)-$(PLATFORM)-$(ARCH)
endif
BINARYTAR=$(BINARYNAME).tar
# OSX doesn't have xz installed by default, http://macpkg.sourceforge.net/
# macOS doesn't have xz installed by default, http://macpkg.sourceforge.net/
HAS_XZ ?= $(shell command -v xz > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0)
# Supply SKIP_XZ=1 to explicitly skip .tar.xz creation
SKIP_XZ ?= 0
Expand Down
6 changes: 3 additions & 3 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,14 @@
dest="fully_static",
default=None,
help="Generate an executable without external dynamic libraries. This "
"will not work on OSX when using the default compilation environment")
"will not work on macOS when using the default compilation environment")

parser.add_argument("--partly-static",
action="store_true",
dest="partly_static",
default=None,
help="Generate an executable with libgcc and libstdc++ libraries. This "
"will not work on OSX when using the default compilation environment")
"will not work on macOS when using the default compilation environment")

parser.add_argument("--enable-vtune-profiling",
action="store_true",
Expand Down Expand Up @@ -1682,7 +1682,7 @@ def without_ssl_error(option):
def configure_static(o):
if options.fully_static or options.partly_static:
if flavor == 'mac':
warn("Generation of static executable will not work on OSX "
warn("Generation of static executable will not work on macOS "
"when using the default compilation environment")
return

Expand Down
2 changes: 1 addition & 1 deletion node.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
}],

[ 'OS=="mac"', {
# linking Corefoundation is needed since certain OSX debugging tools
# linking Corefoundation is needed since certain macOS debugging tools
# like Instruments require it for some features
'libraries': [ '-framework CoreFoundation' ],
'defines!': [
Expand Down
2 changes: 1 addition & 1 deletion src/large_pages/node_large_page.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
// To move the .text section, perform the following steps:
// * Map a new, temporary area and copy the original code there.
// * Use mmap using the start address with MAP_FIXED so we get exactly the
// same virtual address (except on OSX). On platforms other than Linux,
// same virtual address (except on macOS). On platforms other than Linux,
// use mmap flags to request hugepages.
// * On Linux use madvise with MADV_HUGEPAGE to use anonymous 2MB pages.
// * If successful copy the code to the newly mapped area and protect it to
Expand Down
2 changes: 1 addition & 1 deletion src/node_internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ bool HasSignalJSHandler(int signum);

#ifdef _WIN32
typedef SYSTEMTIME TIME_TYPE;
#else // UNIX, OSX
#else // UNIX, macOS
typedef struct tm TIME_TYPE;
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/node_report.cc
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ static void WriteNodeReport(Isolate* isolate,
tm_struct.wMinute,
tm_struct.wSecond);
writer.json_keyvalue("dumpEventTime", timebuf);
#else // UNIX, OSX
#else // UNIX, macOS
snprintf(timebuf,
sizeof(timebuf),
"%4d-%02d-%02dT%02d:%02d:%02dZ",
Expand Down
4 changes: 2 additions & 2 deletions src/util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ std::vector<char> ReadFileSync(FILE* fp) {
void DiagnosticFilename::LocalTime(TIME_TYPE* tm_struct) {
#ifdef _WIN32
GetLocalTime(tm_struct);
#else // UNIX, OSX
#else // UNIX, macOS
struct timeval time_val;
gettimeofday(&time_val, nullptr);
localtime_r(&time_val.tv_sec, tm_struct);
Expand All @@ -339,7 +339,7 @@ std::string DiagnosticFilename::MakeFilename(
oss << "." << std::setfill('0') << std::setw(2) << tm_struct.wHour;
oss << std::setfill('0') << std::setw(2) << tm_struct.wMinute;
oss << std::setfill('0') << std::setw(2) << tm_struct.wSecond;
#else // UNIX, OSX
#else // UNIX, macOS
oss << "."
<< std::setfill('0')
<< std::setw(4)
Expand Down
2 changes: 1 addition & 1 deletion test/common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ Platform check for Linux.

Platform check for Linux on PowerPC.

### `isOSX`
### `isMacOS`

* [\<boolean>][<boolean>]

Expand Down
4 changes: 2 additions & 2 deletions test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const isSunOS = process.platform === 'sunos';
const isFreeBSD = process.platform === 'freebsd';
const isOpenBSD = process.platform === 'openbsd';
const isLinux = process.platform === 'linux';
const isOSX = process.platform === 'darwin';
const isMacOS = process.platform === 'darwin';
const isASan = process.config.variables.asan === 1;
const isPi = (() => {
try {
Expand Down Expand Up @@ -981,7 +981,7 @@ const common = {
isLinux,
isMainThread,
isOpenBSD,
isOSX,
isMacOS,
isPi,
isSunOS,
isWindows,
Expand Down
4 changes: 2 additions & 2 deletions test/common/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const {
isLinuxPPCBE,
isMainThread,
isOpenBSD,
isOSX,
isMacOS,
isSunOS,
isWindows,
localIPv6Hosts,
Expand Down Expand Up @@ -85,7 +85,7 @@ export {
isLinuxPPCBE,
isMainThread,
isOpenBSD,
isOSX,
isMacOS,
isSunOS,
isWindows,
localIPv6Hosts,
Expand Down
2 changes: 1 addition & 1 deletion test/common/shared-lib-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function addLibraryPath(env) {
env.LIBPATH =
(env.LIBPATH ? env.LIBPATH + path.delimiter : '') +
kExecPath;
// For Mac OSX.
// For macOS.
env.DYLD_LIBRARY_PATH =
(env.DYLD_LIBRARY_PATH ? env.DYLD_LIBRARY_PATH + path.delimiter : '') +
kExecPath;
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/permission/fs-write.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ const relativeProtectedFolder = process.env.RELATIVEBLOCKEDFOLDER;

// fs.lchmod
{
if (common.isOSX) {
if (common.isMacOS) {
fs.lchmod(blockedFile, 0o755, common.expectsError({
code: 'ERR_ACCESS_DENIED',
permission: 'FileSystemWrite',
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-child-process-exec-timeout-expire.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ cp.exec(cmd, {
// At least starting with Darwin Kernel Version 16.4.0, sending a SIGTERM to a
// process that is still starting up kills it with SIGKILL instead of SIGTERM.
// See: https://github.com/libuv/libuv/issues/1226
if (common.isOSX)
if (common.isMacOS)
assert.ok(err.signal === 'SIGTERM' || err.signal === 'SIGKILL');
else
assert.strictEqual(err.signal, sigterm);
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-cluster-bind-privileged-port.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ if (common.isLinux) {
}
}

// Skip on OS X Mojave. https://github.com/nodejs/node/issues/21679
if (common.isOSX)
// Skip on macOS Mojave. https://github.com/nodejs/node/issues/21679
if (common.isMacOS)
common.skip('macOS may allow ordinary processes to use any port');

if (common.isIBMi)
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-cluster-concurrent-disconnect.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if (cluster.isPrimary) {
// to send messages when the worker is disconnecting.
worker.on('error', (err) => {
assert.strictEqual(err.syscall, 'write');
if (common.isOSX) {
if (common.isMacOS) {
assert(['EPIPE', 'ENOTCONN'].includes(err.code), err);
} else {
assert(['EPIPE', 'ECONNRESET'].includes(err.code), err);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
'use strict';
const common = require('../common');

// Skip on OS X Mojave. https://github.com/nodejs/node/issues/21679
if (common.isOSX)
// Skip on macOS Mojave. https://github.com/nodejs/node/issues/21679
if (common.isMacOS)
common.skip('macOS may allow ordinary processes to use any port');

if (common.isIBMi)
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-fs-lchmod.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const f = __filename;
// This test ensures that input for lchmod is valid, testing for valid
// inputs for path, mode and callback

if (!common.isOSX) {
if (!common.isMacOS) {
common.skip('lchmod is only available on macOS');
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-fs-mkdir.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ function nextdir() {

// mkdirpSync dirname loop
// XXX: windows and smartos have issues removing a directory that you're in.
if (common.isMainThread && (common.isLinux || common.isOSX)) {
if (common.isMainThread && (common.isLinux || common.isMacOS)) {
const pathname = tmpdir.resolve(nextdir());
fs.mkdirSync(pathname);
process.chdir(pathname);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-fs-open-flags.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ assert.throws(
{ code: 'ERR_INVALID_ARG_VALUE', name: 'TypeError' }
);

if (common.isLinux || common.isOSX) {
if (common.isLinux || common.isMacOS) {
const tmpdir = require('../common/tmpdir');
tmpdir.refresh();
const file = tmpdir.resolve('a.js');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async function checkAggregateError(op) {
await checkAggregateError((filePath) => truncate(filePath));
await checkAggregateError((filePath) => readFile(filePath));
await checkAggregateError((filePath) => writeFile(filePath, '123'));
if (common.isOSX) {
if (common.isMacOS) {
await checkAggregateError((filePath) => lchmod(filePath, 0o777));
}
})().then(common.mustCall());
2 changes: 1 addition & 1 deletion test/parallel/test-fs-promises-file-handle-close-errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ async function checkCloseError(op) {
await checkCloseError((filePath) => truncate(filePath));
await checkCloseError((filePath) => readFile(filePath));
await checkCloseError((filePath) => writeFile(filePath, '123'));
if (common.isOSX) {
if (common.isMacOS) {
await checkCloseError((filePath) => lchmod(filePath, 0o777));
}
})().then(common.mustCall());
2 changes: 1 addition & 1 deletion test/parallel/test-fs-promises-file-handle-op-errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async function checkOperationError(op) {
await checkOperationError((filePath) => truncate(filePath));
await checkOperationError((filePath) => readFile(filePath));
await checkOperationError((filePath) => writeFile(filePath, '123'));
if (common.isOSX) {
if (common.isMacOS) {
await checkOperationError((filePath) => lchmod(filePath, 0o777));
}
})().then(common.mustCall());
4 changes: 2 additions & 2 deletions test/parallel/test-fs-promises-watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ class WatchTestCase {
const kCases = [
// Watch on a directory should callback with a filename on supported systems
new WatchTestCase(
common.isLinux || common.isOSX || common.isWindows || common.isAIX,
common.isLinux || common.isMacOS || common.isWindows || common.isAIX,
'watch1',
'foo',
'filePath'
),
// Watch on a file should callback with a filename on supported systems
new WatchTestCase(
common.isLinux || common.isOSX || common.isWindows,
common.isLinux || common.isMacOS || common.isWindows,
'watch2',
'bar',
'dirPath'
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-fs-promises.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ async function executeOnHandle(dest, func) {
(await readlink(newLink)).toLowerCase());

const newMode = 0o666;
if (common.isOSX) {
if (common.isMacOS) {
// `lchmod` is only available on macOS.
await lchmod(newLink, newMode);
stats = await lstat(newLink);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-fs-readdir-buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const common = require('../common');
const fs = require('fs');

if (!common.isOSX) {
if (!common.isMacOS) {
common.skip('this tests works only on MacOS');
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-fs-watch-enoent.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ tmpdir.refresh();
}

{
if (common.isOSX || common.isWindows) {
if (common.isMacOS || common.isWindows) {
const file = tmpdir.resolve('file-to-watch');
fs.writeFileSync(file, 'test');
const watcher = fs.watch(file, common.mustNotCall());
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-fs-watch-recursive-validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ tmpdir.refresh();
(async () => {
// Handle non-boolean values for options.recursive

if (!common.isWindows && !common.isOSX) {
if (!common.isWindows && !common.isMacOS) {
assert.throws(() => {
const testsubdir = fs.mkdtempSync(testDir + path.sep);
fs.watch(testsubdir, { recursive: '1' });
Expand Down
6 changes: 3 additions & 3 deletions test/parallel/test-fs-watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ class WatchTestCase {
const cases = [
// Watch on a file should callback with a filename on supported systems
new WatchTestCase(
common.isLinux || common.isOSX || common.isWindows || common.isAIX,
common.isLinux || common.isMacOS || common.isWindows || common.isAIX,
'watch1',
'foo',
'filePath'
),
// Watch on a directory should callback with a filename on supported systems
new WatchTestCase(
common.isLinux || common.isOSX || common.isWindows,
common.isLinux || common.isMacOS || common.isWindows,
'watch2',
'bar',
'dirPath'
Expand Down Expand Up @@ -66,7 +66,7 @@ for (const testCase of cases) {
clearInterval(interval);
interval = null;
}
if (common.isOSX)
if (common.isMacOS)
assert.strictEqual(['rename', 'change'].includes(eventType), true);
else
assert.strictEqual(eventType, 'change');
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-fs-watchfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ watcher.on('stop', common.mustCall());

// Watch events should callback with a filename on supported systems.
// Omitting AIX. It works but not reliably.
if (common.isLinux || common.isOSX || common.isWindows) {
if (common.isLinux || common.isMacOS || common.isWindows) {
const dir = tmpdir.resolve('watch');

fs.mkdir(dir, common.mustCall(function(err) {
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-process-getgroups.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const common = require('../common');

// Check `id -G` and `process.getgroups()` return same groups.

if (common.isOSX)
if (common.isMacOS)
common.skip('Output of `id -G` is unreliable on Darwin.');

const assert = require('assert');
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-stdin-from-file-spawn.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if (process.platform === 'linux' || process.platform === 'darwin') {
} else if (process.platform === 'win32') {
defaultShell = 'cmd.exe';
} else {
common.skip('This is test exists only on Linux/Win32/OSX');
common.skip('This is test exists only on Linux/Win32/macOS');
}

const { execSync } = require('child_process');
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-tls-honorcipherorder.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function test(honorCipherOrder, clientCipher, expectedCipher, defaultCiphers) {

const server = tls.createServer(soptions, mustCall(function(clearTextStream) {
// End socket to send CLOSE_NOTIFY and TCP FIN packet, otherwise
// it may hang for ~30 seconds in FIN_WAIT_1 state (at least on OSX).
// it may hang for ~30 seconds in FIN_WAIT_1 state (at least on macOS).
clearTextStream.end();
}));
server.listen(0, localhost, mustCall(function() {
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-watch-mode-files_watcher.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import watcher from 'internal/watch_mode/files_watcher';
if (common.isIBMi)
common.skip('IBMi does not support `fs.watch()`');

const supportsRecursiveWatching = common.isOSX || common.isWindows;
const supportsRecursiveWatching = common.isMacOS || common.isWindows;

const { FilesWatcher } = watcher;
tmpdir.refresh();
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-cluster-send-handle-large-payload.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if (cluster.isPrimary) {
// Send a second message after a delay on macOS.
//
// Refs: https://github.com/nodejs/node/issues/14747
if (common.isOSX)
if (common.isMacOS)
setTimeout(() => { process.send({ payload }, handle); }, 1000);
else
process.send({ payload }, handle);
Expand Down
Loading

0 comments on commit 2eea850

Please sign in to comment.