authorgravatar for leroycepearson@geemili.xyzLeRoyce Pearson <leroycepearson@geemili.xyz> 2020-03-14 20:36:26-06:00
committergravatar for leroycepearson@geemili.xyzLeRoyce Pearson <leroycepearson@geemili.xyz> 2020-03-14 20:36:26-06:00
log819537d70a3283737474e1b673fc20f574ac6bb6
tree9078f9bc013ddc228405c2dd0ca5a2b49f3eaeb0
parent947abb7626cae990c407d347f62a625001c17cdf

Skip file lock test in single threaded mode


1 files changed, 4 insertions(+), 0 deletions(-)

lib/std/fs.zig+4
...@@ -1724,6 +1724,8 @@ test "" {...@@ -1724,6 +1724,8 @@ test "" {
1724const FILE_LOCK_TEST_SLEEP_TIME = 1 * std.time.ns_per_s;1724const FILE_LOCK_TEST_SLEEP_TIME = 1 * std.time.ns_per_s;
17251725
1726test "open file with lock twice, make sure it wasn't open at the same time" {1726test "open file with lock twice, make sure it wasn't open at the same time" {
1727 if (builtin.single_threaded) return;
1728
1727 const filename = "file_lock_test.txt";1729 const filename = "file_lock_test.txt";
17281730
1729 var contexts = [_]FileLockTestContext{1731 var contexts = [_]FileLockTestContext{
...@@ -1751,6 +1753,8 @@ test "open file with lock twice, make sure it wasn't open at the same time" {...@@ -1751,6 +1753,8 @@ test "open file with lock twice, make sure it wasn't open at the same time" {
1751}1753}
17521754
1753test "create file, lock and read from multiple process at once" {1755test "create file, lock and read from multiple process at once" {
1756 if (builtin.single_threaded) return;
1757
1754 const filename = "file_read_lock_test.txt";1758 const filename = "file_read_lock_test.txt";
1755 const filedata = "Hello, world!\n";1759 const filedata = "Hello, world!\n";
17561760