From nobody Mon Sep 16 19:07:55 2024 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=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1721311737291233.17013056706753; Thu, 18 Jul 2024 07:08:57 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 33EE8A11; Thu, 18 Jul 2024 10:08:56 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id E6BF0A2D; Thu, 18 Jul 2024 10:08:20 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 41FED9F0; Thu, 18 Jul 2024 10:08:16 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id D00269F9 for ; Thu, 18 Jul 2024 10:08:15 -0400 (EDT) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-597-mHV_EgERO4-z_1Afy0J-9g-1; Thu, 18 Jul 2024 10:08:14 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0B9161954B30 for ; Thu, 18 Jul 2024 14:08:12 +0000 (UTC) Received: from maggie.brq.redhat.com (unknown [10.43.3.102]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 473C21955E80 for ; Thu, 18 Jul 2024 14:08:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: ** X-Spam-Status: No, score=2.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_SBL_CSS,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1721311695; 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: in-reply-to:in-reply-to:references:references; bh=Tr70wlWyZlvKjjrFhc/Zs7Pg71LXEGh143Zz3PpOVXM=; b=ieK/6uGAlikxtQADawRWS+fTf1FK87tGV4huREZp8+dNsUJNFgM4TtpYuuQgEbH2nNPvMk rI2Y1SxzpKn3XNuIw4P+iM4Bk8MGfzLOMtyTzSG26b/t6NChpACM5sJdbSvhhUrYwELk6q 10mmTLP4c3nLfKFglJOkTTzqwu2FBa8= X-MC-Unique: mHV_EgERO4-z_1Afy0J-9g-1 From: Michal Privoznik To: devel@lists.libvirt.org Subject: [PATCH 1/5] vircommand: Initialize dryRunStatus to portable EXIT_SUCCESS instead of 0 Date: Thu, 18 Jul 2024 16:08:03 +0200 Message-ID: <734f4fad0545bde5bc34fc676e6561d429cc7418.1721311651.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 67BWUVF7EGPZ66VFFGEDKV5BEG63OZOK X-Message-ID-Hash: 67BWUVF7EGPZ66VFFGEDKV5BEG63OZOK X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1721311737938116600 Content-Type: text/plain; charset="utf-8"; x-default="true" If dry run of a command was requested (virCommandSetDryRun()) then a specified callback is called instead of running actual command. This is meant to be used in tests. To mimic running the command as closely as possible the callback can also set exit status of the command it's implementing. To save some lines though, the exit status is initialized to 0 so that callback has to set it only on failures. Now, 0 is not exactly portable value - that's why stdlib.h has EXIT_SUCCESS (and EXIT_FAILURE) values. Initialize the exit status (held in dryRunStatus) to EXIT_SUCCESS then. Signed-off-by: Michal Privoznik Reviewed-by: Jiri Denemark --- src/util/vircommand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/vircommand.c b/src/util/vircommand.c index 07bee9b12e..a03fcc37ae 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -2630,7 +2630,7 @@ virCommandRunAsync(virCommand *cmd, pid_t *pid) =20 if (dryRunBuffer || dryRunCallback) { g_autofree char *cmdstr =3D NULL; - dryRunStatus =3D 0; + dryRunStatus =3D EXIT_SUCCESS; =20 if (!(cmdstr =3D virCommandToStringFull(cmd, dryRunBufferArgLinebr= eaks, dryRunBufferCommandStripPath= ))) --=20 2.44.2 From nobody Mon Sep 16 19:07:55 2024 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=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1721311757482653.5278032609313; Thu, 18 Jul 2024 07:09:17 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 32973B69; Thu, 18 Jul 2024 10:09:16 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id B872AA5A; Thu, 18 Jul 2024 10:08:23 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 38D27A02; Thu, 18 Jul 2024 10:08:17 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id C07379F0 for ; Thu, 18 Jul 2024 10:08:16 -0400 (EDT) Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-314-6zxBpBB8ONmvV7gJhwqyLA-1; Thu, 18 Jul 2024 10:08:13 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1F6DA1944A95 for ; Thu, 18 Jul 2024 14:08:13 +0000 (UTC) Received: from maggie.brq.redhat.com (unknown [10.43.3.102]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 64BE01955E80 for ; Thu, 18 Jul 2024 14:08:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: ** X-Spam-Status: No, score=2.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,RCVD_IN_SBL_CSS,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1721311696; 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: in-reply-to:in-reply-to:references:references; bh=SOrid9R6nLj5pyrcKWET7yPZqsjs9bIC/UGDF7+mX8Q=; b=MgHJDvUSjFkxU/EHxwl+oLRFU/q8CLvXYPh1PJTpoiXy1QK8ZJDy4/zCbSp5EFPfarkcWq VqS+u+XsLWrGeKXKtRMEMed92yhFT+O2ZorM+sB9WIHd0PFIXRVaOJk/PEvVwrWKGiyLaW fD4vDsmLQxlycIMopFELCt1+AHXM/As= X-MC-Unique: 6zxBpBB8ONmvV7gJhwqyLA-1 From: Michal Privoznik To: devel@lists.libvirt.org Subject: [PATCH 2/5] virsysinfo: Trim newline when decoding OEM strings Date: Thu, 18 Jul 2024 16:08:04 +0200 Message-ID: <48bfb520e29816fb55895afb9dfca04d14892ca1.1721311651.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: ZEYK47GVZTJL4457DFZF2AUOVV5ZHNH4 X-Message-ID-Hash: ZEYK47GVZTJL4457DFZF2AUOVV5ZHNH4 X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1721311757988116600 Content-Type: text/plain; charset="utf-8"; x-default="true" dmidecode always puts a newline character at the end of each OEM string it prints. It's the dmi_oem_strings() function [1] that iterates over strings and calls pr_attr() over each one which puts "\n" at the end, unconditionally [2[. Since it's not part of the string though, trim it. 1: https://git.savannah.nongnu.org/cgit/dmidecode.git/tree/dmidecode.c#n2431 2: https://git.savannah.nongnu.org/cgit/dmidecode.git/tree/dmioutput.c#n63 Signed-off-by: Michal Privoznik Reviewed-by: Jiri Denemark --- src/util/virsysinfo.c | 2 ++ tests/sysinfotest.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/virsysinfo.c b/src/util/virsysinfo.c index 0d9083c891..cdc2a7d87b 100644 --- a/src/util/virsysinfo.c +++ b/src/util/virsysinfo.c @@ -915,6 +915,8 @@ virSysinfoDMIDecodeOEMString(size_t i, if (err && *err !=3D '\0') return -1; =20 + virStringTrimOptionalNewline(*str); + return 0; } =20 diff --git a/tests/sysinfotest.c b/tests/sysinfotest.c index 287c40c6f9..09cfe6fa45 100644 --- a/tests/sysinfotest.c +++ b/tests/sysinfotest.c @@ -66,7 +66,7 @@ testDMIDecodeDryRun(const char *const*args G_GNUC_UNUSED, if (STREQ(args[3], "3")) { *output =3D g_strdup("Ha ha ha try parsing\\n\n" " String 3: this correctly\n" - " String 4:then"); + " String 4:then\n"); } else { *error =3D g_strdup_printf("No OEM string number %s", args[3]); *status =3D EXIT_FAILURE; --=20 2.44.2 From nobody Mon Sep 16 19:07:55 2024 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=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1721311819018851.8501090231932; Thu, 18 Jul 2024 07:10:19 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id E9436A0F; Thu, 18 Jul 2024 10:10:17 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id A62FEA0E; Thu, 18 Jul 2024 10:08:30 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 4A1EFABA; Thu, 18 Jul 2024 10:08:25 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 5C7C3A02 for ; Thu, 18 Jul 2024 10:08:18 -0400 (EDT) Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-633-S-Yin-4sPU2FHHmlB3q8Og-1; Thu, 18 Jul 2024 10:08:16 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 336FA1955D62 for ; Thu, 18 Jul 2024 14:08:14 +0000 (UTC) Received: from maggie.brq.redhat.com (unknown [10.43.3.102]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 78C6C1955E80 for ; Thu, 18 Jul 2024 14:08:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: ** X-Spam-Status: No, score=2.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_SBL_CSS,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1721311697; 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: in-reply-to:in-reply-to:references:references; bh=uy41mL6DCvJAfiOaQ+iXcZC5HK/Xm7WMuF23GmnPP/0=; b=RthAWMUEIrSwiWcLXSxjV5ifrvKNDTmds5kNBpJ9yGFkbquoUaZV28TQwfKR5KvrHJh7CQ EI+Imfmn4ROwfnSmVdRR8nk9+/x1QdrOb0mF//MNLQcTEyBVpFfQ9R3uOTO4PGcjVVg8GQ +Azg2zJJDT2gsYq8sDRdEApoC1dOa8E= X-MC-Unique: S-Yin-4sPU2FHHmlB3q8Og-1 From: Michal Privoznik To: devel@lists.libvirt.org Subject: [PATCH 3/5] tests: Add HPE Apollo test case to sysinfotest Date: Thu, 18 Jul 2024 16:08:05 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: JIGBACJOQ7URYCB7XVTRZNFUA6IMK7ZV X-Message-ID-Hash: JIGBACJOQ7URYCB7XVTRZNFUA6IMK7ZV X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1721311820374116600 Content-Type: text/plain; charset="utf-8"; x-default="true" Introduce a test case for sysinfotest. The data was obtained by running dmidecode as libvirt would run it: dmidecode -q -t 0,1,2,3,4,11,17 Now, the expected output fits almost perfectly, except for OEM strings where the third string looks nothing like in the dmidecode output. This is because of testDMIDecodeDryRun() which overwrites the third OEM string (see v6.5.0-rc1~214 for more info). But that's okay for now. Speaking of OEM strings, it's worth noticing two 'OEM Strings' sections in the dmidecode output. This is causing some troubles and will be fixed in next commit. Signed-off-by: Michal Privoznik Reviewed-by: Jiri Denemark --- .../aarch64-hpe-apollosysinfo.data | 162 ++++++++++++++++++ .../aarch64-hpe-apollosysinfo.expect | 90 ++++++++++ tests/sysinfotest.c | 1 + 3 files changed, 253 insertions(+) create mode 100644 tests/sysinfodata/aarch64-hpe-apollosysinfo.data create mode 100644 tests/sysinfodata/aarch64-hpe-apollosysinfo.expect diff --git a/tests/sysinfodata/aarch64-hpe-apollosysinfo.data b/tests/sysin= fodata/aarch64-hpe-apollosysinfo.data new file mode 100644 index 0000000000..769373f2ce --- /dev/null +++ b/tests/sysinfodata/aarch64-hpe-apollosysinfo.data @@ -0,0 +1,162 @@ +BIOS Information + Vendor: EDK II + Version: L50_5.13_1.11 + Release Date: 06/18/2019 + Address: 0xF0000 + Runtime Size: 64 kB + ROM Size: 64 MB + Characteristics: + PCI is supported + BIOS is upgradeable + BIOS shadowing is allowed + Boot from CD is supported + Selectable boot is supported + BIOS ROM is socketed + ACPI is supported + BIOS boot specification is supported + Targeted content distribution is supported + UEFI is supported + BIOS Revision: 7.2 + +System Information + Manufacturer: HPE + Product Name: Apollo 70 =20 + Version: X1 + Serial Number: 0000000000 + UUID: 69d9c240-bfde-1000-03ca-ea3db8730904 + Wake-up Type: Power Switch + SKU Number: P00367-B21 + Family: CN99XX + +Base Board Information + Manufacturer: HPE + Product Name: C01_APACHE_MB =20 + Version: 876453-001 + Serial Number: PWJBD0AR9BI016 + Asset Tag: PWJBD0AR9BI016 + Features: + Board is a hosting board + Board is replaceable + Location In Chassis: Default string + Type: Motherboard + +Chassis Information + Manufacturer: HPE + Type: Rack Mount Chassis + Lock: Not Present + Version: P00367-B21 + Serial Number: 0000000000 + Asset Tag: 0000000000 + Boot-up State: Safe + Power Supply State: Safe + Thermal State: Safe + Security Status: None + OEM Information: 0x00000000 + Height: Unspecified + Number Of Power Cords: 1 + Contained Elements: 0 + SKU Number: Default string + +OEM Strings + String 1: Default string + +OEM Strings + String 1: ThunderX2 System + String 2: cavium.com + String 3: Comanche + +Processor Information + Socket Designation: Socket 0 + Type: Central Processor + Family: ARM + Manufacturer: Cavium Inc. + Signature: Implementor 0x43, Variant 0x1, Architecture 15, Part 0x0af, Re= vision 1 + Version: Cavium ThunderX2(R) CPU CN9975 v2.1 @ 2.0GHz + Voltage: 0.8 V + External Clock: 33 MHz + Max Speed: 2500 MHz + Current Speed: 2000 MHz + Status: Populated, Enabled + Upgrade: Other + Serial Number: 0000115D-1AEA3248 + Asset Tag: Not Specified + Part Number: CN9975-2000LG4077-Y21-G + Core Count: 28 + Core Enabled: 28 + Thread Count: 112 + Characteristics: + 64-bit capable + Multi-Core + Hardware Thread + Execute Protection + Enhanced Virtualization + Power/Performance Control + +Memory Device + Total Width: 72 bits + Data Width: 64 bits + Size: 16 GB + Form Factor: DIMM + Set: None + Locator: DIMM_A0 + Bank Locator: N0 + Type: DDR4 + Type Detail: Registered (Buffered) + Speed: 2666 MT/s + Manufacturer: Hyundai Electronics + Serial Number: 1112731123 + Asset Tag: Not Specified + Part Number: HMA82GR7CJR8N-VK =20 + Rank: 2 + Configured Memory Speed: 2666 MT/s + Minimum Voltage: 1.2 V + Maximum Voltage: 1.2 V + Configured Voltage: 1.2 V + +Processor Information + Socket Designation: Socket 1 + Type: Central Processor + Family: ARM + Manufacturer: Cavium Inc. + Signature: Implementor 0x43, Variant 0x1, Architecture 15, Part 0x0af, Re= vision 1 + Version: Cavium ThunderX2(R) CPU CN9975 v2.1 @ 2.0GHz + Voltage: 0.8 V + External Clock: 33 MHz + Max Speed: 2500 MHz + Current Speed: 2000 MHz + Status: Populated, Enabled + Upgrade: Other + Serial Number: 0000115D-2AEA322B + Asset Tag: Not Specified + Part Number: CN9975-2000LG4077-Y21-G + Core Count: 28 + Core Enabled: 28 + Thread Count: 112 + Characteristics: + 64-bit capable + Multi-Core + Hardware Thread + Execute Protection + Enhanced Virtualization + Power/Performance Control + +Memory Device + Total Width: 72 bits + Data Width: 64 bits + Size: 16 GB + Form Factor: DIMM + Set: None + Locator: DIMM_I0 + Bank Locator: N1 + Type: DDR4 + Type Detail: Registered (Buffered) + Speed: 2666 MT/s + Manufacturer: Hyundai Electronics + Serial Number: 1112731032 + Asset Tag: Not Specified + Part Number: HMA82GR7CJR8N-VK =20 + Rank: 2 + Configured Memory Speed: 2666 MT/s + Minimum Voltage: 1.2 V + Maximum Voltage: 1.2 V + Configured Voltage: 1.2 V diff --git a/tests/sysinfodata/aarch64-hpe-apollosysinfo.expect b/tests/sys= infodata/aarch64-hpe-apollosysinfo.expect new file mode 100644 index 0000000000..331454834d --- /dev/null +++ b/tests/sysinfodata/aarch64-hpe-apollosysinfo.expect @@ -0,0 +1,90 @@ + + + EDK II + L50_5.13_1.11 + 06/18/2019 + 7.2 + + + HPE + Apollo 70 + X1 + 0000000000 + 69d9c240-bfde-1000-03ca-ea3db8730904 + P00367-B21 + CN99XX + + + HPE + C01_APACHE_MB + 876453-001 + PWJBD0AR9BI016 + PWJBD0AR9BI016 + Default string + + + HPE + P00367-B21 + 0000000000 + 0000000000 + Default string + + + Socket 0 + Central Processor + ARM + Cavium Inc. + Implementor 0x43, Variant 0x1, Architecture = 15, Part 0x0af, Revision 1 + Cavium ThunderX2(R) CPU CN9975 v2.1 @ 2.0GHz + 33 MHz + 2500 MHz + Populated, Enabled + 0000115D-1AEA3248 + CN9975-2000LG4077-Y21-G + + + Socket 1 + Central Processor + ARM + Cavium Inc. + Implementor 0x43, Variant 0x1, Architecture = 15, Part 0x0af, Revision 1 + Cavium ThunderX2(R) CPU CN9975 v2.1 @ 2.0GHz + 33 MHz + 2500 MHz + Populated, Enabled + 0000115D-2AEA322B + CN9975-2000LG4077-Y21-G + + + 16 GB + DIMM + DIMM_A0 + N0 + DDR4 + Registered (Buffered) + 2666 MT/s + Hyundai Electronics + 1112731123 + HMA82GR7CJR8N-VK + + + 16 GB + DIMM + DIMM_I0 + N1 + DDR4 + Registered (Buffered) + 2666 MT/s + Hyundai Electronics + 1112731032 + HMA82GR7CJR8N-VK + + + Default string + ThunderX2 System + Ha ha ha try parsing\n + String 3: this correctly + String 4:then + Comanche + + diff --git a/tests/sysinfotest.c b/tests/sysinfotest.c index 09cfe6fa45..d8bd1f38ba 100644 --- a/tests/sysinfotest.c +++ b/tests/sysinfotest.c @@ -141,6 +141,7 @@ mymain(void) TEST("aarch64", virSysinfoReadARM); TEST("aarch64-moonshot", virSysinfoReadARM); TEST("aarch64-gigabyte", virSysinfoReadARM); + TEST("aarch64-hpe-apollo", virSysinfoReadARM); =20 return ret; } --=20 2.44.2 From nobody Mon Sep 16 19:07:55 2024 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=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1721311785858952.7526886933414; Thu, 18 Jul 2024 07:09:45 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id CA84AA24; Thu, 18 Jul 2024 10:09:44 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id BAFD9C94; Thu, 18 Jul 2024 10:08:27 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id B8E42C64; Thu, 18 Jul 2024 10:08:23 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 07CD5A00 for ; Thu, 18 Jul 2024 10:08:17 -0400 (EDT) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-635-nwF8nhejMxG-Mzhe_B4hIw-1; Thu, 18 Jul 2024 10:08:16 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 489C51954205 for ; Thu, 18 Jul 2024 14:08:15 +0000 (UTC) Received: from maggie.brq.redhat.com (unknown [10.43.3.102]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8CD5D1955E89 for ; Thu, 18 Jul 2024 14:08:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: ** X-Spam-Status: No, score=2.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_SBL_CSS,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1721311697; 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: in-reply-to:in-reply-to:references:references; bh=RFCiJ3e4mjojE9oy8SqTFN0IxcnLjXkucnrt5aYBDto=; b=JtrOYY8EbFm4koX+yXRAZc8JMSt5MYI/G29v/NxkT4pYI8wCFlAhorz+mENJA9UzcqvhoK QWSyiYwg9EJdq4sRXKLORuzoZ2MhaHEau5C87M8cN1uF36XfYC8Mr2251Sdi/eQzodynIE YITR1apV1YKjunBgdI5/blJ/xfgzYug= X-MC-Unique: nwF8nhejMxG-Mzhe_B4hIw-1 From: Michal Privoznik To: devel@lists.libvirt.org Subject: [PATCH 4/5] virsysinfo: Be more forgiving when decoding OEM strings Date: Thu, 18 Jul 2024 16:08:06 +0200 Message-ID: <83608742292a2d914061e58ef3d0b88e9332bc10.1721311651.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: WZEQGK4JNLLEVM6IQY26VEGBM7YRJ52Q X-Message-ID-Hash: WZEQGK4JNLLEVM6IQY26VEGBM7YRJ52Q X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1721311786136116600 Content-Type: text/plain; charset="utf-8"; x-default="true" On some systems, there are two or even more 'OEM Strings' sections in DMI table. Here's an example of dmidecode output on such system: # dmidecode -q -t 11 OEM Strings String 1: Default string OEM Strings String 1: ThunderX2 System String 2: cavium.com String 3: Comanche Now, this poses a problem, because when one tries to obtain individual strings, they get: # dmidecode -q --oem-string 1 Default string ThunderX2 System # dmidecode -q --oem-string 2 No OEM string number 2 cavium.com NB, the "No OEM string number 2" is printed onto stderr and everything else onto stdout. Oh, and trying to get OEM strings from just one section doesn't fly: # dmidecode -q -H 0x1d --oem-string 2 Options --string, --type, --handle and --dump-bin are mutually exclusive This means two things: 1) we have no way of distinguishing OEM strings at the same index but in different sections, 2) because of how virSysinfoDMIDecodeOEMString() is written, we fail in querying OEM string that exists in one section but not in the others (for instance string #2 from example above). While there's not much we can do about 1), there is something that can be done about 2) - refine the error condition and make the function return an error iff there's nothing on stdout and there's something on stderr. Resolves: https://issues.redhat.com/browse/RHEL-45952 Signed-off-by: Michal Privoznik Reviewed-by: Jiri Denemark --- src/util/virsysinfo.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/util/virsysinfo.c b/src/util/virsysinfo.c index cdc2a7d87b..1fd8261dc1 100644 --- a/src/util/virsysinfo.c +++ b/src/util/virsysinfo.c @@ -910,9 +910,20 @@ virSysinfoDMIDecodeOEMString(size_t i, =20 /* Unfortunately, dmidecode returns 0 even if OEM String index is out * of bounds, but it prints an error message in that case. Check stderr - * and return success/failure accordingly. */ + * and return success/failure accordingly. + * To make matters worse, if there are two or more 'OEM String' + * sections then: + * + * a) we have no way of distinguishing them as dmidecode prints + * strings from all sections, + * b) if one section contains a valid string, but the other doesn't, + * then stdout contains the valid string and stderr contains the + * error "No OEM string number X*. + * + * Let's just hope there is not many systems like that. + */ =20 - if (err && *err !=3D '\0') + if (!(*str && **str !=3D '\0') && err && *err !=3D '\0') return -1; =20 virStringTrimOptionalNewline(*str); --=20 2.44.2 From nobody Mon Sep 16 19:07:55 2024 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=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1721311842282688.1451403380272; Thu, 18 Jul 2024 07:10:42 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 2C85C9BC; Thu, 18 Jul 2024 10:10:41 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 60D4DCAD; Thu, 18 Jul 2024 10:08:32 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 29E9EA66; Thu, 18 Jul 2024 10:08:26 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id DC033A09 for ; Thu, 18 Jul 2024 10:08:18 -0400 (EDT) Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-607-mdjYjksONaanPdo7ax2ZLQ-1; Thu, 18 Jul 2024 10:08:17 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7790F1955D54 for ; Thu, 18 Jul 2024 14:08:16 +0000 (UTC) Received: from maggie.brq.redhat.com (unknown [10.43.3.102]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A0A931955E80 for ; Thu, 18 Jul 2024 14:08:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: ** X-Spam-Status: No, score=2.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_SBL_CSS,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1721311698; 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: in-reply-to:in-reply-to:references:references; bh=pa6TtVNwRQmG6gk3evTm7dcUxLt3Tz1GKDFqAbbaxXM=; b=RbOGVLquRT5rrmvvjO5c2+sIpSvL1qqxf9SVaI8Mn+dSyZZONAtYxwLFBLh9QIHWmQw4oL 2rXUEA0HPa+NqfM+dyXZ63UQZ64X+rareGiGWETnHQoPQpqD5uC01WMXLUBH0ByR5O0VRN cctfiPa8mm5Th/CbtivM4mPuBNFwE3I= X-MC-Unique: mdjYjksONaanPdo7ax2ZLQ-1 From: Michal Privoznik To: devel@lists.libvirt.org Subject: [PATCH 5/5] virsysinfo: Calculate OEM string index better Date: Thu, 18 Jul 2024 16:08:07 +0200 Message-ID: <434af362b6e511dca9d4a9ccb7aca12c1a0c0b9c.1721311651.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: MOGOFQZ7LHNN7BUJXJFYC7RHPUU2MXHQ X-Message-ID-Hash: MOGOFQZ7LHNN7BUJXJFYC7RHPUU2MXHQ X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1721311844462116600 Content-Type: text/plain; charset="utf-8"; x-default="true" As can be seen in earlier commits, there can be two OEM strings with the same index. But since our parser (virSysinfoParseOEMStrings()) doesn't expect that, it increments index in each run and thus skips over these strings. Fortunately, we have the right index at hand - we're just skipping over it in a loop. Just reconstruct the index back inside the loop. Signed-off-by: Michal Privoznik Reviewed-by: Jiri Denemark --- src/util/virsysinfo.c | 19 ++++++++++++------- .../aarch64-hpe-apollosysinfo.expect | 4 +--- tests/sysinfotest.c | 6 +++++- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/util/virsysinfo.c b/src/util/virsysinfo.c index 1fd8261dc1..8823af0469 100644 --- a/src/util/virsysinfo.c +++ b/src/util/virsysinfo.c @@ -895,13 +895,13 @@ virSysinfoParseX86Chassis(const char *base, =20 =20 static int -virSysinfoDMIDecodeOEMString(size_t i, +virSysinfoDMIDecodeOEMString(unsigned int idx, char **str) { g_autofree char *err =3D NULL; g_autoptr(virCommand) cmd =3D virCommandNewArgList(DMIDECODE, "--dump", "--oem-string", NULL); - virCommandAddArgFormat(cmd, "%zu", i); + virCommandAddArgFormat(cmd, "%u", idx); virCommandSetOutputBuffer(cmd, str); virCommandSetErrorBuffer(cmd, &err); =20 @@ -937,7 +937,6 @@ virSysinfoParseOEMStrings(const char *base, virSysinfoOEMStringsDef **stringsRet) { virSysinfoOEMStringsDef *strings =3D NULL; - size_t i =3D 1; int ret =3D -1; const char *cur; =20 @@ -947,6 +946,8 @@ virSysinfoParseOEMStrings(const char *base, strings =3D g_new0(virSysinfoOEMStringsDef, 1); =20 while ((cur =3D strstr(cur, "String "))) { + char *collon =3D NULL; + unsigned int idx =3D 0; char *eol; =20 cur +=3D 7; @@ -957,8 +958,13 @@ virSysinfoParseOEMStrings(const char *base, goto cleanup; } =20 - while (g_ascii_isdigit(*cur)) - cur++; + if (virStrToLong_ui(cur, &collon, 10, &idx) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("Malformed output of dmidecode")); + goto cleanup; + } + + cur =3D collon; =20 if (*cur !=3D ':') { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", @@ -981,7 +987,7 @@ virSysinfoParseOEMStrings(const char *base, if (memchr(cur, '.', eol - cur)) { char *str; =20 - if (virSysinfoDMIDecodeOEMString(i, &str) < 0) + if (virSysinfoDMIDecodeOEMString(idx, &str) < 0) goto cleanup; =20 strings->values[strings->nvalues - 1] =3D g_steal_pointer(&str= ); @@ -989,7 +995,6 @@ virSysinfoParseOEMStrings(const char *base, strings->values[strings->nvalues - 1] =3D g_strndup(cur, eol -= cur); } =20 - i++; cur =3D eol; } =20 diff --git a/tests/sysinfodata/aarch64-hpe-apollosysinfo.expect b/tests/sys= infodata/aarch64-hpe-apollosysinfo.expect index 331454834d..2b886f74fd 100644 --- a/tests/sysinfodata/aarch64-hpe-apollosysinfo.expect +++ b/tests/sysinfodata/aarch64-hpe-apollosysinfo.expect @@ -82,9 +82,7 @@ Default string ThunderX2 System - Ha ha ha try parsing\n - String 3: this correctly - String 4:then + Some valid OEM string Comanche diff --git a/tests/sysinfotest.c b/tests/sysinfotest.c index d8bd1f38ba..b666847379 100644 --- a/tests/sysinfotest.c +++ b/tests/sysinfotest.c @@ -63,7 +63,11 @@ testDMIDecodeDryRun(const char *const*args G_GNUC_UNUSED, return; } =20 - if (STREQ(args[3], "3")) { + if (STREQ(args[3], "2")) { + *output =3D g_strdup("Some valid OEM string\n"); + *error =3D g_strdup_printf("No OEM string number %s", args[3]); + return; + } else if (STREQ(args[3], "3")) { *output =3D g_strdup("Ha ha ha try parsing\\n\n" " String 3: this correctly\n" " String 4:then\n"); --=20 2.44.2