From: Peter Xu <[email protected]> Add a plain tcp test for guest-memfd. Note that the test will be automatically skipped whenever not supported (e.g. qemu compiled without KVM, or host kernel doesn't support kvm, or old kernels, etc.).
Signed-off-by: Peter Xu <[email protected]> Reviewed-by: Fabiano Rosas <[email protected]> Signed-off-by: Michael Roth <[email protected]> --- tests/qtest/migration/precopy-tests.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/qtest/migration/precopy-tests.c b/tests/qtest/migration/precopy-tests.c index a23d51126b..8146f37d61 100644 --- a/tests/qtest/migration/precopy-tests.c +++ b/tests/qtest/migration/precopy-tests.c @@ -182,6 +182,14 @@ static void test_precopy_tcp_plain(char *name, MigrateCommon *args) test_precopy_common(args); } +static void test_precopy_tcp_plain_gmemfd(char *name, MigrateCommon *args) +{ + args->uri = "tcp:127.0.0.1:0"; + args->start.mem_type = MEM_TYPE_GUEST_MEMFD; + + test_precopy_common(args); +} + static void test_precopy_tcp_switchover_ack(char *name, MigrateCommon *args) { /* @@ -1108,6 +1116,8 @@ void migration_test_add_precopy(MigrationTestEnv *env) return; } + migration_test_add("/migration/precopy/tcp/plain/guest-memfd", + test_precopy_tcp_plain_gmemfd); migration_test_add("/migration/precopy/tcp/plain/switchover-ack", test_precopy_tcp_switchover_ack); -- 2.43.0
