Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 35D2CC636D4 for ; Mon, 13 Feb 2023 21:11:36 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRg58-00076U-Ka; Mon, 13 Feb 2023 16:09:50 -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 1pRg54-00075L-Uo for qemu-devel@nongnu.org; Mon, 13 Feb 2023 16:09:46 -0500 Received: from smtp-out2.suse.de ([195.135.220.29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pRg53-0000yx-5l for qemu-devel@nongnu.org; Mon, 13 Feb 2023 16:09:46 -0500 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 8A94020354; Mon, 13 Feb 2023 21:09:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1676322582; 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; bh=DIqaw09aD/AE0VPQkv4ob/NtUBWeoIsLy9/eB9M7XTE=; b=zJN1truziibH5vw54aMzSEiZVuR4DQ78uLxibjTlyG7niOyrZfmeASC6IpkrFHj98gVBxB 2/RgTPzbgsFOlUgk8RLjW24XdXDUz8iVeZA1oyCtdVWu1Z4TggwmhpXltbR/x5RR317HHU IpT+Nbz6pBBRNeVO1u4aZhO8J77fclk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1676322582; 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; bh=DIqaw09aD/AE0VPQkv4ob/NtUBWeoIsLy9/eB9M7XTE=; b=iVVWWJ5PFNx75dPwXA5yZULW1iZJIbRC9v1RuQ1EwBViTbY+OpMJJTgaAO2bk6N44XJAjH cAGUHr8nq1aS9KDA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 9821E138E6; Mon, 13 Feb 2023 21:09:41 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id XZNWFxWn6mPoRAAAMHmgww (envelope-from ); Mon, 13 Feb 2023 21:09:41 +0000 From: Fabiano Rosas To: qemu-devel@nongnu.org Cc: Thomas Huth Subject: [PATCH v3 00/12] qtests vs. default devices Date: Mon, 13 Feb 2023 18:07:26 -0300 Message-Id: <20230213210738.9719-1-farosas@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=195.135.220.29; 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 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org I based this on master this time, the Kconfig series might take longer. patch 4 - changed conditional to use the same style as surrounding code; v2: patch 3 - fixed typo s/PCIE_ROOT/PCIE_PORT and dropped runtime check; patch 4 - dropped runtime check and added a dep on CONFIG_VIRTIO_SERIAL; patch 7 - added skip messages and folded look_for_device_builtin into has_device_builtin; patch 9 - dropped runtime check; v1: https://lore.kernel.org/r/20230206150416.4604-1-farosas@suse.de Most of our tests assume the presence of default devices. When building --without-default-devices or with individual CONFIGs disabled, several tests fail. I went through them one by one and did local changes to skip or avoid including tests that require devices that are missing. With these initial changes, 'make check' now passes for the --without-default-devices build for x86 and arm. However, the approach of making local changes seems hard to maintain: every time a CONFIG changes from 'y' to 'n' a test might break and all new tests need to remember to check before adding devices, which some tests add several. So the last patch in the series provides an alternative: Parse the command line at qtest_init and skip the test if devices are missing. Individual tests would have to check 'if (!qts)' and bail. Seems a bit heavy-weight, but it would mean we don't have to put a qtest_has_device check for every device in every test. Based on: <20230206140809.26028-1-farosas@suse.de> [PATCH 00/10] Kconfig vs. default devices https://lore.kernel.org/r/20230206140809.26028-1-farosas@suse.de Fabiano Rosas (12): tests/qtest: Skip PXE tests for missing devices tests/qtest: Do not run lsi53c895a test if device is not present tests/qtest: Add dependence on PCIE_PORT for virtio-net-failover.c tests/qtest: Don't build virtio-serial-test.c if device not present tests/qtest: hd-geo-test: Check for missing devices tests/qtest: Fix coding style in device-plug-test.c tests/qtest: Skip unplug tests that use missing devices tests/qtest: drive_del-test: Skip tests that require missing devices tests/qtest: Check for devices in bios-tables-test tests/qtest: Do not include hexloader-test if loader device is not present tests/qemu-iotests: Require virtio-scsi-pci tests/qtest: bios-tables-test: Skip if missing configs tests/qemu-iotests/186 | 1 + tests/qtest/bios-tables-test.c | 75 ++++++++++++++++++++++++++++-- tests/qtest/device-plug-test.c | 41 ++++++++++++---- tests/qtest/drive_del-test.c | 65 ++++++++++++++++++++++++++ tests/qtest/fuzz-lsi53c895a-test.c | 4 ++ tests/qtest/hd-geo-test.c | 38 +++++++++------ tests/qtest/meson.build | 17 +++++-- tests/qtest/pxe-test.c | 4 ++ 8 files changed, 214 insertions(+), 31 deletions(-) -- 2.35.3