summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMatt Mastracci <matthew@mastracci.com>2023-06-29 07:24:01 -0600
committerGitHub <noreply@github.com>2023-06-29 07:24:01 -0600
commit93b3ff017078b2c1e993457ef43af6b52e715ba6 (patch)
tree856d339ae30fef01566d5ea919d4738c1e3fa65d /tools
parentb6253370cc8e430c575acd3fce0da44e057eb5b9 (diff)
fix(ext/websocket): Ensure that errors are available after async response returns (#19642)
Fixes the WPT tests that test w/invalid codes. Also explicitly ignoring some h2 tests to hopefully prevent flakes. The previous changes to WebSocketStream introduced a bug where the close errors were not made available if the `pull` method was re-entrant.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/wpt.ts8
-rw-r--r--tools/wpt/expectation.json34
-rw-r--r--tools/wpt/runner.ts1
3 files changed, 13 insertions, 30 deletions
diff --git a/tools/wpt.ts b/tools/wpt.ts
index fe2a350b2..29d3e3517 100755
--- a/tools/wpt.ts
+++ b/tools/wpt.ts
@@ -567,8 +567,9 @@ function analyzeTestResult(
function reportVariation(result: TestResult, expectation: boolean | string[]) {
if (result.status !== 0 || result.harnessStatus === null) {
- console.log(`test stderr:`);
- writeAllSync(Deno.stdout, new TextEncoder().encode(result.stderr));
+ if (result.stderr) {
+ console.log(`test stderr:\n${result.stderr}\n`);
+ }
const expectFail = expectation === false;
const failReason = result.status !== 0
@@ -611,6 +612,9 @@ function reportVariation(result: TestResult, expectation: boolean | string[]) {
for (const result of expectedFailedButPassed) {
console.log(` ${JSON.stringify(result.name)}`);
}
+ if (result.stderr) {
+ console.log("\ntest stderr:\n" + result.stderr);
+ }
console.log(
`\nfile result: ${
failedCount > 0 ? red("failed") : green("ok")
diff --git a/tools/wpt/expectation.json b/tools/wpt/expectation.json
index 9cf0a7af1..535372179 100644
--- a/tools/wpt/expectation.json
+++ b/tools/wpt/expectation.json
@@ -6945,18 +6945,6 @@
"Create-extensions-empty.any.worker.html": true,
"Create-extensions-empty.any.worker.html?wpt_flags=h2": false,
"Create-extensions-empty.any.worker.html?wss": true,
- "Create-invalid-urls.any.html": true,
- "Create-invalid-urls.any.html?wpt_flags=h2": true,
- "Create-invalid-urls.any.html?wss": true,
- "Create-invalid-urls.any.worker.html": true,
- "Create-invalid-urls.any.worker.html?wpt_flags=h2": true,
- "Create-invalid-urls.any.worker.html?wss": true,
- "Create-non-absolute-url.any.html": false,
- "Create-non-absolute-url.any.html?wpt_flags=h2": true,
- "Create-non-absolute-url.any.html?wss": true,
- "Create-non-absolute-url.any.worker.html": false,
- "Create-non-absolute-url.any.worker.html?wpt_flags=h2": true,
- "Create-non-absolute-url.any.worker.html?wss": true,
"Create-nonAscii-protocol-string.any.html": true,
"Create-nonAscii-protocol-string.any.html?wpt_flags=h2": true,
"Create-nonAscii-protocol-string.any.html?wss": true,
@@ -7030,12 +7018,6 @@
"Create-valid-url.any.worker.html": true,
"Create-valid-url.any.worker.html?wpt_flags=h2": false,
"Create-valid-url.any.worker.html?wss": true,
- "Create-wrong-scheme.any.html": true,
- "Create-wrong-scheme.any.html?wpt_flags=h2": true,
- "Create-wrong-scheme.any.html?wss": true,
- "Create-wrong-scheme.any.worker.html": true,
- "Create-wrong-scheme.any.worker.html?wpt_flags=h2": true,
- "Create-wrong-scheme.any.worker.html?wss": true,
"Send-0byte-data.any.html": true,
"Send-0byte-data.any.html?wpt_flags=h2": false,
"Send-0byte-data.any.html?wss": true,
@@ -7212,19 +7194,17 @@
"close.any.html?wpt_flags=h2": false,
"close.any.html?wss": true,
"close.any.worker.html?wpt_flags=h2": false,
- "close.any.worker.html?wss": {
- "ignore": true
- },
+ "close.any.worker.html?wss": true,
"constructor.any.html?wpt_flags=h2": false,
"constructor.any.html?wss": true,
"constructor.any.worker.html?wpt_flags=h2": false,
"constructor.any.worker.html?wss": true,
- "abort.any.html?wpt_flags=h2": [
- "abort after connect should do nothing"
- ],
- "abort.any.worker.html?wpt_flags=h2": [
- "abort after connect should do nothing"
- ],
+ "abort.any.html?wpt_flags=h2": {
+ "ignore": true
+ },
+ "abort.any.worker.html?wpt_flags=h2": {
+ "ignore": true
+ },
"backpressure-receive.any.worker.html?wpt_flags=h2": false
}
},
diff --git a/tools/wpt/runner.ts b/tools/wpt/runner.ts
index dffeacae1..90898ae6f 100644
--- a/tools/wpt/runner.ts
+++ b/tools/wpt/runner.ts
@@ -154,7 +154,6 @@ export async function runSingleTest(
harnessStatus = JSON.parse(line.slice(5));
} else {
stderr += line + "\n";
- console.error(line);
}
}