test(basekit): add threads, system and filesystem coverage tests - #769
Conversation
Add unit tests for FileLock, NamedCriticalSection, NamedSemaphore, Thread priority, sync primitives, UUID, StackTrace, console, DLL, pipe, process, symlink, path and file buffer operations. 新增basekit线程/系统/文件系统模块的单元测试,覆盖文件锁、 命名临界区、信号量、线程优先级、同步原语、UUID、堆栈跟踪、 控制台、动态库、管道、进程、符号链接和文件操作。 Log: 添加basekit基础设施覆盖率测试 Influence: 仅新增测试文件,不影响现有功能,提升basekit模块测试覆盖率。
There was a problem hiding this comment.
Sorry @pengfeixx, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
deepin pr auto review★ 总体评分:95分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 std::string MakeTempFile(const std::string& content = "data")
{
char t[] = "/tmp/bk_symf_XXXXXX";
int fd = mkstemp(t);
if (fd < 0) throw std::runtime_error("mkstemp");
ssize_t written = write(fd, content.data(), content.size());
close(fd);
if (written < 0 || static_cast<size_t>(written) != content.size()) {
std::remove(t);
throw std::runtime_error("write failed");
}
return t;
} |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lzwind, pengfeixx The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/forcemerge |
|
This pr force merged! (status: unstable) |
Add unit tests for FileLock, NamedCriticalSection, NamedSemaphore, Thread priority, sync primitives, UUID, StackTrace, console, DLL, pipe, process, symlink, path and file buffer operations.
新增basekit线程/系统/文件系统模块的单元测试,覆盖文件锁、
命名临界区、信号量、线程优先级、同步原语、UUID、堆栈跟踪、
控制台、动态库、管道、进程、符号链接和文件操作。
Log: 添加basekit基础设施覆盖率测试
Influence: 仅新增测试文件,不影响现有功能,提升basekit模块测试覆盖率。