Description: tests: tolerate GNU tar pax extended-header warnings The "gzipped tarball that makes some drain/resume stuff" test pipes a node-tar archive to the system tar and fails on any stderr output. GNU tar emits "Ignoring unknown extended header keyword 'SCHILY.*'" warnings for the pax keywords node-tar writes (e.g. for hardlinks); these are harmless and version-dependent. Filter them out so the test still checks that the system tar reads the archive successfully (exit code 0) without failing on cosmetic warnings. Author: Xavier Guimard Forwarded: not-needed --- a/test/create.ts +++ b/test/create.ts @@ -242,7 +242,16 @@ stdio: ['ignore', 'ignore', 'pipe'], }) child.stderr.on('data', c => { - t.fail(c + '') + // GNU tar warns about node-tar's SCHILY.* (and other) extended-header + // pax keywords it does not recognise; these are harmless and depend on + // the system tar version. Only fail on other, real errors. + const s = String(c) + .replace( + /tar: Ignoring unknown extended header keyword '[^']*'\n?/g, + '', + ) + .trim() + if (s) t.fail(s) }) child.on('close', (code, signal) => { t.equal(code, 0)