Merge branch 'tizen' into security-manager 66/88366/1
authorZbigniew Jasinski <z.jasinski@samsung.com>
Fri, 16 Sep 2016 12:13:07 +0000 (14:13 +0200)
committerZbigniew Jasinski <z.jasinski@samsung.com>
Fri, 16 Sep 2016 12:20:13 +0000 (14:20 +0200)
Signed-off-by: Zbigniew Jasinski <z.jasinski@samsung.com>
Conflicts:
src/common/tests_common.cpp
src/common/tests_common.h

Change-Id: Ic2301d3414aad2be4488eb04c59e217e184037ca

1  2 
packaging/security-tests.spec
src/common/tests_common.cpp
src/common/tests_common.h

Simple merge
@@@ -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("<<label<<"). Error: " << ret);
+ }
@@@ -56,8 -55,7 +56,8 @@@ void mktreeSafe(const std::string &path
  void creatSafe(const std::string &path, mode_t mode);
  void symlinkSafe(const std::string &targetPath, const std::string &linkPath);
  void removeDir(const std::string &path);
 +void waitPid(pid_t pid);
+ void change_label(const char* label);
  
  #define RUNNER_TEST_SMACK(Proc, ...)                                                        \
      void Proc(std::tuple<__VA_ARGS__> &optionalArgsTuple);                                  \