From nobody Sat May 30 19:21:51 2026 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=1777392204; cv=none; d=zohomail.com; s=zohoarc; b=n2ss6hQSVtmXPj9p3vTa9ok0gmTrXniOK1fixalIehDHrm//Puwh9MpNuH/ju/a/0UyR687GH3pAxFQs2VJ8h4ahK3bvPUCOfEZNZP5jPi++K4Qn/DYpWbolIOTxPkOl8By53OByaSVoD1yIxiBlc0WRy5BSR9vFyo0kL2mBnps= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777392204; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=5QS08LdqDUIEpDxve/9nBXhEGDIUiWJTjDQzQQnp94I=; b=U4ts3SNp01YVv6rGYB3n1IFxgAVVSmia7Hr3Thgywfc12j6x7EYTx3QbDVVZmjjOZiJSHTktBOj8N7S25bf9cs4CN5u1/nyiS51i9qnus1HM3Ev283WocEGsGQPyD6ABWpXsh6ZNnIiAG12PDRWVNtRfv38At8Ms8VyPak1wsW8= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777392204683773.2147049341321; Tue, 28 Apr 2026 09:03:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wHktz-0003vB-CY; Tue, 28 Apr 2026 12:03:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wHksW-0003AK-MP for qemu-devel@nongnu.org; Tue, 28 Apr 2026 12:01:42 -0400 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 1wHksS-0003le-Uh for qemu-devel@nongnu.org; Tue, 28 Apr 2026 12:01:40 -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-out2.suse.de (Postfix) with ESMTPS id 543A05BD3F; Tue, 28 Apr 2026 16:01: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 8D434593B0; Tue, 28 Apr 2026 16:01:26 +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 ducXF9bZ8Gm8CQAAD6G6ig (envelope-from ); Tue, 28 Apr 2026 16:01:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1777392093; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5QS08LdqDUIEpDxve/9nBXhEGDIUiWJTjDQzQQnp94I=; b=rP8B2Rrw0cBwBNdvw0CnGuBrqJGon6EScfFnKqOk9j++Hyifv4TlA5ryGgC2z414nUfYXo 7XZnHoMhtQ8JtZjOKVCvhmaGTx3a7O0cKIcGey2DH3tsJXj1Vk3w1jNIB+mP1GKMs9TGlj 9hfAquQGgDUpQP8zBpZ6GksUppiOa9U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1777392093; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5QS08LdqDUIEpDxve/9nBXhEGDIUiWJTjDQzQQnp94I=; b=/SFVwytbZF8OT+bxqqQnfRGvBk49eQqaufNFbJUXV+xvVQX5e9MwQS3rz4uU8m1uNlV/9r LuXmj5jP24GPSIAQ== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1777392088; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5QS08LdqDUIEpDxve/9nBXhEGDIUiWJTjDQzQQnp94I=; b=pdVDzyw2A/qWj/MlGPCMH5noioGFViowyqzesj/gqZE/EYSQ70JpqLeiIFa92i6aGetXoY uLZzbnGy/4084IgDreljAJtGA4r2f/hsvl649hLQy38k/xn+dN/9LMOBQ2UGdsPmt6W3zT 5WLyJmmLaxqGVUGJCLFGCoz8YSAPibk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1777392088; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5QS08LdqDUIEpDxve/9nBXhEGDIUiWJTjDQzQQnp94I=; b=pDtaWcMFGW2kGrfV7NQBMTYWeXGAewvdwDnTq7NPM0lsBW3Viv8bnOyk005ejJTWyQ8ljq LuizQyZcnIEK7YDQ== From: Fabiano Rosas To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Stefan Hajnoczi , Tyrone Ting , Hao Wu , Laurent Vivier , Paolo Bonzini Subject: [PATCH v1] tests/qtest: Avoid timers from default devices Date: Tue, 28 Apr 2026 13:01:20 -0300 Message-ID: <20260428160120.12130-1-farosas@suse.de> X-Mailer: git-send-email 2.51.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-3.30 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-0.999]; MIME_GOOD(-0.10)[text/plain]; FUZZY_RATELIMITED(0.00)[rspamd.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCPT_COUNT_SEVEN(0.00)[7]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo, suse.de:mid, suse.de:email, linaro.org:email] X-Spam-Score: -3.30 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=lists1p.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: -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: qemu development 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: 1777392207966158500 Having default devices enabled while testing timers leads to non-deterministic behavior on the usage of the QTest qtest_clock_step_next() command as the implicit devices can have timers of their own that may have a deadline more recent than the tested device. In the particular case of npcm7xx-timer-test, having SLIRP enabled in the QEMU binary may cause the net_slirp_timer to shadow the clock advance that was expected to trigger the NPCM7xx timer: npcm7xx_timer-test.c:475:test_periodic_interrupt: assertion failed (tim_read(td, TISR) =3D=3D tim_timer_bit(td)): (0x000000= 00 =3D=3D 0x00000010) npcm7xx_timer-test.c:476:test_periodic_interrupt: 'qtest_get_irq(global_qtest, tim_timer_irq(td))' should be TRUE Add the -nodefaults command line option to all tests that invoke qtest_clock_step_next. CC: Alex Benn=C3=A9e Reported-by: Stefan Hajnoczi Signed-off-by: Fabiano Rosas Reviewed-by: Stefan Hajnoczi --- tests/qtest/npcm7xx_timer-test.c | 2 +- tests/qtest/pflash-cfi02-test.c | 4 ++-- tests/qtest/rtc-test.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/qtest/npcm7xx_timer-test.c b/tests/qtest/npcm7xx_timer-t= est.c index 43711049ca..0e2284669d 100644 --- a/tests/qtest/npcm7xx_timer-test.c +++ b/tests/qtest/npcm7xx_timer-test.c @@ -551,7 +551,7 @@ int main(int argc, char **argv) } } =20 - qtest_start("-machine npcm750-evb"); + qtest_start("-machine npcm750-evb -nodefaults"); qtest_irq_intercept_in(global_qtest, "/machine/soc/a9mpcore/gic"); ret =3D g_test_run(); qtest_end(); diff --git a/tests/qtest/pflash-cfi02-test.c b/tests/qtest/pflash-cfi02-tes= t.c index 8c073efcb4..65b35811fa 100644 --- a/tests/qtest/pflash-cfi02-test.c +++ b/tests/qtest/pflash-cfi02-test.c @@ -260,7 +260,7 @@ static void test_geometry(const void *opaque) { const FlashConfig *config =3D opaque; QTestState *qtest; - qtest =3D qtest_initf("-M musicpal" + qtest =3D qtest_initf("-M musicpal -nodefaults" " -drive if=3Dpflash,file=3D%s,format=3Draw,copy-o= n-read=3Don" /* Device geometry properties. */ " -global driver=3Dcfi.pflash02," @@ -580,7 +580,7 @@ static void test_cfi_in_autoselect(const void *opaque) { const FlashConfig *config =3D opaque; QTestState *qtest; - qtest =3D qtest_initf("-M musicpal" + qtest =3D qtest_initf("-M musicpal -nodefaults" " -drive if=3Dpflash,file=3D%s,format=3Draw,copy-o= n-read=3Don", image_path); FlashConfig explicit_config =3D expand_config_defaults(config); diff --git a/tests/qtest/rtc-test.c b/tests/qtest/rtc-test.c index 02ed4e1238..09b6de9166 100644 --- a/tests/qtest/rtc-test.c +++ b/tests/qtest/rtc-test.c @@ -691,7 +691,7 @@ int main(int argc, char **argv) =20 g_test_init(&argc, &argv, NULL); =20 - s =3D qtest_start("-rtc clock=3Dvm"); + s =3D qtest_start("-rtc clock=3Dvm -nodefaults"); qtest_irq_intercept_in(s, "ioapic"); =20 qtest_add_func("/rtc/check-time/bcd", bcd_check_time); --=20 2.51.0