Last modified: 2012-10-19 13:12:31 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T38452, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 36452 - xdebug causes bogus failures for <tag>-related parser tests
xdebug causes bogus failures for <tag>-related parser tests
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Unit tests (Other open bugs)
1.20.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-02 17:21 UTC by Chad H.
Modified: 2012-10-19 13:12 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Chad H. 2012-05-02 17:21:52 UTC
When I enable xdebug, I get the following 4 bogus failures <http://p.defau.lt/?PIkfleT2gR1E_HKF3PDoZg>

xdebug seems to be changing array key formatting on var_dump() (see ParserTestParserHook::dumpHook)) which is causing phpunit to claim there's a failure when there obviously isn't. Disabling xdebug makes the failures go away.

This may be something platform-specific (OSX 10.7.3, PHPUnit 3.6.10, PHP 5.3.8). Not sure if it's a real bug upstream or just some behavior we should work around.
Comment 1 Antoine "hashar" Musso (WMF) 2012-05-02 20:55:24 UTC
Same platform. No issue :-]

Can you paste your xdebug version? php --version will tell something like:

    with Xdebug v2.1.3, Copyright (c) 2002-2012, by Derick Rethans


It could be your xdebug configuration?

php -i | grep xdebug


xdebug
xdebug support => enabled
xdebug.auto_trace => Off => Off
xdebug.collect_assignments => Off => Off
xdebug.collect_includes => On => On
xdebug.collect_params => 0 => 0
xdebug.collect_return => Off => Off
xdebug.collect_vars => Off => Off
xdebug.default_enable => On => On
xdebug.dump.COOKIE => no value => no value
xdebug.dump.ENV => no value => no value
xdebug.dump.FILES => no value => no value
xdebug.dump.GET => no value => no value
xdebug.dump.POST => no value => no value
xdebug.dump.REQUEST => no value => no value
xdebug.dump.SERVER => no value => no value
xdebug.dump.SESSION => no value => no value
xdebug.dump_globals => On => On
xdebug.dump_once => On => On
xdebug.dump_undefined => Off => Off
xdebug.extended_info => On => On
xdebug.file_link_format => no value => no value
xdebug.idekey => amusso => no value
xdebug.manual_url => http://www.php.net => http://www.php.net
xdebug.max_nesting_level => 100 => 100
xdebug.overload_var_dump => On => On
xdebug.profiler_aggregate => Off => Off
xdebug.profiler_append => Off => Off
xdebug.profiler_enable => Off => Off
xdebug.profiler_enable_trigger => Off => Off
xdebug.profiler_output_dir => /var/tmp/ => /var/tmp/
xdebug.profiler_output_name => cachegrind.out.%p => cachegrind.out.%p
xdebug.remote_autostart => Off => Off
xdebug.remote_connect_back => Off => Off
xdebug.remote_cookie_expire_time => 3600 => 3600
xdebug.remote_enable => Off => Off
xdebug.remote_handler => dbgp => dbgp
xdebug.remote_host => localhost => localhost
xdebug.remote_log => no value => no value
xdebug.remote_mode => req => req
xdebug.remote_port => 9000 => 9000
xdebug.scream => Off => Off
xdebug.show_exception_trace => Off => Off
xdebug.show_local_vars => Off => Off
xdebug.show_mem_delta => Off => Off
xdebug.trace_format => 0 => 0
xdebug.trace_options => 0 => 0
xdebug.trace_output_dir => /var/tmp/ => /var/tmp/
xdebug.trace_output_name => trace.%c => trace.%c
xdebug.var_display_max_children => 128 => 128
xdebug.var_display_max_data => 512 => 512
xdebug.var_display_max_depth => 3 => 3
Comment 2 Mark A. Hershberger 2012-08-18 20:52:07 UTC
No errors on a CentOS VM with php 5.3.3 and Xdebug v2.1.4.

Only tested there (before I found this bug) because I was seeing errors on my laptop (Debian/Ubuntu) which has the php package from 5.3.16-1~dotdeb.0 and XDebug v2.2.1.

Checking xdebug settings shows only a few differences, but those may be version things.
Comment 3 Mark A. Hershberger 2012-08-18 22:03:09 UTC
Debian squeeze worked.

$ php -v
PHP 5.3.3-7+squeeze14 with Suhosin-Patch (cli) (built: Aug  6 2012 14:18:06) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans
    with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH

Trying to upgrade to Xdebug 2.2.
Comment 4 Mark A. Hershberger 2012-08-18 23:15:01 UTC
Recompiled XDebug from source and got the problem:

$ php -v
PHP 5.3.3-7+squeeze14 with Suhosin-Patch (cli) (built: Aug  6 2012 14:18:06) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with Xdebug v2.3.0dev, Copyright (c) 2002-2012, by Derick Rethans
    with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH
Comment 5 Mark A. Hershberger 2012-08-18 23:44:08 UTC
http://bugs.xdebug.org/view.php?id=863

Adding xdebug.overload_var_dump=0 to php.ini solves the problem.
Comment 6 Tim Landscheidt 2012-10-19 02:13:00 UTC
To add some search terms: "Parser hook: basic arguments".  The setting can also be changed by the CLI option "-d", so "php -d xdebug.overload_var_dump=0 ./tests/parserTests.php" will work.

Generally, it would be nice to port these tests to PHPUnit and use assertEquals() so that they don't depend on formatting and indentation.
Comment 7 Tim Landscheidt 2012-10-19 04:16:37 UTC
Gerrit change #28662.
Comment 8 Antoine "hashar" Musso (WMF) 2012-10-19 13:12:31 UTC
Merged in. Thanks!

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links