]> git.feebdaed.xyz Git - 0xmirror/qemu.git/commit
qtest: Allow and ignore blank lines in input
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 6 Nov 2025 15:19:59 +0000 (15:19 +0000)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 25 Nov 2025 21:41:37 +0000 (22:41 +0100)
commit3de6afef49449c487256dc6238649ba0f0508789
tree324e6fb59d2b4bf771b87e4c949a1b58c5b36f87
parenta8d023be622cab21e90bca8d9618068f0e49b74b
qtest: Allow and ignore blank lines in input

Currently the code that reads the qtest protocol commands insists
that every input line has a command.  If it receives a line with
nothing but whitespace it will trip an assertion in
qtest_process_command().

This is a little awkward for the case where we are feeding qtest a
set of bug-reproduction commands via standard input or a file,
because it means you need to be careful not to leave a blank line at
the start or the end when cutting and pasting the command sequence
from a bug report.

Change the code to allow and ignore blank lines in the input.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Message-ID: <20251106151959.1088095-1-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
system/qtest.c