| ... | @@ -181,7 +181,10 @@ test "setTimestamps" { | ... | @@ -181,7 +181,10 @@ test "setTimestamps" { |
| 181 | .modify_timestamp = .{ .new = stat_old.mtime.subDuration(.fromSeconds(5)) }, | 181 | .modify_timestamp = .{ .new = stat_old.mtime.subDuration(.fromSeconds(5)) }, |
| 182 | }); | 182 | }); |
| 183 | const stat_new = try file.stat(io); | 183 | const stat_new = try file.stat(io); |
| 184 | if (stat_old.atime) |old_atime| try expect(stat_new.atime.?.nanoseconds < old_atime.nanoseconds); | 184 | // NetBSD with noatime will just not update the timestamp, and noatime is default in at least NetBSD 11+. |
| | 185 | if (builtin.os.tag != .netbsd) { |
| | 186 | if (stat_old.atime) |old_atime| try expect(stat_new.atime.?.nanoseconds < old_atime.nanoseconds); |
| | 187 | } |
| 185 | try expect(stat_new.mtime.nanoseconds < stat_old.mtime.nanoseconds); | 188 | try expect(stat_new.mtime.nanoseconds < stat_old.mtime.nanoseconds); |
| 186 | } | 189 | } |
| 187 | | 190 | |