From nobody Mon Feb 9 12:24:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1698253652; cv=none; d=zohomail.com; s=zohoarc; b=BI86fjzi+xE2qOODE4YQaFmQRnPg/bvqfjOcDyxdjvaRqhHt8ZbSAKtl/BuObnZKx+ifTvGRW5XeNFRubY0INSBbdftMWLIRob7u6opQDFmFnWkuqy5OW/ir2D8oyMv6wRO1pncQawzJ5S+pYu66oxIxdHrMAUvf24BrFM7F80M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698253652; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=eCJre7ZTTPZwLjEgRuGDm+u7U17mzFaCSgHcT+5UFuw=; b=QuTWbr4Lb6X5lv4E2SJrKgNsOjPc/JkaqQOy0XsiNfqM2Rh5cbGrnaJLIZ9brEEh0J3D5SFEhzpk9cKgo5EQsIWV5qLlQUg23JxmDDfiDdUsIrsT7feGGl/SexgjQ75S0vfV6vIfwV12Y2EV6VAeNs0jL8rWDyD1RmY8IXs+k0k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1698253652819842.2599765431912; Wed, 25 Oct 2023 10:07:32 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-180-RFrlBzZvPkSvu3c3iP8w1Q-1; Wed, 25 Oct 2023 13:07:12 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8324984B11C; Wed, 25 Oct 2023 17:07:09 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6EC57492BE8; Wed, 25 Oct 2023 17:07:09 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 31D3519465A3; Wed, 25 Oct 2023 17:07:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 1A496194658C for ; Wed, 25 Oct 2023 17:07:08 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 011F0492BE7; Wed, 25 Oct 2023 17:07:08 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.224.90]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 01819492BE8 for ; Wed, 25 Oct 2023 17:07:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698253651; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=eCJre7ZTTPZwLjEgRuGDm+u7U17mzFaCSgHcT+5UFuw=; b=Y7ydhVB+HmhGscuoQhRN/HPwqdLoHtKH1pomwN3mbWTObHS6c88cIcVUfKfJMkChNJ/9tg SLbzrHzz+q9ykmXo5UxkBZKct2ksZbc6k5WJ2e4W5VaIAq4O8y2HPg3oFZMKxk9QNJxU6O xAcX3XT/8CL//N02KYRjWaXA+A1f8SM= X-MC-Unique: RFrlBzZvPkSvu3c3iP8w1Q-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 1/8] tests: Fix some test cases on macOS Date: Wed, 25 Oct 2023 19:06:54 +0200 Message-ID: <20231025170701.239137-2-abologna@redhat.com> In-Reply-To: <20231025170701.239137-1-abologna@redhat.com> References: <20231025170701.239137-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1698253653418100011 Content-Type: text/plain; charset="utf-8"; x-default="true" Test cases that depend on duplicating fds are using fairly big values as targets. This works fine on Linux, where RLIMIT_NOFILE is 1024 by default, but fails on macOS which uses 256 as the default. Decrease the values so that they're valid across all platforms. Signed-off-by: Andrea Bolognani --- .../qemuxml2argvdata/disk-source-fd.x86_64-latest.args | 10 +++++----- .../qemuxml2argvdata/disk-vhostvdpa.x86_64-latest.args | 2 +- tests/qemuxml2argvtest.c | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/qemuxml2argvdata/disk-source-fd.x86_64-latest.args b/tes= ts/qemuxml2argvdata/disk-source-fd.x86_64-latest.args index 9d8109a8f4..1341b7d032 100644 --- a/tests/qemuxml2argvdata/disk-source-fd.x86_64-latest.args +++ b/tests/qemuxml2argvdata/disk-source-fd.x86_64-latest.args @@ -27,18 +27,18 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUG= uest1/.config \ -no-shutdown \ -boot strict=3Don \ -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0= x2"}' \ --add-fd set=3D2,fd=3D700,opaque=3Dlibvirt-4-storage0 \ --add-fd set=3D2,fd=3D705,opaque=3Dlibvirt-4-storage1 \ +-add-fd set=3D2,fd=3D200,opaque=3Dlibvirt-4-storage0 \ +-add-fd set=3D2,fd=3D205,opaque=3Dlibvirt-4-storage1 \ -blockdev '{"driver":"file","filename":"/dev/fdset/2","node-name":"libvirt= -4-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"node-name":"libvirt-4-format","read-only":false,"driver":"qco= w2","file":"libvirt-4-storage"}' \ -device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x2","drive":"li= bvirt-4-format","id":"virtio-disk4","bootindex":1}' \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/rhel7.1484= 071876","node-name":"libvirt-3-storage","auto-read-only":true,"discard":"un= map"}' \ -blockdev '{"node-name":"libvirt-3-format","read-only":true,"driver":"qcow= 2","file":"libvirt-3-storage","backing":null}' \ --add-fd set=3D1,fd=3D777,opaque=3Dlibvirt-2-storage0 \ --add-fd set=3D1,fd=3D778,opaque=3Dlibvirt-2-storage1 \ +-add-fd set=3D1,fd=3D247,opaque=3Dlibvirt-2-storage0 \ +-add-fd set=3D1,fd=3D248,opaque=3Dlibvirt-2-storage1 \ -blockdev '{"driver":"file","filename":"/dev/fdset/1","node-name":"libvirt= -2-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"node-name":"libvirt-2-format","read-only":true,"driver":"qcow= 2","file":"libvirt-2-storage","backing":"libvirt-3-format"}' \ --add-fd set=3D0,fd=3D704,opaque=3Dlibvirt-1-storage0 \ +-add-fd set=3D0,fd=3D204,opaque=3Dlibvirt-1-storage0 \ -blockdev '{"driver":"file","filename":"/dev/fdset/0","node-name":"libvirt= -1-storage","read-only":false,"discard":"unmap"}' \ -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qco= w2","file":"libvirt-1-storage","backing":"libvirt-2-format"}' \ -device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x3","drive":"li= bvirt-1-format","id":"virtio-disk5"}' \ diff --git a/tests/qemuxml2argvdata/disk-vhostvdpa.x86_64-latest.args b/tes= ts/qemuxml2argvdata/disk-vhostvdpa.x86_64-latest.args index b987455ee4..27035184ad 100644 --- a/tests/qemuxml2argvdata/disk-vhostvdpa.x86_64-latest.args +++ b/tests/qemuxml2argvdata/disk-vhostvdpa.x86_64-latest.args @@ -27,7 +27,7 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGue= st1/.config \ -no-shutdown \ -boot strict=3Don \ -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0= x2"}' \ --add-fd set=3D0,fd=3D801,opaque=3Dlibvirt-1-storage-vdpa \ +-add-fd set=3D0,fd=3D201,opaque=3Dlibvirt-1-storage-vdpa \ -blockdev '{"driver":"virtio-blk-vhost-vdpa","path":"/dev/fdset/0","node-n= ame":"libvirt-1-storage","cache":{"direct":true,"no-flush":false},"auto-rea= d-only":true,"discard":"unmap"}' \ -blockdev '{"node-name":"libvirt-1-format","read-only":false,"cache":{"dir= ect":true,"no-flush":false},"driver":"raw","file":"libvirt-1-storage"}' \ -device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x2","drive":"li= bvirt-1-format","id":"virtio-disk0","bootindex":1,"write-cache":"on"}' \ diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 48058cb924..4fda68a4ce 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1186,7 +1186,7 @@ mymain(void) DO_TEST_CAPS_LATEST("disk-vhostuser-numa"); DO_TEST_CAPS_LATEST("disk-vhostuser"); DO_TEST_CAPS_ARCH_LATEST_FULL("disk-vhostvdpa", "x86_64", - ARG_VDPA_FD, "/dev/vhost-vdpa-0", 801); + ARG_VDPA_FD, "/dev/vhost-vdpa-0", 201); DO_TEST_CAPS_LATEST_PARSE_ERROR("disk-device-lun-type-invalid"); DO_TEST_CAPS_LATEST_PARSE_ERROR("disk-attaching-partition-nosupport"); DO_TEST_CAPS_LATEST("disk-usb-device"); @@ -1226,9 +1226,9 @@ mymain(void) DO_TEST_CAPS_LATEST("disk-backing-chains-index"); DO_TEST_CAPS_LATEST("disk-backing-chains-noindex"); DO_TEST_CAPS_ARCH_LATEST_FULL("disk-source-fd", "x86_64", - ARG_FD_GROUP, "testgroup2", 2, 700, 705, - ARG_FD_GROUP, "testgroup5", 1, 704, - ARG_FD_GROUP, "testgroup6", 2, 777, 778); + ARG_FD_GROUP, "testgroup2", 2, 200, 205, + ARG_FD_GROUP, "testgroup5", 1, 204, + ARG_FD_GROUP, "testgroup6", 2, 247, 248); =20 DO_TEST_CAPS_LATEST("disk-slices"); DO_TEST_CAPS_LATEST("disk-rotation"); --=20 2.41.0