[test] bug53965.php fails with recent libxml/libxslt
- Dominant language
- C++
- Stars
- 18.7k
- Forks
- 3.1k
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 2
Description
I was analysing test bug53965, which fails
on the following machines:
* aarch64 Ubuntu Xenial
* aarch64 Fedora 25
* aarch64 OpenSuse LEAP 42.2
* x86_64 Fedora 25
and works on the following machines:
* x86_64 CentOS 7
* aarch64 CentOS 7
The diff looks like this:
```
001+ I/O warning : failed to load external entity "file:/mnt/cmuellner/hhvm/hphp/test/zend/good/ext/xsl/tests/53965/include.xsl"
002+
003+ Warning: compilation error: file file:///mnt/cmuellner/hhvm/hphp/test/zend/good/ext/xsl/tests/53965/collection.xsl line 3 element include in /mnt/cmuellner/hhvm/hphp/test/zend/good/ext/xsl/tests/bug53965.php on line 12
004+
001- Hey\! Welcome to Nicolas Eliaszewicz's sweet CD collection\!
002-
003- \Fight for your mind\<\/h1\>\by Ben Harper \- 1995\<\/h2\>\
004- \Electric Ladyland\<\/h1\>\by Jimi Hendrix \- 1997\<\/h2\>\
005+ Warning: xsl:include : unable to load file:/mnt/cmuellner/hhvm/hphp/test/zend/good/ext/xsl/tests/53965/include.xsl in /mnt/cmuellner/hhvm/hphp/test/zend/good/ext/xsl/tests/bug53965.php on line 12
006+
007+ Fatal error: Unable to import stylesheet in /mnt/cmuellner/hhvm/hphp/test/zend/good/ext/xsl/tests/bug53965.php on line 12
```
So HHVM cannot load include.xsl, which is included by collection.xsl.
The problem seems to be obvious: the "file:" is not a valid protocol
in an URI (two missing slashes).
However, when applying this patch everything works fine:
```
diff --git a/hphp/test/zend/good/ext/xsl/tests/bug53965.php b/hphp/test/zend/good/ext/xsl/tests/bug53965.php
index 73abefb..4b1ee6a 100644
--- a/hphp/test/zend/good/ext/xsl/tests/bug53965.php
+++ b/hphp/test/zend/good/ext/xsl/tests/bug53965.php
@@ -1,6 +1,6 @@
load($base . DIRECTORY_SEPARATOR . 'collection.xml');
```
The I/O warning comes from libxslt.
However libxslt comes in version 1.1.28 on all named systems.
However libxml2, which is very tight coupled with libxslt,
comes in different versions:
* Ubuntu Xenial: libxml2 2.9.3
* Fedora 25: libxml2 2.9.3
* CentOS 7: libxml2 2.9.1
* OpenSuse LEAP 42.2: libxml2 2.9.4
My guess is, that there are behaviour changes in libxml2,
which cause this to fail. However, I did not find the root
cause for the issue so far.
Contributor guide
Assessment
This issue has not been assessed yet.