Last modified: 2014-10-19 17:47:06 UTC
I've been getting this for quite some time. First on OSX then on Vagrant. I've been hitting my head against the wall. Some test (not all) triggers a session reset. Nothing seems to fail weirdly in the tests, but once you're done the output is appended with: --- PHP Warning: Unknown: The session id is too long or contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,' in Unknown on line 0 PHP Stack trace: PHP 1. {main}() /vagrant/mediawiki/tests/phpunit/phpunit.php:0 PHP 2. MediaWikiPHPUnitCommand::main() /vagrant/mediawiki/tests/phpunit/phpunit.php:160 PHP 3. PHPUnit_TextUI_Command->run() /vagrant/mediawiki/tests/phpunit/MediaWikiPHPUnitCommand.php:42 Warning: Unknown: The session id is too long or contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,' in Unknown on line 0 Call Stack: 0.0010 253088 1. {main}() /vagrant/mediawiki/tests/phpunit/phpunit.php:0 0.1257 7994792 2. MediaWikiPHPUnitCommand::main() /vagrant/mediawiki/tests/phpunit/phpunit.php:160 0.1258 8008656 3. PHPUnit_TextUI_Command->run() /vagrant/mediawiki/tests/phpunit/MediaWikiPHPUnitCommand.php:42 PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 PHP Stack trace: PHP 1. {main}() /vagrant/mediawiki/tests/phpunit/phpunit.php:0 PHP 2. MediaWikiPHPUnitCommand::main() /vagrant/mediawiki/tests/phpunit/phpunit.php:160 PHP 3. PHPUnit_TextUI_Command->run() /vagrant/mediawiki/tests/phpunit/MediaWikiPHPUnitCommand.php:42 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 Call Stack: 0.0010 253088 1. {main}() /vagrant/mediawiki/tests/phpunit/phpunit.php:0 0.1257 7994792 2. MediaWikiPHPUnitCommand::main() /vagrant/mediawiki/tests/phpunit/phpunit.php:160 0.1258 8008656 3. PHPUnit_TextUI_Command->run() /vagrant/mediawiki/tests/phpunit/MediaWikiPHPUnitCommand.php:42 --- I promise that the session.save_path is writable. Usual debugging methods (throwing exceptions, printing output) are difficult since PHPUnit basically takes over all output.
PHPUnit does catch exceptions, since you might want to write a test that assert an exception is thrown. Using either --debug or --tap shows the test name being run. Though the later most probably eat output as well. var_dump() should show up though. I also have: if( $wgCommandLineMode ) { $wgDebugLogFile = '/tmp/cli-trunk.log'; } else { $wgDebugLogFile = '/tmp/www-trunk.log'; } This way you can use wfDebugLog('CHAD', 'something') and tail -f /tmp/cli-trunk.log|fgrep CHAD We also have a hidden command --debug-tests for the phpunit.php wrapper. That emit a log in PHPUnitCommand log buckets at start and completion of tests which help refine which test emitted the log: $ cd tests/phpunit $ php phpunit.php --debug-tests And in /tmp/cli-trunk.log: [PHPUnitCommand] Start test GlobalTest::testCgiToArray with data set #0 <some debug log related to that test> [PHPUnitCommand] End test GlobalTest::testCgiToArray with data set #0 Have you tried disabling all extensions? With a fresh LocalSettings.php? Throwing the sessions data? Zend vs Hiphop? :-D
(In reply to Antoine "hashar" Musso from comment #1) > Have you tried disabling all extensions? Yes > With a fresh LocalSettings.php? Yes > Throwing the sessions data? Hmm? > Zend vs Hiphop? Zend only. HHVM isn't affected by this.
I tried running all the tests individually in their own process to see if I could isolate it to one misbehaving test. Surprise surprise, it didn't break then! I'm spinning up a fresh vagrant VM, won't touch a damn thing and we'll get it breaking again I'm sure.
Fresh VM did no good. Same results as the previous.
Same here. Can it be related to running way too many tests at once (bug 67216 comment 8)? :-) PHP Warning: Unknown: The session id is too long or contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,' in Unknown on line 0 PHP Stack trace: PHP 1. {main}() /srv/vagrant/mediawiki/tests/phpunit/phpunit.php:0 PHP 2. MediaWikiPHPUnitCommand::main() /srv/vagrant/mediawiki/tests/phpunit/phpunit.php:160 PHP 3. PHPUnit_TextUI_Command->run() /srv/vagrant/mediawiki/tests/phpunit/MediaWikiPHPUnitCommand.php:42 Warning: Unknown: The session id is too long or contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,' in Unknown on line 0 Call Stack: 0.0006 252912 1. {main}() /srv/vagrant/mediawiki/tests/phpunit/phpunit.php:0 1.6730 25034984 2. MediaWikiPHPUnitCommand::main() /srv/vagrant/mediawiki/tests/phpunit/phpunit.php:160 1.6731 25047464 3. PHPUnit_TextUI_Command->run() /srv/vagrant/mediawiki/tests/phpunit/MediaWikiPHPUnitCommand.php:42 PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 PHP Stack trace: PHP 1. {main}() /srv/vagrant/mediawiki/tests/phpunit/phpunit.php:0 PHP 2. MediaWikiPHPUnitCommand::main() /srv/vagrant/mediawiki/tests/phpunit/phpunit.php:160 PHP 3. PHPUnit_TextUI_Command->run() /srv/vagrant/mediawiki/tests/phpunit/MediaWikiPHPUnitCommand.php:42 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 Call Stack: 0.0006 252912 1. {main}() /srv/vagrant/mediawiki/tests/phpunit/phpunit.php:0 1.6730 25034984 2. MediaWikiPHPUnitCommand::main() /srv/vagrant/mediawiki/tests/phpunit/phpunit.php:160 1.6731 25047464 3. PHPUnit_TextUI_Command->run() /srv/vagrant/mediawiki/tests/phpunit/MediaWikiPHPUnitCommand.php:42