From nobody Fri May 17 22:29:09 2024 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=1671702551; cv=none; d=zohomail.com; s=zohoarc; b=WvZg0Glz8kJjqzB9oMUKdQo8CQKaqQXX1C/rjzMPQjk5qmaavGXbpBO+yH0OucWXh696wtzXJjQy3AcU5bER6HYNGj5RFpKUk9zu5BTFLNcmuPhSWVcwbZ1eqFtYF/xQkxaCIc5DS5yrDZfnsX7TUjXwi3EzyzRgO7R45E5ABzc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1671702551; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=rPC7W00mboX6XHmJoAbbaqUlfivO9c36D9cEF2HPdIg=; b=YNE06GoJpdp/mlUeM2zNPbGIwkUVO2jiAcBuUaDIEBAohvIRMvrEOKDJD1ifmVV1nIxJH8C4Qyo3aTKKCGZ7M/iWT41wl0OizNxo29e0n3B+yCqbXcrXdBSp1Er5M6Hd2N/TZ/SxKpvkl0AefzmdGY6oNcUiNOdX6iAwi8bnWAs= 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 167170255112035.53591587569997; Thu, 22 Dec 2022 01:49:11 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-290-aMmSHHakNoKQ2kuQwvgH0A-1; Thu, 22 Dec 2022 04:49:06 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CA4FC877CA2; Thu, 22 Dec 2022 09:49:04 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id B4040C1602C; Thu, 22 Dec 2022 09:49:04 +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 8C0E919465B1; Thu, 22 Dec 2022 09:49:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id B379A19465A8 for ; Thu, 22 Dec 2022 09:49:02 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id A18CB492B02; Thu, 22 Dec 2022 09:49:02 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 49566492B00 for ; Thu, 22 Dec 2022 09:49:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671702550; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=rPC7W00mboX6XHmJoAbbaqUlfivO9c36D9cEF2HPdIg=; b=FtZ22TdmWs2DiBikeIhoXC/ix2D/aRAno4r6FUwK9z5w5xksOY3SrCpFfMc6qNwaAYetqk yQ71PgxqZ/bmD7JjQJkEy7dWv887jBtcaUgljoERpMeZ6KImVXnnqgzOeksOO+/lhRknln 85yHLn7rBAlXsOt2tBF32eVziRZC7jw= X-MC-Unique: aMmSHHakNoKQ2kuQwvgH0A-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH] qemumonitortestutils: Fix line counting in qemuMonitorTestProcessFileEntries() Date: Thu, 22 Dec 2022 10:48:58 +0100 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 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.1 on 10.11.54.8 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: 1671702551504100001 Content-Type: text/plain; charset="utf-8"; x-default="true" It just so happens that our JSON snippets in qemucapabilitiesdata/*.replies files are separated by an empty line. These empty lines are then overwritten to make a single line JSON. Nevertheless, the line counter @line is not incremented which then leads to a misleading numbers in errors: Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- tests/qemumonitortestutils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c index 46791931b0..4e99c4b54e 100644 --- a/tests/qemumonitortestutils.c +++ b/tests/qemumonitortestutils.c @@ -1302,6 +1302,9 @@ qemuMonitorTestProcessFileEntries(char *inputstr, continue; } =20 + /* We've seen a new line, increment the counter */ + line++; + /* Cut off a single reply. */ *(tmp + 1) =3D '\0'; =20 --=20 2.38.2