-
Notifications
You must be signed in to change notification settings - Fork 78
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
testscript: ignore result when interrupting background processes #265
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When an entire script runs and the end is reached, any background processes begun with a '&' command get interrupted or killed, depending on the platform and timeout, and we wait for them to finish. We also checked their resulting status code and failed if they didn't exit with a status code of 0. However, as explained in the comment, this would always fail on Windows, given that it doesn't have interrupt signals so we would kill directly, causing a "signal: killed" error. Worse, any failures here caused a `panic: fail now!` as that is how we bubble up errors when a script command is being run, but such panics were not being recovered once we reached the end of a script. Now that we don't check the result anymore here, the panics are gone. Fixes rogpeppe#228. Fixes rogpeppe#260.
mvdan
force-pushed
the
stop-background-error
branch
from
July 9, 2024 14:29
bc6c35a
to
3ade0b8
Compare
rogpeppe
approved these changes
Jul 9, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks!
cueckoo
pushed a commit
to cue-lang/cue-trybot
that referenced
this pull request
Jul 9, 2024
In particular, rogpeppe/go-internal#265 fixes an issue with a testscript that a CUE contributor is trying to add. Signed-off-by: Daniel Martí <[email protected]> Change-Id: I428f7bdd9ff846c028fea20401388713489a3373 Dispatch-Trailer: {"type":"trybot","CL":1197460,"patchset":1,"ref":"refs/changes/60/1197460/1","targetBranch":"master"}
cueckoo
pushed a commit
to cue-lang/cue
that referenced
this pull request
Jul 9, 2024
In particular, rogpeppe/go-internal#265 fixes an issue with a testscript that a CUE contributor is trying to add. Signed-off-by: Daniel Martí <[email protected]> Change-Id: I428f7bdd9ff846c028fea20401388713489a3373 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1197460 Reviewed-by: Roger Peppe <[email protected]> TryBot-Result: CUEcueckoo <[email protected]> Unity-Result: CUE porcuepine <[email protected]>
1 task
dmathieu
referenced
this pull request
in open-telemetry/opentelemetry-go-contrib
Sep 24, 2024
…#6147) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/rogpeppe/go-internal](https://redirect.github.com/rogpeppe/go-internal) | `v1.12.0` -> `v1.13.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2frogpeppe%2fgo-internal/v1.13.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2frogpeppe%2fgo-internal/v1.13.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2frogpeppe%2fgo-internal/v1.12.0/v1.13.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2frogpeppe%2fgo-internal/v1.12.0/v1.13.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>rogpeppe/go-internal (github.com/rogpeppe/go-internal)</summary> ### [`v1.13.1`](https://redirect.github.com/rogpeppe/go-internal/releases/tag/v1.13.1) [Compare Source](https://redirect.github.com/rogpeppe/go-internal/compare/v1.13.0...v1.13.1) #### What's Changed - testscript: fix ptyName() returning /dev/pts/4294967296 on s390x by [@​anthonyfok](https://redirect.github.com/anthonyfok) in [https://github.com/rogpeppe/go-internal/pull/246](https://redirect.github.com/rogpeppe/go-internal/pull/246) - all: Move away from ioutil by [@​abhinav](https://redirect.github.com/abhinav) in [https://github.com/rogpeppe/go-internal/pull/248](https://redirect.github.com/rogpeppe/go-internal/pull/248) - testscript/doc: add `go` to the list of testscript commands by [@​rudifa](https://redirect.github.com/rudifa) in [https://github.com/rogpeppe/go-internal/pull/249](https://redirect.github.com/rogpeppe/go-internal/pull/249) - testscript: Add Chdir method to change directory by [@​abhinav](https://redirect.github.com/abhinav) in [https://github.com/rogpeppe/go-internal/pull/247](https://redirect.github.com/rogpeppe/go-internal/pull/247) - testscript: add kill command by [@​kortschak](https://redirect.github.com/kortschak) in [https://github.com/rogpeppe/go-internal/pull/243](https://redirect.github.com/rogpeppe/go-internal/pull/243) - testscript: clarify HOME and TMPDIR env var names by [@​mvdan](https://redirect.github.com/mvdan) in [https://github.com/rogpeppe/go-internal/pull/240](https://redirect.github.com/rogpeppe/go-internal/pull/240) - all: Add Go 1.22, drop Go 1.20 by [@​abhinav](https://redirect.github.com/abhinav) in [https://github.com/rogpeppe/go-internal/pull/252](https://redirect.github.com/rogpeppe/go-internal/pull/252) - update dependencies and rely on Go 1.21 APIs by [@​mvdan](https://redirect.github.com/mvdan) in [https://github.com/rogpeppe/go-internal/pull/256](https://redirect.github.com/rogpeppe/go-internal/pull/256) - cmd/testscript: remove redundant use of Failed by [@​rogpeppe](https://redirect.github.com/rogpeppe) in [https://github.com/rogpeppe/go-internal/pull/257](https://redirect.github.com/rogpeppe/go-internal/pull/257) - testscript: add Config.Files by [@​rogpeppe](https://redirect.github.com/rogpeppe) in [https://github.com/rogpeppe/go-internal/pull/258](https://redirect.github.com/rogpeppe/go-internal/pull/258) - cmd/testscript: do not create an extra temporary directory by [@​rogpeppe](https://redirect.github.com/rogpeppe) in [https://github.com/rogpeppe/go-internal/pull/259](https://redirect.github.com/rogpeppe/go-internal/pull/259) - Fix typos discovered by codespell by [@​cclauss](https://redirect.github.com/cclauss) in [https://github.com/rogpeppe/go-internal/pull/262](https://redirect.github.com/rogpeppe/go-internal/pull/262) - testscript: ignore result when interrupting background processes by [@​mvdan](https://redirect.github.com/mvdan) in [https://github.com/rogpeppe/go-internal/pull/265](https://redirect.github.com/rogpeppe/go-internal/pull/265) - add goproxytest testing API, forward dirhash by [@​mvdan](https://redirect.github.com/mvdan) in [https://github.com/rogpeppe/go-internal/pull/272](https://redirect.github.com/rogpeppe/go-internal/pull/272) - update Go, update the README by [@​mvdan](https://redirect.github.com/mvdan) in [https://github.com/rogpeppe/go-internal/pull/273](https://redirect.github.com/rogpeppe/go-internal/pull/273) #### New Contributors - [@​anthonyfok](https://redirect.github.com/anthonyfok) made their first contribution in [https://github.com/rogpeppe/go-internal/pull/246](https://redirect.github.com/rogpeppe/go-internal/pull/246) - [@​abhinav](https://redirect.github.com/abhinav) made their first contribution in [https://github.com/rogpeppe/go-internal/pull/248](https://redirect.github.com/rogpeppe/go-internal/pull/248) - [@​rudifa](https://redirect.github.com/rudifa) made their first contribution in [https://github.com/rogpeppe/go-internal/pull/249](https://redirect.github.com/rogpeppe/go-internal/pull/249) - [@​kortschak](https://redirect.github.com/kortschak) made their first contribution in [https://github.com/rogpeppe/go-internal/pull/243](https://redirect.github.com/rogpeppe/go-internal/pull/243) - [@​cclauss](https://redirect.github.com/cclauss) made their first contribution in [https://github.com/rogpeppe/go-internal/pull/262](https://redirect.github.com/rogpeppe/go-internal/pull/262) **Full Changelog**: rogpeppe/go-internal@v1.12.0...v1.13.1 ### [`v1.13.0`](https://redirect.github.com/rogpeppe/go-internal/compare/v1.12.0...v1.13.0) [Compare Source](https://redirect.github.com/rogpeppe/go-internal/compare/v1.12.0...v1.13.0) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/open-telemetry/opentelemetry-go-contrib). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MC4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiU2tpcCBDaGFuZ2Vsb2ciLCJkZXBlbmRlbmNpZXMiXX0=--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: dmathieu <[email protected]>
dmathieu
referenced
this pull request
in open-telemetry/opentelemetry-go
Sep 25, 2024
…#5835) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/rogpeppe/go-internal](https://redirect.github.com/rogpeppe/go-internal) | `v1.12.0` -> `v1.13.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2frogpeppe%2fgo-internal/v1.13.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2frogpeppe%2fgo-internal/v1.13.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2frogpeppe%2fgo-internal/v1.12.0/v1.13.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2frogpeppe%2fgo-internal/v1.12.0/v1.13.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>rogpeppe/go-internal (github.com/rogpeppe/go-internal)</summary> ### [`v1.13.1`](https://redirect.github.com/rogpeppe/go-internal/releases/tag/v1.13.1) [Compare Source](https://redirect.github.com/rogpeppe/go-internal/compare/v1.13.0...v1.13.1) #### What's Changed - testscript: fix ptyName() returning /dev/pts/4294967296 on s390x by [@​anthonyfok](https://redirect.github.com/anthonyfok) in [https://github.com/rogpeppe/go-internal/pull/246](https://redirect.github.com/rogpeppe/go-internal/pull/246) - all: Move away from ioutil by [@​abhinav](https://redirect.github.com/abhinav) in [https://github.com/rogpeppe/go-internal/pull/248](https://redirect.github.com/rogpeppe/go-internal/pull/248) - testscript/doc: add `go` to the list of testscript commands by [@​rudifa](https://redirect.github.com/rudifa) in [https://github.com/rogpeppe/go-internal/pull/249](https://redirect.github.com/rogpeppe/go-internal/pull/249) - testscript: Add Chdir method to change directory by [@​abhinav](https://redirect.github.com/abhinav) in [https://github.com/rogpeppe/go-internal/pull/247](https://redirect.github.com/rogpeppe/go-internal/pull/247) - testscript: add kill command by [@​kortschak](https://redirect.github.com/kortschak) in [https://github.com/rogpeppe/go-internal/pull/243](https://redirect.github.com/rogpeppe/go-internal/pull/243) - testscript: clarify HOME and TMPDIR env var names by [@​mvdan](https://redirect.github.com/mvdan) in [https://github.com/rogpeppe/go-internal/pull/240](https://redirect.github.com/rogpeppe/go-internal/pull/240) - all: Add Go 1.22, drop Go 1.20 by [@​abhinav](https://redirect.github.com/abhinav) in [https://github.com/rogpeppe/go-internal/pull/252](https://redirect.github.com/rogpeppe/go-internal/pull/252) - update dependencies and rely on Go 1.21 APIs by [@​mvdan](https://redirect.github.com/mvdan) in [https://github.com/rogpeppe/go-internal/pull/256](https://redirect.github.com/rogpeppe/go-internal/pull/256) - cmd/testscript: remove redundant use of Failed by [@​rogpeppe](https://redirect.github.com/rogpeppe) in [https://github.com/rogpeppe/go-internal/pull/257](https://redirect.github.com/rogpeppe/go-internal/pull/257) - testscript: add Config.Files by [@​rogpeppe](https://redirect.github.com/rogpeppe) in [https://github.com/rogpeppe/go-internal/pull/258](https://redirect.github.com/rogpeppe/go-internal/pull/258) - cmd/testscript: do not create an extra temporary directory by [@​rogpeppe](https://redirect.github.com/rogpeppe) in [https://github.com/rogpeppe/go-internal/pull/259](https://redirect.github.com/rogpeppe/go-internal/pull/259) - Fix typos discovered by codespell by [@​cclauss](https://redirect.github.com/cclauss) in [https://github.com/rogpeppe/go-internal/pull/262](https://redirect.github.com/rogpeppe/go-internal/pull/262) - testscript: ignore result when interrupting background processes by [@​mvdan](https://redirect.github.com/mvdan) in [https://github.com/rogpeppe/go-internal/pull/265](https://redirect.github.com/rogpeppe/go-internal/pull/265) - add goproxytest testing API, forward dirhash by [@​mvdan](https://redirect.github.com/mvdan) in [https://github.com/rogpeppe/go-internal/pull/272](https://redirect.github.com/rogpeppe/go-internal/pull/272) - update Go, update the README by [@​mvdan](https://redirect.github.com/mvdan) in [https://github.com/rogpeppe/go-internal/pull/273](https://redirect.github.com/rogpeppe/go-internal/pull/273) #### New Contributors - [@​anthonyfok](https://redirect.github.com/anthonyfok) made their first contribution in [https://github.com/rogpeppe/go-internal/pull/246](https://redirect.github.com/rogpeppe/go-internal/pull/246) - [@​abhinav](https://redirect.github.com/abhinav) made their first contribution in [https://github.com/rogpeppe/go-internal/pull/248](https://redirect.github.com/rogpeppe/go-internal/pull/248) - [@​rudifa](https://redirect.github.com/rudifa) made their first contribution in [https://github.com/rogpeppe/go-internal/pull/249](https://redirect.github.com/rogpeppe/go-internal/pull/249) - [@​kortschak](https://redirect.github.com/kortschak) made their first contribution in [https://github.com/rogpeppe/go-internal/pull/243](https://redirect.github.com/rogpeppe/go-internal/pull/243) - [@​cclauss](https://redirect.github.com/cclauss) made their first contribution in [https://github.com/rogpeppe/go-internal/pull/262](https://redirect.github.com/rogpeppe/go-internal/pull/262) **Full Changelog**: rogpeppe/go-internal@v1.12.0...v1.13.1 ### [`v1.13.0`](https://redirect.github.com/rogpeppe/go-internal/compare/v1.12.0...v1.13.0) [Compare Source](https://redirect.github.com/rogpeppe/go-internal/compare/v1.12.0...v1.13.0) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/open-telemetry/opentelemetry-go). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MC4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiU2tpcCBDaGFuZ2Vsb2ciLCJkZXBlbmRlbmNpZXMiXX0=--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: dmathieu <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(see commit message)
Fixes #228.
Fixes #260.