From: Krzysztof Jackiewicz Date: Mon, 20 Apr 2020 13:18:10 +0000 (+0200) Subject: Make ScopedAppLauncher child always notify the parent X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Ftest%2Fsecurity-tests.git;a=commitdiff_plain;h=dd444cfa7f8f869a9c3f40808883dec1b72f7765 Make ScopedAppLauncher child always notify the parent In case any of ScopedAppLauncher child process asserts fails, make sure the parent is notified and displays the error properly. Change-Id: I75bbe0e7781cf338b62a39de03fda8f305ae8d50 --- diff --git a/src/security-manager-tests/common/scoped_app_launcher.cpp b/src/security-manager-tests/common/scoped_app_launcher.cpp index a557f01..50a9587 100644 --- a/src/security-manager-tests/common/scoped_app_launcher.cpp +++ b/src/security-manager-tests/common/scoped_app_launcher.cpp @@ -34,11 +34,15 @@ ScopedAppLauncher::ScopedAppLauncher(const AppInstallHelper& app) : } else { m_syncPipe.claimChildEp(); - RUNNER_ASSERT_ERRNO_MSG(setLauncherSecurityAttributes(app.getUID(), app.getGID()) == 0, - "launcher failed"); - Api::prepareAppCandidate(); - Api::prepareApp(app.getAppId().c_str()); - + try { + RUNNER_ASSERT_ERRNO_MSG(setLauncherSecurityAttributes(app.getUID(), app.getGID()) == 0, + "launcher failed"); + Api::prepareAppCandidate(); + Api::prepareApp(app.getAppId().c_str()); + } catch (...) { + m_syncPipe.post(); + throw; + } m_syncPipe.post(); m_syncPipe.wait(); exit(0);