go: x/sys/unix: go1.11 on mips64le fails at TestFstatat on Debian build
As of go1.11.4 (1.11.2 and 1.11.4 tested), TestFstatat fails on Debian buildd machines:
--- FAIL: TestFstatat (0.00s)
syscall_unix_test.go:516: Fstatat: returned stat does not match Stat
syscall_unix_test.go:535: Fstatat: returned stat does not match Lstat
FAIL
FAIL cmd/vendor/golang.org/x/sys/unix 0.405s
See https://buildd.debian.org/status/logs.php?pkg=golang-1.11&arch=mips64el for build logs.
Sorry, I haven’t found time to try to study this in depth by logging into Debian’s remote mips64el (mips64le) machine yet, but thought I should try my luck here first. 😃 Many thanks!
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 16 (7 by maintainers)
It looks the the Fstatat system call is working under the mistaken assumption that the timespecs’ fields (seconds and nanoseconds) are only 32 bit. The Go declarations make them 64 bit. That doesn’t seem right. That system call should be writing assuming 64-bit timespec fields. It seems to work on all other architectures.
We might need to do what Stat does, which is to use fillStat_t to convert a
stat_t(32-bit) to aStat_t(64-bit).It would be good to try to reproduce this using C. I don’t understand why mips64le and not (presumably) other architectures.