Detection for tests that fail due to error in test code needed

Bug #1240131 reported by Chris Gregan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PlainBox (Toolkit)
Fix Released
High
Zygmunt Krynicki

Bug Description

There is currently no way to detect when at Plainbox test dies or causes a system failure so bad that the test run must be recovered. It would be helpful for test cases quality maintenance to know when test processes quit in an ungraceful manner. If this could be flagged so it could, minimally, be displayed in the report would be great, with eventual plans to add support to C3.

Related branches

Revision history for this message
Daniel Manrique (roadmr) wrote :

A simple way to achieve this is to set the comment to "this test was skipped because it crashed the test run". We already have a place where the outcome of the last attempted test is set to "fail" when the user selects "continue" as a resume option.

Changed in checkbox:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

This needs to be done at the framework level. What we've briefly disscussed with Chris is to have a set of flags associated with each test result. The framework could detect when the job was cancelled / interrupted (by killing the process) and when we didn't really observe the process exiting (so probably the machine rebooted). We should expose this in the API so that apps can do whatever is appropriate (render pretty reports, set comments, etc)

Zygmunt Krynicki (zyga)
Changed in checkbox:
status: Triaged → Fix Released
status: Fix Released → Triaged
Zygmunt Krynicki (zyga)
Changed in checkbox:
milestone: none → plainbox-0.6
Zygmunt Krynicki (zyga)
Changed in plainbox:
status: New → Triaged
importance: Undecided → High
milestone: none → 0.6
Changed in checkbox:
milestone: plainbox-0.6 → none
Zygmunt Krynicki (zyga)
affects: checkbox → checkbox-ng
Zygmunt Krynicki (zyga)
tags: removed: plainbox
Revision history for this message
Chris Gregan (cgregan) wrote :

1) write a job that kills plainbox (IIRC there's one in stubbox or somewhere else)
2) run it and see what happens to plainbox
3) try stuff that misbehaves in other ways

One thing it boils down to is the exit status (not just exit code, exit status also has type of exit and more) we should get that data and use it.
The other thing is the pre-run/post-run session meta data update
Code that runs external programs is in plainbox.vendor.extcmd

Changed in plainbox:
milestone: 0.6 → 0.7
Changed in checkbox-ng:
milestone: none → 0.5
Changed in plainbox:
milestone: 0.7 → 0.9
Changed in checkbox-ng:
milestone: 0.5 → 0.7
Changed in checkbox-ng:
milestone: 0.7 → 0.9
Changed in plainbox:
milestone: 0.9 → 0.11
Daniel Manrique (roadmr)
Changed in plainbox:
milestone: 0.11 → future
Changed in checkbox-ng:
milestone: 0.9 → future
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

The replacement extcmd implementation can now detect exactly how a process has finished. We don't currently make use of that bue we can simply store that in the job result object. We still need to figure out what's needed to push this data to C3 and into test reports.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Replacement extcmd almost here, I'll defer this until the outcome metadata API lands so adding new outcomes is easy.

Changed in plainbox:
status: Triaged → In Progress
Changed in plainbox:
status: In Progress → Triaged
Zygmunt Krynicki (zyga)
Changed in plainbox:
milestone: future → 0.18
Changed in checkbox-ng:
milestone: future → none
Zygmunt Krynicki (zyga)
Changed in plainbox:
status: Triaged → In Progress
assignee: nobody → Zygmunt Krynicki (zkrynicki)
Changed in plainbox:
milestone: 0.18 → none
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Next time please read the merge request. This works regardless of which runner is used. It can be a part of the next release.

Changed in plainbox:
milestone: none → 0.18
Changed in plainbox:
milestone: 0.18 → 0.19
Changed in plainbox:
status: In Progress → Fix Committed
no longer affects: checkbox-ng
Changed in plainbox:
status: Fix Committed → Fix Released
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.