Revert "[GVN] MemorySSA for GVN: add optional `AllowMemorySSA`"
[llvm-project.git] / libc / test / src / sys / select / select_failure_test.cpp
bloba4990bfd4b1b53cf6971b0f62f00c56bc789a4b4
1 //===-- Failure unittests for select --------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "src/sys/select/select.h"
10 #include "src/unistd/read.h"
11 #include "test/UnitTest/ErrnoSetterMatcher.h"
12 #include "test/UnitTest/Test.h"
14 #include <sys/select.h>
15 #include <unistd.h>
17 using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Fails;
19 TEST(LlvmLibcSelectTest, SelectInvalidFD) {
20 fd_set set;
21 FD_ZERO(&set);
22 struct timeval timeout {
23 0, 0
25 ASSERT_THAT(LIBC_NAMESPACE::select(-1, &set, nullptr, nullptr, &timeout),
26 Fails(EINVAL));