tests/qtest: migration: Add support for negative testing of qmp_migrate
commit5274274c262edc6738ddc5c590dc0a08dd1090b1
authorFabiano Rosas <farosas@suse.de>
Wed, 12 Jul 2023 19:07:41 +0000 (12 16:07 -0300)
committerJuan Quintela <quintela@redhat.com>
Wed, 11 Oct 2023 09:17:02 +0000 (11 11:17 +0200)
tree0525f84bb72a6f6fd32ee66d3adb45e4af13dd27
parent4111a732e80894256c9053577f0e9369eeea807b
tests/qtest: migration: Add support for negative testing of qmp_migrate

There is currently no way to write a test for errors that happened in
qmp_migrate before the migration has started.

Add a version of qmp_migrate that ensures an error happens. To make
use of it a test needs to set MigrateCommon.result as
MIG_TEST_QMP_ERROR.

Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20230712190742.22294-6-farosas@suse.de>
tests/qtest/libqtest.c
tests/qtest/libqtest.h
tests/qtest/migration-helpers.c
tests/qtest/migration-helpers.h
tests/qtest/migration-test.c