]> www.infradead.org Git - users/dwmw2/qemu.git/commit
tests/functional: require non-NULL success_message for console wait
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 21 Nov 2024 16:57:41 +0000 (16:57 +0000)
committerAlex Bennée <alex.bennee@linaro.org>
Mon, 25 Nov 2024 10:13:41 +0000 (10:13 +0000)
commitf03a81897db14bb56109b6adc8699a91774b3389
tree7bc531fd21c373a8f61134391db1b6a46d4bc6c8
parent7699e37b2ac32ba4b905b4b22024e93f33337ce7
tests/functional: require non-NULL success_message for console wait

When waiting for expected output, the 'success_message' is a mandatory
parameter, with 'failure_message' defaulting to None.

The code has logic which indicates it was trying to cope with
'success_message' being None and 'failure_message' being non-None but
it does not appear able to actually do anything useful. The check for
'success_message is None' will break out of the loop before any check
for 'failure_message' has been performed.

IOW, for practcal purposes 'success_message' must be non-None unless
'send_string' is set. Assert this expectation and simplify the loop
logic.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20241121154218.1423005-15-berrange@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20241121165806.476008-15-alex.bennee@linaro.org>
tests/functional/qemu_test/cmd.py