]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
kunit: tool: skip stty when stdin is not a tty
authorShuvam Pandey <shuvampandey1@gmail.com>
Fri, 27 Feb 2026 12:31:36 +0000 (18:16 +0545)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 6 Apr 2026 20:07:29 +0000 (14:07 -0600)
commite42c349f4cdfa43cb39a68c8f764f8cafc23a9a9
tree7cb029c906448e2666515e12e7b740548bb3561c
parentb73f50ffd4bddcd42b312a6c2b3d990f2cde7bf7
kunit: tool: skip stty when stdin is not a tty

run_kernel() cleanup and signal_handler() invoke stty unconditionally.
When stdin is not a tty (for example in CI or unit tests), this writes
noise to stderr.

Call stty only when stdin is a tty.

Add regression tests for these paths:
- run_kernel() with non-tty stdin
- signal_handler() with non-tty stdin
- signal_handler() with tty stdin

Signed-off-by: Shuvam Pandey <shuvampandey1@gmail.com>
Reviewed-by: David Gow <david@davidgow.net>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/kunit/kunit_kernel.py
tools/testing/kunit/kunit_tool_test.py