fix: 修复获取容器信息失败
Signed-off-by: zhushengle <zhushengle@huawei.com> Change-Id: Ie612d14337f7c24812c74f1510c0a8e6fca1c200
This commit is contained in:
@@ -30,19 +30,13 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "It_process_fs_test.h"
|
||||
|
||||
static const int ini_process_max = 3;
|
||||
|
||||
void ItProcessFs013(void)
|
||||
{
|
||||
std::string path;
|
||||
DIR *dirp = nullptr;
|
||||
for (int i = 1; i <= ini_process_max; i++) {
|
||||
if (i != 2) { /* 2: skip kernel process */
|
||||
path = GenProcPidPath(i);
|
||||
printf("path: %s\n", path.c_str());
|
||||
dirp = opendir(path.data());
|
||||
ASSERT_NE(dirp, nullptr);
|
||||
(void)closedir(dirp);
|
||||
};
|
||||
}
|
||||
path = GenProcPidPath(1);
|
||||
printf("path: %s\n", path.c_str());
|
||||
dirp = opendir(path.data());
|
||||
ASSERT_NE(dirp, nullptr);
|
||||
(void)closedir(dirp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user