fix: streamline tests and preserve Darwin process ownership (#8275)

* test: strengthen suite guards and regression oracles

* test: share JSON client registration contract

* test: reuse fixtures and reduce repeated setup

* fix(process): preserve ambiguous Darwin token ownership

* test(process): bound child readiness waits
This commit is contained in:
morluto authored and GitHub committed 2026-10-31 16:43:04 +08:00
1 parent b43c329df7
commit 23de10bb28
33 files changed
+1297 -771

No files matched your search

+8 -8
View File
@@ -278,7 +278,7 @@ cliTest(
header[2] = 0x0d;
header[3] = 0x0a;
await writeFile(path, Buffer.concat([header, marshal]));
const result = await cli.run({
const result = await runFileCli(cli, {
arguments: ["inspect-python-pyc", path, "--json"],
});
expect(result.exitCode).toBe(1);
@@ -295,7 +295,7 @@ cliTest(
for (const magic of [3392, 3394]) {
const path = join(root, `${magic}.pyc`);
await writeFile(path, Buffer.concat([pythonPycHeader(magic), marshal]));
const result = await cli.run({
const result = await runFileCli(cli, {
arguments: ["inspect-python-pyc", path, "--json"],
});
expect(result.exitCode, result.stderr).toBe(0);
@@ -354,7 +354,7 @@ cliTest(
path,
Buffer.concat([pythonPycHeader(magic), marshalCode(layout, fields)]),
);
const result = await cli.run({
const result = await runFileCli(cli, {
arguments: ["inspect-python-pyc", path, "--json"],
});
expect(result.exitCode, result.stderr).toBe(0);
@@ -413,7 +413,7 @@ cliTest(
path,
Buffer.concat([pythonPycHeader(magic), marshalCode(layout, fields)]),
);
const result = await cli.run({
const result = await runFileCli(cli, {
arguments: ["inspect-python-pyc", path, "--json"],
});
expect(result.exitCode).toBe(1);
@@ -502,7 +502,7 @@ cliTest(
}),
]),
);
const result = await cli.run({
const result = await runFileCli(cli, {
arguments: ["inspect-python-pyc", path, "--json"],
});
expect(result.exitCode, result.stderr).toBe(0);
@@ -552,7 +552,7 @@ cliTest(
marshalCode(testCase.layout, { consts: [frozenSet, dict] }),
]),
);
const result = await cli.run({
const result = await runFileCli(cli, {
arguments: ["inspect-python-pyc", path, "--json"],
});
expect(result.exitCode, result.stderr).toBe(0);
@@ -633,7 +633,7 @@ cliTest(
marshalCode(testCase.layout, { consts: [frozenSet, dict] }),
]),
);
const result = await cli.run({
const result = await runFileCli(cli, {
arguments: ["inspect-python-pyc", path, "--json"],
});
expect(result.exitCode, result.stderr).toBe(0);
@@ -664,7 +664,7 @@ cliTest(
}),
]),
);
const rawResult = await cli.run({
const rawResult = await runFileCli(cli, {
arguments: ["inspect-python-pyc", rawPath, "--json"],
});
expect(rawResult.exitCode, rawResult.stderr).toBe(0);