From nobody Tue Oct 22 23:21:37 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=1729175563; cv=none; d=zohomail.com; s=zohoarc; b=nG47zig7WDPuYMfCh9V8+IXYeOTp7INv3YVCZBAy75jjMmPyTp8Biom7qZNr+/yLnqRk223+3XDuWuorwH5gPvV+W4y9QFv6XJEfuFzdE7hv47LeUu8iJNunGPjjhScdeiEjkSNJY+Rt8U3xJSgGx5uuuz3hLOatWnADxbrTbVA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729175563; 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=qIRM9LB7FwkHydC3GCwMPV0i8o72SEtPi5z7MK5aYuI=; b=EInjJKlgSkWST9QeifCmqIQuiys6sopaCY0IFzfuql4uEYah6SyacUE8S83OWStDL3zzx9uhKDhfdm9oKrTN6SvzYlf3H4PV3YFYl5h46rgdeyZpuk/GDAPAsH1rTKVZQsSt/ysSmshZY6GjN6QsRdr69DZkBkWJx8wAxJMXSIQ= 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 1729175563306109.95050366103078; Thu, 17 Oct 2024 07:32:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t1RYB-0005QC-W2; Thu, 17 Oct 2024 10:32:28 -0400 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 1t1RY8-0005NP-7r for qemu-devel@nongnu.org; Thu, 17 Oct 2024 10:32:25 -0400 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 1t1RY5-0003sf-DI for qemu-devel@nongnu.org; Thu, 17 Oct 2024 10:32:23 -0400 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 9FBA521D4F; Thu, 17 Oct 2024 14:32: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 CD32F13A42; Thu, 17 Oct 2024 14:32:15 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id OJN+JO8fEWcDKQAAD6G6ig (envelope-from ); Thu, 17 Oct 2024 14:32:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1729175538; 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=qIRM9LB7FwkHydC3GCwMPV0i8o72SEtPi5z7MK5aYuI=; b=WtZpEtpXatHHkdPNey7Gf6cvt/rSj6xSZ0tEYceBh9bwWIgyQnQDP2do/7rGFmzrnmoDbf VFxQjti3RnyUQ08bRxEZ0oynEqKMGGrGnBHO8M8D3q+CtpHQ7h4PE05/qqtLKGAu9Wp1Qn wmhUPWLurVe1h8FXOKiyeeQ5+wqNkdA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1729175538; 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=qIRM9LB7FwkHydC3GCwMPV0i8o72SEtPi5z7MK5aYuI=; b=vjHR2lQQObrZ8e918wyAyaSnTI1dUxfuiv5YYH7QPWqtsL/FQS1yNFLy+a1zZeShvogdkE RYIdDM0PqJ67xWAA== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=WtZpEtpX; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=vjHR2lQQ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1729175538; 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=qIRM9LB7FwkHydC3GCwMPV0i8o72SEtPi5z7MK5aYuI=; b=WtZpEtpXatHHkdPNey7Gf6cvt/rSj6xSZ0tEYceBh9bwWIgyQnQDP2do/7rGFmzrnmoDbf VFxQjti3RnyUQ08bRxEZ0oynEqKMGGrGnBHO8M8D3q+CtpHQ7h4PE05/qqtLKGAu9Wp1Qn wmhUPWLurVe1h8FXOKiyeeQ5+wqNkdA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1729175538; 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=qIRM9LB7FwkHydC3GCwMPV0i8o72SEtPi5z7MK5aYuI=; b=vjHR2lQQObrZ8e918wyAyaSnTI1dUxfuiv5YYH7QPWqtsL/FQS1yNFLy+a1zZeShvogdkE RYIdDM0PqJ67xWAA== From: Fabiano Rosas To: qemu-devel@nongnu.org Cc: Peter Xu , Peter Maydell , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth , Laurent Vivier Subject: [PATCH 1/4] tests/qtest: Add check-migration Date: Thu, 17 Oct 2024 11:32:08 -0300 Message-Id: <20241017143211.17771-2-farosas@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20241017143211.17771-1-farosas@suse.de> References: <20241017143211.17771-1-farosas@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 9FBA521D4F X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:email,suse.de:dkim,suse.de:mid]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCPT_COUNT_SEVEN(0.00)[10]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCVD_COUNT_TWO(0.00)[2]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, 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: 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: 1729175564681116600 Content-Type: text/plain; charset="utf-8" Add two new targets, check-migration and check-migration-quick to allow dividing migration tests into a quick set and a slow set. With this it'll be possible to reduce the amount of migration tests that run by default as part of 'make check'. Keep under the 'migration-quick' suite only a few tests to serve as sanity check for every build and move the rest under the 'migration' suite. Signed-off-by: Fabiano Rosas --- meson.build | 6 +++--- tests/Makefile.include | 2 ++ tests/qtest/meson.build | 47 +++++++++++++++++++++++++++++++++-------- 3 files changed, 43 insertions(+), 12 deletions(-) diff --git a/meson.build b/meson.build index 4ea1984fc5..92d38691f9 100644 --- a/meson.build +++ b/meson.build @@ -3,9 +3,9 @@ project('qemu', ['c'], meson_version: '>=3D1.1.0', 'b_staticpic=3Dfalse', 'stdsplit=3Dfalse', 'opti= mization=3D2', 'b_pie=3Dtrue'], version: files('VERSION')) =20 -add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: = true) -add_test_setup('slow', exclude_suites: ['thorough'], env: ['G_TEST_SLOW=3D= 1', 'SPEED=3Dslow']) -add_test_setup('thorough', env: ['G_TEST_SLOW=3D1', 'SPEED=3Dthorough']) +add_test_setup('quick', exclude_suites: ['slow', 'thorough', 'migration'],= is_default: true) +add_test_setup('slow', exclude_suites: ['thorough', 'migration-quick'], en= v: ['G_TEST_SLOW=3D1', 'SPEED=3Dslow']) +add_test_setup('thorough', exclude_suites: ['migration-quick'], env: ['G_T= EST_SLOW=3D1', 'SPEED=3Dthorough']) =20 meson.add_postconf_script(find_program('scripts/symlink-install-tree.py')) =20 diff --git a/tests/Makefile.include b/tests/Makefile.include index 010369bd3a..79c1350bfb 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -11,6 +11,8 @@ check-help: @echo " $(MAKE) check-qtest Run qtest tests" @echo " $(MAKE) check-functional Run python-based functional test= s" @echo " $(MAKE) check-functional-TARGET Run functional tests for a given= target" + @echo " $(MAKE) check-migration-quick Run a small set of migration tes= ts" + @echo " $(MAKE) check-migration Run all migration tests" @echo " $(MAKE) check-unit Run qobject tests" @echo " $(MAKE) check-qapi-schema Run QAPI schema tests" @echo " $(MAKE) check-block Run block tests" diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index b207e38696..27a802474a 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -406,14 +406,43 @@ foreach dir : target_dirs test: executable(test, src, dependencies: deps) } endif - test('qtest-@0@/@1@'.format(target_base, test), - qtest_executables[test], - depends: [test_deps, qtest_emulator, emulator_modules], - env: qtest_env, - args: ['--tap', '-k'], - protocol: 'tap', - timeout: slow_qtests.get(test, 60), - priority: slow_qtests.get(test, 60), - suite: ['qtest', 'qtest-' + target_base]) + + # The migration-test test runs several slow sub-tests. Add it to + # two separate targets, one for executing a few tests + # (migration-quick) and another for executing the full set + # (migration). This is done to reduce the amount of tests that run + # via make check. + if test =3D=3D 'migration-test' + foreach opts : [ + { + 'test-args': ['--tap', '-k', '-m', 'slow'], + 'test-suite': ['migration'] + }, + { + 'test-args': ['--tap', '-k', '-m', 'quick'], + 'test-suite': ['migration-quick'] + }] + + test(target_base, + qtest_executables[test], + depends: [test_deps, qtest_emulator, emulator_modules], + env: qtest_env, + args: opts['test-args'], + protocol: 'tap', + timeout: slow_qtests.get(test, 60), + priority: slow_qtests.get(test, 60), + suite: opts['test-suite']) + endforeach + else + test('qtest-@0@/@1@'.format(target_base, test), + qtest_executables[test], + depends: [test_deps, qtest_emulator, emulator_modules], + env: qtest_env, + args: ['--tap', '-k'], + protocol: 'tap', + timeout: slow_qtests.get(test, 60), + priority: slow_qtests.get(test, 60), + suite: ['qtest', 'qtest-' + target_base]) + endif endforeach endforeach --=20 2.35.3 From nobody Tue Oct 22 23:21:37 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=1729175596; cv=none; d=zohomail.com; s=zohoarc; b=YPh5Zk2Rw/Cd17AUlzjesLUdnRnMcnBFOF3yuPC6t3CEpZZ2tS55katmtfIJY1AN7ywT0AKFxxAenY0XUk9523Mlw0uLwAL6FQuL0j2YVA1GgIDq38YJBb9DF+eWmG07sAW4hJMOXGY8WQxEZMbZ0mkE8Y7b92FDZic2JW5tKfY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729175596; 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=pTjLE5k9ibYoIFALNcr3q01Oev4bQqTk9DaEMml1LA4=; b=J6ddfaj6Le9cYJKKpG/ZlGIsik2pbaugZKh4Wmm1VibpSykonzG5vAd6GED2lOA4MfZtPmGLZa/WZ6G0dWNLZhMb31WI/iWxvqKASu/3MBi+3GGsHh8FjZ+MxijP7ylIH+zwVXNsz3nf/7N7dlguM68we8rBV8SuaU9AwWScrlA= 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 1729175596264387.16155989668414; Thu, 17 Oct 2024 07:33:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t1RYB-0005PO-An; Thu, 17 Oct 2024 10:32:27 -0400 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 1t1RY8-0005Ne-WD for qemu-devel@nongnu.org; Thu, 17 Oct 2024 10:32:25 -0400 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 1t1RY6-0003sk-Ik for qemu-devel@nongnu.org; Thu, 17 Oct 2024 10:32:24 -0400 Received: from imap1.dmz-prg2.suse.org (unknown [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 42C7721D2B; Thu, 17 Oct 2024 14:32:20 +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 18A4913A42; Thu, 17 Oct 2024 14:32:18 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id kNzDM/IfEWcDKQAAD6G6ig (envelope-from ); Thu, 17 Oct 2024 14:32:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1729175540; 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=pTjLE5k9ibYoIFALNcr3q01Oev4bQqTk9DaEMml1LA4=; b=rf1rpF9CJwali0QHACbx/4LwE5kNTBBdJ2aDXlGCN7PHkTUDFJC0hJgZCyrTgY3GKYI7/Q vZuUYg0QxQq9pCdfHdierZDClql+0jkovJ8ce8FJP/Z4mXYCYdmHWuOuEywLzywxLaAI1H 9gPXwDoLCeq5O/7KuiwSNOjkPdZR0Ts= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1729175540; 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=pTjLE5k9ibYoIFALNcr3q01Oev4bQqTk9DaEMml1LA4=; b=IzwIQ1jjFcgIIJMBWDA49gFu3Rspb3QhQbqu4XnlcpmKPmuAm6l9yPp/shjcPRGM/5MpYY tjd/l9Ia3+5tzwDg== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1729175540; 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=pTjLE5k9ibYoIFALNcr3q01Oev4bQqTk9DaEMml1LA4=; b=rf1rpF9CJwali0QHACbx/4LwE5kNTBBdJ2aDXlGCN7PHkTUDFJC0hJgZCyrTgY3GKYI7/Q vZuUYg0QxQq9pCdfHdierZDClql+0jkovJ8ce8FJP/Z4mXYCYdmHWuOuEywLzywxLaAI1H 9gPXwDoLCeq5O/7KuiwSNOjkPdZR0Ts= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1729175540; 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=pTjLE5k9ibYoIFALNcr3q01Oev4bQqTk9DaEMml1LA4=; b=IzwIQ1jjFcgIIJMBWDA49gFu3Rspb3QhQbqu4XnlcpmKPmuAm6l9yPp/shjcPRGM/5MpYY tjd/l9Ia3+5tzwDg== From: Fabiano Rosas To: qemu-devel@nongnu.org Cc: Peter Xu , Peter Maydell Subject: [PATCH 2/4] docs: Add migration tests documentation Date: Thu, 17 Oct 2024 11:32:09 -0300 Message-Id: <20241017143211.17771-3-farosas@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20241017143211.17771-1-farosas@suse.de> References: <20241017143211.17771-1-farosas@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:mid,suse.de:email]; 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, 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: 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: 1729175598141116600 Content-Type: text/plain; charset="utf-8" Add documentation about how to write, run and debug migration tests. Signed-off-by: Fabiano Rosas --- docs/devel/testing/index.rst | 1 + docs/devel/testing/main.rst | 13 ++ docs/devel/testing/migration.rst | 275 +++++++++++++++++++++++++++++++ docs/devel/testing/qtest.rst | 1 + 4 files changed, 290 insertions(+) create mode 100644 docs/devel/testing/migration.rst diff --git a/docs/devel/testing/index.rst b/docs/devel/testing/index.rst index 45eb4a7181..e46a33e9e8 100644 --- a/docs/devel/testing/index.rst +++ b/docs/devel/testing/index.rst @@ -9,6 +9,7 @@ testing infrastructure. =20 main qtest + migration functional avocado acpi-bits diff --git a/docs/devel/testing/main.rst b/docs/devel/testing/main.rst index 09725e8ea9..f238926300 100644 --- a/docs/devel/testing/main.rst +++ b/docs/devel/testing/main.rst @@ -96,6 +96,19 @@ QTest cases can be executed with =20 make check-qtest =20 +Migration +~~~~~~~~~ + +Migration tests are part of QTest, but are run independently. Refer +to :doc:`migration` for more details. + +Migration test cases can be executed with + +.. code:: + + make check-migration + make check-migration-quick + Writing portable test cases ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Both unit tests and qtests can run on POSIX hosts as well as Windows hosts. diff --git a/docs/devel/testing/migration.rst b/docs/devel/testing/migratio= n.rst new file mode 100644 index 0000000000..e877a979bf --- /dev/null +++ b/docs/devel/testing/migration.rst @@ -0,0 +1,275 @@ +.. _migration: + +Migration tests +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +Migration tests are part of QTest, but have some particularities of +their own, such as: + +- Extended test time due to the need to exercise the iterative phase + of migration; +- Extra requirements on the QEMU binary being used due to + :ref:`cross-version migration `; +- The use of a custom binary for the guest code to test memory + integrity (see :ref:`guest-code`). + +Invocation +---------- + +Migration tests can be ran with: + +.. code:: + + make check-migration + make check-migration-quick + +or directly: + +.. code:: + + # all tests + QTEST_QEMU_BINARY=3D./qemu-system-x86_64 ./tests/qtest/migration-test + + # single test + QTEST_QEMU_BINARY=3D./qemu-system-x86_64 ./tests/qtest/migration-test -= p /x86_64/migration/bad_dest + + # all tests under /multifd (note no trailing slash) + QTEST_QEMU_BINARY=3D./qemu-system-x86_64 ./tests/qtest/migration-test -= r /x86_64/migration/multifd + +for cross-version tests (see :ref:`cross-version-tests`): + +.. code:: + + # old QEMU -> new QEMU + QTEST_QEMU_BINARY=3D./qemu-system-x86_64 QTEST_QEMU_BINARY_SRC=3D./old/= qemu-system-x86_64 ./tests/qtest/migration-test + QTEST_QEMU_BINARY_DST=3D./qemu-system-x86_64 QTEST_QEMU_BINARY=3D./old/= qemu-system-x86_64 ./tests/qtest/migration-test + + # new QEMU -> old QEMU (backwards migration) + QTEST_QEMU_BINARY_SRC=3D./qemu-system-x86_64 QTEST_QEMU_BINARY=3D./old/= qemu-system-x86_64 ./tests/qtest/migration-test + QTEST_QEMU_BINARY=3D./qemu-system-x86_64 QTEST_QEMU_BINARY_DST=3D./old/= qemu-system-x86_64 ./tests/qtest/migration-test + + # both _SRC and _DST variants are supported for convenience + +.. _cross-version-tests: + +Cross-version tests +~~~~~~~~~~~~~~~~~~~ + +To detect compatibility issues between different QEMU versions, all +tests from migration-test can be executed with two different QEMU +versions. The common machine type between the two versions is used. + +To setup cross-version tests, a previous build of QEMU must be kept, +e.g.: + +.. code:: + + # build current code + mkdir build + cd build + ../configure; make + + # build previous version + cd ../ + mkdir build-9.1 + git checkout v9.1.0 + cd build + ../configure; make + +To avoid issues with newly added features and new tests, it is highly +recommended to run the tests from the source directory of *older* +version being tested. + +.. code:: + + ./build/qemu-system-x86_64 --version + QEMU emulator version 9.1.50 + + ./build-9.1/qemu-system-x86_64 --version + QEMU emulator version 9.1.0 + + cd build-9.1 + QTEST_QEMU_BINARY=3D./qemu-system-x86_64 QTEST_QEMU_BINARY_DST=3D../bui= ld/qemu-system-x86_64 ./tests/qtest/migration-test + + +How to write migration tests +---------------------------- + +Add a test function (prefixed with ``test_``) that gets registered +with QTest using the ``migration_test_add*()`` helpers. + +The choice between ``migration_test_add()`` and +``migration_test_add_quick()`` affects whether a test is executed via +``make check``. The former helper adds a test to the "slow" set, which +only runs via ``make check-migration``, while the latter allows a test +to run via ``make check`` or ``make check-migration-quick``. + +A new test should preferably not add too much time to ``make +check``. In general, code that depends on external libraries or pieces +outside of migration could be tested in the quick set as well as tests +that are fast (e.g. only tests migration URL and exits). Code that is +core to the migration framework or changes infrequently should be +tested in the slow set as well as test that are considerably slower +(e.g. run several migration iterations). + +.. code:: + + migration_test_add("/migration/multifd/tcp/plain/cancel", test_multifd_t= cp_cancel); + +There is no formal grammar for the definition of the test paths, but +an informal rule is followed for consistency. Usually: + +``/migration////`` + +Bear in mind that the path string affects test execution order and +filtering when using the ``-r`` flag. + +For simpler tests, the test function can setup the test arguments in +the ``MigrateCommon`` structure and call into a common test +routine. Currently there are two common test routines: + + - test_precopy_common - for generic precopy migration + - test_file_common - for migration using the file: URL + +The general structure of a test routine is: + +- call ``test_migrate_start()`` to initialize the two QEMU + instances. Usually named "from", for the source machine and "to" for + the destination machine; + +- define the migration duration, (roughly speaking either quick or + slow) by altering the convergence parameters with + ``migrate_ensure[_non]_converge()``; + +- wait for the machines to be in the desired state with the ``wait_for_*`` + helpers; + +- migrate with ``migrate_qmp()/migrate_incoming_qmp()/migrate_qmp_fail()``; + +- check that guest memory was not corrupted and clean up the QEMU + instances with ``test_migrate_end()``. + +If using the common test routines, the ``.start_hook`` and ``.finish_hook`` +callbacks can be used to perform test-specific tasks. + +.. _guest-code: + +About guest code +---------------- + +The tests all use a custom, architecture-specific binary as the guest +code. This code, known as a-b-kernel or a-b-bootblock, constantly +iterates over the guest memory, writing a number to the start of each +guest page, incrementing it as it loops around (i.e. a generation +count). This allows the tests to catch memory corruption errors that +occur during migration as every page's first byte must have the same +value, except at the point where the transition happens. + +Whenever guest memory is migrated incorrectly, the test will output +the address and amount of pages that present a value inconsistent with +the generation count, e.g.: + +.. code:: + + Memory content inconsistency at d53000 first_byte =3D 27 last_byte =3D 2= 6 current =3D 27 hit_edge =3D 1 + Memory content inconsistency at d54000 first_byte =3D 27 last_byte =3D 2= 6 current =3D 27 hit_edge =3D 1 + Memory content inconsistency at d55000 first_byte =3D 27 last_byte =3D 2= 6 current =3D 27 hit_edge =3D 1 + and in another 4929 pages + +In the scenario above, + +``first_byte`` shows that the current generation number is 27, therefore +all pages should have 27 as their first byte. Since ``hit_edge=3D1``, that +means the transition point was found, i.e. the guest was stopped for +migration while not all pages had yet been updated to the new +generation count. So 26 is also a valid byte to find in some pages. + +The inconsistency here is that ``last_byte``, i.e. the previous +generation count is smaller than the ``current`` byte, which should not +be possible. This would indicate a memory layout such as: + +.. code:: + + 0xb00000 | 27 00 00 ... + ... + 0xc00000 | 27 00 00 ... + ... + 0xd00000 | 27 00 00 ... + 0x?????? | 26 00 00 ... <-- pages around this addr weren't migrated corr= ectly + ... + 0xd53000 | 27 00 00 ... + 0xd54000 | 27 00 00 ... + 0xd55000 | 27 00 00 ... + ... + +The a-b code is located at ``tests/migration/``. + +Troubleshooting +--------------- + +Migration tests usually run as part of make check, which is most +likely to not have been using the verbose flag, so the first thing to +check is the test log from meson (``meson-logs/testlog.txt``). + +There, look for the last "Running" entry, which will be the current +test. Notice whether the failing program is one of the QEMU instances +or the migration-test itself. + +E.g.: + +.. code:: + + # Running /s390x/migration/precopy/unix/plain + # Using machine type: s390-ccw-virtio-9.2 + # starting QEMU: exec ./qemu-system-s390x -qtest ... + # starting QEMU: exec ./qemu-system-s390x -qtest ... + ----------------------------------- stderr -----------------------------= ------ + migration-test: ../tests/qtest/migration-test.c:1712: test_precopy_commo= n: Assertion `0' failed. + + (test program exited with status code -6) + +.. code:: + + # Running /x86_64/migration/bad_dest + # Using machine type: pc-q35-9.2 + # starting QEMU: exec ./qemu-system-x86_64 -qtest ... + # starting QEMU: exec ./qemu-system-x86_64 -qtest ... + ----------------------------------- stderr -----------------------------= ------ + Broken pipe + ../tests/qtest/libqtest.c:205: kill_qemu() detected QEMU death from sign= al 6 (Aborted) (core dumped) + + (test program exited with status code -6) + +The above is usually not enough to determine what happened, so +re-running the test directly is helpful: + +.. code:: + + QTEST_QEMU_BINARY=3D./qemu-system-x86_64 ./tests/qtest/migration-test -= p /x86_64/migration/bad_dest + +There are also the QTEST_LOG and QTEST_TRACE variables for increased +logging and tracing. + +The QTEST_QEMU_BINARY environment variable can be abused to hook GDB +or valgrind into the invocation: + +.. code:: + + QTEST_QEMU_BINARY=3D'gdb -q --ex "set pagination off" --ex "set print t= hread-events off" \ + --ex "handle SIGUSR1 noprint" --ex "break " --ex "run" --ex= "quit \$_exitcode" \ + --args ./qemu-system-x86_64' ./tests/qtest/migration-test -p /x86_64/mi= gration/multifd/file/mapped-ram/fdset/dio + +.. code:: + + QTEST_QEMU_BINARY=3D'valgrind -q --leak-check=3Dfull --show-leak-kinds= =3Ddefinite,indirect \ + ./qemu-system-x86_64' ./tests/qtest/migration-test -r /x86_64/migration + +Whenever a test fails, it will leave behind a temporary +directory. This is useful for file migrations to inspect the generated +migration file: + +.. code:: + + $ file /tmp/migration-test-X496U2/migfile + /tmp/migration-test-X496U2/migfile: QEMU suspend to disk image + $ hexdump -C /tmp/migration-test-X496U2/migfile | less diff --git a/docs/devel/testing/qtest.rst b/docs/devel/testing/qtest.rst index c5b8546b3e..4665c160b6 100644 --- a/docs/devel/testing/qtest.rst +++ b/docs/devel/testing/qtest.rst @@ -5,6 +5,7 @@ QTest Device Emulation Testing Framework .. toctree:: =20 qgraph + migration =20 QTest is a device emulation testing framework. It can be very useful to t= est device models; it could also control certain aspects of QEMU (such as virt= ual --=20 2.35.3 From nobody Tue Oct 22 23:21:37 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=1729175565; cv=none; d=zohomail.com; s=zohoarc; b=mmA343uAmYlVWbWjf1WUowEDhKL4HUAv+qtAHHI6BEy6imDzxd/5jvg8MtXugJ6gz6NOHgn8aXKyu+5ZnPvBfdX0V8m5gt/na1CwPnI5q1CSsL5ITqXxGCZcrkggJI8iGXpBs4ZgoOa31OFlf5Q/APEM+as8LePdriLLbZRvWIQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729175565; 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=BqzdKfAFeutz4QGQaOzHSpfxNGfoWlqPyFUzIiF3vD0=; b=YyoiDvIr5PVGDDo7cAVCnd5I7ihrCo3waW3qnMP9gUadTg/Lkv9soXb+i+sOHUDCk5KEpr/lrt3TP9CSYCee5Jc8/ZnhjeKbBcg4g5y3OXFYweA2qf1XeTYwWHD8Sq3Vq1qlD2UD7pTziKXH27jKNV/MXiAjX8pQiDcn/Pp8rYo= 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 1729175565825661.6012567141219; Thu, 17 Oct 2024 07:32:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t1RYC-0005QK-B2; Thu, 17 Oct 2024 10:32:28 -0400 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 1t1RY9-0005Nw-RU for qemu-devel@nongnu.org; Thu, 17 Oct 2024 10:32:25 -0400 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 1t1RY7-0003tC-CN for qemu-devel@nongnu.org; Thu, 17 Oct 2024 10:32:25 -0400 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 E196E21D8B; Thu, 17 Oct 2024 14:32: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 BB21D13A42; Thu, 17 Oct 2024 14:32:20 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id AAgPIPQfEWcDKQAAD6G6ig (envelope-from ); Thu, 17 Oct 2024 14:32:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1729175542; 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=BqzdKfAFeutz4QGQaOzHSpfxNGfoWlqPyFUzIiF3vD0=; b=pTefrODdzZyF59ar4/YxiHcmmSKempb4mkX+rZri2+u8tnXi/b67PeL6OJvLxoFaklyMvo Lpo+7QaE+K2adu2/AWevRrYqHNaPM/0LxhdWBGiZxqLLuXaxzYeSo+AJYW1Nrpxf1wxOkU Y6W7SLbu1PRazwQd9ZqRaFGQpueUlkY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1729175542; 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=BqzdKfAFeutz4QGQaOzHSpfxNGfoWlqPyFUzIiF3vD0=; b=Mbc3i7ncp+NgdLHRuBmWSQsKfNNK313exupLeYkxDHFBF5ttElYifrFjzmjYe/M7SQ7j98 FLwNXlj1NS6cvrBg== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=Oq296ZZu; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=Nz7XyTo0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1729175541; 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=BqzdKfAFeutz4QGQaOzHSpfxNGfoWlqPyFUzIiF3vD0=; b=Oq296ZZu1hgO6ya7zZOo1qUERR+3X6eFGOu2ex6etikwmqBgin1ULJ/3qVQpd8r7axYRxs y955TEPMvdZF2nWI8YYcJCY1ICXw7XYjJdNHqeLgbUdV+7DiycbY8IC0wdWi1gaIN11Njy PrIksbhTbFJYLisi1rrZajEBRRuXDZ0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1729175541; 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=BqzdKfAFeutz4QGQaOzHSpfxNGfoWlqPyFUzIiF3vD0=; b=Nz7XyTo04I53jiCCr5KrBBVwOno4Hrietiqgx3X5l3OgNgh05kRUewqEKkBWGxek75Wdu9 Rc0OF0pSajKYCeCQ== From: Fabiano Rosas To: qemu-devel@nongnu.org Cc: Peter Xu , Peter Maydell Subject: [PATCH 3/4] tests/qtest/migration: Move tests into g_test_slow() Date: Thu, 17 Oct 2024 11:32:10 -0300 Message-Id: <20241017143211.17771-4-farosas@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20241017143211.17771-1-farosas@suse.de> References: <20241017143211.17771-1-farosas@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: E196E21D8B X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:dkim,suse.de:mid,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCPT_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:+] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 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, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, 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: 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: 1729175568146116600 Content-Type: text/plain; charset="utf-8" Move most of the tests under g_test_slow() and add a migration_test_add_quick() helper to mark a test as "quick". quick - runs with: make check make check-migration-quick make check-migration make SPEED=3Dslow check slow - runs with: make check-migration make SPEED=3Dslow check Also add some words on the rationale, which is to keep the bulk of the migration-test out of make check. Signed-off-by: Fabiano Rosas --- tests/qtest/migration-helpers.c | 9 +++++ tests/qtest/migration-helpers.h | 16 ++++++++ tests/qtest/migration-test.c | 67 ++++++++++++++++----------------- 3 files changed, 58 insertions(+), 34 deletions(-) diff --git a/tests/qtest/migration-helpers.c b/tests/qtest/migration-helper= s.c index 0025933883..b3a873630f 100644 --- a/tests/qtest/migration-helpers.c +++ b/tests/qtest/migration-helpers.c @@ -456,6 +456,15 @@ static void migration_test_wrapper(const void *data) } =20 void migration_test_add(const char *path, void (*fn)(void)) +{ + if (!g_test_slow()) { + return; + } + + migration_test_add_quick(path, fn); +} + +void migration_test_add_quick(const char *path, void (*fn)(void)) { MigrationTest *test =3D g_new0(MigrationTest, 1); =20 diff --git a/tests/qtest/migration-helpers.h b/tests/qtest/migration-helper= s.h index 72dba369fb..59daf5ea62 100644 --- a/tests/qtest/migration-helpers.h +++ b/tests/qtest/migration-helpers.h @@ -62,7 +62,23 @@ static inline bool probe_o_direct_support(const char *tm= pfs) return false; } #endif + +/* + * Tests that would only break due to core migration changes should be + * added with migration_test_add(). Those are considered 'slow' by + * default and run during make check-migration, or when '-m slow' is + * added on the cmdline. + * + * Tests that are quick and simple, as well as those that are + * succeptible to changes outside of migration/ (e.g. depend on TLS, + * qio_channel, etc), should be added with + * migration_test_add_quick(). Those are considered 'quick' and run as + * part of make check (i.e. execute in CI and with every developer's + * invocation of make check). Avoid adding too much time to those. + */ void migration_test_add(const char *path, void (*fn)(void)); +void migration_test_add_quick(const char *path, void (*fn)(void)); + void migration_event_wait(QTestState *s, const char *target); =20 #endif /* MIGRATION_HELPERS_H */ diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 95e45b5029..4b021984c4 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -43,6 +43,7 @@ static bool uffd_feature_thread_id; static QTestMigrationState src_state; static QTestMigrationState dst_state; =20 + /* * An initial 3 MB offset is used as that corresponds * to ~1 sec of data transfer with our bandwidth setting. @@ -3785,20 +3786,20 @@ int main(int argc, char **argv) #endif =20 if (is_x86) { - 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); + migration_test_add_quick("/migration/precopy/unix/suspend/live", + test_precopy_unix_suspend_live); + migration_test_add_quick("/migration/precopy/unix/suspend/notlive", + test_precopy_unix_suspend_notlive); } =20 if (has_uffd) { - migration_test_add("/migration/postcopy/plain", test_postcopy); + migration_test_add_quick("/migration/postcopy/plain", test_postcop= y); 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); + migration_test_add_quick("/migration/postcopy/preempt/plain", + test_postcopy_preempt); + migration_test_add_quick("/migration/postcopy/preempt/recovery/pla= in", + test_postcopy_preempt_recovery); migration_test_add("/migration/postcopy/recovery/double-failures/h= andshake", test_postcopy_recovery_fail_handshake); migration_test_add("/migration/postcopy/recovery/double-failures/r= econnect", @@ -3809,12 +3810,12 @@ int main(int argc, char **argv) } } =20 - migration_test_add("/migration/precopy/unix/plain", - test_precopy_unix_plain); - if (g_test_slow()) { - migration_test_add("/migration/precopy/unix/xbzrle", - test_precopy_unix_xbzrle); - } + migration_test_add_quick("/migration/precopy/unix/plain", + test_precopy_unix_plain); + + migration_test_add("/migration/precopy/unix/xbzrle", + test_precopy_unix_xbzrle); + migration_test_add("/migration/precopy/file", test_precopy_file); migration_test_add("/migration/precopy/file/offset", @@ -3881,14 +3882,14 @@ int main(int argc, char **argv) #endif /* CONFIG_TASN1 */ #endif /* CONFIG_GNUTLS */ =20 - migration_test_add("/migration/precopy/tcp/plain", test_precopy_tcp_pl= ain); + migration_test_add_quick("/migration/precopy/tcp/plain", test_precopy_= tcp_plain); =20 migration_test_add("/migration/precopy/tcp/plain/switchover-ack", test_precopy_tcp_switchover_ack); =20 #ifdef CONFIG_GNUTLS - migration_test_add("/migration/precopy/tcp/tls/psk/match", - test_precopy_tcp_tls_psk_match); + migration_test_add_quick("/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 @@ -3930,25 +3931,23 @@ int main(int argc, char **argv) /* * See explanation why this test is slow on function definition */ - if (g_test_slow()) { - migration_test_add("/migration/auto_converge", - test_migrate_auto_converge); - if (g_str_equal(arch, "x86_64") && - has_kvm && kvm_dirty_ring_supported()) { - migration_test_add("/migration/dirty_limit", - test_migrate_dirty_limit); - } + migration_test_add("/migration/auto_converge", + test_migrate_auto_converge); + if (g_str_equal(arch, "x86_64") && + has_kvm && kvm_dirty_ring_supported()) { + migration_test_add("/migration/dirty_limit", + test_migrate_dirty_limit); } - migration_test_add("/migration/multifd/tcp/uri/plain/none", - test_multifd_tcp_uri_none); + migration_test_add_quick("/migration/multifd/tcp/uri/plain/none", + test_multifd_tcp_uri_none); migration_test_add("/migration/multifd/tcp/channels/plain/none", test_multifd_tcp_channels_none); migration_test_add("/migration/multifd/tcp/plain/zero-page/legacy", test_multifd_tcp_zero_page_legacy); migration_test_add("/migration/multifd/tcp/plain/zero-page/none", test_multifd_tcp_no_zero_page); - migration_test_add("/migration/multifd/tcp/plain/cancel", - test_multifd_tcp_cancel); + migration_test_add_quick("/migration/multifd/tcp/plain/cancel", + test_multifd_tcp_cancel); migration_test_add("/migration/multifd/tcp/plain/zlib", test_multifd_tcp_zlib); #ifdef CONFIG_ZSTD @@ -3957,7 +3956,7 @@ int main(int argc, char **argv) #endif #ifdef CONFIG_QATZIP migration_test_add("/migration/multifd/tcp/plain/qatzip", - test_multifd_tcp_qatzip); + test_multifd_tcp_qatzip); #endif #ifdef CONFIG_QPL migration_test_add("/migration/multifd/tcp/plain/qpl", @@ -3987,9 +3986,9 @@ int main(int argc, char **argv) #endif /* CONFIG_GNUTLS */ =20 if (g_str_equal(arch, "x86_64") && has_kvm && kvm_dirty_ring_supported= ()) { - migration_test_add("/migration/dirty_ring", - test_precopy_unix_dirty_ring); - if (qtest_has_machine("pc") && g_test_slow()) { + migration_test_add_quick("/migration/dirty_ring", + test_precopy_unix_dirty_ring); + if (qtest_has_machine("pc")) { migration_test_add("/migration/vcpu_dirty_limit", test_vcpu_dirty_limit); } --=20 2.35.3 From nobody Tue Oct 22 23:21:37 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=1729175613; cv=none; d=zohomail.com; s=zohoarc; b=akcGDRuQuhHbU8L2PiLu62HP58mgvv02RmmLpdVLZVK7DH3ayP3sJKhw0dKwLgecHpdSzQNS8/N1a+0418N7s8nX/+DJEe6fUQN1dBwXsEX1tzC3LlXvykJ98+qbbGqM+tRSBAbqSi9NleadsdX6shz71eS/XN96Wkp7F17VtKU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729175613; 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=P43KxTI/+J6dM0EcAKzewQzNim/G2N0eTsStzshMoaE=; b=BLCmIMxzRbcG0xs4ZJSlLiptyAk/ARy1jhxn8pN0h+VNsnEWzbYWeMwZJMkFVZkP2NB3WrZeE5rKDIL8/PWc40aTziTk/y5zz4wfEQsYHJjWegBA9+mwpeK9HmbPQVBsChFY8G3EnfxviU5I8Hu75GEkkgT89XwbW0+469KjRus= 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 1729175613681742.1258934946143; Thu, 17 Oct 2024 07:33:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t1RYD-0005Qb-65; Thu, 17 Oct 2024 10:32:29 -0400 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 1t1RYB-0005PU-9F for qemu-devel@nongnu.org; Thu, 17 Oct 2024 10:32:27 -0400 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 1t1RY9-0003vM-M1 for qemu-devel@nongnu.org; Thu, 17 Oct 2024 10:32:26 -0400 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 6F24821D4F; Thu, 17 Oct 2024 14:32: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 5FC1613A42; Thu, 17 Oct 2024 14:32:22 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id sMeXCfYfEWcDKQAAD6G6ig (envelope-from ); Thu, 17 Oct 2024 14:32:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1729175544; 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=P43KxTI/+J6dM0EcAKzewQzNim/G2N0eTsStzshMoaE=; b=mWphIMxGwT8V6SLZe3DEkIjsF0gMBAsrw84gqpcWgp3TyI5s5wyPD7eoKxTGtA8on26b9r VteTO+1El7Da7PTm3US2btf9mB7yGrV0+PPT5+j4W/Uj+IGi9wEUM+HIls0c55AMz+poiE 2TPCS69BHfq4Epg5BlDPN49y62G+Wzw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1729175544; 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=P43KxTI/+J6dM0EcAKzewQzNim/G2N0eTsStzshMoaE=; b=kEjSHOdWkgHivc7t6yIdmuVOKhRSfptIKbgy9ehE6/bqd/ApZ279Rcz1CdeiYXerJNgQrr mR+LMKoef7fFi7CQ== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=mWphIMxG; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=kEjSHOdW DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1729175544; 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=P43KxTI/+J6dM0EcAKzewQzNim/G2N0eTsStzshMoaE=; b=mWphIMxGwT8V6SLZe3DEkIjsF0gMBAsrw84gqpcWgp3TyI5s5wyPD7eoKxTGtA8on26b9r VteTO+1El7Da7PTm3US2btf9mB7yGrV0+PPT5+j4W/Uj+IGi9wEUM+HIls0c55AMz+poiE 2TPCS69BHfq4Epg5BlDPN49y62G+Wzw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1729175544; 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=P43KxTI/+J6dM0EcAKzewQzNim/G2N0eTsStzshMoaE=; b=kEjSHOdWkgHivc7t6yIdmuVOKhRSfptIKbgy9ehE6/bqd/ApZ279Rcz1CdeiYXerJNgQrr mR+LMKoef7fFi7CQ== From: Fabiano Rosas To: qemu-devel@nongnu.org Cc: Peter Xu , Peter Maydell , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta Subject: [PATCH 4/4] ci: Add check-migration-quick to the clang job Date: Thu, 17 Oct 2024 11:32:11 -0300 Message-Id: <20241017143211.17771-5-farosas@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20241017143211.17771-1-farosas@suse.de> References: <20241017143211.17771-1-farosas@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 6F24821D4F X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.de:dkim,suse.de:mid,suse.de:email]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCPT_COUNT_SEVEN(0.00)[7]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCVD_COUNT_TWO(0.00)[2]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org 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, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, 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: 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: 1729175614133116600 Content-Type: text/plain; charset="utf-8" Recent changes to how we invoke the migration tests have (intentionally) caused them to not be part of the check-qtest target anymore. Add the check-migration-quick target so we don't lose migration code testing in this job. Signed-off-by: Fabiano Rosas --- .gitlab-ci.d/buildtest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index 34d3f4e9ab..37247dc5fa 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -442,7 +442,7 @@ clang-system: CONFIGURE_ARGS: --cc=3Dclang --cxx=3Dclang++ --enable-ubsan --extra-cflags=3D-fno-sanitize-recover=3Dundefined TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu s390x-s= oftmmu - MAKE_CHECK_ARGS: check-qtest check-tcg + MAKE_CHECK_ARGS: check-qtest check-tcg check-migration-quick =20 clang-user: extends: .native_build_job_template --=20 2.35.3