Skip to content

Commit ae2012d

Browse files
[libc] Disable epoll_create fail test when SYS_epoll_create1 is used internally (#99785)
The fail test case only makes sense if SYS_epoll_create is used internally to implement epoll_create, since the only argument to epoll_create (size) is dropped if SYS_epoll_create1 is used.
1 parent 16c24a8 commit ae2012d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libc/test/src/sys/epoll/linux/epoll_create_test.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "src/unistd/close.h"
1111
#include "test/UnitTest/ErrnoSetterMatcher.h"
1212
#include "test/UnitTest/Test.h"
13+
#include <sys/syscall.h> // For syscall numbers.
1314

1415
using namespace LIBC_NAMESPACE::testing::ErrnoSetterMatcher;
1516

@@ -21,6 +22,8 @@ TEST(LlvmLibcEpollCreateTest, Basic) {
2122
ASSERT_THAT(LIBC_NAMESPACE::close(fd), Succeeds());
2223
}
2324

25+
#ifdef SYS_epoll_create
2426
TEST(LlvmLibcEpollCreateTest, Fails) {
2527
ASSERT_THAT(LIBC_NAMESPACE::epoll_create(0), Fails(EINVAL));
2628
}
29+
#endif

0 commit comments

Comments
 (0)