allow an xpcshell test to request longer timeout before it is killed
Categories
(Testing :: XPCShell Harness, defect)
Tracking
(Not tracked)
People
(Reporter: aceman, Assigned: aceman)
References
Details
(Keywords: dev-doc-needed)
Attachments
(1 file)
(deleted),
patch
|
ted
:
review+
|
Details | Diff | Splinter Review |
Comment 1•11 years ago
|
||
Comment 3•11 years ago
|
||
Comment 5•11 years ago
|
||
Comment 6•11 years ago
|
||
Comment 8•5 years ago
|
||
Dear aceman,
I would like to run xpcshell-test under valgrind to weed out any remaining memory-related errors.
But in order to do that I need to run the test with much longer timeout value.
Maybe a multiplication factor of 20-25 would be needed.
What is exactly the format of writing this multiplication factor?
For example, the following is the content of
mozilla/comm/chat/components/src/test/xpcshell.ini
that is included from
moz-obj-dir/objdir-tb3/_tests/xpcshell/xpcshell.ini (this is under my MOZOBJDIR).
--- quote
[DEFAULT]
head =
tail =
[test_accounts.js]
[test_commands.js]
[test_conversations.js]
[test_logger.js]
--- end quote
Where do I put the multiplication factor for timeout and how?
It would be awesome if we can specify the timeout multiplication factor on a directory basis instead of
specifying it for each file, but I can live with individual specification for now.
TIA
Yes, see how the timeout variable is used in tests:
https://searchfox.org/comm-central/search?q=requesttimeoutfactor&path=
Comment 10•5 years ago
|
||
(In reply to :aceman from comment #9)
Yes, see how the timeout variable is used in tests:
https://searchfox.org/comm-central/search?q=requesttimeoutfactor&path=
Thank you very much.
I will try to increase the timeout as suggested.
Comment 11•5 years ago
|
||
Aceman,
Thank you for the feature to lengthen timeout value.
This is a summary of latest discovery.
valgrind warning goes into stderr or stdout and is not visible unless the log is printed.
So I had to print out the detailed log for every test since xpcshell test does not print stderr/stdout output if there is no error.
(Passing --verbose to xpcshell-test as in |mach xpcshell-test --verbose|)
This makes the output of whole xpcshell-test whoppingly large. About 115MB (!)
[With verbose output of my local patches to enable buffered output, the total will be more than 170MB. A bit too large for easy handling in an editor buffer. Not impossible.]
So I had to run a few tests to see how it goes before producing such a large output.
Then I already found a positive uninitialized value reference in M-C code. I will file a bugzilla on this.
After a little tweak of my setup to invoke valgrind to reduce the output (now I had to disable output for memory leak and mismatched new/delete/malloc/free), I ran the whole C-C test only. [I selectively chose C-C test directories, and lengthened the timeout values appropriately..] This still generates close to 20MB of output.
But the run was worth it.
Surprise. I found a few dozen tests which caused uninitialized value access: there seem to be several causes and a few of them cause a dozen warnings each.
I will file bugzilla entries about them in the next few days.
At least, I can immediately see on of them seems to be serious. It has something to do with the handling of selected messages. I have a feeling some erratic behavior seen by users may be related to this.
All in all, I am glad I asked the question to lengthen the timeout so that I can run xpcshell test with C-C TB running under valgrind.
(I used a fake wrapper to call the real xpcshell binary under valgrind with suitable options and installed this wrapper as |xpcshell| after renaming the original |xpcshell| to |xpcshell-bin|. Then invoked |mach xpcshell-test --verbose| )
I have a feeling that I probably find another few warnings in M-C code once I ran the whole test under valgrind.
TIA
Description
•