You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On both i686 and armv7hl, TestProcStatLimits overflows:
# github.com/prometheus/procfs [github.com/prometheus/procfs.test]
./proc_stat_test.go:97:49: cannot use math.MinInt64 (untyped int constant -9223372036854775808) as int value in struct literal (overflows)
./proc_stat_test.go:98:51: cannot use math.MaxInt64 (untyped int constant 9223372036854775807) as int value in struct literal (overflows)
The text was updated successfully, but these errors were encountered:
to avoid `math.MinInt64` and `math.MaxInt64` overflowing `int` type
when running `TestProcStatLimits` on 32bit architectures:
```
./proc_stat_test.go:97:49: cannot use math.MinInt64 (untyped int constant -9223372036854775808) as int value in struct literal (overflows)
./proc_stat_test.go:98:51: cannot use math.MaxInt64 (untyped int constant 9223372036854775807) as int value in struct literal (overflows)
```
Fixes: prometheus#432
Signed-off-by: Tim Rots <tim.rots@protonmail.ch>
In terms of fixing this, we ran into a pretty similar situation before, which I fixed in #314, i.e. split the tests into 32-bit and 64-bit variants, using Go build tags to conditionally perform the right test on the right arch.
I guess it boils down to how imperative it is that we ship testdata fixtures which exercise the full range of machine-native ints / uints.
On both i686 and armv7hl, TestProcStatLimits overflows:
The text was updated successfully, but these errors were encountered: