linux-stable/tools
Steven Rostedt 18d347d1b0 ktest.pl: Add RUN_TIMEOUT option with default unlimited
commit 4e7d2a8f0b upstream.

There is a disconnect between the run_command function and the
wait_for_input. The wait_for_input has a default timeout of 2 minutes. But
if that happens, the run_command loop will exit out to the waitpid() of
the executing command. This fails in that it no longer monitors the
command, and also, the ssh to the test box can hang when its finished, as
it's waiting for the pipe it's writing to to flush, but the loop that
reads that pipe has already exited, leaving the command stuck, and the
test hangs.

Instead, make the default "wait_for_input" of the run_command infinite,
and allow the user to override it if they want with a default timeout
option "RUN_TIMEOUT".

But this fixes the hang that happens when the pipe is full and the ssh
session never exits.

Cc: stable@vger.kernel.org
Fixes: 6e98d1b441 ("ktest: Add timeout to ssh command")
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-11 16:44:05 +01:00
..
accounting
arch parisc: Align parisc MADV_XXX constants with all other architectures 2023-01-18 11:42:00 +01:00
bpf bpftool: Clear errno after libcap's checks 2022-10-26 13:22:48 +02:00
build tools build: Switch to new openssl API for test-libcrypto 2022-08-25 11:18:25 +02:00
cgroup
debugging
firewire
firmware
gpio
hv
iio tools: iio: iio_utils: fix digit calculation 2022-11-03 23:56:53 +09:00
include tools/nolibc/string: Fix memcmp() implementation 2022-11-10 17:57:55 +01:00
io_uring
kvm/kvm_stat
laptop
leds
lib libbpf: Fix alen calculation in libbpf_nla_dump_errormsg() 2023-03-11 16:43:41 +01:00
memory-model
nfsd
objtool objtool: Add a missing comma to avoid string concatenation 2023-02-06 07:52:49 +01:00
pci
pcmcia
perf perf tools: Fix auto-complete on aarch64 2023-03-11 16:43:49 +01:00
power tools/power turbostat: fix ICX DRAM power numbers 2022-06-14 18:11:25 +02:00
scripts tools: Allow proper CC/CXX/... override with LLVM=1 in Makefile.include 2021-07-31 08:19:37 +02:00
spi
testing ktest.pl: Add RUN_TIMEOUT option with default unlimited 2023-03-11 16:44:05 +01:00
thermal/tmon tools/thermal: Fix possible path truncations 2022-08-25 11:18:09 +02:00
time
usb usb: testusb: Fix for showing the connection speed 2021-10-09 14:39:49 +02:00
virtio tools/virtio: fix the vringh test for virtio ring changes 2023-02-22 12:50:34 +01:00
vm tools/vm/slabinfo-gnuplot: use "grep -E" instead of "egrep" 2022-12-08 11:23:04 +01:00
wmi
Makefile