Peter Xu <[email protected]> writes: > 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]> > --- > tests/qtest/migration/precopy-tests.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/tests/qtest/migration/precopy-tests.c > b/tests/qtest/migration/precopy-tests.c > index 57ca623de5..88d2627efd 100644 > --- a/tests/qtest/migration/precopy-tests.c > +++ b/tests/qtest/migration/precopy-tests.c > @@ -215,6 +215,16 @@ static void test_precopy_tcp_plain(void) > test_precopy_common(&args); > } > > +static void test_precopy_tcp_plain_gmemfd(void) > +{ > + MigrateCommon args = { > + .listen_uri = "tcp:127.0.0.1:0", > + .start.mem_type = MEM_TYPE_GUEST_MEMFD, > + }; > + > + test_precopy_common(&args); > +} > + > static void test_precopy_tcp_switchover_ack(void) > { > MigrateCommon args = { > @@ -1276,6 +1286,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);
Reviewed-by: Fabiano Rosas <[email protected]>
