Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syscall: TestSyscallNoError failing on linux-mipsle-rtrk #35422

Closed
bcmills opened this issue Nov 7, 2019 · 8 comments

Comments

@bcmills
Copy link
Member

@bcmills bcmills commented Nov 7, 2019

linux-mipsle-rtrk (https://build.golang.org/log/7c41de40632a6e8445e6c90e94cb825c3aabdbd8):

--- FAIL: TestSyscallNoError (0.02s)
    syscall_linux_test.go:366: expected 4294967295 / 2 / 4294967294, got 4294967294 / 0 / 4294967294
FAIL
FAIL	syscall	6.696s

See previously #30258 (CC @ianlancetaylor @bradfitz)

@bcmills bcmills added this to the Go1.14 milestone Nov 7, 2019
@bcmills

This comment has been minimized.

Copy link
Member Author

@bcmills bcmills commented Nov 7, 2019

@bradfitz

This comment has been minimized.

Copy link
Member

@bradfitz bradfitz commented Nov 7, 2019

@tklauser

This comment has been minimized.

Copy link
Member

@tklauser tklauser commented Nov 7, 2019

Do I understand correctly that linux-mipsle-rtrk is linux/mipsle actually running on 64-bit MIPS hardware/kernel? Maybe that has something to do with it?

@bradfitz

This comment has been minimized.

Copy link
Member

@bradfitz bradfitz commented Nov 7, 2019

Correct.

@cherrymui

This comment has been minimized.

Copy link
Contributor

@cherrymui cherrymui commented Nov 7, 2019

On MIPS, the kernel returns whether the syscall has error in a separate register, R7 (https://go.googlesource.com/go/+/refs/heads/master/src/syscall/asm_linux_mipsx.s#107), instead of a negative result.

I'm not sure I understand why TestSyscallNoError expects syscall.RawSyscall returns an error while the syscall is not erred. It looks to me that the intent of TestSyscallNoError is that RawSyscallNoError does the right thing, not RawSyscall (incorrectly) returns an error.

@bradfitz

This comment has been minimized.

Copy link
Member

@bradfitz bradfitz commented Nov 7, 2019

It's not just the error value that's an unexpected value.

The first value is also unexpected. It's easier if it's reformatted like this:

expected 4294967295 / 2 / 4294967294,
     got 4294967294 / 0 / 4294967294
@cherrymui

This comment has been minimized.

Copy link
Contributor

@cherrymui cherrymui commented Nov 7, 2019

The first value, 4294967295, is just -1, as set by e.g. https://go.googlesource.com/go/+/refs/heads/master/src/syscall/asm_linux_386.s#79 when RawSyscall thinks it gets an error.

Assuming there is no error, 4294967294 is the expected result.

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 8, 2019

Change https://golang.org/cl/205898 mentions this issue: syscall: skip TestSyscallNoError on mips{,le}

@gopherbot gopherbot closed this in 6e11195 Nov 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.