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.19 backport] #58941

Closed
gopherbot opened this issue Mar 8, 2023 · 3 comments
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.19 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
@gopherbot gopherbot added this to the Go1.19.8 milestone 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
Copy link
Author

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

@gopherbot
Copy link
Author

Change https://go.dev/cl/474619 mentions this issue: [release-branch.go1.19] os/signal/internal/pty: fix error handling

@gopherbot
Copy link
Author

Closed by merging 20c96a7 to release-branch.go1.19.

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 #58941

Change-Id: I4009e10b344e43fec291b941a63bcf4548937d44
Reviewed-on: https://go-review.googlesource.com/c/go/+/474619
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Auto-Submit: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
@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