-
Notifications
You must be signed in to change notification settings - Fork 27
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
terminal: input characters echoing is broken after running a test suite #147
Comments
Thanks for reporting, i can reproduce it! We will take a look into it. |
I can not reproduce with Alacritty+ZSH. Only with BASH (Alacritty or GNOME Terminal) In my case, a Intel laptop, it is related to It can be reproduced only with the following command:
Do you have an Intel GPU and |
My computer owns an Intel GPU indeed I dont have The following command is also reproducing the issue |
@dabrain34 are you using bash or zsh? Trying to narrow down the issue... |
I'm using bash |
I was able to isolate the problem in this small piece of code. On my laptop the error is not deterministic, it fails less than half of the time. from multiprocessing import Pool
from unittest.result import TestResult
from time import perf_counter
import subprocess
jobs=3
failfast=False
timeout=30
verbose=True
tests = [1,2,3]
def run_command(command, verbose = False, check = True, timeout = None):
"""Runs a command"""
sout = subprocess.DEVNULL if not verbose else None
serr = subprocess.DEVNULL if not verbose else None
if verbose:
print(f'\nRunning command "{" ".join(command)}"')
try:
subprocess.run(command, stdout=sout, stderr=serr, check=check, timeout=timeout)
except (subprocess.CalledProcessError, subprocess.TimeoutExpired) as ex:
raise ex
def _run_worker(test):
print("running", test)
cmd = ['ffmpeg']
out = run_command(cmd, timeout=timeout, verbose=verbose)
return out
with Pool(jobs) as pool:
def _callback(test_result) -> None:
print(
test_result,
flush=True,
)
if failfast:
pool.terminate()
start = perf_counter()
for test in tests:
pool.apply_async(_run_worker, (test,), callback=_callback)
pool.close()
pool.join() |
It looks like you have multiple |
Fix issue with Bash Linux terminal does not echo the input characters after running a full test suite. Thanks to Kerin Millar for the help in the bash list [1] The issue could be reproduced with ``` from multiprocessing import Pool from unittest.result import TestResult from time import perf_counter import subprocess jobs=3 failfast=False timeout=30 verbose=True tests = [1,2,3] def run_command(command, verbose = False, check = True, timeout = None): """Runs a command""" sout = subprocess.DEVNULL if not verbose else None serr = subprocess.DEVNULL if not verbose else None if verbose: print(f'\nRunning command "{" ".join(command)}"') try: subprocess.run(command, stdout=sout, stderr=serr, check=check, timeout=timeout) except (subprocess.CalledProcessError, subprocess.TimeoutExpired) as ex: raise ex def _run_worker(test): print("running", test) cmd = ['ffmpeg'] out = run_command(cmd, timeout=timeout, verbose=verbose) return out with Pool(jobs) as pool: def _callback(test_result) -> None: print( test_result, flush=True, ) if failfast: pool.terminate() start = perf_counter() for test in tests: pool.apply_async(_run_worker, (test,), callback=_callback) pool.close() pool.join() ``` Fixes #147 [1] https://lists.gnu.org/archive/html/help-bash/2024-02/msg00084.html
I asked in help-bash mail list [1]. And the community did the work ❤️ @dabrain34 and @mdimopoulos can you check solution of PR #164 ? [1] https://lists.gnu.org/archive/html/help-bash/2024-02/msg00084.html |
FYI: this issue was the origin of https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/1910 |
Fix issue with Bash Linux terminal does not echo the input characters after running a full test suite. Thanks to Kerin Millar for the help in the bash list [1] The issue could be reproduced with ``` from multiprocessing import Pool from unittest.result import TestResult from time import perf_counter import subprocess jobs=3 failfast=False timeout=30 verbose=True tests = [1,2,3] def run_command(command, verbose = False, check = True, timeout = None): """Runs a command""" sout = subprocess.DEVNULL if not verbose else None serr = subprocess.DEVNULL if not verbose else None if verbose: print(f'\nRunning command "{" ".join(command)}"') try: subprocess.run(command, stdout=sout, stderr=serr, check=check, timeout=timeout) except (subprocess.CalledProcessError, subprocess.TimeoutExpired) as ex: raise ex def _run_worker(test): print("running", test) cmd = ['ffmpeg'] out = run_command(cmd, timeout=timeout, verbose=verbose) return out with Pool(jobs) as pool: def _callback(test_result) -> None: print( test_result, flush=True, ) if failfast: pool.terminate() start = perf_counter() for test in tests: pool.apply_async(_run_worker, (test,), callback=_callback) pool.close() pool.join() ``` Fixes #147 [1] https://lists.gnu.org/archive/html/help-bash/2024-02/msg00084.html
The linux terminal does not echo the input characters after running a full test suite run such as:
./fluster.py run -ts JCT-VC-HEVC_V1
Need
stty sane
to be executed to get back a usable terminalThe text was updated successfully, but these errors were encountered: