From nobody Tue Jun 9 21:16:24 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) client-ip=38.145.34.151; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1778573078; cv=none; d=zohomail.com; s=zohoarc; b=gvqMtewyTCP9hoUJNaykCzKpLgITooOs3hf5iEv7b543c3RDW2giZoLHpTq+Opt6Z5GRQyHwzXnw4gndpOqLi737EIpxMk3CT5J2XEz2GKXF74rmv7wo26UwA444dkZePNbw86fnPWE4sAMtQpmwCqHoQ1frC6oB5ndcLv+wChc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778573078; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:Subject:Subject:To:To:Message-Id:Cc; bh=6eLcsYKfHZK9T2E6fkzj8If4i+76oBYX46MSK3NyNeE=; b=iSUN/mkqApmp4GtmLc3TEpRO4A0ffNsVmiSQKsq5J7WjTnd8VK6uNXOjHjB6tCxQSOVNE9fK7wuQkxLphexNTIpQGc+kCbkD/KXM1BRxkKW0kGKokYZPlIqap4P4NhvwJ3klKYcQWpphqhMCYWQEBmunFLSuq3rhDlBOleOybqc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [38.145.34.151]) by mx.zohomail.com with SMTPS id 1778573078359377.3516536317202; Tue, 12 May 2026 01:04:38 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 26E34418E9; Tue, 12 May 2026 04:04:36 -0400 (EDT) Received: from [172.19.199.9] (unknown [10.16.107.18]) by lists.libvirt.org (Postfix) with ESMTP id D4B7341A0C; Tue, 12 May 2026 04:03:46 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 26718417E9; Tue, 12 May 2026 04:03:39 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 018054186E for ; Tue, 12 May 2026 04:03:36 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-252-DqQSAYSvMnuh_IyLLVgilg-1; Tue, 12 May 2026 04:03:34 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D3CB318005B3 for ; Tue, 12 May 2026 08:03:33 +0000 (UTC) Received: from speedmetal.openshiftapps.com (unknown [10.44.22.8]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 07FF830001BE for ; Tue, 12 May 2026 08:03:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778573016; h=from:from: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; bh=6eLcsYKfHZK9T2E6fkzj8If4i+76oBYX46MSK3NyNeE=; b=ZWBuph77DcBvXerNMbLZsjLq+OinJE+EDP5DvWJNY1VYo9gQnpIR+j8lMouFMlqUSLwS+s RQtK7RJIWT2NebR/ext3rITPQvN5y1pPUM6qGOqp9qPDETuU1kAze5QLtQF854bRgnSz8x 7JJYtf1TUbIVEFX6qQaWGcMqFAk/tiI= X-MC-Unique: DqQSAYSvMnuh_IyLLVgilg-1 X-Mimecast-MFC-AGG-ID: DqQSAYSvMnuh_IyLLVgilg_1778573014 To: devel@lists.libvirt.org Subject: [PATCH] test: qemu: Fix error message when populating fd groups Date: Tue, 12 May 2026 10:03:31 +0200 Message-ID: <152b07e766161a0daa32f7a9f6afb8c30f4684eb.1778573011.git.pkrempa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: ZnhJL7Y7JDu2uVq-p7dWbhQE2742SHXoDIV7HZNmyUk_1778573014 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: R7VV6PRTIKW7SNVMW66W6VHM7IVOPERK X-Message-ID-Hash: R7VV6PRTIKW7SNVMW66W6VHM7IVOPERK X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1778573079867158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa The 'new->fds' array is not yet initialized at the point where the check if the FD is occupied happens so the error would always report that FD '0' is in use. Use 'new->testfds' instead. Signed-off-by: Peter Krempa Reviewed-by: Pavel Hrdina --- tests/testutilsqemu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index e9bdbdbbe7..e7a61d0c6f 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -727,7 +727,7 @@ testQemuInfoSetArgs(testQemuInfo *info, new->testfds[i] =3D va_arg(argptr, unsigned int); if (fcntl(new->testfds[i], F_GETFD) !=3D -1) { - fprintf(stderr, "fd '%d' is already in use\n", new->fd= s[i]); + fprintf(stderr, "fd '%d' is already in use\n", new->te= stfds[i]); abort(); } --=20 2.54.0