{"id":2233085,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2233085/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260505160915.25558-5-farosas@suse.de/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/1.2/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260505160915.25558-5-farosas@suse.de>","list_archive_url":null,"date":"2026-05-05T16:09:03","name":"[v1,04/15] tests/qtest/migration: Group unix migration tests","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"3ee34566c08944370d8fa59267366443035c1bba","submitter":{"id":85343,"url":"http://patchwork.ozlabs.org/api/1.2/people/85343/?format=json","name":"Fabiano Rosas","email":"farosas@suse.de"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260505160915.25558-5-farosas@suse.de/mbox/","series":[{"id":502864,"url":"http://patchwork.ozlabs.org/api/1.2/series/502864/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=502864","date":"2026-05-05T16:09:07","name":"tests/qtest/migration: Always defer","version":1,"mbox":"http://patchwork.ozlabs.org/series/502864/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2233085/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2233085/checks/","tags":{},"related":[],"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256\n header.s=susede2_rsa header.b=D8blho+5;\n\tdkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=JspJLqEU;\n\tdkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de\n header.a=rsa-sha256 header.s=susede2_rsa header.b=D8blho+5;\n\tdkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=JspJLqEU;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)","smtp-out2.suse.de;\n\tnone"],"Received":["from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g93RG26ygz1yJx\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 06 May 2026 02:11:22 +1000 (AEST)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wKIM4-0008QZ-BU; Tue, 05 May 2026 12:10:40 -0400","from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <farosas@suse.de>) id 1wKILC-0007w5-Rp\n for qemu-devel@nongnu.org; Tue, 05 May 2026 12:09:48 -0400","from smtp-out2.suse.de ([195.135.223.131])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <farosas@suse.de>) id 1wKIL9-0007RT-Dc\n for qemu-devel@nongnu.org; Tue, 05 May 2026 12:09:46 -0400","from imap1.dmz-prg2.suse.org (unknown [10.150.64.97])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by smtp-out2.suse.de (Postfix) with ESMTPS id 910CC5CB10;\n Tue,  5 May 2026 16:09:29 +0000 (UTC)","from imap1.dmz-prg2.suse.org (localhost [127.0.0.1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 6C9EB593A3;\n Tue,  5 May 2026 16:09:28 +0000 (UTC)","from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167])\n by imap1.dmz-prg2.suse.org with ESMTPSA id 4D1fDzgW+mmNcgAAD6G6ig\n (envelope-from <farosas@suse.de>); Tue, 05 May 2026 16:09:28 +0000"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_rsa;\n t=1777997369;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=zYZtWW/BG1VVPc2RlzeHfPalbRqchXjdPpj+gIrK+Rg=;\n b=D8blho+5DO0lqsUOXGG4EnoWqPj7jXMR9f3UJrIjGMmsZRuUU2nj3Us4AcmmqjNG/iQMHq\n tlxTN1GKCIjPUiG48PzxxJs0ewI3e4fP3zufit8NvjT1fwA8Mko+RoWUwkPqCkPdug0/G3\n FG16gJdm5YtcHHcNwK4k0Ek9ktE62a4=","v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1777997369;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=zYZtWW/BG1VVPc2RlzeHfPalbRqchXjdPpj+gIrK+Rg=;\n b=JspJLqEUCHRhcFJkjRviJqsLqf2nu39JpEHs5SAEHFLko0bE9k/UiDsAIYimXw4AjqPZGX\n oXxcku7y/b5UzTAg==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_rsa;\n t=1777997369;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=zYZtWW/BG1VVPc2RlzeHfPalbRqchXjdPpj+gIrK+Rg=;\n b=D8blho+5DO0lqsUOXGG4EnoWqPj7jXMR9f3UJrIjGMmsZRuUU2nj3Us4AcmmqjNG/iQMHq\n tlxTN1GKCIjPUiG48PzxxJs0ewI3e4fP3zufit8NvjT1fwA8Mko+RoWUwkPqCkPdug0/G3\n FG16gJdm5YtcHHcNwK4k0Ek9ktE62a4=","v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1777997369;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=zYZtWW/BG1VVPc2RlzeHfPalbRqchXjdPpj+gIrK+Rg=;\n b=JspJLqEUCHRhcFJkjRviJqsLqf2nu39JpEHs5SAEHFLko0bE9k/UiDsAIYimXw4AjqPZGX\n oXxcku7y/b5UzTAg=="],"From":"Fabiano Rosas <farosas@suse.de>","To":"qemu-devel@nongnu.org","Cc":"Peter Xu <peterx@redhat.com>, Laurent Vivier <lvivier@redhat.com>,\n Paolo Bonzini <pbonzini@redhat.com>","Subject":"[PATCH v1 04/15] tests/qtest/migration: Group unix migration tests","Date":"Tue,  5 May 2026 13:09:03 -0300","Message-ID":"<20260505160915.25558-5-farosas@suse.de>","X-Mailer":"git-send-email 2.51.0","In-Reply-To":"<20260505160915.25558-1-farosas@suse.de>","References":"<20260505160915.25558-1-farosas@suse.de>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-Spam-Score":"-2.80","X-Spamd-Result":"default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%];\n NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[];\n R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000];\n MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[];\n FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+];\n TO_DN_SOME(0.00)[];\n DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:mid,imap1.dmz-prg2.suse.org:helo];\n RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_EQ_ENVFROM(0.00)[];\n RCVD_COUNT_TWO(0.00)[2]; FUZZY_RATELIMITED(0.00)[rspamd.com];\n DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519];\n RCPT_COUNT_THREE(0.00)[4]; RCVD_TLS_ALL(0.00)[]","Received-SPF":"pass client-ip=195.135.223.131; envelope-from=farosas@suse.de;\n helo=smtp-out2.suse.de","X-Spam_score_int":"-43","X-Spam_score":"-4.4","X-Spam_bar":"----","X-Spam_report":"(-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=ham autolearn_force=no","X-Spam_action":"no action","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"qemu development <qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<https://lists.nongnu.org/archive/html/qemu-devel>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"},"content":"Remove some repetition when defining unix: tests by introducing a\n_common function.\n\nSigned-off-by: Fabiano Rosas <farosas@suse.de>\n---\n tests/qtest/migration/compression-tests.c |  6 +----\n tests/qtest/migration/framework.c         |  9 +++++++\n tests/qtest/migration/framework.h         |  1 +\n tests/qtest/migration/precopy-tests.c     | 30 +++--------------------\n tests/qtest/migration/tls-tests.c         | 12 ++-------\n 5 files changed, 17 insertions(+), 41 deletions(-)","diff":"diff --git a/tests/qtest/migration/compression-tests.c b/tests/qtest/migration/compression-tests.c\nindex 845e622cd5..7f2856b7f8 100644\n--- a/tests/qtest/migration/compression-tests.c\n+++ b/tests/qtest/migration/compression-tests.c\n@@ -123,10 +123,6 @@ migrate_hook_start_xbzrle(QTestState *from,\n \n static void test_precopy_unix_xbzrle(char *name, MigrateCommon *args)\n {\n-    g_autofree char *uri = g_strdup_printf(\"unix:%s/migsocket\", tmpfs);\n-\n-    args->connect_uri = uri;\n-    args->listen_uri = uri;\n     args->start_hook = migrate_hook_start_xbzrle;\n     args->iterations = 2;\n     /*\n@@ -137,7 +133,7 @@ static void test_precopy_unix_xbzrle(char *name, MigrateCommon *args)\n \n     args->start.caps[MIGRATION_CAPABILITY_XBZRLE] = true;\n \n-    test_precopy_common(args);\n+    test_precopy_unix_common(args);\n }\n \n static void *\ndiff --git a/tests/qtest/migration/framework.c b/tests/qtest/migration/framework.c\nindex 42f565af7b..73bb015f64 100644\n--- a/tests/qtest/migration/framework.c\n+++ b/tests/qtest/migration/framework.c\n@@ -934,6 +934,15 @@ finish:\n     return 0;\n }\n \n+void test_precopy_unix_common(MigrateCommon *args)\n+{\n+    g_autofree char *uri = g_strdup_printf(\"unix:%s/migsocket\", tmpfs);\n+\n+    args->listen_uri = uri;\n+    args->connect_uri = uri;\n+    test_precopy_common(args);\n+}\n+\n static void file_dirty_offset_region(void)\n {\n     g_autofree char *path = g_strdup_printf(\"%s/%s\", tmpfs, FILE_TEST_FILENAME);\ndiff --git a/tests/qtest/migration/framework.h b/tests/qtest/migration/framework.h\nindex 13ce84b49e..613839dec8 100644\n--- a/tests/qtest/migration/framework.h\n+++ b/tests/qtest/migration/framework.h\n@@ -239,6 +239,7 @@ void test_postcopy_common(MigrateCommon *args);\n void test_postcopy_recovery_common(MigrateCommon *args,\n                                    PostcopyRecoveryFailStage fail_stage);\n int test_precopy_common(MigrateCommon *args);\n+void test_precopy_unix_common(MigrateCommon *args);\n void test_file_common(MigrateCommon *args, bool stop_src);\n void *migrate_hook_start_precopy_tcp_multifd_common(QTestState *from,\n                                                     QTestState *to,\ndiff --git a/tests/qtest/migration/precopy-tests.c b/tests/qtest/migration/precopy-tests.c\nindex a0e3ff0547..54e45e2a02 100644\n--- a/tests/qtest/migration/precopy-tests.c\n+++ b/tests/qtest/migration/precopy-tests.c\n@@ -37,62 +37,40 @@ static char *tmpfs;\n \n static void test_precopy_unix_plain(char *name, MigrateCommon *args)\n {\n-    g_autofree char *uri = g_strdup_printf(\"unix:%s/migsocket\", tmpfs);\n-\n-    args->listen_uri = uri;\n-    args->connect_uri = uri;\n     /*\n      * The simplest use case of precopy, covering smoke tests of\n      * get-dirty-log dirty tracking.\n      */\n     args->live = true;\n-\n-    test_precopy_common(args);\n+    test_precopy_unix_common(args);\n }\n \n static void test_precopy_unix_suspend_live(char *name, MigrateCommon *args)\n {\n-    g_autofree char *uri = g_strdup_printf(\"unix:%s/migsocket\", tmpfs);\n-\n-    args->listen_uri = uri;\n-    args->connect_uri = uri;\n     /*\n      * despite being live, the test is fast because the src\n      * suspends immediately.\n      */\n     args->live = true;\n-\n     args->start.suspend_me = true;\n-\n-    test_precopy_common(args);\n+    test_precopy_unix_common(args);\n }\n \n static void test_precopy_unix_suspend_notlive(char *name, MigrateCommon *args)\n {\n-    g_autofree char *uri = g_strdup_printf(\"unix:%s/migsocket\", tmpfs);\n-\n-    args->listen_uri = uri;\n-    args->connect_uri = uri;\n     args->start.suspend_me = true;\n-\n-    test_precopy_common(args);\n+    test_precopy_unix_common(args);\n }\n \n static void test_precopy_unix_dirty_ring(char *name, MigrateCommon *args)\n {\n-    g_autofree char *uri = g_strdup_printf(\"unix:%s/migsocket\", tmpfs);\n-\n-    args->listen_uri = uri;\n-    args->connect_uri = uri;\n     /*\n      * Besides the precopy/unix basic test, cover dirty ring interface\n      * rather than get-dirty-log.\n      */\n     args->live = true;\n-\n     args->start.use_dirty_ring = true;\n-\n-    test_precopy_common(args);\n+    test_precopy_unix_common(args);\n }\n \n #ifdef CONFIG_RDMA\ndiff --git a/tests/qtest/migration/tls-tests.c b/tests/qtest/migration/tls-tests.c\nindex 87898af260..0677ca661e 100644\n--- a/tests/qtest/migration/tls-tests.c\n+++ b/tests/qtest/migration/tls-tests.c\n@@ -424,14 +424,10 @@ static void test_multifd_postcopy_preempt_recovery_tls_psk(char *name,\n \n static void test_precopy_unix_tls_psk(char *name, MigrateCommon *args)\n {\n-    g_autofree char *uri = g_strdup_printf(\"unix:%s/migsocket\", tmpfs);\n-\n-    args->connect_uri = uri;\n-    args->listen_uri = uri;\n     args->start_hook = migrate_hook_start_tls_psk_match;\n     args->end_hook = migrate_hook_end_tls_psk;\n \n-    test_precopy_common(args);\n+    test_precopy_unix_common(args);\n }\n \n #ifdef CONFIG_TASN1\n@@ -454,14 +450,10 @@ static void test_precopy_unix_tls_x509_default_host(char *name,\n static void test_precopy_unix_tls_x509_override_host(char *name,\n                                                      MigrateCommon *args)\n {\n-    g_autofree char *uri = g_strdup_printf(\"unix:%s/migsocket\", tmpfs);\n-\n-    args->connect_uri = uri;\n-    args->listen_uri = uri;\n     args->start_hook = migrate_hook_start_tls_x509_override_host;\n     args->end_hook = migrate_hook_end_tls_x509;\n \n-    test_precopy_common(args);\n+    test_precopy_unix_common(args);\n }\n #endif /* CONFIG_TASN1 */\n \n","prefixes":["v1","04/15"]}