Bug #34896 mysqltestrun loses the result file if test times out
Submitted: 27 Feb 2008 16:55 Modified: 6 Oct 2010 13:15
Reporter: Sven Sandberg Email Updates:
Status: Duplicate Impact on me:
None 
Category:Tools: MTR / mysql-test-run Severity:S7 (Test Cases)
Version:5.0, 5.1, 4.1, 6.0 BK OS:Any
Assigned to: CPU Architecture:Any
Tags: mtr, mysql-test-run, result file, test result, timeout

[27 Feb 2008 16:55] Sven Sandberg
Description:
Usually, mysql-test-run writes the output of a test case either to suite/the-suite/r/test-case.reject, or to var/log/test-case.log. However, if mysql-test-run.pl times out, the output file is lost.

This is particularly problematic since it is important to see what happened when the test times out. It is possible to get partial (but not complete) information by looking in the server logs. The output of the test is usually much easier to follow and allows debugging the test by inserting printouts.

The reason for the bug is that the output is saved in an internal buffer which is written to file when the test completes (either fails or succeeds), but not when the test times out.

How to repeat:
Run a test that times out.

Suggested fix:
Write the output to file instead of to an internal memory buffer.

This also has the advantage that the test can be followed live while running, using tail -f.
[27 Feb 2008 21:34] Sveta Smirnova
Thank you for the report.

Verified as described.
[21 Jul 2008 10:26] Sven Sandberg
See also BUG#38181.
[6 Oct 2010 13:15] Bjørn Munch
I think this was actually fixed by Bug #38181. I cannot reproduce it in 5.1 now.