Bug 12613

Summary: libxml2 ptest fails
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Ross Burton <ross.burton>
Component: coreAssignee: Changqing Li <changqing.li>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: juro.bystricky, liezhi.yang, meta.mr.watcher, meta.watcher, randy.macleod, stephano
Version: 2.5   
Target Milestone: 2.6 M3   
Hardware: x86   
OS: Multiple   
Whiteboard: Backport 2.5.1
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ross Burton 2018-03-20 05:46:12 UTC
BEGIN: /usr/lib/libxml2/ptest
/usr/lib/libxml2/ptest/run-ptest: line 3: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory
[ -d test   ] || ln -s ../libxml2-2.9.8/test   .
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
[ -d result ] || ln -s ../libxml2-2.9.8/result .
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
./runtest && \
     ./testrecurse && \
    ASAN_OPTIONS="$ASAN_OPTIONS:detect_leaks=0"  ./testapi && \
     ./testchar && \
     ./testdict && \
     ./runxmlconf
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
File ./test/icu_parse_test.xml generated an error
File ./test/icu_parse_test.xml generated an error
File ./test/icu_parse_test.xml generated an error
Result for ./test/icu_parse_test.xml failed in result/icu_parse_test.xml.rdr
File ./test/icu_parse_test.xml generated an error
Result for ./test/icu_parse_test.xml failed in result/icu_parse_test.xml.rde
File ./test/icu_parse_test.xml generated an error
Result for ./test/icu_parse_test.xml failed in result/icu_parse_test.xml.rdr
File ./test/icu_parse_test.xml generated an error
Failed to parse ./test/icu_parse_test.xml
File ./test/icu_parse_test.xml generated an error
Failed to parse ./test/icu_parse_test.xml
File ./test/icu_parse_test.xml generated an error
Failed to parse ./test/icu_parse_test.xml
File ./test/icu_parse_test.xml generated an error
Failed to parse ./test/icu_parse_test.xml
File ./test/icu_parse_test.xml generated an error
Failed to parse ./test/icu_parse_test.xml
File ./test/icu_parse_test.xml generated an error
## XML regression tests
FAIL: XML regression tests
## XML regression tests on memory
FAIL: XML regression tests on memory
## XML entity subst regression tests
FAIL: XML entity subst regression tests
## XML Namespaces regression tests
PASS: XML Namespaces regression tests
## Error cases regression tests
PASS: Error cases regression tests
## Error cases regression tests (old 1.0)
PASS: Error cases regression tests (old 1.0)
## Error cases stream regression tests
PASS: Error cases stream regression tests
## Reader regression tests
FAIL: Reader regression tests
## Reader entities substitution regression tests
FAIL: Reader entities substitution regression tests
## Reader on memory regression tests
FAIL: Reader on memory regression tests
## Walker regression tests
FAIL: Walker regression tests
## SAX1 callbacks regression tests
FAIL: SAX1 callbacks regression tests
## SAX2 callbacks regression tests
FAIL: SAX2 callbacks regression tests
## SAX2 callbacks regression tests with entity substitution
FAIL: SAX2 callbacks regression tests with entity substitution
## XML push regression tests
FAIL: XML push regression tests
## HTML regression tests
PASS: HTML regression tests
## Push HTML regression tests
PASS: Push HTML regression tests
## HTML SAX regression tests
PASS: HTML SAX regression tests
## Valid documents regression tests
PASS: Valid documents regression tests
## Validity checking regression tests
PASS: Validity checking regression tests
## Streaming validity checking regression tests
PASS: Streaming validity checking regression tests
## Streaming validity error checking regression tests
PASS: Streaming validity error checking regression tests
## General documents valid regression tests
PASS: General documents valid regression tests
## XInclude regression tests
PASS: XInclude regression tests
## XInclude xmlReader regression tests
PASS: XInclude xmlReader regression tests
## XInclude regression tests stripping include nodes
PASS: XInclude regression tests stripping include nodes
## XInclude xmlReader regression tests stripping include nodes
PASS: XInclude xmlReader regression tests stripping include nodes
## URI parsing tests
PASS: URI parsing tests
## URI base composition tests
PASS: URI base composition tests
## Path URI conversion tests
PASS: Path URI conversion tests
## Schemas regression tests
PASS: Schemas regression tests
## Relax-NG regression tests
PASS: Relax-NG regression tests
## Relax-NG streaming regression tests
PASS: Relax-NG streaming regression tests
## Pattern regression tests
PASS: Pattern regression tests
## C14N with comments regression tests
PASS: C14N with comments regression tests
## C14N without comments regression tests
PASS: C14N without comments regression tests
## C14N exclusive without comments regression tests
PASS: C14N exclusive without comments regression tests
## C14N 1.1 without comments regression tests
PASS: C14N 1.1 without comments regression tests
## Catalog and Threads regression tests
PASS: Catalog and Threads regression tests
Total 2791 tests, 11 errors, 0 leaks
FAIL: runtest

make: *** [Makefile:1919: runtests] Error 1

ERROR: Exit status is 512
END: /usr/lib/libxml2/ptest
Comment 1 Juro Bystricky 2018-03-21 13:55:34 UTC
Hmm, I just rebuilt core-image-sato-sdk-ptest (qemux86-64) and ran 
libxml2 ptest without any errors.

Build Configuration:
BB_VERSION           = "1.37.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "x86_64-poky-linux"
MACHINE              = "qemux86-64"
DISTRO               = "poky"
DISTRO_VERSION       = "2.4+snapshot-20180321"

(branch based on master f49ee61422c867516db252054e993df29f775136
systemd-boot: upgrade to 237)
Comment 2 Ross Burton 2018-03-21 15:03:33 UTC
So it's a dependencies problem.

At least the en_US thing was because I was running in a core-image-minimal and install only en_GB: the ptest package should install all the locales/encodings that it needs.  That might solve all the failures.
Comment 3 Juro Bystricky 2018-03-21 15:17:21 UTC
(In reply to comment #2)
> So it's a dependencies problem.
> 
> At least the en_US thing was because I was running in a core-image-minimal
> and install only en_GB: the ptest package should install all the
> locales/encodings that it needs.  That might solve all the failures.

The recipe for ptest should probably RDEPEND on utf-8 (there are some other ptest recipes that explicitly ask for utf-8, I think)
Comment 4 Changqing Li 2018-08-01 05:44:19 UTC
1 . 

"warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) " is caused by missing en-us locale.  

"./test/icu_parse_test.xml generated an error"  is caused by missing EUC_JP glibc iconv configuration.

Add above missing part to depend. 

2.

With above fix, all the error reported in the bug is resloved. but one new ptest error found, which is caused by recently add patch "fix-CVE-2017-8872.patch". 
have report this to https://bugzilla.gnome.org/show_bug.cgi?id=775200