Closed krader1961 closed 5 months ago
What is perplexing is why the existing FreeBSD CI environment doesn't catch this problem. Before fixing this so the test passes on my VM we should probably figure out why the existing FreeBSD CI environment didn't catch the problem.
It seems that a bug in Go has prevented the tests from actually running. I reported https://github.com/golang/go/issues/65425.
The issue here seems to be that FreeBSD uses uint64 while other platforms use int64. Note that I get the same exception on FreeBSD prior to the recent change that introduced transcript based unit tests. The decimal value 9223372036854775807 is 0x7FFFFFFFFFFFFFFF. Which matches the definition of infinity on FreeBSD:
Note that decimal 18446744073709551615 (the expected value) is 0xFFFFFFFFFFFFFFFF which is -1, the usual value for infinity on platforms (which is most of them) that use a signed int for these values. The old tests relied on pkg/mods/unix/rlim_t_int64.go and /pkg/modes/unix/rlim_t_uint64.go to finesse the type difference between FreeBSD and all other Unix platforms.