Re: [Wikitech-l] MediaWiki core tests failing? why?
On Mon, Oct 26, 2015 at 6:08 PM, Marcin Cieslak wrote: > Is there any requirement for those serializations to be consistent > in the API? If yes, then probably the API value formatting should be > more tightly formatted. > No, just that it be valid PHP serialized data. -- Brad Jorsch (Anomie) Senior Software Engineer Wikimedia Foundation ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] MediaWiki core tests failing? why?
On 2015-10-26, Brad Jorsch (Anomie) wrote: > On Sat, Oct 24, 2015 at 7:14 PM, Marcin Cieslak wrote: > >> I am getting few interesting failures: >> >> - floating point format problems >> > > Why do you have serialize_precision set to 100? Once you go over the > default of 17, you're into the range of rounding errors in an IEEE double, > which in turn is what PHP typically is using for its float type. > > This probably doesn't break anything besides unit tests, though. serialize_precision too high: filed bug https://phabricator.wikimedia.org/T116683 gerrit change https://gerrit.wikimedia.org/r/#/c/249018/ that does ini_set() >> - various XMP XML metadata issues >> > > This seems to cover most of your errors. In particular, the metadata seems > to be completely missing. What might be happening there is that > XMPReader::isSupported() may be returning false on your system due to > missing dependencies, and all these tests should be made to skip in that > case. Two problems: - XMP XML metadata reading needs allow_url_fopen enabled: filed bug https://phabricator.wikimedia.org/T116701 also filed https://phabricator.wikimedia.org/T116704 to make sure CI is running without allow_url_fopen (got bitten before as well) - Some charset/iconv problem for testIPTCParseForcedUTFButInvalid() filed bug https://phabricator.wikimedia.org/T116705 no patch/idea why it fails yet > >> and few others. >> > > The only "other" looks like failures 3-6, which seems to boil down to some > issue with JavaScriptContent::getRedirectTarget() recognizing redirects in > general. If you can manage to figure out one of them (e.g. failure 4), it > will probably figure out all of them. My guess offhand is that something in > your setup is making the preg_match() in that function fail to match. reason: mixed up $wgScript / $wgScriptPath gerrit change https://gerrit.wikimedia.org/r/#/c/249004/ merged by legoktm, thanks! Marcin ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] MediaWiki core tests failing? why?
On 2015-10-26, Brad Jorsch (Anomie) wrote: Brad - thank you very much for having a look at this. > On Sat, Oct 24, 2015 at 7:14 PM, Marcin Cieslak wrote: > >> I am getting few interesting failures: >> >> - floating point format problems >> > > Why do you have serialize_precision set to 100? Once you go over the > default of 17, you're into the range of rounding errors in an IEEE double, > which in turn is what PHP typically is using for its float type. > > This probably doesn't break anything besides unit tests, though. That is probably inherited from the vendor's (Gentoo) defaults. This should probably fixed in the test - to have a fixed precision in the test, enforced by ini_set() in the worst case. Is there any requirement for those serializations to be consistent in the API? If yes, then probably the API value formatting should be more tightly formatted. The test passes after setting serialize_precision to 14. >> - various XMP XML metadata issues >> > > This seems to cover most of your errors. In particular, the metadata seems > to be completely missing. What might be happening there is that > XMPReader::isSupported() may be returning false on your system due to > missing dependencies, and all these tests should be made to skip in that > case. A quick test with eval.php gives me > var_dump(XMPReader::isSupported()) bool(true) Will investigate. >> and few others. >> > > The only "other" looks like failures 3-6, which seems to boil down to some > issue with JavaScriptContent::getRedirectTarget() recognizing redirects in > general. If you can manage to figure out one of them (e.g. failure 4), it > will probably figure out all of them. My guess offhand is that something in > your setup is making the preg_match() in that function fail to match. I think that 'wgScriptPath' set to '/w/index.php' might be incorrect (I think they meant 'wgScript'). I have $wgScriptPath = "/~saper/ybabel"; in my LocalSettings.php and this confuses the test. https://gerrit.wikimedia.org/r/249004 fixes this for me. Marcin ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] MediaWiki core tests failing? why?
On Sat, Oct 24, 2015 at 7:14 PM, Marcin Cieslak wrote: > I am getting few interesting failures: > > - floating point format problems > Why do you have serialize_precision set to 100? Once you go over the default of 17, you're into the range of rounding errors in an IEEE double, which in turn is what PHP typically is using for its float type. This probably doesn't break anything besides unit tests, though. > - various XMP XML metadata issues > This seems to cover most of your errors. In particular, the metadata seems to be completely missing. What might be happening there is that XMPReader::isSupported() may be returning false on your system due to missing dependencies, and all these tests should be made to skip in that case. > and few others. > The only "other" looks like failures 3-6, which seems to boil down to some issue with JavaScriptContent::getRedirectTarget() recognizing redirects in general. If you can manage to figure out one of them (e.g. failure 4), it will probably figure out all of them. My guess offhand is that something in your setup is making the preg_match() in that function fail to match. -- Brad Jorsch (Anomie) Senior Software Engineer Wikimedia Foundation ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
[Wikitech-l] MediaWiki core tests failing? why?
Hello, I have tried to run our current MediaWiki tests using PHP 5.4 on a Gentoo machine against +/- git master: + git -C . log --oneline -1 5c63cce Merge "ApiQueryAllRevisions: Actually use 'start' and 'end'" + git -C vendor log --oneline -1 5efd7d7 Update OOjs UI to v0.12.12 + git -C skins/Vector log --oneline -1 9f5f333 Localisation updates from https://translatewiki.net. I have posted my php.ini to https://phabricator.wikimedia.org/P2226 I am running PHPUnit 4.3.1; 3.x series crashes at some point. I am getting few interesting failures: - floating point format problems - various XMP XML metadata issues and few others. This looks to me like some environment problems (some library too old etc. etc.). Any hints where those come from? If those are env problems indeed, I'd like to try to add some checks to the installers. ~saper env LC_MESSAGES=C LANG=C LC_TIME=C php5.4 -c ${HOME}/php54.ini tests/phpunit/phpunit.php --configuration tests/phpunit/suite.xml --exclude-group Broken,Stub,Dump,ParserFuzz --log-junit "${HOME}/tests/log/postgres-log.xml" Script started on Sun Oct 25 00:47:01 2015 #!/usr/bin/env php Using PHPUnit from /usr/share/php/phpunit/phpunit.phar PHPUnit 4.3.1 by Sebastian Bergmann. Configuration read from /usr/home/saper/public_html/ybabel/tests/phpunit/suite.xml (...) Time: 12.45 minutes, Memory: 1301.75Mb There were 35 failures: 1) ApiFormatPhpTest::testGeneralEncoding with data set #7 (array(1.0E+42), 'a:1:{i:0;d:1.0E+42;}', array(1)) Failed asserting that two strings are identical. --- Expected +++ Actual @@ @@ -a:1:{i:0;d:1.0E+42;} +a:1:{i:0;d:144885712678075916785549312;} /usr/home/saper/public_html/ybabel/tests/phpunit/includes/api/format/ApiFormatTestBase.php:61 /usr/home/saper/public_html/ybabel/tests/phpunit/MediaWikiTestCase.php:137 2) ApiFormatPhpTest::testGeneralEncoding with data set #30 (array(1.0E+42), 'a:1:{i:0;d:1.0E+42;}', array(2)) Failed asserting that two strings are identical. --- Expected +++ Actual @@ @@ -a:1:{i:0;d:1.0E+42;} +a:1:{i:0;d:144885712678075916785549312;} /usr/home/saper/public_html/ybabel/tests/phpunit/includes/api/format/ApiFormatTestBase.php:61 /usr/home/saper/public_html/ybabel/tests/phpunit/MediaWikiTestCase.php:137 3) JavaScriptContentTest::testUpdateRedirect with data set #1 ('/* #REDIRECT */mw.loader.load("//example.org/w/index.php?title=MediaWiki:MonoBook.js\\u0026action=raw\\u0026ctype=text/javascript");', '/* #REDIRECT */mw.loader.load("//example.org/w/index.php?title=TestUpdateRedirect_target\\u0026action=raw\\u0026ctype=text/javascript");') Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'/* #REDIRECT */mw.loader.load("//example.org/w/index.php?title=TestUpdateRedirect_target\u0026action=raw\u0026ctype=text/javascript");' +'/* #REDIRECT */mw.loader.load("//example.org/w/index.php?title=MediaWiki:MonoBook.js\u0026action=raw\u0026ctype=text/javascript");' /usr/home/saper/public_html/ybabel/tests/phpunit/includes/content/JavaScriptContentTest.php:268 /usr/home/saper/public_html/ybabel/tests/phpunit/MediaWikiTestCase.php:137 4) JavaScriptContentTest::testGetRedirectTarget with data set #0 ('MediaWiki:MonoBook.js', '/* #REDIRECT */mw.loader.load("//example.org/w/index.php?title=MediaWiki:MonoBook.js\\u0026action=raw\\u0026ctype=text/javascript");') Failed asserting that null matches expected 'MediaWiki:MonoBook.js'. /usr/home/saper/public_html/ybabel/tests/phpunit/includes/content/JavaScriptContentTest.php:324 /usr/home/saper/public_html/ybabel/tests/phpunit/MediaWikiTestCase.php:137 5) JavaScriptContentTest::testGetRedirectTarget with data set #1 ('User:FooBar/common.js', '/* #REDIRECT */mw.loader.load("//example.org/w/index.php?title=User:FooBar/common.js\\u0026action=raw\\u0026ctype=text/javascript");') Failed asserting that null matches expected 'User:FooBar/common.js'. /usr/home/saper/public_html/ybabel/tests/phpunit/includes/content/JavaScriptContentTest.php:324 /usr/home/saper/public_html/ybabel/tests/phpunit/MediaWikiTestCase.php:137 6) JavaScriptContentTest::testGetRedirectTarget with data set #2 ('Gadget:FooBaz.js', '/* #REDIRECT */mw.loader.load("//example.org/w/index.php?title=Gadget:FooBaz.js\\u0026action=raw\\u0026ctype=text/javascript");') Failed asserting that null matches expected 'Gadget:FooBaz.js'. /usr/home/saper/public_html/ybabel/tests/phpunit/includes/content/JavaScriptContentTest.php:324 /usr/home/saper/public_html/ybabel/tests/phpunit/MediaWikiTestCase.php:137 7) BitmapMetadataHandlerTest::testMultilingualCascade 'right(iptc)' does not match expected type "array". /usr/home/saper/public_html/ybabel/tests/phpunit/includes/media/BitmapMetadataHandlerTest.php:43 /usr/home/saper/public_html/ybabel/tests/phpunit/MediaWikiTestCase.php:137 8) BitmapMetadataHandlerTest::testPNGXMP Failed asserting that two arrays are equal. --- Expected +++ Actual @@ @@ Array ( 'frameCount' => 0 'loopCount' => 1 -'duration'