From 054b79427e160b9842983e6c657605b697ec1682 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 12 Dec 2019 15:19:58 -0800 Subject: [PATCH] Fix the path_filestat test on Linux (#706) Only very recently in #700 did we actually start running wasi tests again (they weren't running by accident). Just before that landed we also landed #688 which had some refactorings. Unfortunately #688 had a minor issue in it which wasn't caught because tests weren't run. This means that the bug in #688 slipped in and is now being caught by #700 now that both are landed on master. This commit fixes the small issue introduced and should get our CI green again! --- .../wasi-common/src/old/snapshot_0/sys/unix/linux/filetime.rs | 2 +- crates/wasi-common/src/sys/unix/linux/filetime.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/wasi-common/src/old/snapshot_0/sys/unix/linux/filetime.rs b/crates/wasi-common/src/old/snapshot_0/sys/unix/linux/filetime.rs index a286874413..8162b391fa 100644 --- a/crates/wasi-common/src/old/snapshot_0/sys/unix/linux/filetime.rs +++ b/crates/wasi-common/src/old/snapshot_0/sys/unix/linux/filetime.rs @@ -36,7 +36,7 @@ pub(crate) fn utimensat( static INVALID: AtomicBool = AtomicBool::new(false); if !INVALID.load(Relaxed) { let p = CString::new(path.as_bytes())?; - let times = [to_timespec(&atime), to_timespec(&mtime)]; + let times = [to_timespec(&atime)?, to_timespec(&mtime)?]; let rc = unsafe { libc::syscall( libc::SYS_utimensat, diff --git a/crates/wasi-common/src/sys/unix/linux/filetime.rs b/crates/wasi-common/src/sys/unix/linux/filetime.rs index 48413a5514..6ffd6b8ddf 100644 --- a/crates/wasi-common/src/sys/unix/linux/filetime.rs +++ b/crates/wasi-common/src/sys/unix/linux/filetime.rs @@ -36,7 +36,7 @@ pub(crate) fn utimensat( static INVALID: AtomicBool = AtomicBool::new(false); if !INVALID.load(Relaxed) { let p = CString::new(path.as_bytes())?; - let times = [to_timespec(&atime), to_timespec(&mtime)]; + let times = [to_timespec(&atime)?, to_timespec(&mtime)?]; let rc = unsafe { libc::syscall( libc::SYS_utimensat,