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.
This commit is contained in:
parent
426b9536df
commit
870779ab1d
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user