Skip to content

Commit fb149e4

Browse files
committed
[libc] Use the new style includes for tests
This is a follow up to D154529 covering tests. Differential Revision: https://reviews.llvm.org/D154746
1 parent 661d91a commit fb149e4

File tree

9 files changed

+15
-10
lines changed

9 files changed

+15
-10
lines changed

libc/test/src/signal/kill_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88

99
#include "src/signal/kill.h"
1010

11-
#include "include/sys/syscall.h" // For syscall numbers.
1211
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
1312
#include "test/UnitTest/ErrnoSetterMatcher.h"
1413
#include "test/UnitTest/Test.h"
1514

1615
#include <signal.h>
16+
#include <sys/syscall.h> // For syscall numbers.
1717

1818
using __llvm_libc::testing::ErrnoSetterMatcher::Succeeds;
1919

libc/test/src/signal/raise_test.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "include/signal.h"
109
#include "src/signal/raise.h"
1110

1211
#include "test/UnitTest/Test.h"
1312

13+
#include <signal.h>
14+
1415
TEST(LlvmLibcSignalTest, Raise) {
1516
// SIGCONT is ingored unless stopped, so we can use it to check the return
1617
// value of raise without needing to block.

libc/test/src/signal/sigaddset_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "include/signal.h"
109
#include "src/signal/sigaddset.h"
1110

1211
#include "test/UnitTest/ErrnoSetterMatcher.h"
1312
#include "test/UnitTest/Test.h"
1413

1514
#include <errno.h>
15+
#include <signal.h>
1616

1717
// This tests invalid inputs and ensures errno is properly set.
1818
TEST(LlvmLibcSignalTest, SigaddsetInvalid) {

libc/test/src/signal/sigdelset_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "include/signal.h"
109
#include "src/signal/raise.h"
1110
#include "src/signal/sigdelset.h"
1211
#include "src/signal/sigfillset.h"
@@ -16,6 +15,7 @@
1615
#include "test/UnitTest/Test.h"
1716

1817
#include <errno.h>
18+
#include <signal.h>
1919

2020
TEST(LlvmLibcSigdelset, Invalid) {
2121
using __llvm_libc::testing::ErrnoSetterMatcher::Fails;

libc/test/src/signal/sigfillset_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "include/signal.h"
109
#include "src/signal/raise.h"
1110
#include "src/signal/sigfillset.h"
1211
#include "src/signal/sigprocmask.h"
@@ -15,6 +14,7 @@
1514
#include "test/UnitTest/Test.h"
1615

1716
#include <errno.h>
17+
#include <signal.h>
1818

1919
TEST(LlvmLibcSigfillset, Invalid) {
2020
using __llvm_libc::testing::ErrnoSetterMatcher::Fails;

libc/test/src/signal/signal_test.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "include/signal.h"
109
#include "src/errno/libc_errno.h"
1110
#include "src/signal/raise.h"
1211
#include "src/signal/signal.h"
1312

1413
#include "test/UnitTest/ErrnoSetterMatcher.h"
1514
#include "test/UnitTest/Test.h"
1615

16+
#include <signal.h>
17+
1718
using __llvm_libc::testing::ErrnoSetterMatcher::Fails;
1819
using __llvm_libc::testing::ErrnoSetterMatcher::Succeeds;
1920

libc/test/src/signal/sigprocmask_test.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "include/signal.h"
109
#include "src/errno/libc_errno.h"
1110
#include "src/signal/raise.h"
1211
#include "src/signal/sigaddset.h"
@@ -16,6 +15,8 @@
1615
#include "test/UnitTest/ErrnoSetterMatcher.h"
1716
#include "test/UnitTest/Test.h"
1817

18+
#include <signal.h>
19+
1920
class LlvmLibcSignalTest : public __llvm_libc::testing::Test {
2021
sigset_t oldSet;
2122

libc/test/src/stdlib/_Exit_test.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "include/stdlib.h"
109
#include "src/stdlib/_Exit.h"
1110
#include "src/stdlib/exit.h"
1211
#include "test/UnitTest/Test.h"
1312

13+
#include <stdlib.h>
14+
1415
TEST(LlvmLibcStdlib, _Exit) {
1516
EXPECT_EXITS([] { __llvm_libc::_Exit(1); }, 1);
1617
EXPECT_EXITS([] { __llvm_libc::_Exit(65); }, 65);

libc/test/src/stdlib/abort_test.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "include/signal.h"
10-
#include "include/stdlib.h"
119
#include "src/stdlib/abort.h"
1210
#include "test/UnitTest/Test.h"
1311

12+
#include <signal.h>
13+
#include <stdlib.h>
14+
1415
TEST(LlvmLibcStdlib, abort) {
1516
// -1 matches against any signal, which is necessary for now until
1617
// __llvm_libc::abort() unblocks SIGABRT.

0 commit comments

Comments
 (0)