GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: improve debug output in trace-events test · nodejs/node@c400448

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-trace-events-fs-sync.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-trace-events-fs-sync.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-trace-events-fs-sync.js
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const common = require('../common');
33
const assert = require('assert');
44
const cp = require('child_process');
55
const fs = require('fs');
6+
const util = require('util');
67

78
if (!common.isMainThread)
89
common.skip('process.chdir is not available in Workers');
@@ -121,7 +122,8 @@ for (const tr in tests) {
121122
const proc = cp.spawnSync(process.execPath,
122123
[ '--trace-events-enabled',
123124
'--trace-event-categories', 'node.fs.sync',
124-
'-e', tests[tr] ]);
125+
'-e', tests[tr] ],
126+
{ encoding: 'utf8' });
125127
// Some AIX versions don't support futimes or utimes, so skip.
126128
if (common.isAIX && proc.status !== 0 && tr === 'fs.sync.futimes') {
127129
continue;
@@ -131,7 +133,7 @@ for (const tr in tests) {
131133
}
132134

133135
// Make sure the operation is successful.
134-
assert.strictEqual(proc.status, 0, tr + ': ' + proc.stderr);
136+
assert.strictEqual(proc.status, 0, `${tr}:\n${util.inspect(proc)}`);
135137

136138
// Confirm that trace log file is created.
137139
assert(common.fileExists(traceFile));

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.