summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Mastracci <matthew@mastracci.com>2024-02-16 10:49:42 -0700
committerGitHub <noreply@github.com>2024-02-16 10:49:42 -0700
commitc92717a1a43d31951cd8a1161afb766ef339aa21 (patch)
tree48a8fa58531d525c87824d55a6a934e42037815e
parent88d7c50cd559b9fd0189d2a2c1df6e2f1b790ddb (diff)
chore(cli): pre-factor the sanitizer tests (#22436)
Moving tests around so that we can make #22413 smaller
-rw-r--r--tests/integration/test_tests.rs48
-rw-r--r--tests/testdata/test/exit_sanitizer.out38
-rw-r--r--tests/testdata/test/ops_sanitizer_missing_details.out18
-rw-r--r--tests/testdata/test/ops_sanitizer_missing_details.ts10
-rw-r--r--tests/testdata/test/ops_sanitizer_multiple_timeout_tests.out45
-rw-r--r--tests/testdata/test/ops_sanitizer_step_leak.out10
-rw-r--r--tests/testdata/test/ops_sanitizer_timeout_failure.out6
-rw-r--r--tests/testdata/test/sanitizer/exit_sanitizer.out38
-rw-r--r--tests/testdata/test/sanitizer/exit_sanitizer.ts (renamed from tests/testdata/test/exit_sanitizer.ts)0
-rw-r--r--tests/testdata/test/sanitizer/ops_sanitizer_closed_inside_started_before.out (renamed from tests/testdata/test/ops_sanitizer_closed_inside_started_before.out)10
-rw-r--r--tests/testdata/test/sanitizer/ops_sanitizer_closed_inside_started_before.ts (renamed from tests/testdata/test/ops_sanitizer_closed_inside_started_before.ts)0
-rw-r--r--tests/testdata/test/sanitizer/ops_sanitizer_multiple_timeout_tests.out45
-rw-r--r--tests/testdata/test/sanitizer/ops_sanitizer_multiple_timeout_tests.ts (renamed from tests/testdata/test/ops_sanitizer_multiple_timeout_tests.ts)0
-rw-r--r--tests/testdata/test/sanitizer/ops_sanitizer_multiple_timeout_tests_no_trace.out (renamed from tests/testdata/test/ops_sanitizer_multiple_timeout_tests_no_trace.out)12
-rw-r--r--tests/testdata/test/sanitizer/ops_sanitizer_nexttick.out (renamed from tests/testdata/test/ops_sanitizer_nexttick.out)2
-rw-r--r--tests/testdata/test/sanitizer/ops_sanitizer_nexttick.ts (renamed from tests/testdata/test/ops_sanitizer_nexttick.ts)0
-rw-r--r--tests/testdata/test/sanitizer/ops_sanitizer_step_leak.out10
-rw-r--r--tests/testdata/test/sanitizer/ops_sanitizer_step_leak.ts (renamed from tests/testdata/test/ops_sanitizer_step_leak.ts)0
-rw-r--r--tests/testdata/test/sanitizer/ops_sanitizer_timeout_failure.out6
-rw-r--r--tests/testdata/test/sanitizer/ops_sanitizer_timeout_failure.ts (renamed from tests/testdata/test/ops_sanitizer_timeout_failure.ts)0
-rw-r--r--tests/testdata/test/sanitizer/ops_sanitizer_unstable.out (renamed from tests/testdata/test/ops_sanitizer_unstable.out)10
-rw-r--r--tests/testdata/test/sanitizer/ops_sanitizer_unstable.ts (renamed from tests/testdata/test/ops_sanitizer_unstable.ts)1
-rw-r--r--tests/testdata/test/sanitizer/resource_sanitizer.out (renamed from tests/testdata/test/resource_sanitizer.out)8
-rw-r--r--tests/testdata/test/sanitizer/resource_sanitizer.ts (renamed from tests/testdata/test/resource_sanitizer.ts)0
-rw-r--r--tests/testdata/test/sanitizer/trace_ops_caught_error/main.out (renamed from tests/testdata/test/trace_ops_caught_error/main.out)2
-rw-r--r--tests/testdata/test/sanitizer/trace_ops_caught_error/main.ts (renamed from tests/testdata/test/trace_ops_caught_error/main.ts)1
-rw-r--r--tests/unit_node/process_test.ts5
27 files changed, 146 insertions, 179 deletions
diff --git a/tests/integration/test_tests.rs b/tests/integration/test_tests.rs
index 2984941cd..f9b47fdbc 100644
--- a/tests/integration/test_tests.rs
+++ b/tests/integration/test_tests.rs
@@ -219,63 +219,55 @@ itest!(allow_none {
});
itest!(ops_sanitizer_unstable {
- args: "test --trace-ops test/ops_sanitizer_unstable.ts",
+ args: "test --trace-ops test/sanitizer/ops_sanitizer_unstable.ts",
exit_code: 1,
- output: "test/ops_sanitizer_unstable.out",
+ output: "test/sanitizer/ops_sanitizer_unstable.out",
});
itest!(ops_sanitizer_timeout_failure {
- args: "test test/ops_sanitizer_timeout_failure.ts",
- output: "test/ops_sanitizer_timeout_failure.out",
+ args: "test test/sanitizer/ops_sanitizer_timeout_failure.ts",
+ output: "test/sanitizer/ops_sanitizer_timeout_failure.out",
});
itest!(ops_sanitizer_multiple_timeout_tests {
- args: "test --trace-ops test/ops_sanitizer_multiple_timeout_tests.ts",
+ args:
+ "test --trace-ops test/sanitizer/ops_sanitizer_multiple_timeout_tests.ts",
exit_code: 1,
- output: "test/ops_sanitizer_multiple_timeout_tests.out",
+ output: "test/sanitizer/ops_sanitizer_multiple_timeout_tests.out",
});
itest!(ops_sanitizer_multiple_timeout_tests_no_trace {
- args: "test test/ops_sanitizer_multiple_timeout_tests.ts",
+ args: "test test/sanitizer/ops_sanitizer_multiple_timeout_tests.ts",
exit_code: 1,
- output: "test/ops_sanitizer_multiple_timeout_tests_no_trace.out",
+ output: "test/sanitizer/ops_sanitizer_multiple_timeout_tests_no_trace.out",
});
-itest!(trace_ops_catch_error {
- args: "test -A --trace-ops test/trace_ops_caught_error/main.ts",
+itest!(sanitizer_trace_ops_catch_error {
+ args: "test -A --trace-ops test/sanitizer/trace_ops_caught_error/main.ts",
exit_code: 0,
- output: "test/trace_ops_caught_error/main.out",
+ output: "test/sanitizer/trace_ops_caught_error/main.out",
});
-// TODO(@littledivy): re-enable this test, recent optimizations made output non deterministic.
-// https://github.com/denoland/deno/issues/14268
-//
-// itest!(ops_sanitizer_missing_details {
-// args: "test --allow-write --allow-read test/ops_sanitizer_missing_details.ts",
-// exit_code: 1,
-// output: "test/ops_sanitizer_missing_details.out",
-// });
-
itest!(ops_sanitizer_closed_inside_started_before {
- args: "test --trace-ops test/ops_sanitizer_closed_inside_started_before.ts",
+ args: "test --trace-ops test/sanitizer/ops_sanitizer_closed_inside_started_before.ts",
exit_code: 1,
- output: "test/ops_sanitizer_closed_inside_started_before.out",
+ output: "test/sanitizer/ops_sanitizer_closed_inside_started_before.out",
});
itest!(ops_sanitizer_nexttick {
- args: "test --no-check test/ops_sanitizer_nexttick.ts",
- output: "test/ops_sanitizer_nexttick.out",
+ args: "test --no-check test/sanitizer/ops_sanitizer_nexttick.ts",
+ output: "test/sanitizer/ops_sanitizer_nexttick.out",
});
itest!(resource_sanitizer {
- args: "test --allow-read test/resource_sanitizer.ts",
+ args: "test --allow-read test/sanitizer/resource_sanitizer.ts",
exit_code: 1,
- output: "test/resource_sanitizer.out",
+ output: "test/sanitizer/resource_sanitizer.out",
});
itest!(exit_sanitizer {
- args: "test test/exit_sanitizer.ts",
- output: "test/exit_sanitizer.out",
+ args: "test test/sanitizer/exit_sanitizer.ts",
+ output: "test/sanitizer/exit_sanitizer.out",
exit_code: 1,
});
diff --git a/tests/testdata/test/exit_sanitizer.out b/tests/testdata/test/exit_sanitizer.out
deleted file mode 100644
index 684001475..000000000
--- a/tests/testdata/test/exit_sanitizer.out
+++ /dev/null
@@ -1,38 +0,0 @@
-Check [WILDCARD]/test/exit_sanitizer.ts
-running 3 tests from ./test/exit_sanitizer.ts
-exit(0) ... FAILED ([WILDCARD])
-exit(1) ... FAILED ([WILDCARD])
-exit(2) ... FAILED ([WILDCARD])
-
- ERRORS
-
-exit(0) => ./test/exit_sanitizer.ts:[WILDCARD]
-error: Error: Test case attempted to exit with exit code: 0
- Deno.exit(0);
- ^
- at [WILDCARD]
- at [WILDCARD]/test/exit_sanitizer.ts:2:8
-
-exit(1) => ./test/exit_sanitizer.ts:[WILDCARD]
-error: Error: Test case attempted to exit with exit code: 1
- Deno.exit(1);
- ^
- at [WILDCARD]
- at [WILDCARD]/test/exit_sanitizer.ts:6:8
-
-exit(2) => ./test/exit_sanitizer.ts:[WILDCARD]
-error: Error: Test case attempted to exit with exit code: 2
- Deno.exit(2);
- ^
- at [WILDCARD]
- at [WILDCARD]/test/exit_sanitizer.ts:10:8
-
- FAILURES
-
-exit(0) => ./test/exit_sanitizer.ts:[WILDCARD]
-exit(1) => ./test/exit_sanitizer.ts:[WILDCARD]
-exit(2) => ./test/exit_sanitizer.ts:[WILDCARD]
-
-FAILED | 0 passed | 3 failed ([WILDCARD])
-
-error: Test failed
diff --git a/tests/testdata/test/ops_sanitizer_missing_details.out b/tests/testdata/test/ops_sanitizer_missing_details.out
deleted file mode 100644
index 36191912a..000000000
--- a/tests/testdata/test/ops_sanitizer_missing_details.out
+++ /dev/null
@@ -1,18 +0,0 @@
-Check [WILDCARD]test/ops_sanitizer_missing_details.ts
-running 1 test from ./test/ops_sanitizer_missing_details.ts
-test 1 ... FAILED [WILDCARD]
-
- ERRORS
-
-test 1 => ./test/ops_sanitizer_missing_details.ts:[WILDCARD]
-error: Leaking async ops:
- - 1 async operation to op_write was started in this test, but never completed.
-To get more details where ops were leaked, run again with --trace-ops flag.
-
- FAILURES
-
-test 1 => ./test/ops_sanitizer_missing_details.ts:[WILDCARD]
-
-FAILED | 0 passed | 1 failed [WILDCARD]
-
-error: Test failed
diff --git a/tests/testdata/test/ops_sanitizer_missing_details.ts b/tests/testdata/test/ops_sanitizer_missing_details.ts
deleted file mode 100644
index 45fc89b42..000000000
--- a/tests/testdata/test/ops_sanitizer_missing_details.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-// https://github.com/denoland/deno/issues/13729
-// https://github.com/denoland/deno/issues/13938
-import { writeAll } from "../../../tests/util/std/streams/write_all.ts";
-
-Deno.test("test 1", { permissions: { write: true, read: true } }, async () => {
- const tmpFile = await Deno.makeTempFile();
- const file = await Deno.open(tmpFile, { write: true });
- const buf = new Uint8Array(new Array(1_000_000).fill(1));
- writeAll(file, buf);
-});
diff --git a/tests/testdata/test/ops_sanitizer_multiple_timeout_tests.out b/tests/testdata/test/ops_sanitizer_multiple_timeout_tests.out
deleted file mode 100644
index 6ebd28c51..000000000
--- a/tests/testdata/test/ops_sanitizer_multiple_timeout_tests.out
+++ /dev/null
@@ -1,45 +0,0 @@
-Check [WILDCARD]/testdata/test/ops_sanitizer_multiple_timeout_tests.ts
-running 2 tests from ./test/ops_sanitizer_multiple_timeout_tests.ts
-test 1 ... FAILED ([WILDCARD])
-test 2 ... FAILED ([WILDCARD])
-
- ERRORS
-
-test 1 => ./test/ops_sanitizer_multiple_timeout_tests.ts:[WILDCARD]
-error: Leaking async ops:
- - 2 async operations to sleep for a duration were started in this test, but never completed. This is often caused by not cancelling a `setTimeout` or `setInterval` call. The operations were started here:
- at [WILDCARD]
- at setTimeout ([WILDCARD])
- at test ([WILDCARD]/testdata/test/ops_sanitizer_multiple_timeout_tests.ts:[WILDCARD])
- at [WILDCARD]/testdata/test/ops_sanitizer_multiple_timeout_tests.ts:8:27
- at [WILDCARD]
-
- at [WILDCARD]
- at setTimeout ([WILDCARD])
- at test ([WILDCARD]/testdata/test/ops_sanitizer_multiple_timeout_tests.ts:[WILDCARD])
- at [WILDCARD]/testdata/test/ops_sanitizer_multiple_timeout_tests.ts:8:27
- at [WILDCARD]
-
-test 2 => ./test/ops_sanitizer_multiple_timeout_tests.ts:[WILDCARD]
-error: Leaking async ops:
- - 2 async operations to sleep for a duration were started in this test, but never completed. This is often caused by not cancelling a `setTimeout` or `setInterval` call. The operations were started here:
- at [WILDCARD]
- at setTimeout ([WILDCARD])
- at test ([WILDCARD]/testdata/test/ops_sanitizer_multiple_timeout_tests.ts:[WILDCARD])
- at [WILDCARD]/testdata/test/ops_sanitizer_multiple_timeout_tests.ts:10:27
- at [WILDCARD]
-
- at [WILDCARD]
- at setTimeout ([WILDCARD])
- at test ([WILDCARD]/testdata/test/ops_sanitizer_multiple_timeout_tests.ts:[WILDCARD])
- at [WILDCARD]/testdata/test/ops_sanitizer_multiple_timeout_tests.ts:10:27
- at [WILDCARD]
-
- FAILURES
-
-test 1 => ./test/ops_sanitizer_multiple_timeout_tests.ts:[WILDCARD]
-test 2 => ./test/ops_sanitizer_multiple_timeout_tests.ts:[WILDCARD]
-
-FAILED | 0 passed | 2 failed ([WILDCARD])
-
-error: Test failed
diff --git a/tests/testdata/test/ops_sanitizer_step_leak.out b/tests/testdata/test/ops_sanitizer_step_leak.out
deleted file mode 100644
index 55c89582a..000000000
--- a/tests/testdata/test/ops_sanitizer_step_leak.out
+++ /dev/null
@@ -1,10 +0,0 @@
-Check [WILDCARD]/tests/testdata/test/ops_sanitizer_step_leak.ts
-running 1 test from ./tests/testdata/test/ops_sanitizer_step_leak.ts
-timeout ...
- step ... ok [WILDCARD]
-------- output -------
-done
------ output end -----
-timeout ... ok [WILDCARD]
-
-ok | 1 passed (1 step) | 0 failed [WILDCARD] \ No newline at end of file
diff --git a/tests/testdata/test/ops_sanitizer_timeout_failure.out b/tests/testdata/test/ops_sanitizer_timeout_failure.out
deleted file mode 100644
index a4fbf0008..000000000
--- a/tests/testdata/test/ops_sanitizer_timeout_failure.out
+++ /dev/null
@@ -1,6 +0,0 @@
-Check [WILDCARD]/testdata/test/ops_sanitizer_timeout_failure.ts
-running 1 test from ./test/ops_sanitizer_timeout_failure.ts
-wait ... ok ([WILDCARD])
-
-ok | 1 passed | 0 failed ([WILDCARD])
-
diff --git a/tests/testdata/test/sanitizer/exit_sanitizer.out b/tests/testdata/test/sanitizer/exit_sanitizer.out
new file mode 100644
index 000000000..305d51cc8
--- /dev/null
+++ b/tests/testdata/test/sanitizer/exit_sanitizer.out
@@ -0,0 +1,38 @@
+Check [WILDCARD]/exit_sanitizer.ts
+running 3 tests from [WILDCARD]/exit_sanitizer.ts
+exit(0) ... FAILED ([WILDCARD])
+exit(1) ... FAILED ([WILDCARD])
+exit(2) ... FAILED ([WILDCARD])
+
+ ERRORS
+
+exit(0) => [WILDCARD]/exit_sanitizer.ts:[WILDCARD]
+error: Error: Test case attempted to exit with exit code: 0
+ Deno.exit(0);
+ ^
+ at [WILDCARD]
+ at [WILDCARD]/exit_sanitizer.ts:2:8
+
+exit(1) => [WILDCARD]/exit_sanitizer.ts:[WILDCARD]
+error: Error: Test case attempted to exit with exit code: 1
+ Deno.exit(1);
+ ^
+ at [WILDCARD]
+ at [WILDCARD]/exit_sanitizer.ts:6:8
+
+exit(2) => [WILDCARD]/exit_sanitizer.ts:[WILDCARD]
+error: Error: Test case attempted to exit with exit code: 2
+ Deno.exit(2);
+ ^
+ at [WILDCARD]
+ at [WILDCARD]/exit_sanitizer.ts:10:8
+
+ FAILURES
+
+exit(0) => [WILDCARD]/exit_sanitizer.ts:[WILDCARD]
+exit(1) => [WILDCARD]/exit_sanitizer.ts:[WILDCARD]
+exit(2) => [WILDCARD]/exit_sanitizer.ts:[WILDCARD]
+
+FAILED | 0 passed | 3 failed ([WILDCARD])
+
+error: Test failed
diff --git a/tests/testdata/test/exit_sanitizer.ts b/tests/testdata/test/sanitizer/exit_sanitizer.ts
index 186406a9d..186406a9d 100644
--- a/tests/testdata/test/exit_sanitizer.ts
+++ b/tests/testdata/test/sanitizer/exit_sanitizer.ts
diff --git a/tests/testdata/test/ops_sanitizer_closed_inside_started_before.out b/tests/testdata/test/sanitizer/ops_sanitizer_closed_inside_started_before.out
index 0a8cc2245..823f4704e 100644
--- a/tests/testdata/test/ops_sanitizer_closed_inside_started_before.out
+++ b/tests/testdata/test/sanitizer/ops_sanitizer_closed_inside_started_before.out
@@ -1,18 +1,18 @@
-Check [WILDCARD]test/ops_sanitizer_closed_inside_started_before.ts
-running 1 test from ./test/ops_sanitizer_closed_inside_started_before.ts
+Check [WILDCARD]/ops_sanitizer_closed_inside_started_before.ts
+running 1 test from [WILDCARD]/ops_sanitizer_closed_inside_started_before.ts
test 1 ... FAILED [WILDCARD]
ERRORS
-test 1 => ./test/ops_sanitizer_closed_inside_started_before.ts:[WILDCARD]
+test 1 => [WILDCARD]/ops_sanitizer_closed_inside_started_before.ts:[WILDCARD]
error: Leaking async ops:
- 1 async operation to sleep for a duration was started before this test, but was completed during the test. Async operations should not complete in a test if they were not started in that test. This is often caused by not cancelling a `setTimeout` or `setInterval` call. The operation was started here:
at [WILDCARD]
- at [WILDCARD]/tests/testdata/test/ops_sanitizer_closed_inside_started_before.ts:[WILDCARD]
+ at [WILDCARD]/ops_sanitizer_closed_inside_started_before.ts:[WILDCARD]
FAILURES
-test 1 => ./test/ops_sanitizer_closed_inside_started_before.ts:[WILDCARD]
+test 1 => [WILDCARD]/ops_sanitizer_closed_inside_started_before.ts:[WILDCARD]
FAILED | 0 passed | 1 failed [WILDCARD]
diff --git a/tests/testdata/test/ops_sanitizer_closed_inside_started_before.ts b/tests/testdata/test/sanitizer/ops_sanitizer_closed_inside_started_before.ts
index 97d3d72c8..97d3d72c8 100644
--- a/tests/testdata/test/ops_sanitizer_closed_inside_started_before.ts
+++ b/tests/testdata/test/sanitizer/ops_sanitizer_closed_inside_started_before.ts
diff --git a/tests/testdata/test/sanitizer/ops_sanitizer_multiple_timeout_tests.out b/tests/testdata/test/sanitizer/ops_sanitizer_multiple_timeout_tests.out
new file mode 100644
index 000000000..6af59da90
--- /dev/null
+++ b/tests/testdata/test/sanitizer/ops_sanitizer_multiple_timeout_tests.out
@@ -0,0 +1,45 @@
+Check [WILDCARD]/ops_sanitizer_multiple_timeout_tests.ts
+running 2 tests from [WILDCARD]/ops_sanitizer_multiple_timeout_tests.ts
+test 1 ... FAILED ([WILDCARD])
+test 2 ... FAILED ([WILDCARD])
+
+ ERRORS
+
+test 1 => [WILDCARD]/ops_sanitizer_multiple_timeout_tests.ts:[WILDCARD]
+error: Leaking async ops:
+ - 2 async operations to sleep for a duration were started in this test, but never completed. This is often caused by not cancelling a `setTimeout` or `setInterval` call. The operations were started here:
+ at [WILDCARD]
+ at setTimeout ([WILDCARD])
+ at test ([WILDCARD]/ops_sanitizer_multiple_timeout_tests.ts:[WILDCARD])
+ at [WILDCARD]/ops_sanitizer_multiple_timeout_tests.ts:8:27
+ at [WILDCARD]
+
+ at [WILDCARD]
+ at setTimeout ([WILDCARD])
+ at test ([WILDCARD]/ops_sanitizer_multiple_timeout_tests.ts:[WILDCARD])
+ at [WILDCARD]/ops_sanitizer_multiple_timeout_tests.ts:8:27
+ at [WILDCARD]
+
+test 2 => [WILDCARD]/ops_sanitizer_multiple_timeout_tests.ts:[WILDCARD]
+error: Leaking async ops:
+ - 2 async operations to sleep for a duration were started in this test, but never completed. This is often caused by not cancelling a `setTimeout` or `setInterval` call. The operations were started here:
+ at [WILDCARD]
+ at setTimeout ([WILDCARD])
+ at test ([WILDCARD]/ops_sanitizer_multiple_timeout_tests.ts:[WILDCARD])
+ at [WILDCARD]/ops_sanitizer_multiple_timeout_tests.ts:10:27
+ at [WILDCARD]
+
+ at [WILDCARD]
+ at setTimeout ([WILDCARD])
+ at test ([WILDCARD]/ops_sanitizer_multiple_timeout_tests.ts:[WILDCARD])
+ at [WILDCARD]/ops_sanitizer_multiple_timeout_tests.ts:10:27
+ at [WILDCARD]
+
+ FAILURES
+
+test 1 => [WILDCARD]/ops_sanitizer_multiple_timeout_tests.ts:[WILDCARD]
+test 2 => [WILDCARD]/ops_sanitizer_multiple_timeout_tests.ts:[WILDCARD]
+
+FAILED | 0 passed | 2 failed ([WILDCARD])
+
+error: Test failed
diff --git a/tests/testdata/test/ops_sanitizer_multiple_timeout_tests.ts b/tests/testdata/test/sanitizer/ops_sanitizer_multiple_timeout_tests.ts
index 1f52d481f..1f52d481f 100644
--- a/tests/testdata/test/ops_sanitizer_multiple_timeout_tests.ts
+++ b/tests/testdata/test/sanitizer/ops_sanitizer_multiple_timeout_tests.ts
diff --git a/tests/testdata/test/ops_sanitizer_multiple_timeout_tests_no_trace.out b/tests/testdata/test/sanitizer/ops_sanitizer_multiple_timeout_tests_no_trace.out
index 1655c162f..ae5f68f2f 100644
--- a/tests/testdata/test/ops_sanitizer_multiple_timeout_tests_no_trace.out
+++ b/tests/testdata/test/sanitizer/ops_sanitizer_multiple_timeout_tests_no_trace.out
@@ -1,24 +1,24 @@
-Check [WILDCARD]/testdata/test/ops_sanitizer_multiple_timeout_tests.ts
-running 2 tests from ./test/ops_sanitizer_multiple_timeout_tests.ts
+Check [WILDCARD]/ops_sanitizer_multiple_timeout_tests.ts
+running 2 tests from [WILDCARD]/ops_sanitizer_multiple_timeout_tests.ts
test 1 ... FAILED ([WILDCARD])
test 2 ... FAILED ([WILDCARD])
ERRORS
-test 1 => ./test/ops_sanitizer_multiple_timeout_tests.ts:[WILDCARD]
+test 1 => [WILDCARD]/ops_sanitizer_multiple_timeout_tests.ts:[WILDCARD]
error: Leaking async ops:
- 2 async operations to sleep for a duration were started in this test, but never completed. This is often caused by not cancelling a `setTimeout` or `setInterval` call.
To get more details where ops were leaked, run again with --trace-ops flag.
-test 2 => ./test/ops_sanitizer_multiple_timeout_tests.ts:[WILDCARD]
+test 2 => [WILDCARD]/ops_sanitizer_multiple_timeout_tests.ts:[WILDCARD]
error: Leaking async ops:
- 2 async operations to sleep for a duration were started in this test, but never completed. This is often caused by not cancelling a `setTimeout` or `setInterval` call.
To get more details where ops were leaked, run again with --trace-ops flag.
FAILURES
-test 1 => ./test/ops_sanitizer_multiple_timeout_tests.ts:[WILDCARD]
-test 2 => ./test/ops_sanitizer_multiple_timeout_tests.ts:[WILDCARD]
+test 1 => [WILDCARD]/ops_sanitizer_multiple_timeout_tests.ts:[WILDCARD]
+test 2 => [WILDCARD]/ops_sanitizer_multiple_timeout_tests.ts:[WILDCARD]
FAILED | 0 passed | 2 failed ([WILDCARD])
diff --git a/tests/testdata/test/ops_sanitizer_nexttick.out b/tests/testdata/test/sanitizer/ops_sanitizer_nexttick.out
index 44a8d13d5..407699b6a 100644
--- a/tests/testdata/test/ops_sanitizer_nexttick.out
+++ b/tests/testdata/test/sanitizer/ops_sanitizer_nexttick.out
@@ -1,4 +1,4 @@
-running 2 tests from ./test/ops_sanitizer_nexttick.ts
+running 2 tests from [WILDCARD]/ops_sanitizer_nexttick.ts
test 1 ... ok ([WILDCARD])
test 2 ... ok ([WILDCARD])
diff --git a/tests/testdata/test/ops_sanitizer_nexttick.ts b/tests/testdata/test/sanitizer/ops_sanitizer_nexttick.ts
index 9ad3a7b28..9ad3a7b28 100644
--- a/tests/testdata/test/ops_sanitizer_nexttick.ts
+++ b/tests/testdata/test/sanitizer/ops_sanitizer_nexttick.ts
diff --git a/tests/testdata/test/sanitizer/ops_sanitizer_step_leak.out b/tests/testdata/test/sanitizer/ops_sanitizer_step_leak.out
new file mode 100644
index 000000000..be88a6e1d
--- /dev/null
+++ b/tests/testdata/test/sanitizer/ops_sanitizer_step_leak.out
@@ -0,0 +1,10 @@
+Check [WILDCARD]/ops_sanitizer_step_leak.ts
+running 1 test from [WILDCARD]/ops_sanitizer_step_leak.ts
+timeout ...
+ step ... ok [WILDCARD]
+------- output -------
+done
+----- output end -----
+timeout ... ok [WILDCARD]
+
+ok | 1 passed (1 step) | 0 failed [WILDCARD] \ No newline at end of file
diff --git a/tests/testdata/test/ops_sanitizer_step_leak.ts b/tests/testdata/test/sanitizer/ops_sanitizer_step_leak.ts
index 3fb9b397e..3fb9b397e 100644
--- a/tests/testdata/test/ops_sanitizer_step_leak.ts
+++ b/tests/testdata/test/sanitizer/ops_sanitizer_step_leak.ts
diff --git a/tests/testdata/test/sanitizer/ops_sanitizer_timeout_failure.out b/tests/testdata/test/sanitizer/ops_sanitizer_timeout_failure.out
new file mode 100644
index 000000000..e6e527112
--- /dev/null
+++ b/tests/testdata/test/sanitizer/ops_sanitizer_timeout_failure.out
@@ -0,0 +1,6 @@
+Check [WILDCARD]/ops_sanitizer_timeout_failure.ts
+running 1 test from [WILDCARD]/ops_sanitizer_timeout_failure.ts
+wait ... ok ([WILDCARD])
+
+ok | 1 passed | 0 failed ([WILDCARD])
+
diff --git a/tests/testdata/test/ops_sanitizer_timeout_failure.ts b/tests/testdata/test/sanitizer/ops_sanitizer_timeout_failure.ts
index d40a5a258..d40a5a258 100644
--- a/tests/testdata/test/ops_sanitizer_timeout_failure.ts
+++ b/tests/testdata/test/sanitizer/ops_sanitizer_timeout_failure.ts
diff --git a/tests/testdata/test/ops_sanitizer_unstable.out b/tests/testdata/test/sanitizer/ops_sanitizer_unstable.out
index a4f47a749..f7c391b7c 100644
--- a/tests/testdata/test/ops_sanitizer_unstable.out
+++ b/tests/testdata/test/sanitizer/ops_sanitizer_unstable.out
@@ -1,21 +1,21 @@
-Check [WILDCARD]/testdata/test/ops_sanitizer_unstable.ts
-running 2 tests from ./test/ops_sanitizer_unstable.ts
+Check [WILDCARD]/ops_sanitizer_unstable.ts
+running 2 tests from [WILDCARD]/ops_sanitizer_unstable.ts
no-op ... ok ([WILDCARD])
leak interval ... FAILED ([WILDCARD])
ERRORS
-leak interval => ./test/ops_sanitizer_unstable.ts:[WILDCARD]
+leak interval => [WILDCARD]/ops_sanitizer_unstable.ts:[WILDCARD]
error: Leaking async ops:
- 1 async operation to sleep for a duration was started in this test, but never completed. This is often caused by not cancelling a `setTimeout` or `setInterval` call. The operation was started here:
at [WILDCARD]
at setInterval ([WILDCARD])
- at fn ([WILDCARD]/testdata/test/ops_sanitizer_unstable.ts:7:5)
+ at fn ([WILDCARD]/ops_sanitizer_unstable.ts:[WILDCARD])
at [WILDCARD]
FAILURES
-leak interval => ./test/ops_sanitizer_unstable.ts:[WILDCARD]
+leak interval => [WILDCARD]/ops_sanitizer_unstable.ts:[WILDCARD]
FAILED | 1 passed | 1 failed ([WILDCARD])
diff --git a/tests/testdata/test/ops_sanitizer_unstable.ts b/tests/testdata/test/sanitizer/ops_sanitizer_unstable.ts
index d1b554adf..1deb1d5a7 100644
--- a/tests/testdata/test/ops_sanitizer_unstable.ts
+++ b/tests/testdata/test/sanitizer/ops_sanitizer_unstable.ts
@@ -2,6 +2,7 @@ Deno.test("no-op", function () {});
Deno.test({
name: "leak interval",
// regression test for sanitizer errors being swallowed with permissions.
+ // https://github.com/denoland/deno/pull/18550
permissions: {},
fn() {
setInterval(function () {}, 100000);
diff --git a/tests/testdata/test/resource_sanitizer.out b/tests/testdata/test/sanitizer/resource_sanitizer.out
index 655dd2a17..50f98511c 100644
--- a/tests/testdata/test/resource_sanitizer.out
+++ b/tests/testdata/test/sanitizer/resource_sanitizer.out
@@ -1,10 +1,10 @@
-Check [WILDCARD]/test/resource_sanitizer.ts
-running 1 test from ./test/resource_sanitizer.ts
+Check [WILDCARD]/resource_sanitizer.ts
+running 1 test from [WILDCARD]/resource_sanitizer.ts
leak ... FAILED ([WILDCARD])
ERRORS
-leak => ./test/resource_sanitizer.ts:[WILDCARD]
+leak => [WILDCARD]/resource_sanitizer.ts:[WILDCARD]
error: Leaking resources:
[UNORDERED_START]
- The stdin pipe was opened before the test started, but was closed during the test. Do not close resources in a test that were not created during that test.
@@ -13,7 +13,7 @@ error: Leaking resources:
FAILURES
-leak => ./test/resource_sanitizer.ts:[WILDCARD]
+leak => [WILDCARD]/resource_sanitizer.ts:[WILDCARD]
FAILED | 0 passed | 1 failed ([WILDCARD])
diff --git a/tests/testdata/test/resource_sanitizer.ts b/tests/testdata/test/sanitizer/resource_sanitizer.ts
index 93c9222c5..93c9222c5 100644
--- a/tests/testdata/test/resource_sanitizer.ts
+++ b/tests/testdata/test/sanitizer/resource_sanitizer.ts
diff --git a/tests/testdata/test/trace_ops_caught_error/main.out b/tests/testdata/test/sanitizer/trace_ops_caught_error/main.out
index 192ed3a6d..4e591adf1 100644
--- a/tests/testdata/test/trace_ops_caught_error/main.out
+++ b/tests/testdata/test/sanitizer/trace_ops_caught_error/main.out
@@ -1,5 +1,5 @@
Check file:///[WILDCARD]/trace_ops_caught_error/main.ts
-running 1 test from ./test/trace_ops_caught_error/main.ts
+running 1 test from [WILDCARD]/trace_ops_caught_error/main.ts
handle thrown error in async function ... ok ([WILDCARD])
ok | 1 passed | 0 failed ([WILDCARD])
diff --git a/tests/testdata/test/trace_ops_caught_error/main.ts b/tests/testdata/test/sanitizer/trace_ops_caught_error/main.ts
index 8194a8b2a..043018688 100644
--- a/tests/testdata/test/trace_ops_caught_error/main.ts
+++ b/tests/testdata/test/sanitizer/trace_ops_caught_error/main.ts
@@ -1,3 +1,4 @@
+// https://github.com/denoland/deno/pull/16970
Deno.test("handle thrown error in async function", async () => {
const dirPath = Deno.makeTempDirSync();
const filePath = `${dirPath}/file.txt`;
diff --git a/tests/unit_node/process_test.ts b/tests/unit_node/process_test.ts
index bc2ff640e..bff3c6641 100644
--- a/tests/unit_node/process_test.ts
+++ b/tests/unit_node/process_test.ts
@@ -226,6 +226,7 @@ Deno.test({
},
});
+// Only supported on Windows (but won't throw anywhere)
Deno.test({
name: "process.on SIGBREAK doesn't throw",
fn() {
@@ -235,9 +236,9 @@ Deno.test({
},
});
+// Not supported on Windows (but won't throw anywhere)
Deno.test({
- name: "process.on SIGTERM doesn't throw on windows",
- ignore: Deno.build.os !== "windows",
+ name: "process.on SIGTERM doesn't throw",
fn() {
const listener = () => {};
process.on("SIGTERM", listener);