Hi,
I just installed simpletest 6.x-2.8, followed all instructions in INSTALL, and I first ran it on xmlsitemap from the browser. It apparently went fine (reporting failures, not surprisingly since that module was often raising error messages).
But then, maybe I missed it, I couldn't find a report in a form suitable for sending to the module maintainer (please tell me if there is).
So I tried to re-run the tests from the command line, but there, every command (except help) ends with a segmentation fault.
mich@claddagh:/usr/local/share/drupal$ sudo -u www-data php ./scripts/run-tests.sh --url http://localhost/drupal/ --file sites/default/modules/xmlsitemap/xmlsitemap.test
Fatal error: Call to undefined function drupal_get_bootstrap_phase() in /usr/local/share/drupal-sites/default/modules/simpletest/simpletest.function.inc on line 130
Call Stack:
1.8919 19069896 1. _drupal_exception_handler() /usr/local/share/drupal-sites/default/modules/simpletest/simpletest.function.inc:0
1.8920 19070336 2. _drupal_log_error() /usr/local/share/drupal-sites/default/modules/simpletest/simpletest.function.inc:78
Segmentation fault
It turns up that drupal_get_bootstrap_phase() is in D7 only.
Anyway I then tried simpler :
mich@claddagh:/usr/local/share/drupal$ php scripts/run-tests.sh --clean
Environment cleaned.
- No left over tables to remove.
- No temporary directories to remove.
- Removed 0 test results.
Segmentation fault
That doesn't sound good what do you think ?
I'm running PHP 5.2.6-3ubuntu4.1 with Suhosin-Patch 0.9.6.2 with Apache/2.2.11 (linux ubuntu 9.04)
My drupal installation is based on PostgreSQL 8.3 .
I'd really like to be able to use test driven development for D6, because D7 is not released yet, and many big servers still run 5.x ...
Letting code maintainers improve reliability of their D6 modules would be a good step before they port them to D7.
Thank you for your work.
Best regards,
RockyRoad
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | bug474188-interaction.txt | 8.46 KB | RockyRoad |
| #4 | 473504-bootstrap-phase.patch | 3.75 KB | boombatower |
| #1 | 473504-bootstrap-phase.patch | 1.57 KB | boombatower |
Comments
Comment #1
boombatower commentedSee if this fixes it.
Comment #2
boombatower commentedTold it still seg faults in IRC.
Comment #3
boombatower commentedHmmm...running block.test with a call to
hax()in the testMethod() results in the display of the PHP Fatal error as expected.Running test with following command:
Comment #4
boombatower commentedSeems to require a few more updates from D7, but I can now run the xmlsitemap test the same way you do and get the error messages.
Comment #5
RockyRoad commentedI still get seg fault in both --clean invocation and the following:
You noticed that the error incriminates a different function and line number.
It sounds to me like two different issues:
An idea: if #475464: SimpleTest: abstract reporter and generate XML reports (extended to text reports) was implemented, run-tests.sh use case could be reconsidered ... but I may well have missed something.
Comment #6
RockyRoad commentedOoops... previous output was after first patch.
The second patch gave me, for xml test, an html output whose content tells:
"The website encountered an unexpected error. Please try again later."
Same output as before for --clean invocation.
Comment #7
snufkin commentedSame here with the patch. What needs to be backported? I could take a look, I need the cli testing for my SoC project.
Comment #8
RockyRoad commentedHi,
I had postponed working with simpletest, and I needed to retrieve my notes.
I updated from current cvs DRUPAL-6--2 branch, and restarted the tests.
Block and SimpleTests tests succeed from the browser.
From the CLI,
run-tests.shstill complains aboutdrupal_get_bootstrap_phase(),until I reapplied 473504-bootstrap-phase_0 patch , which backports it.
But then, I get an html output with only an error message, but I found no trace of it in apache logs.
Note that, on my localhost where I ran the tests, drupal runs with pgsql.
Nothing indicates that the problem would be there though.
Comment #9
snufkin commentedI just tried todays dev roll, the class cli tests seem to work fine, cleanup works without segfault. The per-file run still misses the boostrap phase function, but I think i'll be able to run my class tests invoking --class.
Comment #10
damien tournoud commentedThe segfault is due to the order of loading the curl and postgresql extensions.
Comment #11
boombatower commented@Damien: any suggestions then? as I don't have postgresql so hard to test.
Comment #12
damien tournoud commentedSee http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=411982
This is apparently a bug in pgsql, that frees a little bit too many things from openssl. You have to be sure to load pgsql before curl to workaround this bug. On Debian, it is as simple as:
Comment #13
RockyRoad commentedYou're right Damien, thanks :)
After renaming curl.ini and reloading apache, the seg fault disappeared \o/
But I still have "The website encountered an unexpected error" html result, when running either :
I just tried the --class invocation:
It works better, with a text output this time:
It works fine with
--class BlockTestCasetoo, with or without the--php /usr/bin/phpoption, but all 66 tests succeed for me.Comment #14
damien tournoud commentedHave you tried by group name? This is the prefered way to invoke a test. I'm not even sure if --file works in D7.
Comment #15
RockyRoad commentedERROR: Unknown argument '--group'.
Comment #16
snufkin commentedYou can invoke a test group like this:
php scripts/run-tests.sh BlockComment #17
mike booth commentedI can't claim to have tested this patch exhaustively... but I was getting the fatal error on the Simpletest admin page, caused by the offending call to drupal_get_bootstrap_phase(), and this patch seems to have resolved my issue. Thanks, and good work.
Comment #18
boombatower commentedPlease re-open if still an issue.