From 870779ab1ddd38d21b14460822704b6cf8dc4de6 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Mon, 5 Mar 2018 22:45:45 +0100 Subject: 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. --- tests/matrix/matrix_test.go | 8 ++++++-- 1 file 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 { -- cgit v1.2.3