From: Zbigniew Jasinski Date: Fri, 16 Sep 2016 12:13:07 +0000 (+0200) Subject: Merge branch 'tizen' into security-manager X-Git-Tag: security-manager_5.5_testing~20^2~50 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Ftest%2Fsecurity-tests.git;a=commitdiff_plain;h=55859d0ed339ac30ae14780b1d1940bcea986834 Merge branch 'tizen' into security-manager Signed-off-by: Zbigniew Jasinski Conflicts: src/common/tests_common.cpp src/common/tests_common.h Change-Id: Ic2301d3414aad2be4488eb04c59e217e184037ca --- 55859d0ed339ac30ae14780b1d1940bcea986834 diff --cc src/common/tests_common.cpp index 52ef252,e34f401..d08893c --- a/src/common/tests_common.cpp +++ b/src/common/tests_common.cpp @@@ -232,11 -231,10 +232,17 @@@ void removeDir(const std::string &path RUNNER_ASSERT_ERRNO_MSG(0 == rmdir(path.c_str()), "rmdir for <" << path << "> failed"); } +void waitPid(pid_t pid) +{ + int status; + pid_t ret = waitpid(pid, &status, 0); + RUNNER_ASSERT_MSG((ret != -1) && WIFEXITED(status) && WEXITSTATUS(status) == 0, + "Child process exited abnormally" << + ": ret=" << ret << ", errno=" << errno << ", status=" << status); +} + // changes process label + void change_label(const char* label) + { + int ret = smack_set_label_for_self(label); + RUNNER_ASSERT_MSG(0 == ret, "Error in smack_set_label_for_self("< &optionalArgsTuple); \