[libvirt] [PATCH] vsh-table: Fix broken build on centos and rhel

Simon Kobyda posted 1 patch 5 years, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20180829074810.10564-1-skobyda@redhat.com
Test syntax-check passed
tests/vshtabletest.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[libvirt] [PATCH] vsh-table: Fix broken build on centos and rhel
Posted by Simon Kobyda 5 years, 7 months ago
The reason of broken build was that centos and rhel use older version of glibc.
These versions of glibc on these platforms cannot work with newer unicodes,
therefore functions iswprint() and wcwidth() failed. So I replaced them with
older unicode characters.

Signed-off-by: Simon Kobyda <skobyda@redhat.com>
---
 tests/vshtabletest.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/vshtabletest.c b/tests/vshtabletest.c
index 1b07c37c56..9e9c045226 100644
--- a/tests/vshtabletest.c
+++ b/tests/vshtabletest.c
@@ -123,7 +123,7 @@ testUnicode(const void *opaque ATTRIBUTE_UNUSED)
 " Id   名稱                  государство  \n"
 "-----------------------------------------\n"
 " 1    fedora28              running      \n"
-" 2    🙊🙉🙈rhel7.5🙆🙆🙅   running      \n";
+" 2    つへソrhel7.5つへソ   running      \n";
     vshTablePtr table;
 
     table = vshTableNew("Id", "名稱", "государство", NULL);
@@ -131,7 +131,7 @@ testUnicode(const void *opaque ATTRIBUTE_UNUSED)
         goto cleanup;
 
     vshTableRowAppend(table, "1", "fedora28", "running", NULL);
-    vshTableRowAppend(table, "2", "🙊🙉🙈rhel7.5🙆🙆🙅", "running",
+    vshTableRowAppend(table, "2", "つへソrhel7.5つへソ", "running",
                       NULL);
 
     act = vshTablePrintToString(table, true);
-- 
2.17.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] vsh-table: Fix broken build on centos and rhel
Posted by Erik Skultety 5 years, 7 months ago
On Wed, Aug 29, 2018 at 09:48:10AM +0200, Simon Kobyda wrote:
> The reason of broken build was that centos and rhel use older version of glibc.
> These versions of glibc on these platforms cannot work with newer unicodes,
> therefore functions iswprint() and wcwidth() failed. So I replaced them with
I'll rephrase ^this as follows:

thus causing functions x y return unexpected values causing the vshtabletest to
fail. Therefore, let's replace the new unicode characters causing issues with
some older ones to fix the test suite, as the issue would still persist during
runtime.

> older unicode characters.
>
> Signed-off-by: Simon Kobyda <skobyda@redhat.com>
> ---

In this case a link to your travis proving the fix would be helpful, but since
I've already seen it personally:

Reviewed-by: Erik Skultety <eskultet@redhat.com>

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] vsh-table: Fix broken build on centos and rhel
Posted by Ján Tomko 5 years, 7 months ago
On Wed, Aug 29, 2018 at 09:48:10AM +0200, Simon Kobyda wrote:
>The reason of broken build was that centos and rhel use older version of glibc.
>These versions of glibc on these platforms cannot work with newer unicodes,
>therefore functions iswprint() and wcwidth() failed. So I replaced them with
>older unicode characters.
>
>Signed-off-by: Simon Kobyda <skobyda@redhat.com>
>---
> tests/vshtabletest.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>

Thanks,

FWIW this also works on my Gentoo with sys-libs/glibc-2.25-r9

Jano
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] vsh-table: Fix broken build on centos and rhel
Posted by Andrea Bolognani 5 years, 7 months ago
On Wed, 2018-08-29 at 09:48 +0200, Simon Kobyda wrote:
> The reason of broken build was that centos and rhel use older version of glibc.
> These versions of glibc on these platforms cannot work with newer unicodes,
> therefore functions iswprint() and wcwidth() failed. So I replaced them with
> older unicode characters.
> 
> Signed-off-by: Simon Kobyda <skobyda@redhat.com>
> ---
>  tests/vshtabletest.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Still broken on FreeBSD 11:

  https://ci.centos.org/view/libvirt/job/libvirt-master-check/systems=libvirt-freebsd-11/1345/console

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list