Hello! > I've committed this patch to update to the final Go 1.12 release. > Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed > to mainline.
This patch introduced following failure in CentOS 5.11: syscall_linux_test.go:381:11: error: reference to undefined field or method 'Flags' 381 | return st.Flags&syscall.MS_NOSUID != 0 | ^ FAIL: syscall According to man statfs, flags were introduced in linux 2.6.36: struct statfs { __fsword_t f_type; /* Type of filesystem (see below) */ __fsword_t f_bsize; /* Optimal transfer block size */ fsblkcnt_t f_blocks; /* Total data blocks in filesystem */ fsblkcnt_t f_bfree; /* Free blocks in filesystem */ fsblkcnt_t f_bavail; /* Free blocks available to unprivileged user */ fsfilcnt_t f_files; /* Total file nodes in filesystem */ fsfilcnt_t f_ffree; /* Free file nodes in filesystem */ fsid_t f_fsid; /* Filesystem ID */ __fsword_t f_namelen; /* Maximum length of filenames */ __fsword_t f_frsize; /* Fragment size (since Linux 2.6) */ __fsword_t f_flags; /* Mount flags of filesystem (since Linux 2.6.36) */ __fsword_t f_spare[xxx]; /* Padding bytes reserved for future use */ }; CentOS 5.11 defines struct statfs as: struct statfs { __SWORD_TYPE f_type; __SWORD_TYPE f_bsize; #ifndef __USE_FILE_OFFSET64 __fsblkcnt_t f_blocks; __fsblkcnt_t f_bfree; __fsblkcnt_t f_bavail; __fsfilcnt_t f_files; __fsfilcnt_t f_ffree; #else __fsblkcnt64_t f_blocks; __fsblkcnt64_t f_bfree; __fsblkcnt64_t f_bavail; __fsfilcnt64_t f_files; __fsfilcnt64_t f_ffree; #endif __fsid_t f_fsid; __SWORD_TYPE f_namelen; __SWORD_TYPE f_frsize; __SWORD_TYPE f_spare[5]; }; so, Statfs_t in sysinfo.go corresponds to: sysinfo.go:type Statfs_t struct { Type int64; Bsize int64; Blocks uint64; Bfree uint64; Bavail uint64; Files uint64; Ffree uint64; Fsid ___fsid_t; Namelen int64; Frsize int64; Spare [4+1]int64; } Uros.