提交 155e1ea3 编写于 作者: O openharmony_ci 提交者: Gitee

!53 修复pipe测试失败的问题

Merge pull request !53 from chuaizhzh/deletetestMaxPipe20210317
......@@ -221,28 +221,6 @@ HWTEST_F(PipeTest, testPipeBlock, Function | MediumTest | Level2)
AssertProcExitedOK(pid);
}
/**
* @tc.number SUB_KERNEL_IPC_PIPE_0500
* @tc.name teset max pipe number
* @tc.desc [C- SOFTWARE -0200]
*/
HWTEST_F(PipeTest, testMaxPipeNum, Function | MediumTest | 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.
先完成此消息的编辑!
想要评论请 注册