aboutsummaryrefslogtreecommitdiff
path: root/lib/std/os/linux
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-12-08 13:39:09 -0800
committerAndrew Kelley <andrew@ziglang.org>2025-12-23 22:15:08 -0800
commitf53248a40936ebc9aaf75ddbd16e67ebec05ab84 (patch)
treeaf6a1a4fa4d3ff09dae241922a8f7c37cde43681 /lib/std/os/linux
parent916998315967f73c91e682e9ea05dd3232818654 (diff)
downloadzig-f53248a40936ebc9aaf75ddbd16e67ebec05ab84.tar.gz
zig-f53248a40936ebc9aaf75ddbd16e67ebec05ab84.zip
update all std.fs.cwd() to std.Io.Dir.cwd()
Diffstat (limited to 'lib/std/os/linux')
-rw-r--r--lib/std/os/linux/IoUring.zig24
-rw-r--r--lib/std/os/linux/test.zig6
2 files changed, 15 insertions, 15 deletions
diff --git a/lib/std/os/linux/IoUring.zig b/lib/std/os/linux/IoUring.zig
index c7d3f35d40..0972a302da 100644
--- a/lib/std/os/linux/IoUring.zig
+++ b/lib/std/os/linux/IoUring.zig
@@ -1991,7 +1991,7 @@ test "writev/fsync/readv" {
defer tmp.cleanup();
const path = "test_io_uring_writev_fsync_readv";
- const file = try tmp.dir.createFile(path, .{ .read = true, .truncate = true });
+ const file = try tmp.dir.createFile(io, path, .{ .read = true, .truncate = true });
defer file.close(io);
const fd = file.handle;
@@ -2062,7 +2062,7 @@ test "write/read" {
var tmp = std.testing.tmpDir(.{});
defer tmp.cleanup();
const path = "test_io_uring_write_read";
- const file = try tmp.dir.createFile(path, .{ .read = true, .truncate = true });
+ const file = try tmp.dir.createFile(io, path, .{ .read = true, .truncate = true });
defer file.close(io);
const fd = file.handle;
@@ -2110,12 +2110,12 @@ test "splice/read" {
var tmp = std.testing.tmpDir(.{});
const path_src = "test_io_uring_splice_src";
- const file_src = try tmp.dir.createFile(path_src, .{ .read = true, .truncate = true });
+ const file_src = try tmp.dir.createFile(io, path_src, .{ .read = true, .truncate = true });
defer file_src.close(io);
const fd_src = file_src.handle;
const path_dst = "test_io_uring_splice_dst";
- const file_dst = try tmp.dir.createFile(path_dst, .{ .read = true, .truncate = true });
+ const file_dst = try tmp.dir.createFile(io, path_dst, .{ .read = true, .truncate = true });
defer file_dst.close(io);
const fd_dst = file_dst.handle;
@@ -2185,7 +2185,7 @@ test "write_fixed/read_fixed" {
defer tmp.cleanup();
const path = "test_io_uring_write_read_fixed";
- const file = try tmp.dir.createFile(path, .{ .read = true, .truncate = true });
+ const file = try tmp.dir.createFile(io, path, .{ .read = true, .truncate = true });
defer file.close(io);
const fd = file.handle;
@@ -2306,7 +2306,7 @@ test "close" {
defer tmp.cleanup();
const path = "test_io_uring_close";
- const file = try tmp.dir.createFile(path, .{});
+ const file = try tmp.dir.createFile(io, path, .{});
errdefer file.close(io);
const sqe_close = try ring.close(0x44444444, file.handle);
@@ -2652,7 +2652,7 @@ test "fallocate" {
defer tmp.cleanup();
const path = "test_io_uring_fallocate";
- const file = try tmp.dir.createFile(path, .{ .truncate = true, .mode = 0o666 });
+ const file = try tmp.dir.createFile(io, path, .{ .truncate = true, .mode = 0o666 });
defer file.close(io);
try testing.expectEqual(@as(u64, 0), (try file.stat()).size);
@@ -2699,7 +2699,7 @@ test "statx" {
var tmp = std.testing.tmpDir(.{});
defer tmp.cleanup();
const path = "test_io_uring_statx";
- const file = try tmp.dir.createFile(path, .{ .truncate = true, .mode = 0o666 });
+ const file = try tmp.dir.createFile(io, path, .{ .truncate = true, .mode = 0o666 });
defer file.close(io);
try testing.expectEqual(@as(u64, 0), (try file.stat()).size);
@@ -2969,7 +2969,7 @@ test "renameat" {
// Write old file with data
- const old_file = try tmp.dir.createFile(old_path, .{ .truncate = true, .mode = 0o666 });
+ const old_file = try tmp.dir.createFile(io, old_path, .{ .truncate = true, .mode = 0o666 });
defer old_file.close(io);
try old_file.writeAll("hello");
@@ -3028,7 +3028,7 @@ test "unlinkat" {
// Write old file with data
- const file = try tmp.dir.createFile(path, .{ .truncate = true, .mode = 0o666 });
+ const file = try tmp.dir.createFile(io, path, .{ .truncate = true, .mode = 0o666 });
defer file.close(io);
// Submit unlinkat
@@ -3125,7 +3125,7 @@ test "symlinkat" {
const path = "test_io_uring_symlinkat";
const link_path = "test_io_uring_symlinkat_link";
- const file = try tmp.dir.createFile(path, .{ .truncate = true, .mode = 0o666 });
+ const file = try tmp.dir.createFile(io, path, .{ .truncate = true, .mode = 0o666 });
defer file.close(io);
// Submit symlinkat
@@ -3177,7 +3177,7 @@ test "linkat" {
// Write file with data
- const first_file = try tmp.dir.createFile(first_path, .{ .truncate = true, .mode = 0o666 });
+ const first_file = try tmp.dir.createFile(io, first_path, .{ .truncate = true, .mode = 0o666 });
defer first_file.close(io);
try first_file.writeAll("hello");
diff --git a/lib/std/os/linux/test.zig b/lib/std/os/linux/test.zig
index 39606ddfac..d7cfb4e138 100644
--- a/lib/std/os/linux/test.zig
+++ b/lib/std/os/linux/test.zig
@@ -18,7 +18,7 @@ test "fallocate" {
defer tmp.cleanup();
const path = "test_fallocate";
- const file = try tmp.dir.createFile(path, .{ .truncate = true, .mode = 0o666 });
+ const file = try tmp.dir.createFile(io, path, .{ .truncate = true, .mode = 0o666 });
defer file.close(io);
try expect((try file.stat()).size == 0);
@@ -85,7 +85,7 @@ test "statx" {
defer tmp.cleanup();
const tmp_file_name = "just_a_temporary_file.txt";
- var file = try tmp.dir.createFile(tmp_file_name, .{});
+ var file = try tmp.dir.createFile(io, tmp_file_name, .{});
defer file.close(io);
var buf: linux.Statx = undefined;
@@ -121,7 +121,7 @@ test "fadvise" {
defer tmp.cleanup();
const tmp_file_name = "temp_posix_fadvise.txt";
- var file = try tmp.dir.createFile(tmp_file_name, .{});
+ var file = try tmp.dir.createFile(io, tmp_file_name, .{});
defer file.close(io);
var buf: [2048]u8 = undefined;