Ungraceful test timeout of check framework on scratchbox / N900

Bug #871832 reported by David Martin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HIPL
Fix Committed
Undecided
Unassigned

Bug Description

Our unit test framework check has a default timeout of 4 seconds for unit tests.
When you run the tests on passion (make check) and a timeout occurs, it fails the respective test and exits gracefully with a notice like this:

> test/lib/core/hostid.c:39:E:Core:test_serialize_deserialize_rsa_keys:0: (after this point) Test timeout expired

When a timeout occurs in the scratchbox environment or on the N900 the running test simply gets killed, i.e. it is exited ungracefully and there is no notice whatsoever (except for a printed "killed."). This should not be the case.

How to reproduce this issue:
- generate a timeout in one of the unit tests and let it run on the scratchbox environment or on the N900, a patch to achieve this is attached (to get a timeout with unit tests on passion or locally insert a sleep(5) somewhere in the unit test)
- see the following merge for some discussion on the issue:
  https://code.launchpad.net/~martin-lp/hipl/n900-build-fix/+merge/78551

Attached are the strace logs of the test/lib/core/hostid.c unit tests with only the 1024 / 2048 bit RSA key generation executed.

Tags: check killed
Revision history for this message
David Martin (martin-lp) wrote :
Revision history for this message
David Martin (martin-lp) wrote :
Revision history for this message
David Martin (martin-lp) wrote :
description: updated
David Martin (martin-lp)
summary: - Ungraceful test timeout exit of check framework on scratchbox / N900
+ Ungraceful test timeout of check framework on scratchbox / N900
Changed in hipl:
status: New → Fix Committed
Revision history for this message
David Martin (martin-lp) wrote :

Hi,
there's no fix committed for this bug yet. :) The issue just doesn't appear anymore
because the timeout in the unit tests has been fixed. The bug is still open as
any test timeout that may occur would still ungracefully break the test run on
scratchbox or on the N900.

Revision history for this message
René Hummen (rene-hummen) wrote :

In case of the check timeout, I don't think it's a bug but a feature. It actually allows to identify long-running function calls, which is a good thing, e.g., for endless loop detection. Hence, there is no requirement for a fix in check. We just need to set the timeout as required. So, your change is a fix for _our_ unit tests ;)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.