Discussion:
fix test failure in test-u8-strtok
(too old to reply)
Bruno Haible
2016-10-16 17:24:56 UTC
Permalink
Raw Message
Hi Daiki,

On a glibc system (glibc 2.15, Linux 3.8) I get this test failure
from a gnulib testdir:

./../build-aux/test-driver: line 107: 13312 Aborted "$@" > $log_file 2>&1
FAIL: test-u8-strtok

unistr/test-u-strtok.h:80: assertion 'result == first_ptr' failed
FAIL test-u8-strtok (exit status: 134)

The reason is through the bug fix from Seiya Kawashima on 2015-07-03
(very nice finding and nice testcase, by the way!) the behaviour of
the u*_strtok functions have changed. However, on my system, the
autoconfiguration finds a preinstalled libunistring.so.2 of
version 0.9.3 (or so):

$ ldd test-u8-strtok
linux-vdso.so.1 => (0x00007fffa250f000)
libunistring.so.2 => /arch/x86_64-linux-gnu/gnu/lib/libunistring.so.2 (0x00007f60910ae000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6090d93000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f60909d4000)
/lib64/ld-linux-x86-64.so.2 (0x00007f6091417000)

But the unit test expects a libunistring of version 0.9.6 or newer
(since that was the version in which the fix was delivered).

This proposed patch fixes the issue for me, along the lines of the comment
in m4/libunistring-base.m4. OK to push?


2016-10-16 Bruno Haible <***@clisp.org>

Make sure the libunistring detection rejects older versions with a
known bug.
* modules/unistr/u8-strtok (configure.ac): Bump required version.
* modules/unistr/u16-strtok (configure.ac): Likewise.
* modules/unistr/u32-strtok (configure.ac): Likewise.

diff --git a/modules/unistr/u16-strtok b/modules/unistr/u16-strtok
index 98cfcf6..4f8ce09 100644
--- a/modules/unistr/u16-strtok
+++ b/modules/unistr/u16-strtok
@@ -12,7 +12,7 @@ unistr/u16-strpbrk
unistr/u16-strmblen

configure.ac:
-gl_LIBUNISTRING_MODULE([0.9], [unistr/u16-strtok])
+gl_LIBUNISTRING_MODULE([0.9.6], [unistr/u16-strtok])

Makefile.am:
if LIBUNISTRING_COMPILE_UNISTR_U16_STRTOK
diff --git a/modules/unistr/u32-strtok b/modules/unistr/u32-strtok
index 1206248..c7435a8 100644
--- a/modules/unistr/u32-strtok
+++ b/modules/unistr/u32-strtok
@@ -12,7 +12,7 @@ unistr/u32-strpbrk
unistr/u32-strmblen

configure.ac:
-gl_LIBUNISTRING_MODULE([0.9], [unistr/u32-strtok])
+gl_LIBUNISTRING_MODULE([0.9.6], [unistr/u32-strtok])

Makefile.am:
if LIBUNISTRING_COMPILE_UNISTR_U32_STRTOK
diff --git a/modules/unistr/u8-strtok b/modules/unistr/u8-strtok
index 657b6fd..b921d0f 100644
--- a/modules/unistr/u8-strtok
+++ b/modules/unistr/u8-strtok
@@ -12,7 +12,7 @@ unistr/u8-strpbrk
unistr/u8-strmblen

configure.ac:
-gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-strtok])
+gl_LIBUNISTRING_MODULE([0.9.6], [unistr/u8-strtok])

Makefile.am:
if LIBUNISTRING_COMPILE_UNISTR_U8_STRTOK
Daiki Ueno
2016-10-18 08:03:04 UTC
Permalink
Raw Message
Post by Bruno Haible
But the unit test expects a libunistring of version 0.9.6 or newer
(since that was the version in which the fix was delivered).
This proposed patch fixes the issue for me, along the lines of the comment
in m4/libunistring-base.m4. OK to push?
Sure, thank you for pointing that.

Regards,
--
Daiki Ueno
Bruno Haible
2016-10-18 12:16:06 UTC
Permalink
Raw Message
Post by Daiki Ueno
Post by Bruno Haible
This proposed patch fixes the issue for me, along the lines of the comment
in m4/libunistring-base.m4. OK to push?
Sure, thank you for pointing that.
OK. Pushed.

Loading...