help-libidn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 3 failed tests for libidn2-2.1.1


From: Dennis Clarke
Subject: Re: 3 failed tests for libidn2-2.1.1
Date: Sun, 12 May 2019 22:59:18 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:67.0) Gecko/20100101 Thunderbird/67.0



Thank you for the reply Tim.

Sometimes progres is made just by looking more closely and then trying
to explain to someone else.  Wherein I saw the pre-existing libs from
last year.

gmake[4]: Entering directory
'/usr/local/build/libidn2-2.1.1a_SunOS5.10_sparc64vii+.001/tests'
PASS: test-punycode
FAIL: test-lookup
PASS: test-register
PASS: test-strerror
PASS: test-tounicode
============================================================================

Testsuite summary for libidn2 2.1.1
============================================================================

# TOTAL: 5
# PASS:  4
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================

See tests/test-suite.log
Please report to address@hidden
============================================================================


OKay that is better.

Still a failure there of course.

If test-lookup still has the same failure as in your first post: I was
wrong, idn2_to_ascii_4i2() is of course not deprecated
(idn2_to_ascii_4i() is).

That function is new since 2.1.0.


This is 2.1.1a however the tarball extracts as just 2.1.1.

Looking into the /usr/local/include/idn2.h header I see :

#define IDN2_VERSION_NUMBER 0x02010001
#define IDN2_VERSION_MAJOR 2
#define IDN2_VERSION_MINOR 1
#define IDN2_VERSION_PATCH 1

I guess I could just make the call to :

NAME
     idn2_check_version - API function

SYNOPSIS
     #include <idn2.h>

     const char * idn2_check_version(const char * req_version);

ARGUMENTS
     const char * req_version
                 version string to compare with, or NULL.


beta$ cat /tmp/iv2.c

#include <stdio.h>
#include <stdlib.h>
#include <idn2.h>
int main(int argc,char *argv[])
{
    printf("idn2_check_version(IDN2_VERSION) returns %s\n",
                             idn2_check_version(IDN2_VERSION));
    return EXIT_SUCCESS;
}

beta$ $CC $CFLAGS -I/usr/local/include -L/usr/local/lib -o /tmp/iv2 /tmp/iv2.c -lidn2
beta$ /tmp/iv2
idn2_check_version(IDN2_VERSION) returns 2.1.1
beta$
beta$ ldd /tmp/iv2
        libidn2.so.0 =>  /usr/local/lib/libidn2.so.0
        libc.so.1 =>     /lib/64/libc.so.1
        libintl.so.7 =>  /usr/local/lib/libintl.so.7
        libiconv.so.2 =>         /usr/local/lib/libiconv.so.2
        libunistring.so.2 =>     /usr/local/lib/libunistring.so.2
        libm.so.2 =>     /lib/64/libm.so.2
        /lib/sparcv9/../libm/sparcv9/libm_hwcap1.so.2
        /platform/SUNW,SPARC-Enterprise/lib/sparcv9/libc_psr.so.1
beta$

So I guess the 'a' is something akin to IDN2_VERSION_PATCH but lessor.
Regardless let's dig here a bit.

So please look into test-lookup.log what it says now. Is there a 'ldd'
command to show the linked libraries ? Does libidn2.so.0 point to the
correct library file ?

beta$
beta$ file ./tests/test-lookup
./tests/test-lookup: ELF 64-bit MSB executable SPARCV9 Version 1, dynamically linked, not stripped
beta$ ldd ./tests/test-lookup
        libidn2.so.0 =>  /usr/local/lib/libidn2.so.0
        libintl.so.7 =>  /usr/local/lib/libintl.so.7
        libunistring.so.2 =>     /usr/local/lib/libunistring.so.2
        libiconv.so.2 =>         /usr/local/lib/libiconv.so.2
        libc.so.1 =>     /lib/64/libc.so.1
        libm.so.2 =>     /lib/64/libm.so.2
        /lib/sparcv9/../libm/sparcv9/libm_hwcap1.so.2
        /platform/SUNW,SPARC-Enterprise/lib/sparcv9/libc_psr.so.1
beta$
beta$ elfdump -devl ./tests/test-lookup | grep -E -e 'NEED|PATH'
       [0]  NEEDED            0x26a               libidn2.so.0
       [1]  NEEDED            0x277               libintl.so.7
       [2]  NEEDED            0x284               libunistring.so.2
       [3]  NEEDED            0x296               libiconv.so.2
       [4]  NEEDED            0x257               libc.so.1
[7] RUNPATH 0x2a4 /usr/local/lib:/usr/local/build/libidn2-2.1.1a_SunOS5.10_sparc64vii+.002/lib/.libs [8] RPATH 0x2a4 /usr/local/lib:/usr/local/build/libidn2-2.1.1a_SunOS5.10_sparc64vii+.002/lib/.libs
      [15]  VERNEED           0x100000d88
      [16]  VERNEEDNUM        0x1
beta$

That RUNPATH and RPATH should have the local build directory first in
the list for testing. That will certainly cause issues on a system with
a previous version around. Which is what I had. I see the abomination
known as LD_LIBRARY_PATH to be only used in oddball cases.  It works for
doing testing of a new lib however the rule is that the ELF files should
always have the RPATH/RUNPATH data in place correctly.

Some of that is just my crusty opinion but it works!  :)

In any case I did the build and test cycle twice and in both cases I
also did the install. Of course on the second pass we get better results
because now the correct version is in place within /usr/local/lib and
we also have them in the build directory tree.  Good stuff.

So we know the version is correct given that the correct version is now
located everywhere we would want it :

beta$
beta$ ls -lapb ./lib/.libs/libidn2*
-rw-r--r--   1 dclarke  devl      537072 May 12 16:11 ./lib/.libs/libidn2.a
-rw-r--r-- 1 dclarke devl 337 May 12 16:11 ./lib/.libs/libidn2.exp lrwxrwxrwx 1 dclarke devl 13 May 12 16:11 ./lib/.libs/libidn2.la -> ../libidn2.la -rw-r--r-- 1 dclarke devl 1099 May 12 16:11 ./lib/.libs/libidn2.lai lrwxrwxrwx 1 dclarke devl 16 May 12 16:11 ./lib/.libs/libidn2.so -> libidn2.so.0.3.5* lrwxrwxrwx 1 dclarke devl 16 May 12 16:11 ./lib/.libs/libidn2.so.0 -> libidn2.so.0.3.5* -rwxr-xr-x 1 dclarke devl 396480 May 12 16:11 ./lib/.libs/libidn2.so.0.3.5


Great.

Also :

beta$ ldd ./src/.libs/idn2
        libidn2.so.0 =>  /usr/local/lib/libidn2.so.0
        libintl.so.7 =>  /usr/local/lib/libintl.so.7
        libunistring.so.2 =>     /usr/local/lib/libunistring.so.2
        libiconv.so.2 =>         /usr/local/lib/libiconv.so.2
        libc.so.1 =>     /lib/64/libc.so.1
        libm.so.2 =>     /lib/64/libm.so.2
        /lib/sparcv9/../libm/sparcv9/libm_hwcap1.so.2
        /platform/SUNW,SPARC-Enterprise/lib/sparcv9/libc_psr.so.1
beta$
beta$ ls -alpb /usr/local/lib/libidn2*
-rw-r--r-- 1 root root 537064 May 12 16:02 /usr/local/lib/libidn2.a -rwxr-xr-x 1 root root 1099 May 12 16:02 /usr/local/lib/libidn2.la lrwxrwxrwx 1 root root 16 May 12 16:02 /usr/local/lib/libidn2.so -> libidn2.so.0.3.5* lrwxrwxrwx 1 root root 16 May 12 16:02 /usr/local/lib/libidn2.so.0 -> libidn2.so.0.3.5* -rwxr-xr-x 1 root root 396488 May 12 16:02 /usr/local/lib/libidn2.so.0.3.5
beta$

So that is fine.


beta$
beta$ wc -l ./tests/test-lookup.log
   11883 ./tests/test-lookup.log
beta$

So that is large enough I can compress it and attach here.

Most of it is unreadable to me. Modem noise is more clear ;)

However :


##########N#\u0301#M-^L#xn--nxasmm1c##
Failed: _check_toASCII(M-LM-^A) -> -303 (expected 0) 0

Failed: _check_toASCII(address@hidden) -> a.b.c.d (expected a.b.c.d.) 10012af30

Failed: _check_toASCII(M-fM-^WM-%M-fM-^\M-,) -> xn--wgv71a (expected xn--wgv71a119e.jp) 10012af10
u8_to_u32(M-fM-^WM-%M-fM-^\M-,address@hidden<) failed (88)

Failed: _check_toASCII() ->  (expected xn--53h) 10012af30

Failed: _check_toASCII(address@hidden<M-^MM-aM- M-^LM-bM-^DM-,address@hidden
M-^TM-0M-sM- M-^GM-/M-oM-,M-^D) -> n--bssffl (expected xn--bssffl) 10012aef0

etc etc etc ...

I will say that every locale alive is installed here :

beta$
beta$ locale -a | wc -l
     345
beta$

Generally I work with these in place :

beta$ env | sort | grep 'LC'
LC_COLLATE=C
LC_CTYPE=C
LC_MESSAGES=C
LC_MONETARY=C
LC_NUMERIC=C
LC_TIME=C
beta$

Not sure what else to look at.


--
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional

Attachment: libidn2-2.1.1a_SunOS5.10_sparc64vii+.002_test-lookup.log.xz
Description: application/xz


reply via email to

[Prev in Thread] Current Thread [Next in Thread]