From 819537d70a3283737474e1b673fc20f574ac6bb6 Mon Sep 17 00:00:00 2001 From: LeRoyce Pearson Date: Sat, 14 Mar 2020 20:36:26 -0600 Subject: [PATCH] Skip file lock test in single threaded mode --- lib/std/fs.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/std/fs.zig b/lib/std/fs.zig index d324ad6e3c..3c7d687bf7 100644 --- a/lib/std/fs.zig +++ b/lib/std/fs.zig @@ -1724,6 +1724,8 @@ test "" { const FILE_LOCK_TEST_SLEEP_TIME = 1 * std.time.ns_per_s; test "open file with lock twice, make sure it wasn't open at the same time" { + if (builtin.single_threaded) return; + const filename = "file_lock_test.txt"; var contexts = [_]FileLockTestContext{ @@ -1751,6 +1753,8 @@ test "open file with lock twice, make sure it wasn't open at the same time" { } test "create file, lock and read from multiple process at once" { + if (builtin.single_threaded) return; + const filename = "file_read_lock_test.txt"; const filedata = "Hello, world!\n";