From nobody Sun Feb 8 06:53:35 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1543309674044661.9117493931999; Tue, 27 Nov 2018 01:07:54 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 754AD308339D; Tue, 27 Nov 2018 09:07:51 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EB4885C6A6; Tue, 27 Nov 2018 09:07:48 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 39565181B9E5; Tue, 27 Nov 2018 09:07:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wAR97hoO013192 for ; Tue, 27 Nov 2018 04:07:43 -0500 Received: by smtp.corp.redhat.com (Postfix) id B456219493; Tue, 27 Nov 2018 09:07:43 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.43.2.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1026C19C65; Tue, 27 Nov 2018 09:07:42 +0000 (UTC) From: Simon Kobyda To: libvir-list@redhat.com Date: Tue, 27 Nov 2018 10:07:32 +0100 Message-Id: <20181127090733.30970-2-skobyda@redhat.com> In-Reply-To: <20181127090733.30970-1-skobyda@redhat.com> References: <20181127090733.30970-1-skobyda@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Simon Kobyda Subject: [libvirt] [PATCH 1/2] vsh-table: Get rid of trailing spaces X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Tue, 27 Nov 2018 09:07:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Get rid of trailing spaces which can be found after last column in tables. Signed-off-by: Simon Kobyda --- tools/vsh-table.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/vsh-table.c b/tools/vsh-table.c index 9b4a34c1e6..fb656ffeb0 100644 --- a/tools/vsh-table.c +++ b/tools/vsh-table.c @@ -348,8 +348,10 @@ vshTableRowPrint(vshTableRowPtr row, for (i =3D 0; i < row->ncells; i++) { virBufferAsprintf(buf, " %s", row->cells[i]); =20 - for (j =3D 0; j < maxwidths[i] - widths[i] + 2; j++) - virBufferAddChar(buf, ' '); + if (i < (row->ncells - 1)) { + for (j =3D 0; j < maxwidths[i] - widths[i] + 2; j++) + virBufferAddChar(buf, ' '); + } } virBufferAddChar(buf, '\n'); } --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Feb 8 06:53:35 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1543309688040943.8994420790209; Tue, 27 Nov 2018 01:08:08 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3BAD3307D867; Tue, 27 Nov 2018 09:08:06 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EBF885C26E; Tue, 27 Nov 2018 09:08:05 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 5D55C181B9E5; Tue, 27 Nov 2018 09:08:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wAR97iQc013202 for ; Tue, 27 Nov 2018 04:07:44 -0500 Received: by smtp.corp.redhat.com (Postfix) id B4C4819493; Tue, 27 Nov 2018 09:07:44 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.43.2.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1008419C65; Tue, 27 Nov 2018 09:07:43 +0000 (UTC) From: Simon Kobyda To: libvir-list@redhat.com Date: Tue, 27 Nov 2018 10:07:33 +0100 Message-Id: <20181127090733.30970-3-skobyda@redhat.com> In-Reply-To: <20181127090733.30970-1-skobyda@redhat.com> References: <20181127090733.30970-1-skobyda@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Simon Kobyda Subject: [libvirt] [PATCH 2/2] tests: Remove trailing spaces in test cases X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Tue, 27 Nov 2018 09:08:07 +0000 (UTC) Signed-off-by: Simon Kobyda --- tests/virshtest.c | 10 ++++---- tests/vshtabletest.c | 58 ++++++++++++++++++++++---------------------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/tests/virshtest.c b/tests/virshtest.c index 250efb7734..7fb701d580 100644 --- a/tests/virshtest.c +++ b/tests/virshtest.c @@ -96,9 +96,9 @@ static int testCompareListDefault(const void *data ATTRIB= UTE_UNUSED) { const char *const argv[] =3D { VIRSH_DEFAULT, "list", NULL }; const char *exp =3D "\ - Id Name State \n\ + Id Name State\n\ ----------------------\n\ - 1 test running \n\ + 1 test running\n\ \n"; return testCompareOutputLit(exp, NULL, argv); } @@ -107,10 +107,10 @@ static int testCompareListCustom(const void *data ATT= RIBUTE_UNUSED) { const char *const argv[] =3D { VIRSH_CUSTOM, "list", NULL }; const char *exp =3D "\ - Id Name State \n\ + Id Name State\n\ ----------------------\n\ - 1 fv0 running \n\ - 2 fc4 running \n\ + 1 fv0 running\n\ + 2 fc4 running\n\ \n"; return testCompareOutputLit(exp, NULL, argv); } diff --git a/tests/vshtabletest.c b/tests/vshtabletest.c index ff394f65ca..e795c5afc0 100644 --- a/tests/vshtabletest.c +++ b/tests/vshtabletest.c @@ -43,13 +43,13 @@ testVshTableHeader(const void *opaque ATTRIBUTE_UNUSED) int ret =3D 0; char *act =3D NULL; const char *exp =3D -" 1 fedora28 running \n" -" 2 rhel7.5 running \n"; +" 1 fedora28 running\n" +" 2 rhel7.5 running\n"; const char *exp2 =3D -" Id Name State \n" +" Id Name State\n" "--------------------------\n" -" 1 fedora28 running \n" -" 2 rhel7.5 running \n"; +" 1 fedora28 running\n" +" 2 rhel7.5 running\n"; =20 vshTablePtr table =3D vshTableNew("Id", "Name", "State", NULL); //to ask about return @@ -118,10 +118,10 @@ testUnicode(const void *opaque ATTRIBUTE_UNUSED) char *act =3D NULL; =20 const char *exp =3D -" Id =E5=90=8D=E7=A8=B1 =D0=B3=D0=BE=D1=81=D1=83=D0=B4= =D0=B0=D1=80=D1=81=D1=82=D0=B2=D0=BE \n" +" Id =E5=90=8D=E7=A8=B1 =D0=B3=D0=BE=D1=81=D1=83=D0=B4= =D0=B0=D1=80=D1=81=D1=82=D0=B2=D0=BE\n" "-----------------------------------------\n" -" 1 fedora28 running \n" -" 2 =E3=81=A4=E3=81=B8=E3=82=BDrhel7.5=E3=81=A4=E3=81=B8=E3=82=BD run= ning \n"; +" 1 fedora28 running\n" +" 2 =E3=81=A4=E3=81=B8=E3=82=BDrhel7.5=E3=81=A4=E3=81=B8=E3=82=BD run= ning\n"; vshTablePtr table; =20 table =3D vshTableNew("Id", "=E5=90=8D=E7=A8=B1", "=D0=B3=D0=BE=D1=81= =D1=83=D0=B4=D0=B0=D1=80=D1=81=D1=82=D0=B2=D0=BE", NULL); @@ -150,10 +150,10 @@ testUnicodeArabic(const void *opaque ATTRIBUTE_UNUSED) char *act =3D NULL; =20 const char *exp =3D -" =EF=BB=A1=EF=BA=8D =EF=BB=A2=EF=BB=A3=EF=BA=8D =EF=BB=95=EF=BA=8E=EF=BA= =8C=EF=BB=A3=EF=BA=93 =EF=BA=93 =EF=BA=8E=EF=BB=A0=EF=BA=BC=EF=BB=8B = =EF=BA=8D=EF=BB=B8=EF=BA=9C=EF= =BB=A7=EF=BA=8E=EF=BB=A7 \n" +" =EF=BB=A1=EF=BA=8D =EF=BB=A2=EF=BB=A3=EF=BA=8D =EF=BB=95=EF=BA=8E=EF=BA= =8C=EF=BB=A3=EF=BA=93 =EF=BA=93 =EF=BA=8E=EF=BB=A0=EF=BA=BC=EF=BB=8B = =EF=BA=8D=EF=BB=B8=EF=BA=9C=EF= =BB=A7=EF=BA=8E=EF=BB=A7\n" "-------------------------------------------------------------------------= ------------------\n" -" 1 =EF=BB=89=EF=BA=AA=EF=BB=B4=EF=BB=9F =EF=BA=8E=EF=BB=A0= =EF=BA=9C=EF=BB=98=EF=BB=B4=EF=BB=9F =EF=BB=95=EF=BA=8E=EF=BB=A3 =EF=BB=8A= =EF=BB=A7, =D9=A3=D9=A0 =EF=BB=8E=EF=BB=B4=EF=BB=A8=EF=BB=B3=EF=BA=8D =EF= =BB=AE=EF=BA=98=EF=BB=A7=EF=BA=8E=EF=BB=A4=EF=BA=97 =EF=BA=8E=EF=BB=A0=EF= =BA=9B=EF=BA=8E=EF=BB=A0=EF=BA=9B=D8=8C =EF=BA=84=EF=BA=B3=EF=BA=AD, =EF=BA= =A9=EF=BB=AE=EF=BB=9F =EF=BA=A9=EF=BB=AE=EF=BB=9F. =EF=BA=84=EF=BB=A3=EF= =BA=8E=EF=BB=A3 =EF=BA=8D =EF=BA=8E=EF=BB=A7 =EF=BB=B2=EF=BB=9C=EF=BB=A7 \= n" -" =EF=BA=BA=EF=BB=94=EF=BA=A3=EF=BA=93 =EF=BA=96=EF=BB=9C=EF=BA= =98=EF=BB=B4=EF=BB=9B=EF=BA=8D=D9=8B =EF=BB=8A=EF=BB=9F, =EF=BA=8E=EF=BB=A0= =EF=BA=A0=EF=BB=A7=EF=BB=AD=EF=BA=A9 =EF=BB=AD=EF=BA=8E=EF=BB=A0=EF=BB=8C= =EF=BA=97=EF=BA=8D=EF=BA=A9 =EF=BA=B5=EF=BA=AD= \n"; +" 1 =EF=BB=89=EF=BA=AA=EF=BB=B4=EF=BB=9F =EF=BA=8E=EF=BB=A0= =EF=BA=9C=EF=BB=98=EF=BB=B4=EF=BB=9F =EF=BB=95=EF=BA=8E=EF=BB=A3 =EF=BB=8A= =EF=BB=A7, =D9=A3=D9=A0 =EF=BB=8E=EF=BB=B4=EF=BB=A8=EF=BB=B3=EF=BA=8D =EF= =BB=AE=EF=BA=98=EF=BB=A7=EF=BA=8E=EF=BB=A4=EF=BA=97 =EF=BA=8E=EF=BB=A0=EF= =BA=9B=EF=BA=8E=EF=BB=A0=EF=BA=9B=D8=8C =EF=BA=84=EF=BA=B3=EF=BA=AD, =EF=BA= =A9=EF=BB=AE=EF=BB=9F =EF=BA=A9=EF=BB=AE=EF=BB=9F. =EF=BA=84=EF=BB=A3=EF= =BA=8E=EF=BB=A3 =EF=BA=8D =EF=BA=8E=EF=BB=A7 =EF=BB=B2=EF=BB=9C=EF=BB=A7\n" +" =EF=BA=BA=EF=BB=94=EF=BA=A3=EF=BA=93 =EF=BA=96=EF=BB=9C=EF=BA= =98=EF=BB=B4=EF=BB=9B=EF=BA=8D=D9=8B =EF=BB=8A=EF=BB=9F, =EF=BA=8E=EF=BB=A0= =EF=BA=A0=EF=BB=A7=EF=BB=AD=EF=BA=A9 =EF=BB=AD=EF=BA=8E=EF=BB=A0=EF=BB=8C= =EF=BA=97=EF=BA=8D=EF=BA=A9 =EF=BA=B5=EF=BA=AD= \n"; vshTablePtr table; wchar_t wc; =20 @@ -192,10 +192,10 @@ testUnicodeZeroWidthChar(const void *opaque ATTRIBUTE= _UNUSED) int ret =3D 0; vshTablePtr table =3D NULL; const char *exp =3D -" I\u200Bd Name \u200BStatus \n" +" I\u200Bd Name \u200BStatus\n" "--------------------------\n" -" 1\u200B fedora28 run\u200Bning \n" -" 2 rhel7.5 running \n"; +" 1\u200B fedora28 run\u200Bning\n" +" 2 rhel7.5 running\n"; char *act =3D NULL; wchar_t wc; =20 @@ -229,10 +229,10 @@ testUnicodeCombiningChar(const void *opaque ATTRIBUTE= _UNUSED) int ret =3D 0; vshTablePtr table =3D NULL; const char *exp =3D -" Id N=C3=A1me =E2=93=88tatus \n" +" Id N=C3=A1me =E2=93=88tatus\n" "--------------------------\n" -" 1 f=C4=9Bdora28 running \n" -" 2 rhel running \n"; +" 1 f=C4=9Bdora28 running\n" +" 2 rhel running\n"; char *act =3D NULL; =20 table =3D vshTableNew("Id", "N=C3=A1me", "=E2=93=88tatus", NULL); @@ -258,10 +258,10 @@ testUnicodeNonPrintableChar(const void *opaque ATTRIB= UTE_UNUSED) int ret =3D 0; vshTablePtr table =3D NULL; const char *exp =3D -" I\\x09d Name Status \n" +" I\\x09d Name Status\n" "----------------------------------\n" -" 1 f\\x07edora28 running \n" -" 2 rhel7.5 running \n"; +" 1 f\\x07edora28 running\n" +" 2 rhel7.5 running\n"; char *act =3D NULL; =20 table =3D vshTableNew("I\td", "Name", "Status", NULL); @@ -288,20 +288,20 @@ testNTables(const void *opaque ATTRIBUTE_UNUSED) vshTablePtr table2 =3D NULL; vshTablePtr table3 =3D NULL; const char *exp1 =3D -" Id Name Status \n" +" Id Name Status\n" "--------------------------\n" -" 1 fedora28 running \n" -" 2 rhel7.5 running \n"; +" 1 fedora28 running\n" +" 2 rhel7.5 running\n"; const char *exp2 =3D -" Id Name Status \n" +" Id Name Status\n" "---------------------\n"; const char *exp3 =3D -" Id \n" +" Id\n" "-----\n" -" 1 \n" -" 2 \n" -" 3 \n" -" 4 \n"; +" 1\n" +" 2\n" +" 3\n" +" 4\n"; char *act1 =3D NULL; char *act2 =3D NULL; char *act3 =3D NULL; --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list