diff options
author | Yury Kotov <yury-kotov@yandex-team.ru> | 2019-09-03 19:22:45 +0300 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2019-09-12 11:19:48 +0100 |
commit | d43e59e7ab883249c25cca513837407461216900 (patch) | |
tree | 6146435662eab4325cd5a3ebced3a90307b8c08d /tests/libqtest.h | |
parent | b9d68df62a1340529f7eef251353d2040c66f403 (diff) |
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 <yury-kotov@yandex-team.ru>
Message-Id: <20190903162246.18524-3-yury-kotov@yandex-team.ru>
Acked-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'tests/libqtest.h')
-rw-r--r-- | tests/libqtest.h | 9 |
1 files changed, 9 insertions, 0 deletions
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 |