aboutsummaryrefslogtreecommitdiff
path: root/tests/matrix
diff options
context:
space:
mode:
authorJakob Unterwurzacher2018-03-05 22:45:45 +0100
committerJakob Unterwurzacher2018-03-05 22:52:05 +0100
commit870779ab1ddd38d21b14460822704b6cf8dc4de6 (patch)
tree4cfe1b18f21907fe4e33bcd6376ceee475364366 /tests/matrix
parent426b9536df01ba1229f506842d3948953eefcfc7 (diff)
macos: doTestUtimesNano: skip UTIME_OMIT and nanoseconds testcases
Not supported on macos. Beef up the first test case a little by using different second values.
Diffstat (limited to 'tests/matrix')
-rw-r--r--tests/matrix/matrix_test.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/matrix/matrix_test.go b/tests/matrix/matrix_test.go
index ae8c7a0..77af0ab 100644
--- a/tests/matrix/matrix_test.go
+++ b/tests/matrix/matrix_test.go
@@ -731,8 +731,8 @@ const _UTIME_OMIT = ((1 << 30) - 2)
func doTestUtimesNano(t *testing.T, path string) {
utimeTestcases := []utimesTestcaseStruct{
{
- in: [2]syscall.Timespec{{Sec: 50, Nsec: 0}, {Sec: 50, Nsec: 0}},
- out: [2]syscall.Timespec{{Sec: 50, Nsec: 0}, {Sec: 50, Nsec: 0}},
+ in: [2]syscall.Timespec{{Sec: 50, Nsec: 0}, {Sec: 51, Nsec: 0}},
+ out: [2]syscall.Timespec{{Sec: 50, Nsec: 0}, {Sec: 51, Nsec: 0}},
},
{
in: [2]syscall.Timespec{{Sec: 1, Nsec: 2}, {Sec: 3, Nsec: 4}},
@@ -747,6 +747,10 @@ func doTestUtimesNano(t *testing.T, path string) {
out: [2]syscall.Timespec{{Sec: 7, Nsec: 8}, {Sec: 5, Nsec: 6}},
},
}
+ if runtime.GOOS == "darwin" {
+ // darwin neither supports UTIME_OMIT nor nanoseconds (!?)
+ utimeTestcases = utimeTestcases[:1]
+ }
for i, tc := range utimeTestcases {
err := syscall.UtimesNano(path, tc.in[:])
if err != nil {