aboutsummaryrefslogtreecommitdiff
path: root/lib/std/os/linux/test.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-09-15 14:46:31 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-09-15 14:51:08 -0700
commitf3ebfcae3882c03da84821abed40167ea07a8c78 (patch)
treef1b759c94cba5b020a9ffb141fc62cb686fc5f04 /lib/std/os/linux/test.zig
parent111a2dcf3ad53c0c8ad2c9e7c9bd042b81e90c82 (diff)
parent0395b35cee8d4082cc40b0dcd0298f797f42309d (diff)
downloadzig-f3ebfcae3882c03da84821abed40167ea07a8c78.tar.gz
zig-f3ebfcae3882c03da84821abed40167ea07a8c78.zip
Merge remote-tracking branch 'origin/master' into llvm13
Conflicts: * cmake/Findclang.cmake * cmake/Findlld.cmake * cmake/Findllvm.cmake In master branch, more search paths were added to these files with "12" in the path. In this commit I updated them to "13". * src/stage1/codegen.cpp * src/zig_llvm.cpp * src/zig_llvm.h In master branch, ZigLLVMBuildCmpXchg is improved to add `is_single_threaded`. However, the LLVM 13 C API has this already, and in the llvm13 branch, ZigLLVMBuildCmpXchg is deleted in favor of the C API. In this commit I updated stage2 to use the LLVM 13 C API rather than depending on an improved ZigLLVMBuildCmpXchg. Additionally, src/target.zig largestAtomicBits needed to be updated to include the new m68k ISA.
Diffstat (limited to 'lib/std/os/linux/test.zig')
-rw-r--r--lib/std/os/linux/test.zig14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/std/os/linux/test.zig b/lib/std/os/linux/test.zig
index e45c9dbb99..14ff8ea38d 100644
--- a/lib/std/os/linux/test.zig
+++ b/lib/std/os/linux/test.zig
@@ -35,7 +35,7 @@ test "timer" {
var err: linux.E = linux.getErrno(epoll_fd);
try expect(err == .SUCCESS);
- const timer_fd = linux.timerfd_create(linux.CLOCK_MONOTONIC, 0);
+ const timer_fd = linux.timerfd_create(linux.CLOCK.MONOTONIC, 0);
try expect(linux.getErrno(timer_fd) == .SUCCESS);
const time_interval = linux.timespec{
@@ -52,11 +52,11 @@ test "timer" {
try expect(err == .SUCCESS);
var event = linux.epoll_event{
- .events = linux.EPOLLIN | linux.EPOLLOUT | linux.EPOLLET,
+ .events = linux.EPOLL.IN | linux.EPOLL.OUT | linux.EPOLL.ET,
.data = linux.epoll_data{ .ptr = 0 },
};
- err = linux.getErrno(linux.epoll_ctl(@intCast(i32, epoll_fd), linux.EPOLL_CTL_ADD, @intCast(i32, timer_fd), &event));
+ err = linux.getErrno(linux.epoll_ctl(@intCast(i32, epoll_fd), linux.EPOLL.CTL_ADD, @intCast(i32, timer_fd), &event));
try expect(err == .SUCCESS);
const events_one: linux.epoll_event = undefined;
@@ -75,15 +75,15 @@ test "statx" {
}
var statx_buf: linux.Statx = undefined;
- switch (linux.getErrno(linux.statx(file.handle, "", linux.AT_EMPTY_PATH, linux.STATX_BASIC_STATS, &statx_buf))) {
+ switch (linux.getErrno(linux.statx(file.handle, "", linux.AT.EMPTY_PATH, linux.STATX_BASIC_STATS, &statx_buf))) {
.SUCCESS => {},
// The statx syscall was only introduced in linux 4.11
.NOSYS => return error.SkipZigTest,
else => unreachable,
}
- var stat_buf: linux.kernel_stat = undefined;
- switch (linux.getErrno(linux.fstatat(file.handle, "", &stat_buf, linux.AT_EMPTY_PATH))) {
+ var stat_buf: linux.Stat = undefined;
+ switch (linux.getErrno(linux.fstatat(file.handle, "", &stat_buf, linux.AT.EMPTY_PATH))) {
.SUCCESS => {},
else => unreachable,
}
@@ -119,7 +119,7 @@ test "fadvise" {
file.handle,
0,
0,
- linux.POSIX_FADV_SEQUENTIAL,
+ linux.POSIX_FADV.SEQUENTIAL,
);
try expectEqual(@as(usize, 0), ret);
}