提交 96825047 编写于 作者: C chuaizhzh 提交者: Gitee

pipe最大数32测试用例在系统其他进程启动后测试没有意义,有进程或者线程会使用pipe,此时会报错

上级 ace0a912
......@@ -131,30 +131,6 @@ HWTEST_F(PipeTest, testPipeBuf, TestSize.Level3)
AssertProcExitedOK(pid);
}
/**
* @tc.number SUB_KERNEL_IPC_PIPE_0500
* @tc.name teset max pipe number
* @tc.desc [C- SOFTWARE -0200]
* @tc.size SMALL
* @tc.type FUNC
*/
HWTEST_F(PipeTest, testMaxPipeNum, TestSize.Level2)
{
int fd[MAX_PIPE_NUMBER * 2]; // two file descriptor
int tmpInt;
for (int i = 0; i < MAX_PIPE_NUMBER; i++) {
tmpInt = pipe(&fd[i * 2]);
ASSERT_EQ(tmpInt, 0) << "> Create Pipe Error! " << errno;
LOG("> Create Pipe %d", i);
}
tmpInt = pipe(fd);
EXPECT_TRUE((tmpInt == -1) && (errno == ENFILE)) << "> tmpInt = "<< tmpInt << "\n" \
<< "> errno = " << errno;
for (int i = 0; i < MAX_PIPE_NUMBER * 2; i++) {
close(fd[i]);
}
}
/**
* @tc.number SUB_KERNEL_IPC_PIPE_0600
* @tc.name test pipe-ipc between brother
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册