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

If control of shell is not reobtained quickly after a stop-on-signal, a timeout raises (Spurious Timeout after stop-on-silence) #228

Closed
eldipa opened this issue May 6, 2022 · 0 comments · Fixed by #229
Labels
bug out of sync between the code and the docs; something that should be fixed in the near future
Milestone

Comments

@eldipa
Copy link
Collaborator

eldipa commented May 6, 2022

Describe the bug
A clear and concise description of what the bug is followed by the steps to reproduce it:

  1. Be the following c.sh (add exec permission)
#!/bin/bash
trap 'echo INT ; sleep 2 ; echo Bye' INT
echo Start
sleep 3
echo BOOM
  1. Be the following a.md (wrap it in a shell code-fenced block)
$ ./c.sh          # byexample: +timeout=10 +stop-on-silence +stop-signal=interrupt
Start
  1. Run byexample -l shell a.md'
  2. See error

Expected behavior
No error should happen. The test should PASS.

Observed behavior

File "a.md", line 3
Failed example:
    ./c.sh          # byexample: +timeout=10 +stop-on-silence +stop-signal=interrupt
=> Execution timedout at example 1 of 1.
- This could be because the example just ran too slow (try add more time
with +timeout=<n>) or the example is "syntactically incorrect" and
the interpreter hang (may be you forgot a parenthesis or something like that?).
- This is the last output obtained:
Start
INT

[w] Example timed out. Trying to recovering the control (shell)...
[w] Recovering control of shell failed.

byexample version
byexample 10.5.1

@eldipa eldipa added the bug out of sync between the code and the docs; something that should be fixed in the near future label May 6, 2022
@eldipa eldipa added this to the 10.5.2 milestone May 6, 2022
@eldipa eldipa changed the title If control of shell is not reobtained quickly after a stop-on-signal, a timeout raises If control of shell is not reobtained quickly after a stop-on-signal, a timeout raises (Spurious Timeout after stop-on-silence) May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug out of sync between the code and the docs; something that should be fixed in the near future
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant