Skip to content
Prev Previous commit
Next Next commit
fixup: skip if in a FreeBSD jail
  • Loading branch information
Trott committed Nov 28, 2015
commit 8021d83f4f02078b065babe56c303094ad622ef4
6 changes: 6 additions & 0 deletions test/internet/test-dgram-multicast-multi-process.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ const messages = [
new Buffer('Fourth message to send')
];
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Funny indent but if the linter is happy...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Since I'm doing a bunch of other cosmetic-ish changes on the pre-existing code, I'll fix the funky indent.


// skip test in FreeBSD jails
if (common.inFreeBSDJail) {
console.log('1..0 # Skipped: In a FreeBSD jail');
return;
}

function launchChildProcess(index) {
const worker = fork(process.argv[1], ['child']);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

__filename?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Sure, why not. process.argv[1] -> __filename it is.

workers[worker.pid] = worker;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe hoist workers to the top while you're here, it arguably reads easier that way.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, that does make it easier to follow. I'll also fix up the remaining bits of the related var statement to make it consistent with the current unofficial standard (separate statements for each var, const where possible).

Expand Down