From nobody Mon Feb 2 07:30:16 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1769179052; cv=none; d=zohomail.com; s=zohoarc; b=No/NXnTJB6FSTfnKI0yzk/GZ4g98XfzjqpIu+y6UJHcbyNRCH8I90cZkGal2xoAIUU/M7gA4kDGvf5akCL/uYBKmZrnQ/YiMzzO9oW33NXdof+7N6pmesjkC208TtC/8Y180Y3MyQjXhheHmt3O8bS6op2os0c9q3Z4g+eivh0A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769179052; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=QrODwZN08awBl4j+GOTPayr9EBQdEZBltos1TY2T2Ns=; b=j5WIBYDbEvSJ2XNKZvG8UQXrWNNRGIWALNQRbZp88IpMRsx8yBtsJx0gXG1gW6H4EoVMymHy1z7Z/65ThQjAolb4vLRscwk3fIc0Go9XMfTkXmqn126e+WaF6gN8c64NSJrTvytHVmBFgBNTUjQ4YuU2qx5IiOWlac+wpKBUrRk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1769179052902151.38246053421074; Fri, 23 Jan 2026 06:37:32 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 01DAD3F317; Fri, 23 Jan 2026 09:37:32 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 874C141A49; Fri, 23 Jan 2026 09:36:12 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 47DD4419A9; Fri, 23 Jan 2026 09:36:08 -0500 (EST) Received: from mail-dl1-f50.google.com (mail-dl1-f50.google.com [74.125.82.50]) (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 16F8241B74 for ; Fri, 23 Jan 2026 09:35:27 -0500 (EST) Received: by mail-dl1-f50.google.com with SMTP id a92af1059eb24-12336f33098so2287943c88.0 for ; Fri, 23 Jan 2026 06:35:27 -0800 (PST) Received: from fedora ([2804:14c:3b83:91fd::5b41]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1247d997f7bsm4944669c88.11.2026.01.23.06.35.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 06:35:25 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769178926; x=1769783726; darn=lists.libvirt.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QrODwZN08awBl4j+GOTPayr9EBQdEZBltos1TY2T2Ns=; b=C4N4VMokapUjfOioPDqb7i19ZMSC3RlagYjHtcO8kLSIToBc005LCIpV4JEI7NxAZT JNs+bPzXpQ92MPEKXqbiFy4IDihnuvn3n6UqzfdWwt7PSmqzxH+m7Bvo6bnZtaSgsnrD cM1tC8sbA/gzyE4NbaBFyiNOJTrQskfabTX9CExyLpAxOdxV5MooaYMHX80tdqHLiob4 jAGv3I9iEbGzuMvNh60v4dHMUnyXVdm6s9U+ctH6k7RFc4QozoqiSI+ArzZsKa01Ojjl yzYjI6JAiH6wPyu97+Ob4Jd8yuHZpV1f1HjKHXjaXE7pElwhjT+ZkbbnBXttzGBqAT8B 4gDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769178926; x=1769783726; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=QrODwZN08awBl4j+GOTPayr9EBQdEZBltos1TY2T2Ns=; b=rQc6sQwbE6h/9y6yi5Hn1us2p9bHof4zEODo5OWkZT6K3NcyhcNnyViantjZB8VseM sr4LimUi1jTnlaLTl9oWg2+cZy5B/xeLXqWzdZUhRE8XySRdUukj/D8oomawDO4BW8Mc 0FmhFgnliy/nKwturZoWu1ltEoXSbekYBcNvkhPCdQrx3CVxxtsbtfahFdHwkYEEKdRu KgbOxdGFp9OICIaxA/fufi+uyhvEQYW5v+Gghb9C+TOgVWRWKEUyARZQGZK4OTj38cNx HNw/RMRxo4XapvlY+kFfbgKe8bi/XztP3lCsMDotwZJOT4df5shSKydO3b5qFJ0YyE2J RgGw== X-Gm-Message-State: AOJu0YwM3Hd22cK4ivS5RjlgwiU1JXjewGN3I6m+d0cdKBMmpLy0i4Bn 0AQATS0EsIbfhrwzTgYOkJ9aBIEFnbiL1JY6azfOiEgRUZo4usGy1n5a/LH2HQ== X-Gm-Gg: AZuq6aJzOy94yaAyg/CmkIvOLtyq+EHThkvSVn+4ABcGbH0/n80/+SdZ94kXy97WBaW 3GFDBjgt1NPfgCnS6vKEgRG8rhnXoeqV0fWx05pGjbxOMcsduv1XJaXVdMOlM+NbMlLXge8FXSE u2AClzWZa7iuzWRZy8EBqM+foa8GDO9NQ1fzoyXJmL9lKcKG/BWU/+LrE2XY8fAgWu87rD6qiJK +0/IQ2YsAa82jNm/a2OACQF+2qosirrnbKzM0Rp5gmYpoTbo51X6d5Q1Jn0L5V5gpsppyRDVraQ XOTKMti0D71UZZUB5E58H7IWia9Ai+xXpa/HW07Lo8jQ0V/Add7bCTZ72cUqnESnLnbH1LMSEwn GVmB88bsXPirKJQAvddIe8IZm7WfeZg2BgabbCCKbCwXqwFqd78l0Op9RA74cMvo8RM5iSRhm/C 4oCcnVt6fr1QZVNjbURMYi0YzKqkcDWBc= X-Received: by 2002:a05:7022:f88:b0:11b:a8e3:847d with SMTP id a92af1059eb24-1247dba945bmr1367637c88.10.1769178925753; Fri, 23 Jan 2026 06:35:25 -0800 (PST) From: Julio Faracco To: devel@lists.libvirt.org Subject: [PATCH v3 2/2] tests: Add debug information in testFormat() Date: Fri, 23 Jan 2026 11:31:36 -0300 Message-ID: <20260123143507.68168-3-jcfaracco@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260123143507.68168-1-jcfaracco@gmail.com> References: <20260123143507.68168-1-jcfaracco@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: YYO4HVHNMVVNZHWA2CG2IVQIK5BZHUGK X-Message-ID-Hash: YYO4HVHNMVVNZHWA2CG2IVQIK5BZHUGK X-MailFrom: jcfaracco@gmail.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 CC: jtomko@redhat.com 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: X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1769179053819154100 Content-Type: text/plain; charset="utf-8" The testFormat() function should have debug information for the formatted address and what is expected. Since, virTestCompareToString() does not produce any extra debug info, VIR_TEST_DEBUG should be used in this test. Signed-off-by: Julio Faracco --- tests/sockettest.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/sockettest.c b/tests/sockettest.c index b26503a0d4..810a49364a 100644 --- a/tests/sockettest.c +++ b/tests/sockettest.c @@ -43,12 +43,18 @@ static int testParse(virSocketAddr *addr, const char *a= ddrstr, int family, bool static int testFormat(virSocketAddr *addr, const char *addrstr, bool pass) { g_autofree char *newaddrstr =3D NULL; + int rc; =20 newaddrstr =3D virSocketAddrFormat(addr); if (!newaddrstr) return pass ? -1 : 0; =20 - if (virTestCompareToString(newaddrstr, addrstr) < 0) { + rc =3D virTestCompareToString(newaddrstr, addrstr); + + VIR_TEST_DEBUG("Addresses %s and %s %s", newaddrstr, addrstr, + rc < 0 ? "doesn't match" : "matches"); + + if (rc < 0) { return pass ? -1 : 0; } else { return pass ? 0 : -1; --=20 2.52.0