• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <errno.h>
2 #include <fcntl.h>
3 #include <gtest/gtest.h>
4 #include <sys/epoll.h>
5 
6 using namespace testing::ext;
7 
8 class LinuxEpollcreate1Test : public testing::Test {
SetUp()9     void SetUp() override {}
TearDown()10     void TearDown() override {}
11 };
12 
13 /**
14  * @tc.name: epoll_create1_001
15  * @tc.desc: This test verifies epoll can the create1 function correctly create an epoll instance? if the test passes,
16  *           it indicates that epoll the function of the create1 function is normal.
17  * @tc.type: FUNC
18  */
19 HWTEST_F(LinuxEpollcreate1Test, epoll_create1_001, TestSize.Level1)
20 {
21     int fd = epoll_create1(0);
22     ASSERT_NE(fd, -1);
23     close(fd);
24 }