From d43e59e7ab883249c25cca513837407461216900 Mon Sep 17 00:00:00 2001 From: Yury Kotov Date: Tue, 3 Sep 2019 19:22:45 +0300 Subject: tests/libqtest: Allow setting expected exit status Add qtest_set_expected_status function to set expected exit status of child process. By default expected exit status is 0. Signed-off-by: Yury Kotov Message-Id: <20190903162246.18524-3-yury-kotov@yandex-team.ru> Acked-by: Thomas Huth Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Dr. David Alan Gilbert --- tests/libqtest.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/libqtest.h') diff --git a/tests/libqtest.h b/tests/libqtest.h index c8cffe5d68..a177e502d9 100644 --- a/tests/libqtest.h +++ b/tests/libqtest.h @@ -708,4 +708,13 @@ void qmp_assert_error_class(QDict *rsp, const char *class); */ bool qtest_probe_child(QTestState *s); +/** + * qtest_set_expected_status: + * @s: QTestState instance to operate on. + * @status: an expected exit status. + * + * Set expected exit status of the child. + */ +void qtest_set_expected_status(QTestState *s, int status); + #endif -- cgit v1.2.3