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