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
~> set unix:rlimits[cpu] = [&cur=[]]
-want +got:
@@ -1,2 +1,2 @@
-Exception: bad value: cur in rlimit value must be number between 0 and 18446744073709551615, but is []
+Exception: bad value: cur in rlimit value must be number between 0 and 9223372036854775807, but is []
[tty]:1:5-21: set unix:rlimits[cpu] = [&cur=[]]
test_transcript.go:118:
~> set unix:rlimits[cpu] = [&cur=1 &max=[]]
-want +got:
@@ -1,2 +1,2 @@
-Exception: bad value: max in rlimit value must be number between 0 and 18446744073709551615, but is []
+Exception: bad value: max in rlimit value must be number between 0 and 9223372036854775807, but is []
[tty]:1:5-21: set unix:rlimits[cpu] = [&cur=1 &max=[]]
FAIL
FAIL src.elv.sh/pkg/mods/unix 1.421s
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.
The text was updated successfully, but these errors were encountered:
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.
go test -race is not compatible with ASLR, but a current Go bug causes the test
to still appear as successful: golang/go#65425.
This commit should result in a test failure on Cirrus CI's FreeBSD runner,
because there's currently a FreeBSD-specific bug in a test case (#1763).
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.
The text was updated successfully, but these errors were encountered: