mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
io.test: close memfd at end of test
This commit is contained in:
parent
13c9faaa2d
commit
a153a972ad
@ -654,6 +654,7 @@ test "memfd_create" {
|
||||
if (builtin.os != .linux) return error.SkipZigTest;
|
||||
|
||||
const fd = try std.os.memfd_create("test", 0);
|
||||
defer std.os.close(fd);
|
||||
try std.os.write(fd, "test");
|
||||
try std.os.lseek_SET(fd, 0);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user