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

internal/testpty: fails on some Linux machines due to incorrect error handling [1.20 backport] #58942

Closed
gopherbot opened this issue Mar 8, 2023 · 1 comment
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link

@heschi requested issue #58940 to be considered for backport to the next 1.20 minor release.

@gopherbot please backport, the tests are failing on release branches too.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Mar 8, 2023
@heschi heschi added the CherryPickApproved Used during the release process for point releases label Mar 8, 2023
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Mar 8, 2023
@gopherbot gopherbot added this to the Go1.20.3 milestone Mar 8, 2023
@gopherbot
Copy link
Author

Change https://go.dev/cl/474616 mentions this issue: [release-branch.go1.20] internal/testpty: fix error handling

gopherbot pushed a commit that referenced this issue Mar 8, 2023
When calling a c library function, you discover that an error has
occurred, typically by looking at the return value of the function. Only
after that can you use errno to figure out the cause of the error.

Nothing about cgo changes that story -- you still have to look at the
result before checking the error that represents errno. If not you can
get false errors if the function happens to leak a non-zero errno.

Fix testpty to check errors correctly.

Fixes #58942.

Change-Id: Idb95f8dd6a8ed63f653190c2e722e742cf50542b
Reviewed-on: https://go-review.googlesource.com/c/go/+/463397
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
(cherry picked from commit f85c282)
Reviewed-on: https://go-review.googlesource.com/c/go/+/474616
Reviewed-by: Carlos Amedee <carlos@golang.org>
@heschi heschi closed this as completed Mar 8, 2023
@golang golang locked and limited conversation to collaborators Mar 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

2 participants