From nobody Tue Nov 26 20:18:24 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=suse.de ARC-Seal: i=1; a=rsa-sha256; t=1704378185; cv=none; d=zohomail.com; s=zohoarc; b=AtNLPYcB+DMw6NLueJzVaLgafTv175/GCcuYVkmK8LPCkk70BjhYof16RsE/UJFqyx4MDjw+7YuI9EnPX++HPj1a9wlF8iITa2P7DTsgaNp/anirr1v5sOtW5Gq4CZoblXsC9AmG1FrXikJdCUrR0D5GlsxZ7Xm5p2HEyrSxpIM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704378185; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=lVql7tiWBTeK4WI1qaBzlhALh8DU+rKjXn3TGzSv2Yg=; b=Eltsbcwxrx99zQ0Ex5dXkwhWdHitSoOtu/fGX6iHk1o3DgFkQ5BvSy7IAIfzXCaBwrfn0/vVIyYLCoJrSicXgVBv3KBqi09hhcjrdwrr/W1iP5oo21VOHS0JWvvdCqX6H8Bjvm9fW4pICHiafI5FsuMw0FcA8vJyrhCvdw7SFW8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1704378185170168.79438426436934; Thu, 4 Jan 2024 06:23:05 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rLOcB-0001Nq-8b; Thu, 04 Jan 2024 09:22:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rLOc4-0001MR-3H for qemu-devel@nongnu.org; Thu, 04 Jan 2024 09:22:24 -0500 Received: from smtp-out2.suse.de ([2a07:de40:b251:101:10:150:64:2]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rLOc1-0008Uh-Bf for qemu-devel@nongnu.org; Thu, 04 Jan 2024 09:22:23 -0500 Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 49DA21FCD8; Thu, 4 Jan 2024 14:22:18 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 57802137E8; Thu, 4 Jan 2024 14:22:17 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap1.dmz-prg2.suse.org with ESMTPSA id AFlZBxm/lmUfPAAAD6G6ig (envelope-from ); Thu, 04 Jan 2024 14:22:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1704378138; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lVql7tiWBTeK4WI1qaBzlhALh8DU+rKjXn3TGzSv2Yg=; b=TOOveeA9gb/gqasM8lfIF6lL02wPfmVYGk2BRtgO6G8UZ7EdTScYUu7mf6a4NDN7e+QPQ1 bmshlplkIq+fnm3LJ5rhi8cPBBBLMxxK2tnQ2xhuuBDbEqStO+GH3uHXCPXOzZRClE8GQ/ 9OOYgB6CbTHlhNTv6aJ3rh824COOP34= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1704378138; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lVql7tiWBTeK4WI1qaBzlhALh8DU+rKjXn3TGzSv2Yg=; b=m1lQ0fSUIUH//GdKZ+344TtIZWKXmoP0+LJp2zzQ1GIbDnKenvRDDW4KsKjVs1npFQH1yc Q9sFtvzjcaS+uZCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1704378138; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lVql7tiWBTeK4WI1qaBzlhALh8DU+rKjXn3TGzSv2Yg=; b=TOOveeA9gb/gqasM8lfIF6lL02wPfmVYGk2BRtgO6G8UZ7EdTScYUu7mf6a4NDN7e+QPQ1 bmshlplkIq+fnm3LJ5rhi8cPBBBLMxxK2tnQ2xhuuBDbEqStO+GH3uHXCPXOzZRClE8GQ/ 9OOYgB6CbTHlhNTv6aJ3rh824COOP34= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1704378138; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lVql7tiWBTeK4WI1qaBzlhALh8DU+rKjXn3TGzSv2Yg=; b=m1lQ0fSUIUH//GdKZ+344TtIZWKXmoP0+LJp2zzQ1GIbDnKenvRDDW4KsKjVs1npFQH1yc Q9sFtvzjcaS+uZCA== From: Fabiano Rosas To: qemu-devel@nongnu.org Cc: Peter Xu Subject: [PATCH v2 1/7] migration/multifd: Remove MultiFDPages_t::packet_num Date: Thu, 4 Jan 2024 11:21:38 -0300 Message-Id: <20240104142144.9680-2-farosas@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240104142144.9680-1-farosas@suse.de> References: <20240104142144.9680-1-farosas@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Authentication-Results: smtp-out2.suse.de; none X-Spam-Score: 10.00 X-Spamd-Result: default: False [10.00 / 50.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; BAYES_SPAM(5.10)[99.99%]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCVD_COUNT_THREE(0.00)[3]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; URIBL_BLOCKED(0.00)[suse.de:email]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[] Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a07:de40:b251:101:10:150:64:2; envelope-from=farosas@suse.de; 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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @suse.de) X-ZM-MESSAGEID: 1704378187050100003 Content-Type: text/plain; charset="utf-8" This was introduced by commit 34c55a94b1 ("migration: Create multipage support") and never used. Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu --- migration/multifd.c | 1 - migration/multifd.h | 2 -- 2 files changed, 3 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 9f353aecfa..3e650f5da0 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -250,7 +250,6 @@ static void multifd_pages_clear(MultiFDPages_t *pages) { pages->num =3D 0; pages->allocated =3D 0; - pages->packet_num =3D 0; pages->block =3D NULL; g_free(pages->offset); pages->offset =3D NULL; diff --git a/migration/multifd.h b/migration/multifd.h index a835643b48..b0ff610c37 100644 --- a/migration/multifd.h +++ b/migration/multifd.h @@ -58,8 +58,6 @@ typedef struct { uint32_t num; /* number of allocated pages */ uint32_t allocated; - /* global number of generated multifd packets */ - uint64_t packet_num; /* offset of each page */ ram_addr_t *offset; RAMBlock *block; --=20 2.35.3 From nobody Tue Nov 26 20:18:24 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=suse.de ARC-Seal: i=1; a=rsa-sha256; t=1704378229; cv=none; d=zohomail.com; s=zohoarc; b=GSE7XW7OlGakL4xgwkQVa6YLQwOLWqxuCEgG7sAD23A5lP5zD6tXo1ZFLI/a5qog8x4+cb4hCMXitH8m9bWBLzXBGgPKCzJl+MQ5G9kDX3nZc+LVoDX4T7pEJsrVrwdr+JXS0YPqDcliT6dq9Q3evU5f047fECn26wGXJ2V7ues= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704378229; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=OQauhPNVhpDDdP3z2mKGEg4aNBnP7toPGXMNMNJetWg=; b=dRAsBwBv9D2nhnhtxt7t3uCQt3zbIwnCuVKbCXnpDMG3vZabFX9aT9psguIFJMpvJH5A1STRg/2ooKPHr1OxotJHPHB8tgVA/9uC8YEY5tc+sZNbTittsNeFv1/dQMDqhSCtPtADxqjadPOmGPmcGflfUuCjGyO7RnNinYfBdVU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1704378229122521.8015227763447; Thu, 4 Jan 2024 06:23:49 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rLOc6-0001NA-BM; Thu, 04 Jan 2024 09:22:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rLOc4-0001MQ-2L for qemu-devel@nongnu.org; Thu, 04 Jan 2024 09:22:24 -0500 Received: from smtp-out1.suse.de ([195.135.223.130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rLOc1-0008Um-Nf for qemu-devel@nongnu.org; Thu, 04 Jan 2024 09:22:23 -0500 Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id B728B21E1A; Thu, 4 Jan 2024 14:22:19 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id C1E18137E8; Thu, 4 Jan 2024 14:22:18 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap1.dmz-prg2.suse.org with ESMTPSA id uMSnIRq/lmUfPAAAD6G6ig (envelope-from ); Thu, 04 Jan 2024 14:22:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1704378139; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OQauhPNVhpDDdP3z2mKGEg4aNBnP7toPGXMNMNJetWg=; b=lpDPSZWQLcgp1A5fCc9tozhZ18pcfuX8lfmHx0pK8bcR6VbuAqogzNDSOLFbjLQMtL97x3 qUiyA6VLkZXLKg8CGimYjut7E6zXfNWsuxxTcmzjB6JmYo6ZgW6Mv0WxxXL9dq/KBMmyBI 2LA+0cawj8yPVeWyVwDg4nwPLIC3H/Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1704378139; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OQauhPNVhpDDdP3z2mKGEg4aNBnP7toPGXMNMNJetWg=; b=fHYcoIHiJfk1H+dYopeW2vPFGW4x2HY0d6EAYX/BMgbZemM4qHWsJ420Xfacb9belPU5Xo 9SE9GI6hxNXfSaDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1704378139; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OQauhPNVhpDDdP3z2mKGEg4aNBnP7toPGXMNMNJetWg=; b=lpDPSZWQLcgp1A5fCc9tozhZ18pcfuX8lfmHx0pK8bcR6VbuAqogzNDSOLFbjLQMtL97x3 qUiyA6VLkZXLKg8CGimYjut7E6zXfNWsuxxTcmzjB6JmYo6ZgW6Mv0WxxXL9dq/KBMmyBI 2LA+0cawj8yPVeWyVwDg4nwPLIC3H/Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1704378139; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OQauhPNVhpDDdP3z2mKGEg4aNBnP7toPGXMNMNJetWg=; b=fHYcoIHiJfk1H+dYopeW2vPFGW4x2HY0d6EAYX/BMgbZemM4qHWsJ420Xfacb9belPU5Xo 9SE9GI6hxNXfSaDQ== From: Fabiano Rosas To: qemu-devel@nongnu.org Cc: Peter Xu Subject: [PATCH v2 2/7] migration/multifd: Remove QEMUFile from where it is not needed Date: Thu, 4 Jan 2024 11:21:39 -0300 Message-Id: <20240104142144.9680-3-farosas@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240104142144.9680-1-farosas@suse.de> References: <20240104142144.9680-1-farosas@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Authentication-Results: smtp-out1.suse.de; none X-Spam-Score: 8.80 X-Spamd-Result: default: False [8.80 / 50.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; BAYES_SPAM(5.10)[100.00%]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_SHORT(-0.20)[-0.998]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[] Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=195.135.223.130; envelope-from=farosas@suse.de; helo=smtp-out1.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @suse.de) X-ZM-MESSAGEID: 1704378230921100002 Content-Type: text/plain; charset="utf-8" Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu --- migration/multifd.c | 12 ++++++------ migration/multifd.h | 4 ++-- migration/ram.c | 15 +++++++-------- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 3e650f5da0..2dbc3ba836 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -390,7 +390,7 @@ struct { * false. */ =20 -static int multifd_send_pages(QEMUFile *f) +static int multifd_send_pages(void) { int i; static int next_channel; @@ -436,7 +436,7 @@ static int multifd_send_pages(QEMUFile *f) return 1; } =20 -int multifd_queue_page(QEMUFile *f, RAMBlock *block, ram_addr_t offset) +int multifd_queue_page(RAMBlock *block, ram_addr_t offset) { MultiFDPages_t *pages =3D multifd_send_state->pages; bool changed =3D false; @@ -456,12 +456,12 @@ int multifd_queue_page(QEMUFile *f, RAMBlock *block, = ram_addr_t offset) changed =3D true; } =20 - if (multifd_send_pages(f) < 0) { + if (multifd_send_pages() < 0) { return -1; } =20 if (changed) { - return multifd_queue_page(f, block, offset); + return multifd_queue_page(block, offset); } =20 return 1; @@ -583,7 +583,7 @@ static int multifd_zero_copy_flush(QIOChannel *c) return ret; } =20 -int multifd_send_sync_main(QEMUFile *f) +int multifd_send_sync_main(void) { int i; bool flush_zero_copy; @@ -592,7 +592,7 @@ int multifd_send_sync_main(QEMUFile *f) return 0; } if (multifd_send_state->pages->num) { - if (multifd_send_pages(f) < 0) { + if (multifd_send_pages() < 0) { error_report("%s: multifd_send_pages fail", __func__); return -1; } diff --git a/migration/multifd.h b/migration/multifd.h index b0ff610c37..35d11f103c 100644 --- a/migration/multifd.h +++ b/migration/multifd.h @@ -21,8 +21,8 @@ void multifd_load_shutdown(void); bool multifd_recv_all_channels_created(void); void multifd_recv_new_channel(QIOChannel *ioc, Error **errp); void multifd_recv_sync_main(void); -int multifd_send_sync_main(QEMUFile *f); -int multifd_queue_page(QEMUFile *f, RAMBlock *block, ram_addr_t offset); +int multifd_send_sync_main(void); +int multifd_queue_page(RAMBlock *block, ram_addr_t offset); =20 /* Multifd Compression flags */ #define MULTIFD_FLAG_SYNC (1 << 0) diff --git a/migration/ram.c b/migration/ram.c index 8c7886ab79..b4f2f5108f 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -1250,10 +1250,9 @@ static int ram_save_page(RAMState *rs, PageSearchSta= tus *pss) return pages; } =20 -static int ram_save_multifd_page(QEMUFile *file, RAMBlock *block, - ram_addr_t offset) +static int ram_save_multifd_page(RAMBlock *block, ram_addr_t offset) { - if (multifd_queue_page(file, block, offset) < 0) { + if (multifd_queue_page(block, offset) < 0) { return -1; } stat64_add(&mig_stats.normal_pages, 1); @@ -1336,7 +1335,7 @@ static int find_dirty_block(RAMState *rs, PageSearchS= tatus *pss) if (migrate_multifd() && !migrate_multifd_flush_after_each_section()) { QEMUFile *f =3D rs->pss[RAM_CHANNEL_PRECOPY].pss_channel; - int ret =3D multifd_send_sync_main(f); + int ret =3D multifd_send_sync_main(); if (ret < 0) { return ret; } @@ -2067,7 +2066,7 @@ static int ram_save_target_page_legacy(RAMState *rs, = PageSearchStatus *pss) * still see partially copied pages which is data corruption. */ if (migrate_multifd() && !migration_in_postcopy()) { - return ram_save_multifd_page(pss->pss_channel, block, offset); + return ram_save_multifd_page(block, offset); } =20 return ram_save_page(rs, pss); @@ -2985,7 +2984,7 @@ static int ram_save_setup(QEMUFile *f, void *opaque) migration_ops->ram_save_target_page =3D ram_save_target_page_legacy; =20 qemu_mutex_unlock_iothread(); - ret =3D multifd_send_sync_main(f); + ret =3D multifd_send_sync_main(); qemu_mutex_lock_iothread(); if (ret < 0) { return ret; @@ -3109,7 +3108,7 @@ out: if (ret >=3D 0 && migration_is_setup_or_active(migrate_get_current()->state)) { if (migrate_multifd() && migrate_multifd_flush_after_each_section(= )) { - ret =3D multifd_send_sync_main(rs->pss[RAM_CHANNEL_PRECOPY].ps= s_channel); + ret =3D multifd_send_sync_main(); if (ret < 0) { return ret; } @@ -3183,7 +3182,7 @@ static int ram_save_complete(QEMUFile *f, void *opaqu= e) } } =20 - ret =3D multifd_send_sync_main(rs->pss[RAM_CHANNEL_PRECOPY].pss_channe= l); + ret =3D multifd_send_sync_main(); if (ret < 0) { return ret; } --=20 2.35.3 From nobody Tue Nov 26 20:18:25 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=suse.de ARC-Seal: i=1; a=rsa-sha256; t=1704378237; cv=none; d=zohomail.com; s=zohoarc; b=WC0jlUagIci/8pvojfoleWM+lDbSQqZoV1ksGPqRABXp48w8SZrYxQwWd6tfUXbcu/jWpfN5OC1RbwmrpcovTuklodoCtgnUrJcnQ/nbs7Vc6Suzfg7JxciLHYnuCtxaD8sG3i8e5P+6AWpitgok8aTSNoXKnqBfwpUaMV65A/0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704378237; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=uW6mmLImN6OyA0i5yjVSycEF/8hd9DvSSlG42/OfOi4=; b=ECM/Ye+AnzgLXOQhuS8d7/6FqcfR2N+33tibObuqRZr8uXONvxOh498c47bRoBx678huWslv5ZZHA6BeusnMi993eYqvxMHbFL+BgMShwjEehL2kRobFCBrRji2l7kyHYvR71tslXauE/I8y2hiAyQUqSaCHkHSF1EXfIRnyEsI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1704378237690450.93330762548044; Thu, 4 Jan 2024 06:23:57 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rLOcD-0001ds-Qm; Thu, 04 Jan 2024 09:22:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rLOc5-0001Ml-2t for qemu-devel@nongnu.org; Thu, 04 Jan 2024 09:22:25 -0500 Received: from smtp-out1.suse.de ([2a07:de40:b251:101:10:150:64:1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rLOc2-0008V3-SE for qemu-devel@nongnu.org; Thu, 04 Jan 2024 09:22:24 -0500 Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 32C7F21E22; Thu, 4 Jan 2024 14:22:21 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 33FD3137E8; Thu, 4 Jan 2024 14:22:19 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap1.dmz-prg2.suse.org with ESMTPSA id 0NefOhu/lmUfPAAAD6G6ig (envelope-from ); Thu, 04 Jan 2024 14:22:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1704378141; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uW6mmLImN6OyA0i5yjVSycEF/8hd9DvSSlG42/OfOi4=; b=qeM03n1erJoGOmhyM2SGJ0rs0E/fTF9TN6wzSjYK80MlSRqK0z4vM4dLMIBaOEYg0MihTt t0Ta25o37igKVcfO3X5U9HzJLJC/lQc+x4ZjuI41hxlyU3N0I312jN8a85Vpfz7XFT7zGy sxwDbRgkVZ1xxj3hLnV9uhqNAb5ct9o= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1704378141; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uW6mmLImN6OyA0i5yjVSycEF/8hd9DvSSlG42/OfOi4=; b=q3RRHPPz5AT2FB6c0gvpIZLMx+puOYBkUNXOPWTef3HokgovKmODgWqCHL26bUoTj8sIGr Rwu+QYPrWf1A2NCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1704378141; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uW6mmLImN6OyA0i5yjVSycEF/8hd9DvSSlG42/OfOi4=; b=qeM03n1erJoGOmhyM2SGJ0rs0E/fTF9TN6wzSjYK80MlSRqK0z4vM4dLMIBaOEYg0MihTt t0Ta25o37igKVcfO3X5U9HzJLJC/lQc+x4ZjuI41hxlyU3N0I312jN8a85Vpfz7XFT7zGy sxwDbRgkVZ1xxj3hLnV9uhqNAb5ct9o= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1704378141; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uW6mmLImN6OyA0i5yjVSycEF/8hd9DvSSlG42/OfOi4=; b=q3RRHPPz5AT2FB6c0gvpIZLMx+puOYBkUNXOPWTef3HokgovKmODgWqCHL26bUoTj8sIGr Rwu+QYPrWf1A2NCg== From: Fabiano Rosas To: qemu-devel@nongnu.org Cc: Peter Xu Subject: [PATCH v2 3/7] migration/multifd: Change multifd_pages_init argument Date: Thu, 4 Jan 2024 11:21:40 -0300 Message-Id: <20240104142144.9680-4-farosas@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240104142144.9680-1-farosas@suse.de> References: <20240104142144.9680-1-farosas@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Authentication-Results: smtp-out1.suse.de; none X-Spam-Score: 3.70 X-Spamd-Result: default: False [3.70 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-0.998]; RCPT_COUNT_TWO(0.00)[2]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[] Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a07:de40:b251:101:10:150:64:1; envelope-from=farosas@suse.de; helo=smtp-out1.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @suse.de) X-ZM-MESSAGEID: 1704378238984100003 Content-Type: text/plain; charset="utf-8" The 'size' argument is actually the number of pages that fit in a multifd packet. Change it to uint32_t and rename. Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu --- migration/multifd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 2dbc3ba836..25cbc6dc6b 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -236,12 +236,12 @@ static int multifd_recv_initial_packet(QIOChannel *c,= Error **errp) return msg.id; } =20 -static MultiFDPages_t *multifd_pages_init(size_t size) +static MultiFDPages_t *multifd_pages_init(uint32_t n) { MultiFDPages_t *pages =3D g_new0(MultiFDPages_t, 1); =20 - pages->allocated =3D size; - pages->offset =3D g_new0(ram_addr_t, size); + pages->allocated =3D n; + pages->offset =3D g_new0(ram_addr_t, n); =20 return pages; } --=20 2.35.3 From nobody Tue Nov 26 20:18:25 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=suse.de ARC-Seal: i=1; a=rsa-sha256; t=1704378232; cv=none; d=zohomail.com; s=zohoarc; b=lZtV/hDr5YJSCzZlEdH6ifb/ZVJSQCGza1UTxAzlbg4VLBXfGvbwKfO4TwKzHGZoGvpPtUz1WITAvRYF7lhdtD2lupIF4mR1DboUv3HCEcPGbnZhx1KSZDxAbKZoB/vUJcRPc+fAfpNW+8vxchjoCSXmKoQJOeOi6zKr/96rE7o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704378232; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Ds7ZD9fzeDswWxPM6SZXKq10tj+4KgcCp31XLiwDkXk=; b=E841w9RO37IwRVNG8nzNV3irHMY/pMIdyDnTPThqoiysqTCnIQ4Teovu6FXxeG6SZ+Ynvzm0pduWyOisbgHqq9sWpcyGzrnYwQF+xm0C0kDNHq0bHgfuSDNDCn0O4JJ0CuEr4lskwHmDWQlazwgRpQ/REhSyC2y0Whzed1s9ANE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1704378232518792.1730960694596; Thu, 4 Jan 2024 06:23:52 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rLOcG-0001jn-BJ; Thu, 04 Jan 2024 09:22:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rLOc5-0001NC-SG for qemu-devel@nongnu.org; Thu, 04 Jan 2024 09:22:26 -0500 Received: from smtp-out2.suse.de ([2a07:de40:b251:101:10:150:64:2]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rLOc3-0008VK-Uu for qemu-devel@nongnu.org; Thu, 04 Jan 2024 09:22:25 -0500 Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 8FB641FD3A; Thu, 4 Jan 2024 14:22:22 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 9B5EE137E8; Thu, 4 Jan 2024 14:22:21 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap1.dmz-prg2.suse.org with ESMTPSA id YPg+GB2/lmUfPAAAD6G6ig (envelope-from ); Thu, 04 Jan 2024 14:22:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1704378142; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ds7ZD9fzeDswWxPM6SZXKq10tj+4KgcCp31XLiwDkXk=; b=X+kvww9dSF+D/FmVZ0OXXtl9uTSxv1nU2XGGzFiTvCKjHffn+G9k/6XZ00DcVqulaiuTTo vpJK3pKst1jA9km+tdY2TDKzTYV2xOycOMgRHOsd6JKbLBD03tKzDYsg2VgjU1V2zYw2A9 OMMaNqwd/vJ7FfcQDDGG/fZpCQKwFH8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1704378142; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ds7ZD9fzeDswWxPM6SZXKq10tj+4KgcCp31XLiwDkXk=; b=RGTEgVvpxbkQNU5H4A7RFvhxBrj7IM6ke3aAXC3O9GdtmkmK0gH7r/2klywaOb4fBC7C3u zGrUjhkgWpNfaGCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1704378142; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ds7ZD9fzeDswWxPM6SZXKq10tj+4KgcCp31XLiwDkXk=; b=X+kvww9dSF+D/FmVZ0OXXtl9uTSxv1nU2XGGzFiTvCKjHffn+G9k/6XZ00DcVqulaiuTTo vpJK3pKst1jA9km+tdY2TDKzTYV2xOycOMgRHOsd6JKbLBD03tKzDYsg2VgjU1V2zYw2A9 OMMaNqwd/vJ7FfcQDDGG/fZpCQKwFH8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1704378142; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ds7ZD9fzeDswWxPM6SZXKq10tj+4KgcCp31XLiwDkXk=; b=RGTEgVvpxbkQNU5H4A7RFvhxBrj7IM6ke3aAXC3O9GdtmkmK0gH7r/2klywaOb4fBC7C3u zGrUjhkgWpNfaGCA== From: Fabiano Rosas To: qemu-devel@nongnu.org Cc: Peter Xu Subject: [PATCH v2 4/7] migration: Report error in incoming migration Date: Thu, 4 Jan 2024 11:21:41 -0300 Message-Id: <20240104142144.9680-5-farosas@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240104142144.9680-1-farosas@suse.de> References: <20240104142144.9680-1-farosas@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Rspamd-Queue-Id: 8FB641FD3A Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=X+kvww9d; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=RGTEgVvp X-Spam-Score: -1.44 X-Spamd-Result: default: False [-1.44 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DWL_DNSWL_HI(-3.50)[suse.de:dkim]; BROKEN_CONTENT_TYPE(1.50)[]; URIBL_BLOCKED(0.00)[suse.de:email,suse.de:dkim]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.de:+]; RCPT_COUNT_TWO(0.00)[2]; MID_CONTAINS_FROM(1.00)[]; MX_GOOD(-0.01)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:dkim]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-2.63)[98.36%]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from] Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a07:de40:b251:101:10:150:64:2; envelope-from=farosas@suse.de; 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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @suse.de) X-ZM-MESSAGEID: 1704378232916100006 Content-Type: text/plain; charset="utf-8" We're not currently reporting the errors set with migrate_set_error() when incoming migration fails. Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu --- migration/migration.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/migration/migration.c b/migration/migration.c index 454cd4ec1f..4e0fd24e14 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -699,6 +699,13 @@ process_incoming_migration_co(void *opaque) } =20 if (ret < 0) { + MigrationState *s =3D migrate_get_current(); + + if (migrate_has_error(s)) { + WITH_QEMU_LOCK_GUARD(&s->error_mutex) { + error_report_err(s->error); + } + } error_report("load of migration failed: %s", strerror(-ret)); goto fail; } --=20 2.35.3 From nobody Tue Nov 26 20:18:25 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=suse.de ARC-Seal: i=1; a=rsa-sha256; t=1704378185; cv=none; d=zohomail.com; s=zohoarc; b=f0N9SMPFYc4rmk+5eOa7gn2kerWRNfu8pw6dcmxetzmhaxJ8QIQBdOaaek4B22Jg+nZd6G8x3Bbbh+FgU/V4e7ebeAlv1CObMRkisLYkxW6NVMzdpJcHX/vXvFjIqK6APLxEosd9Ij2jOPdmcyUqJkjVHtj6DUC2uLbAmrF6cn4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704378185; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=deauQrXLLwb5GnQkYGueqE40cUtiEFyrySrq4KV19Ck=; b=WMT4qMBZXFMOZ1wWP4VKOUq6zicwtDys+ghaBkvimSpi6HKvl287xY20EfmhPDCXVdzAzJssqRvW3V8E7HRymhd+Vfbbvvm9mMAigspweXY4QGlrghILPwbscsP0tkHlNTfjJAz3ZL6zUwjJROzNTksrILvjk/PIVr6vPO2zJD0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1704378185172357.39863122380075; Thu, 4 Jan 2024 06:23:05 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rLOcH-0001jI-CU; Thu, 04 Jan 2024 09:22:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rLOc7-0001Ns-Q5 for qemu-devel@nongnu.org; Thu, 04 Jan 2024 09:22:29 -0500 Received: from smtp-out1.suse.de ([2a07:de40:b251:101:10:150:64:1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rLOc6-0008Vr-5Y for qemu-devel@nongnu.org; Thu, 04 Jan 2024 09:22:27 -0500 Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id A936121E1A; Thu, 4 Jan 2024 14:22:24 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 0E0C7137E8; Thu, 4 Jan 2024 14:22:22 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap1.dmz-prg2.suse.org with ESMTPSA id IABeMR6/lmUfPAAAD6G6ig (envelope-from ); Thu, 04 Jan 2024 14:22:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1704378144; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=deauQrXLLwb5GnQkYGueqE40cUtiEFyrySrq4KV19Ck=; b=hXKwn0753gQziXgwQD1AsNVhzZFFsRyR7tjD0ToSZr0ivG8fP6e0qaejqGz+aQrAFigbfY /S1USp2wn/vUcZRM5GoWDXnhOOJr6s52LdEpkUytjx86R+12a2q+zi4Ej0NRYzD8t2X+8l lS3YHtx9xEnsycHdDobaJM37hbipSxA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1704378144; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=deauQrXLLwb5GnQkYGueqE40cUtiEFyrySrq4KV19Ck=; b=bYfI38xy6kItTQZZE5Y37PqCPxNbnzsZViUQcgJnraAi9xR8/2KcXmRNcKlvmJjP2vGJXs uJtKVFI1GFCo0uDg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1704378144; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=deauQrXLLwb5GnQkYGueqE40cUtiEFyrySrq4KV19Ck=; b=hXKwn0753gQziXgwQD1AsNVhzZFFsRyR7tjD0ToSZr0ivG8fP6e0qaejqGz+aQrAFigbfY /S1USp2wn/vUcZRM5GoWDXnhOOJr6s52LdEpkUytjx86R+12a2q+zi4Ej0NRYzD8t2X+8l lS3YHtx9xEnsycHdDobaJM37hbipSxA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1704378144; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=deauQrXLLwb5GnQkYGueqE40cUtiEFyrySrq4KV19Ck=; b=bYfI38xy6kItTQZZE5Y37PqCPxNbnzsZViUQcgJnraAi9xR8/2KcXmRNcKlvmJjP2vGJXs uJtKVFI1GFCo0uDg== From: Fabiano Rosas To: qemu-devel@nongnu.org Cc: Peter Xu , Thomas Huth , Laurent Vivier , Paolo Bonzini Subject: [PATCH v2 5/7] tests/qtest/migration: Print migration incoming errors Date: Thu, 4 Jan 2024 11:21:42 -0300 Message-Id: <20240104142144.9680-6-farosas@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240104142144.9680-1-farosas@suse.de> References: <20240104142144.9680-1-farosas@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Authentication-Results: smtp-out1.suse.de; none X-Spam-Score: 1.24 X-Spamd-Result: default: False [1.24 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-0.997]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-2.46)[97.54%] Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a07:de40:b251:101:10:150:64:1; envelope-from=farosas@suse.de; helo=smtp-out1.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @suse.de) X-ZM-MESSAGEID: 1704378187045100002 Content-Type: text/plain; charset="utf-8" We're currently just asserting when incoming migration fails. Let's print the error message from QMP as well. Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu --- tests/qtest/migration-helpers.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/qtest/migration-helpers.c b/tests/qtest/migration-helper= s.c index 37e8e812c5..19384e3fa6 100644 --- a/tests/qtest/migration-helpers.c +++ b/tests/qtest/migration-helpers.c @@ -111,6 +111,12 @@ void migrate_incoming_qmp(QTestState *to, const char *= uri, const char *fmt, ...) =20 rsp =3D qtest_qmp(to, "{ 'execute': 'migrate-incoming', 'arguments': %= p}", args); + + if (!qdict_haskey(rsp, "return")) { + g_autoptr(GString) s =3D qobject_to_json_pretty(QOBJECT(rsp), true= ); + g_test_message("%s", s->str); + } + g_assert(qdict_haskey(rsp, "return")); qobject_unref(rsp); =20 --=20 2.35.3 From nobody Tue Nov 26 20:18:25 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=suse.de ARC-Seal: i=1; a=rsa-sha256; t=1704378203; cv=none; d=zohomail.com; s=zohoarc; b=l0tjzxEpMoNteejUeGRCd50EKAlbH37SaNejxhJN4mWmEylTART7HyqJ/1xj3UDkZPNSXU4HeUCXw2qs4SjQdg3k7Afi78aoZ492/eZLbL/dxIG17Lrm4CiArKgVjvbGPabejsH/Y7KCWCDFQsqvrJpLyql0wqdCiUvkqfIbsfg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704378203; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=xnpu3DA0GrvhfskEhM1zT5+7Q/70EkWdo5FmmXU/Z9I=; b=czu985fR4tCdLuFVsXUDAADLzhMoDYlVgg5cizmQq5KimIbmwgp0Qm4oy++GpF4JgpEA4qglByY5znmbFPh2HFkKxpuH4vk4enm5tmSCpid23z7MDj2sYin6Nj68aCynMQ5d1A3QPlcM1H/L6UIvPZcT7JjLB0lb2Dq/Xv8gwsE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1704378203522835.5553743013617; Thu, 4 Jan 2024 06:23:23 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rLOcJ-0001m4-CY; Thu, 04 Jan 2024 09:22:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rLOcB-0001ch-Es for qemu-devel@nongnu.org; Thu, 04 Jan 2024 09:22:33 -0500 Received: from smtp-out2.suse.de ([2a07:de40:b251:101:10:150:64:2]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rLOc8-000056-13 for qemu-devel@nongnu.org; Thu, 04 Jan 2024 09:22:30 -0500 Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id C7D291F814; Thu, 4 Jan 2024 14:22:26 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 2BDFD137E8; Thu, 4 Jan 2024 14:22:24 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap1.dmz-prg2.suse.org with ESMTPSA id kOR6OCC/lmUfPAAAD6G6ig (envelope-from ); Thu, 04 Jan 2024 14:22:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1704378146; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xnpu3DA0GrvhfskEhM1zT5+7Q/70EkWdo5FmmXU/Z9I=; b=dvHW2qo6f5Ci0+Br6iUUXRPhFxHdDYHvdzioDykxY8ACbCj4nMl2PGjpKccf7jQ/SyBmsh 4XdarT/G2Fc0kAqt6/AVE/1YukczTViLWSnV/Oieye01CjjJh/zA72wd+FpeCWJPbPefza afwPtVc92rXilvSVkpKinJ+mLMDZKNk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1704378146; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xnpu3DA0GrvhfskEhM1zT5+7Q/70EkWdo5FmmXU/Z9I=; b=phWXvFx1X0oKWbTs5UMLCOUuW9g1bjNlMAMGN6DlRhMPKM4GBiTlHi97usCpLL8KH1cEXB noxV5xNLiyK9b3BA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1704378146; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xnpu3DA0GrvhfskEhM1zT5+7Q/70EkWdo5FmmXU/Z9I=; b=dvHW2qo6f5Ci0+Br6iUUXRPhFxHdDYHvdzioDykxY8ACbCj4nMl2PGjpKccf7jQ/SyBmsh 4XdarT/G2Fc0kAqt6/AVE/1YukczTViLWSnV/Oieye01CjjJh/zA72wd+FpeCWJPbPefza afwPtVc92rXilvSVkpKinJ+mLMDZKNk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1704378146; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xnpu3DA0GrvhfskEhM1zT5+7Q/70EkWdo5FmmXU/Z9I=; b=phWXvFx1X0oKWbTs5UMLCOUuW9g1bjNlMAMGN6DlRhMPKM4GBiTlHi97usCpLL8KH1cEXB noxV5xNLiyK9b3BA== From: Fabiano Rosas To: qemu-devel@nongnu.org Cc: Peter Xu , Thomas Huth , Laurent Vivier , Paolo Bonzini Subject: [PATCH v2 6/7] tests/qtest/migration: Add a wrapper to print test names Date: Thu, 4 Jan 2024 11:21:43 -0300 Message-Id: <20240104142144.9680-7-farosas@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240104142144.9680-1-farosas@suse.de> References: <20240104142144.9680-1-farosas@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Rspamd-Queue-Id: C7D291F814 Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=dvHW2qo6; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=phWXvFx1 X-Spam-Score: -1.81 X-Spamd-Result: default: False [-1.81 / 50.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[suse.de:+]; MX_GOOD(-0.01)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; BAYES_HAM(-3.00)[100.00%]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; URIBL_BLOCKED(0.00)[suse.de:email,suse.de:dkim]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DWL_DNSWL_HI(-3.50)[suse.de:dkim]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:dkim]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from] Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a07:de40:b251:101:10:150:64:2; envelope-from=farosas@suse.de; 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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @suse.de) X-ZM-MESSAGEID: 1704378204885100003 Content-Type: text/plain; charset="utf-8" Our usage of gtest results in us losing the very basic functionality of "knowing which test failed". The issue is that gtest only prints test names ("paths" in gtest parlance) once the test has finished, but we use asserts in the tests and crash gtest itself before it can print anything. We also use a final abort when the result of g_test_run is not 0. Depending on how the test failed/broke we can see the function that trigged the abort, which may be representative of the test, but it could also just be some generic function. We have been relying on the primitive method of looking at the name of the previous successful test and then looking at the code to figure out which test should have come next. Add a wrapper to the test registration that does the job of printing the test name before running. Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu --- tests/qtest/migration-helpers.c | 32 ++++++++++++++++++++++++++++++++ tests/qtest/migration-helpers.h | 1 + 2 files changed, 33 insertions(+) diff --git a/tests/qtest/migration-helpers.c b/tests/qtest/migration-helper= s.c index 19384e3fa6..e451dbdbed 100644 --- a/tests/qtest/migration-helpers.c +++ b/tests/qtest/migration-helpers.c @@ -291,3 +291,35 @@ char *resolve_machine_version(const char *alias, const= char *var1, =20 return find_common_machine_version(machine_name, var1, var2); } + +typedef struct { + char *name; + void (*func)(void); +} MigrationTest; + +static void migration_test_destroy(gpointer data) +{ + MigrationTest *test =3D (MigrationTest *)data; + + g_free(test->name); + g_free(test); +} + +static void migration_test_wrapper(const void *data) +{ + MigrationTest *test =3D (MigrationTest *)data; + + g_test_message("Running /%s%s", qtest_get_arch(), test->name); + test->func(); +} + +void migration_test_add(const char *path, void (*fn)(void)) +{ + MigrationTest *test =3D g_new0(MigrationTest, 1); + + test->func =3D fn; + test->name =3D g_strdup(path); + + qtest_add_data_func_full(path, test, migration_test_wrapper, + migration_test_destroy); +} diff --git a/tests/qtest/migration-helpers.h b/tests/qtest/migration-helper= s.h index b478549096..3bf7ded1b9 100644 --- a/tests/qtest/migration-helpers.h +++ b/tests/qtest/migration-helpers.h @@ -52,4 +52,5 @@ char *find_common_machine_version(const char *mtype, cons= t char *var1, const char *var2); char *resolve_machine_version(const char *alias, const char *var1, const char *var2); +void migration_test_add(const char *path, void (*fn)(void)); #endif /* MIGRATION_HELPERS_H */ --=20 2.35.3 From nobody Tue Nov 26 20:18:25 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=suse.de ARC-Seal: i=1; a=rsa-sha256; t=1704378252; cv=none; d=zohomail.com; s=zohoarc; b=VcfKaPmcbP57pwrHKI29jKgqC6DD6DUd5cl+1Yj7qQRkwt13F2lXFpO1esazZztm7KOMscu1ENP2ZTIh0rmoqazQMXAg0rK6VGLT9AM1j1ix/0+lc5VQ1rMqbXyiXuGwZ17Z/gU8LVErSPIEDgNaG5I83lhxvCmhw2NvyrNhL04= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704378252; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=n5iBe/ASFXHFarlRAKuZIhCc2tezpoka9t+9vOktJ9U=; b=V+C2Dzf1TboltbKjE66Au9xtnm8lOphrGjzWPB4ptnCC0YwaiPVpOlSZePUtWgl9WwGQX20zO6s1uJPJFNDQlTs48pbbJc1D446xYBnOaZ+xMiT4vG2YvzSRvTC50yLbZe6EO/pfHhO9+NCSf95BgLG/TGALfpkTdwW9A3FLFRU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1704378252068547.0986668849008; Thu, 4 Jan 2024 06:24:12 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rLOcG-0001k4-KC; Thu, 04 Jan 2024 09:22:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rLOcD-0001db-FU for qemu-devel@nongnu.org; Thu, 04 Jan 2024 09:22:33 -0500 Received: from smtp-out1.suse.de ([2a07:de40:b251:101:10:150:64:1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rLOcA-00005J-6m for qemu-devel@nongnu.org; Thu, 04 Jan 2024 09:22:33 -0500 Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E310F21E1A; Thu, 4 Jan 2024 14:22:28 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 4791D137E8; Thu, 4 Jan 2024 14:22:27 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap1.dmz-prg2.suse.org with ESMTPSA id KHfaAyO/lmUfPAAAD6G6ig (envelope-from ); Thu, 04 Jan 2024 14:22:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1704378149; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n5iBe/ASFXHFarlRAKuZIhCc2tezpoka9t+9vOktJ9U=; b=nNgnQbN3Zs5N5+XelLWQaXkg7XsXaMQGAFsU4tabYygD2aQKl/t9bD1ZFYvP+3Lu3EURF3 dQrBQCj/UYqJ449G9dXrGEjSCVff9QRuZ5qzsBlQcpfK2b8cyOBwYhRIWHPmOaAlT7P3vd 2U7YmsjzgE/MlZ/S9iZC9JesJoWYTuU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1704378149; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n5iBe/ASFXHFarlRAKuZIhCc2tezpoka9t+9vOktJ9U=; b=Ghn/3nClK0//2AZ8jUd7h/TI6BE4bbR4pRjUq8iOC7FHrFuqaZkgsuWUTGPcu1JyH6enPT QtCjVk8bKV+GlJDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1704378148; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n5iBe/ASFXHFarlRAKuZIhCc2tezpoka9t+9vOktJ9U=; b=czXZXpHFSI7RrbBrPF4YnIomwO1HbGNyLSUMp9pSw9fUgzqsKT9GyHBzyEeUgRtzoFIfR+ vsaBp2Rc3gLAtuUKzigs+x/mcRUXjH2IinTH4MNPRK1GzTW/HfGEY9qBdEnjtQitol2FQJ LbhtDoosw4hGYiIrQU4kwHkDuUA+vGM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1704378148; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n5iBe/ASFXHFarlRAKuZIhCc2tezpoka9t+9vOktJ9U=; b=QLrofNMZNxnwO6nT3xRKozQjIzaVhojyQ6quYoGl/nGbJ6A7crP5dc3Fda2PE2tozZc4wY N4UNIlPmiL0Z/tCA== From: Fabiano Rosas To: qemu-devel@nongnu.org Cc: Peter Xu , Thomas Huth , Laurent Vivier , Paolo Bonzini Subject: [PATCH v2 7/7] tests/qtest/migration: Use the new migration_test_add Date: Thu, 4 Jan 2024 11:21:44 -0300 Message-Id: <20240104142144.9680-8-farosas@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240104142144.9680-1-farosas@suse.de> References: <20240104142144.9680-1-farosas@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=czXZXpHF; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=QLrofNMZ X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [0.49 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.de:+]; MX_GOOD(-0.01)[]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; NEURAL_HAM_SHORT(-0.20)[-0.999]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%] X-Spam-Score: 0.49 X-Rspamd-Queue-Id: E310F21E1A Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a07:de40:b251:101:10:150:64:1; envelope-from=farosas@suse.de; helo=smtp-out1.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @suse.de) (identity @suse.de) X-ZM-MESSAGEID: 1704378253081100002 Content-Type: text/plain; charset="utf-8" Replace the tests registration with the new function that prints tests names. Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu --- tests/qtest/migration-test.c | 215 ++++++++++++++++++----------------- 1 file changed, 112 insertions(+), 103 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 136e5df06c..21da140aea 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -3404,70 +3404,75 @@ int main(int argc, char **argv) module_call_init(MODULE_INIT_QOM); =20 if (is_x86) { - qtest_add_func("/migration/precopy/unix/suspend/live", - test_precopy_unix_suspend_live); - qtest_add_func("/migration/precopy/unix/suspend/notlive", - test_precopy_unix_suspend_notlive); + migration_test_add("/migration/precopy/unix/suspend/live", + test_precopy_unix_suspend_live); + migration_test_add("/migration/precopy/unix/suspend/notlive", + test_precopy_unix_suspend_notlive); } =20 if (has_uffd) { - qtest_add_func("/migration/postcopy/plain", test_postcopy); - qtest_add_func("/migration/postcopy/recovery/plain", - test_postcopy_recovery); - qtest_add_func("/migration/postcopy/preempt/plain", test_postcopy_= preempt); - qtest_add_func("/migration/postcopy/preempt/recovery/plain", - test_postcopy_preempt_recovery); + migration_test_add("/migration/postcopy/plain", test_postcopy); + migration_test_add("/migration/postcopy/recovery/plain", + test_postcopy_recovery); + migration_test_add("/migration/postcopy/preempt/plain", + test_postcopy_preempt); + migration_test_add("/migration/postcopy/preempt/recovery/plain", + test_postcopy_preempt_recovery); if (getenv("QEMU_TEST_FLAKY_TESTS")) { - qtest_add_func("/migration/postcopy/compress/plain", - test_postcopy_compress); - qtest_add_func("/migration/postcopy/recovery/compress/plain", - test_postcopy_recovery_compress); + migration_test_add("/migration/postcopy/compress/plain", + test_postcopy_compress); + migration_test_add("/migration/postcopy/recovery/compress/plai= n", + test_postcopy_recovery_compress); } #ifndef _WIN32 - qtest_add_func("/migration/postcopy/recovery/double-failures", - test_postcopy_recovery_double_fail); + migration_test_add("/migration/postcopy/recovery/double-failures", + test_postcopy_recovery_double_fail); #endif /* _WIN32 */ if (is_x86) { - qtest_add_func("/migration/postcopy/suspend", - test_postcopy_suspend); + migration_test_add("/migration/postcopy/suspend", + test_postcopy_suspend); } } =20 - qtest_add_func("/migration/bad_dest", test_baddest); + migration_test_add("/migration/bad_dest", test_baddest); #ifndef _WIN32 - qtest_add_func("/migration/analyze-script", test_analyze_script); + if (!g_str_equal(arch, "s390x")) { + migration_test_add("/migration/analyze-script", test_analyze_scrip= t); + } #endif - qtest_add_func("/migration/precopy/unix/plain", test_precopy_unix_plai= n); - qtest_add_func("/migration/precopy/unix/xbzrle", test_precopy_unix_xbz= rle); + migration_test_add("/migration/precopy/unix/plain", + test_precopy_unix_plain); + migration_test_add("/migration/precopy/unix/xbzrle", + test_precopy_unix_xbzrle); /* * Compression fails from time to time. * Put test here but don't enable it until everything is fixed. */ if (getenv("QEMU_TEST_FLAKY_TESTS")) { - qtest_add_func("/migration/precopy/unix/compress/wait", - test_precopy_unix_compress); - qtest_add_func("/migration/precopy/unix/compress/nowait", - test_precopy_unix_compress_nowait); + migration_test_add("/migration/precopy/unix/compress/wait", + test_precopy_unix_compress); + migration_test_add("/migration/precopy/unix/compress/nowait", + test_precopy_unix_compress_nowait); } =20 - qtest_add_func("/migration/precopy/file", - test_precopy_file); - qtest_add_func("/migration/precopy/file/offset", - test_precopy_file_offset); - qtest_add_func("/migration/precopy/file/offset/bad", - test_precopy_file_offset_bad); + migration_test_add("/migration/precopy/file", + test_precopy_file); + migration_test_add("/migration/precopy/file/offset", + test_precopy_file_offset); + migration_test_add("/migration/precopy/file/offset/bad", + test_precopy_file_offset_bad); =20 /* * Our CI system has problems with shared memory. * Don't run this test until we find a workaround. */ if (getenv("QEMU_TEST_FLAKY_TESTS")) { - qtest_add_func("/migration/mode/reboot", test_mode_reboot); + migration_test_add("/migration/mode/reboot", test_mode_reboot); } =20 #ifdef CONFIG_GNUTLS - qtest_add_func("/migration/precopy/unix/tls/psk", - test_precopy_unix_tls_psk); + migration_test_add("/migration/precopy/unix/tls/psk", + test_precopy_unix_tls_psk); =20 if (has_uffd) { /* @@ -3475,110 +3480,114 @@ int main(int argc, char **argv) * channels are tested under precopy. Here what we want to test i= s the * general postcopy path that has TLS channel enabled. */ - qtest_add_func("/migration/postcopy/tls/psk", test_postcopy_tls_ps= k); - qtest_add_func("/migration/postcopy/recovery/tls/psk", - test_postcopy_recovery_tls_psk); - qtest_add_func("/migration/postcopy/preempt/tls/psk", - test_postcopy_preempt_tls_psk); - qtest_add_func("/migration/postcopy/preempt/recovery/tls/psk", - test_postcopy_preempt_all); + migration_test_add("/migration/postcopy/tls/psk", + test_postcopy_tls_psk); + migration_test_add("/migration/postcopy/recovery/tls/psk", + test_postcopy_recovery_tls_psk); + migration_test_add("/migration/postcopy/preempt/tls/psk", + test_postcopy_preempt_tls_psk); + migration_test_add("/migration/postcopy/preempt/recovery/tls/psk", + test_postcopy_preempt_all); } #ifdef CONFIG_TASN1 - qtest_add_func("/migration/precopy/unix/tls/x509/default-host", - test_precopy_unix_tls_x509_default_host); - qtest_add_func("/migration/precopy/unix/tls/x509/override-host", - test_precopy_unix_tls_x509_override_host); + migration_test_add("/migration/precopy/unix/tls/x509/default-host", + test_precopy_unix_tls_x509_default_host); + migration_test_add("/migration/precopy/unix/tls/x509/override-host", + test_precopy_unix_tls_x509_override_host); #endif /* CONFIG_TASN1 */ #endif /* CONFIG_GNUTLS */ =20 - qtest_add_func("/migration/precopy/tcp/plain", test_precopy_tcp_plain); + migration_test_add("/migration/precopy/tcp/plain", test_precopy_tcp_pl= ain); =20 - qtest_add_func("/migration/precopy/tcp/plain/switchover-ack", - test_precopy_tcp_switchover_ack); + migration_test_add("/migration/precopy/tcp/plain/switchover-ack", + test_precopy_tcp_switchover_ack); =20 #ifdef CONFIG_GNUTLS - qtest_add_func("/migration/precopy/tcp/tls/psk/match", - test_precopy_tcp_tls_psk_match); - qtest_add_func("/migration/precopy/tcp/tls/psk/mismatch", - test_precopy_tcp_tls_psk_mismatch); + migration_test_add("/migration/precopy/tcp/tls/psk/match", + test_precopy_tcp_tls_psk_match); + migration_test_add("/migration/precopy/tcp/tls/psk/mismatch", + test_precopy_tcp_tls_psk_mismatch); #ifdef CONFIG_TASN1 - qtest_add_func("/migration/precopy/tcp/tls/x509/default-host", - test_precopy_tcp_tls_x509_default_host); - qtest_add_func("/migration/precopy/tcp/tls/x509/override-host", - test_precopy_tcp_tls_x509_override_host); - qtest_add_func("/migration/precopy/tcp/tls/x509/mismatch-host", - test_precopy_tcp_tls_x509_mismatch_host); - qtest_add_func("/migration/precopy/tcp/tls/x509/friendly-client", - test_precopy_tcp_tls_x509_friendly_client); - qtest_add_func("/migration/precopy/tcp/tls/x509/hostile-client", - test_precopy_tcp_tls_x509_hostile_client); - qtest_add_func("/migration/precopy/tcp/tls/x509/allow-anon-client", - test_precopy_tcp_tls_x509_allow_anon_client); - qtest_add_func("/migration/precopy/tcp/tls/x509/reject-anon-client", - test_precopy_tcp_tls_x509_reject_anon_client); + migration_test_add("/migration/precopy/tcp/tls/x509/default-host", + test_precopy_tcp_tls_x509_default_host); + migration_test_add("/migration/precopy/tcp/tls/x509/override-host", + test_precopy_tcp_tls_x509_override_host); + migration_test_add("/migration/precopy/tcp/tls/x509/mismatch-host", + test_precopy_tcp_tls_x509_mismatch_host); + migration_test_add("/migration/precopy/tcp/tls/x509/friendly-client", + test_precopy_tcp_tls_x509_friendly_client); + migration_test_add("/migration/precopy/tcp/tls/x509/hostile-client", + test_precopy_tcp_tls_x509_hostile_client); + migration_test_add("/migration/precopy/tcp/tls/x509/allow-anon-client", + test_precopy_tcp_tls_x509_allow_anon_client); + migration_test_add("/migration/precopy/tcp/tls/x509/reject-anon-client= ", + test_precopy_tcp_tls_x509_reject_anon_client); #endif /* CONFIG_TASN1 */ #endif /* CONFIG_GNUTLS */ =20 - /* qtest_add_func("/migration/ignore_shared", test_ignore_shared); */ + /* migration_test_add("/migration/ignore_shared", test_ignore_shared);= */ #ifndef _WIN32 - qtest_add_func("/migration/fd_proto", test_migrate_fd_proto); + migration_test_add("/migration/fd_proto", test_migrate_fd_proto); #endif - qtest_add_func("/migration/validate_uuid", test_validate_uuid); - qtest_add_func("/migration/validate_uuid_error", test_validate_uuid_er= ror); - qtest_add_func("/migration/validate_uuid_src_not_set", - test_validate_uuid_src_not_set); - qtest_add_func("/migration/validate_uuid_dst_not_set", - test_validate_uuid_dst_not_set); + migration_test_add("/migration/validate_uuid", test_validate_uuid); + migration_test_add("/migration/validate_uuid_error", + test_validate_uuid_error); + migration_test_add("/migration/validate_uuid_src_not_set", + test_validate_uuid_src_not_set); + migration_test_add("/migration/validate_uuid_dst_not_set", + test_validate_uuid_dst_not_set); /* * See explanation why this test is slow on function definition */ if (g_test_slow()) { - qtest_add_func("/migration/auto_converge", test_migrate_auto_conve= rge); + migration_test_add("/migration/auto_converge", + test_migrate_auto_converge); if (g_str_equal(arch, "x86_64") && has_kvm && kvm_dirty_ring_supported()) { - qtest_add_func("/migration/dirty_limit", test_migrate_dirty_li= mit); + migration_test_add("/migration/dirty_limit", + test_migrate_dirty_limit); } } - qtest_add_func("/migration/multifd/tcp/plain/none", - test_multifd_tcp_none); + migration_test_add("/migration/multifd/tcp/plain/none", + test_multifd_tcp_none); /* * This test is flaky and sometimes fails in CI and otherwise: * don't run unless user opts in via environment variable. */ if (getenv("QEMU_TEST_FLAKY_TESTS")) { - qtest_add_func("/migration/multifd/tcp/plain/cancel", - test_multifd_tcp_cancel); + migration_test_add("/migration/multifd/tcp/plain/cancel", + test_multifd_tcp_cancel); } - qtest_add_func("/migration/multifd/tcp/plain/zlib", - test_multifd_tcp_zlib); + migration_test_add("/migration/multifd/tcp/plain/zlib", + test_multifd_tcp_zlib); #ifdef CONFIG_ZSTD - qtest_add_func("/migration/multifd/tcp/plain/zstd", - test_multifd_tcp_zstd); + migration_test_add("/migration/multifd/tcp/plain/zstd", + test_multifd_tcp_zstd); #endif #ifdef CONFIG_GNUTLS - qtest_add_func("/migration/multifd/tcp/tls/psk/match", - test_multifd_tcp_tls_psk_match); - qtest_add_func("/migration/multifd/tcp/tls/psk/mismatch", - test_multifd_tcp_tls_psk_mismatch); + migration_test_add("/migration/multifd/tcp/tls/psk/match", + test_multifd_tcp_tls_psk_match); + migration_test_add("/migration/multifd/tcp/tls/psk/mismatch", + test_multifd_tcp_tls_psk_mismatch); #ifdef CONFIG_TASN1 - qtest_add_func("/migration/multifd/tcp/tls/x509/default-host", - test_multifd_tcp_tls_x509_default_host); - qtest_add_func("/migration/multifd/tcp/tls/x509/override-host", - test_multifd_tcp_tls_x509_override_host); - qtest_add_func("/migration/multifd/tcp/tls/x509/mismatch-host", - test_multifd_tcp_tls_x509_mismatch_host); - qtest_add_func("/migration/multifd/tcp/tls/x509/allow-anon-client", - test_multifd_tcp_tls_x509_allow_anon_client); - qtest_add_func("/migration/multifd/tcp/tls/x509/reject-anon-client", - test_multifd_tcp_tls_x509_reject_anon_client); + migration_test_add("/migration/multifd/tcp/tls/x509/default-host", + test_multifd_tcp_tls_x509_default_host); + migration_test_add("/migration/multifd/tcp/tls/x509/override-host", + test_multifd_tcp_tls_x509_override_host); + migration_test_add("/migration/multifd/tcp/tls/x509/mismatch-host", + test_multifd_tcp_tls_x509_mismatch_host); + migration_test_add("/migration/multifd/tcp/tls/x509/allow-anon-client", + test_multifd_tcp_tls_x509_allow_anon_client); + migration_test_add("/migration/multifd/tcp/tls/x509/reject-anon-client= ", + test_multifd_tcp_tls_x509_reject_anon_client); #endif /* CONFIG_TASN1 */ #endif /* CONFIG_GNUTLS */ =20 if (g_str_equal(arch, "x86_64") && has_kvm && kvm_dirty_ring_supported= ()) { - qtest_add_func("/migration/dirty_ring", - test_precopy_unix_dirty_ring); - qtest_add_func("/migration/vcpu_dirty_limit", - test_vcpu_dirty_limit); + migration_test_add("/migration/dirty_ring", + test_precopy_unix_dirty_ring); + migration_test_add("/migration/vcpu_dirty_limit", + test_vcpu_dirty_limit); } =20 ret =3D g_test_run(); --=20 2.35.3