From nobody Mon Feb 9 18:45:54 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1688470051; cv=none; d=zohomail.com; s=zohoarc; b=QaNPLy3yxghqVz5tKbLkE55hXeT9FAqKxO2YG6aZhfFjbKiYUSN1qRhigOvoa558XCTyXacUGsIgk17FCeSZXQaSvh0+ySUdDhIcOLfxncfwmCK36KmF/eqZSolLITP2o9bOqmb1chwn8yQplTF02phoVb+rpBzO2dD9E1eROnc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1688470051; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uCCjtwSbbFETTKSsmt5af6YgxkBnyGQ+Ywb1vZBrF3g=; b=kV7r71opCJL4ujy8GthU4ssgvOYd0Th1yh5sxdZqqBnpVe2GrTvbETNs3xo5ln5ZME4tw05F/QKVMVH1lzKIN7jeegfoSDOGzyWWuHFR7+8bB+2buL0Tp24etpKyu1MC7sX7A55n2A81qCspKHg6pLXDylPDksv8yd5Y1luiwfc= 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 1688470051006865.5062877152243; Tue, 4 Jul 2023 04:27:31 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qGeAy-0001su-Ka; Tue, 04 Jul 2023 07:26:32 -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 1qGeAp-0001oQ-Vk for qemu-devel@nongnu.org; Tue, 04 Jul 2023 07:26:24 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qGeAk-0002Cy-H1 for qemu-devel@nongnu.org; Tue, 04 Jul 2023 07:26:23 -0400 Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-582-69kNRdwKOeOrDO7FmuLYUQ-1; Tue, 04 Jul 2023 07:26:16 -0400 Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-262d505f44cso5505182a91.1 for ; Tue, 04 Jul 2023 04:26:16 -0700 (PDT) Received: from localhost.localdomain ([115.96.131.170]) by smtp.googlemail.com with ESMTPSA id o7-20020a170902bcc700b001b8a897cd26sm780608pls.195.2023.07.04.04.26.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jul 2023 04:26:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688469977; h=from:from:reply-to:subject:subject: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=uCCjtwSbbFETTKSsmt5af6YgxkBnyGQ+Ywb1vZBrF3g=; b=i/s+xwz2cwtXpp4FuhFqv6u5zvAp4yL1gnWIDbX436yleeACHZg/J0zNiFQ1RZeyuZsYGh cZLsOCn/OSvQraAp0aQgZdIt4h+pD58acNiWR63A7br/EVRzQ/hlsSF1Bf6qIDNbqxa/39 dQMvy5AJyKKQnDi1ydsO77VcYT4mzAE= X-MC-Unique: 69kNRdwKOeOrDO7FmuLYUQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688469975; x=1691061975; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uCCjtwSbbFETTKSsmt5af6YgxkBnyGQ+Ywb1vZBrF3g=; b=er924zq13+ztXIoi1HYk0q9RFPgz6tww5qsQamKLVO0odu6Z+xqC3jJe2y2rksyUC+ oBBoERK9sGFeiMn8sOD+1EyeNPHCgPm6xBv9Uek+N8czZgLYLJ2TxpTiVdTM+2o9cPS5 MK5UeRdpmotcwH9p8vDiaUvhnWaVOH408f9Kw0vRTJT6mcCGKuudzS2bTWGvgHtnNCQG RjrYR4FUmAAs99LcJvvv6M4NJxa+NbGWdIi4cPQxklpQScVI0sOQ++dYNum58ae5MniB aFJHXgkkNSEOJCX+OU3JKBqLzD7K083TMdrM7hIPyLIqEBER596LuGFTK9+A4TEEw1gn KGLw== X-Gm-Message-State: ABy/qLb4gamlCjG0D7YAANpJX4zsKOaiQ7x8V+BVI21JABWT/NFU3t5b kPX1Y+dh5ONk91Qjiu3ZqUnuekOzsI28b0atsjIQcrCj+/SuM4ML2mCddVZQjzZ0rYE6zHVnxaB cfG/H4b9jf0pirNYX95qlTNpho8hU87VF4FxL843Pr4ZsfPVhuI2tjZKXeFvrCYEZWWrg4QBhaU Y= X-Received: by 2002:a05:6a20:9189:b0:12f:6a58:9b44 with SMTP id v9-20020a056a20918900b0012f6a589b44mr195884pzd.37.1688469975116; Tue, 04 Jul 2023 04:26:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlGwbLg9L1bHCacNvrPY9fswSKrYfX+180sEnOSfzlXX/Bhk5McQM9/gofU/sWNOWBZSLn0S8Q== X-Received: by 2002:a05:6a20:9189:b0:12f:6a58:9b44 with SMTP id v9-20020a056a20918900b0012f6a589b44mr195860pzd.37.1688469974729; Tue, 04 Jul 2023 04:26:14 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, Thomas Huth , Laurent Vivier , Paolo Bonzini Cc: Ani Sinha , mst@redhat.com, imammedo@redhat.com, Michael Labiuk Subject: [PATCH v7 4/6] tests/qtest/hd-geo-test: fix incorrect pcie-root-port usage and simplify test Date: Tue, 4 Jul 2023 16:55:53 +0530 Message-Id: <20230704112555.5629-5-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230704112555.5629-1-anisinha@redhat.com> References: <20230704112555.5629-1-anisinha@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=170.10.133.124; envelope-from=anisinha@redhat.com; helo=us-smtp-delivery-124.mimecast.com 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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 @redhat.com) X-ZM-MESSAGEID: 1688470052374100001 Content-Type: text/plain; charset="utf-8" The test attaches a SCSI controller to a non-zero slot and a pcie-to-pci br= idge on slot 0 on the same pcie-root-port. Since a downstream device can be atta= ched to a pcie-root-port only on slot 0, the above test configuration is not all= owed. Additionally using pcie.0 as id for pcie-to-pci bridge is incorrect as that= id is reserved only for the root bus. In the test scenario, there is no need to attach a pcie-root-port to the root complex. A SCSI controller can be attached to a pcie-to-pci bridge which can then be directly attached to the root bus (pcie.0). Fix the test and simplify it. CC: mst@redhat.com CC: imammedo@redhat.com CC: Michael Labiuk Acked-by: Thomas Huth Reviewed-by: Igor Mammedov Signed-off-by: Ani Sinha --- tests/qtest/hd-geo-test.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/tests/qtest/hd-geo-test.c b/tests/qtest/hd-geo-test.c index 5aa258a2b3..d08bffad91 100644 --- a/tests/qtest/hd-geo-test.c +++ b/tests/qtest/hd-geo-test.c @@ -784,14 +784,12 @@ static void test_override_scsi(void) test_override(args, "pc", expected); } =20 -static void setup_pci_bridge(TestArgs *args, const char *id, const char *r= ootid) +static void setup_pci_bridge(TestArgs *args, const char *id) { =20 - char *root, *br; - root =3D g_strdup_printf("-device pcie-root-port,id=3D%s", rootid); - br =3D g_strdup_printf("-device pcie-pci-bridge,bus=3D%s,id=3D%s", roo= tid, id); + char *br; + br =3D g_strdup_printf("-device pcie-pci-bridge,bus=3Dpcie.0,id=3D%s",= id); =20 - args->argc =3D append_arg(args->argc, args->argv, ARGV_SIZE, root); args->argc =3D append_arg(args->argc, args->argv, ARGV_SIZE, br); } =20 @@ -811,8 +809,8 @@ static void test_override_scsi_q35(void) add_drive_with_mbr(args, empty_mbr, 1); add_drive_with_mbr(args, empty_mbr, 1); add_drive_with_mbr(args, empty_mbr, 1); - setup_pci_bridge(args, "pcie.0", "br"); - add_scsi_controller(args, "lsi53c895a", "br", 3); + setup_pci_bridge(args, "pcie-pci-br"); + add_scsi_controller(args, "lsi53c895a", "pcie-pci-br", 3); add_scsi_disk(args, 0, 0, 0, 0, 0, 10000, 120, 30); add_scsi_disk(args, 1, 0, 0, 1, 0, 9000, 120, 30); add_scsi_disk(args, 2, 0, 0, 2, 0, 1, 0, 0); @@ -868,9 +866,9 @@ static void test_override_virtio_blk_q35(void) }; add_drive_with_mbr(args, empty_mbr, 1); add_drive_with_mbr(args, empty_mbr, 1); - setup_pci_bridge(args, "pcie.0", "br"); - add_virtio_disk(args, 0, "br", 3, 10000, 120, 30); - add_virtio_disk(args, 1, "br", 4, 9000, 120, 30); + setup_pci_bridge(args, "pcie-pci-br"); + add_virtio_disk(args, 0, "pcie-pci-br", 3, 10000, 120, 30); + add_virtio_disk(args, 1, "pcie-pci-br", 4, 9000, 120, 30); test_override(args, "q35", expected); } =20 --=20 2.39.1