Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

handling test hangs/crashes/freezes

by bulk88 (Priest)
on Apr 30, 2012 at 05:55 UTC ( #967999=perlquestion: print w/ replies, xml ) Need Help??
bulk88 has asked for the wisdom of the Perl Monks concerning the following question:

In a ExtUtils::MakeMaker based module, whats the best or the or a way of dealing with the problem if your pretty sure most of the test failure will result in indefinitely hanging/freezing in OS calls, or crashing the perl process running the .t file? Or dont deal with it, the user installing the module knows how to kill processes?

Comment on handling test hangs/crashes/freezes
Re: handling test hangs/crashes/freezes
by Corion (Pope) on Apr 30, 2012 at 07:08 UTC

    One approach would be to try to make the test files themselves more robust (or more fragile) using alarm and potentially spawning a second Perl process to be watched.

    Personally, I would let things crash, as most smoke testers have such watchdogs already and will abort a test suite after 5 minutes or so. If a user wants to install a module that crashes the interpreter, they will have to skip tests.

      Alarm wouldnt work for me. This is Windows. Alarm on Windows cant break syscalls. The reasons for hanging are I/O and OS threading related. Well, they were until I fixed the reasons for the hangs, but my problem is, if it does "fail" it will fail by hanging. So best idea is not plan for hangs and crashes in tests, since a user shouldnt "normally" see the test fail, and in the rare case it does hang, the user has an automatic watchdog or Ctrl-C/Task Manager to kill it?

        Yes. On Windows, alarm won't help you much, but all the automated testers should have provisions against hanging test suites.

        kill will terminate processes on Windows.


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

        The start of some sanity?

Re: handling test hangs/crashes/freezes
by Anonymous Monk on Apr 30, 2012 at 07:27 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://967999]
Approved by Old_Gray_Bear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2014-08-01 10:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (0 votes), past polls