Merge lp:~unity-team/libqtdbustest/handle-crashing-child-process into lp:libqtdbustest

Proposed by Pete Woods on 2014-03-18
Status: Merged
Approved by: Antti Kaijanmäki on 2014-03-19
Approved revision: 33
Merged at revision: 33
Proposed branch: lp:~unity-team/libqtdbustest/handle-crashing-child-process
Merge into: lp:libqtdbustest
Diff against target: 28 lines (+7/-4)
1 file modified
src/qdbus-test-runner/qdbus-simple-test-runner.cpp (+7/-4)
To merge this branch: bzr merge lp:~unity-team/libqtdbustest/handle-crashing-child-process
Reviewer Review Type Date Requested Status
Antti Kaijanmäki (community) 2014-03-18 Approve on 2014-03-19
PS Jenkins bot continuous-integration Approve on 2014-03-18
Review via email: mp+211586@code.launchpad.net

Commit message

Correctly handle crashing child processes

Description of the change

* Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)
  * Yes
 * Did you build your software in a clean sbuild/pbuilder chroot or ppa?
  * Yes
 * Did you build your software in a clean sbuild/pbuilder armhf chroot or ppa?
  * Yes
 * Has your component "TestPlan” been executed successfully on emulator, N4?
  * Yes
 * Has a 5 minute exploratory testing run been executed on N4?
  * Yes
 * If you changed the packaging (debian), did you subscribe a core-dev to this MP?
  * N/A
 * If you changed the UI, did you subscribe the design-reviewers to this MP?
  * No change
 * What components might get impacted by your changes?
  * Unity7
  * Unity8
 * Have you requested review by the teams of these owning components?
  * Yes

Check List:
https://wiki.ubuntu.com/Process/Merges/Checklists/libqtdbustest

Test Plan:
https://wiki.ubuntu.com/Process/Merges/TestPlan/libqtdbustest

Silo:
<waiting for silo>

To post a comment you must log in.
Antti Kaijanmäki (kaijanmaki) wrote :

LGTM.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/qdbus-test-runner/qdbus-simple-test-runner.cpp'
2--- src/qdbus-test-runner/qdbus-simple-test-runner.cpp 2013-11-13 10:13:18 +0000
3+++ src/qdbus-test-runner/qdbus-simple-test-runner.cpp 2014-03-18 17:21:56 +0000
4@@ -32,7 +32,10 @@
5 Q_OBJECT
6
7 public Q_SLOTS:
8- void finished(int exitCode) {
9+ void finished(int exitCode, QProcess::ExitStatus exitStatus) {
10+ if (exitStatus == QProcess::CrashExit && exitCode == 0) {
11+ exitCode = 1;
12+ }
13 QCoreApplication::exit(exitCode);
14 }
15 };
16@@ -65,9 +68,9 @@
17 runner.startServices();
18
19 ExitListener listener;
20- QObject::connect(&service->underlyingProcess(), SIGNAL(finished(int)),
21- &listener,
22- SLOT(finished(int)));
23+ QObject::connect(&service->underlyingProcess(),
24+ SIGNAL(finished(int, QProcess::ExitStatus)), &listener,
25+ SLOT(finished(int, QProcess::ExitStatus)));
26
27 return application.exec();
28 }

Subscribers

People subscribed via source and target branches

to all changes: