未验证 提交 da8b6247 编写于 作者: O openharmony_ci 提交者: Gitee

!1371 修复seccomp测试用例概率失败的问题

Merge pull request !1371 from 夏不白/fix_seccomp_test_fail
......@@ -35,6 +35,7 @@
#include "seccomp_policy.h"
using SyscallFunc = bool (*)(void);
constexpr int SLEEP_TIME = 100000; // 100ms
using namespace testing::ext;
using namespace std;
......@@ -93,6 +94,11 @@ public:
std::cout << "signal failed:" << strerror(errno) << std::endl;
}
/* Sleeping for avoiding influencing child proccess wait for other threads
* which were created by other unittests to release global rwlock. The global
* rwlock will be used by function dlopen in child process */
usleep(SLEEP_TIME);
pid = StartChild(filterName, func);
if (pid == -1) {
std::cout << "fork failed:" << strerror(errno) << std::endl;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册