Skip to content

Commit 4e70bf8

Browse files
committed
Address review comments
Created using spr 1.3.6-beta.1
1 parent 1ed9829 commit 4e70bf8

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

libc/test/src/sys/mman/linux/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ add_libc_unittest(
9999
libc.src.sys.mman.mincore
100100
libc.src.sys.mman.mlock
101101
libc.src.sys.mman.munlock
102+
libc.src.unistd.sysconf
102103
libc.test.UnitTest.ErrnoCheckingTest
103104
libc.test.UnitTest.ErrnoSetterMatcher
104105
)
@@ -123,6 +124,7 @@ add_libc_unittest(
123124
libc.src.sys.mman.mlockall
124125
libc.src.sys.mman.munlockall
125126
libc.src.sys.resource.getrlimit
127+
libc.src.unistd.sysconf
126128
libc.src.__support.OSUtil.osutil
127129
libc.test.UnitTest.ErrnoCheckingTest
128130
libc.test.UnitTest.ErrnoSetterMatcher
@@ -144,6 +146,7 @@ add_libc_unittest(
144146
libc.src.sys.mman.mincore
145147
libc.src.sys.mman.mlock
146148
libc.src.sys.mman.munlock
149+
libc.src.unistd.sysconf
147150
libc.test.UnitTest.ErrnoCheckingTest
148151
libc.test.UnitTest.ErrnoSetterMatcher
149152
)
@@ -165,6 +168,7 @@ add_libc_unittest(
165168
libc.src.sys.mman.munmap
166169
libc.src.fcntl.open
167170
libc.src.unistd.close
171+
libc.src.unistd.sysconf
168172
)
169173

170174
add_libc_unittest(

libc/test/src/sys/mman/linux/mincore_test.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,16 @@
1212
#include "src/sys/mman/mmap.h"
1313
#include "src/sys/mman/munlock.h"
1414
#include "src/sys/mman/munmap.h"
15+
#include "src/unistd/sysconf.h"
1516
#include "test/UnitTest/ErrnoCheckingTest.h"
1617
#include "test/UnitTest/ErrnoSetterMatcher.h"
1718
#include "test/UnitTest/Test.h"
1819

19-
#include <unistd.h>
20-
2120
using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Fails;
2221
using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Succeeds;
2322
using LlvmLibcMincoreTest = LIBC_NAMESPACE::testing::ErrnoCheckingTest;
2423

25-
const size_t PAGE_SIZE = sysconf(_SC_PAGESIZE);
24+
const size_t PAGE_SIZE = LIBC_NAMESPACE::sysconf(_SC_PAGESIZE);
2625

2726
TEST_F(LlvmLibcMincoreTest, UnMappedMemory) {
2827
unsigned char vec;

libc/test/src/sys/mman/linux/mlock_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
#include "src/sys/mman/munlockall.h"
2323
#include "src/sys/mman/munmap.h"
2424
#include "src/sys/resource/getrlimit.h"
25+
#include "src/unistd/sysconf.h"
2526
#include "test/UnitTest/ErrnoCheckingTest.h"
2627
#include "test/UnitTest/ErrnoSetterMatcher.h"
2728
#include "test/UnitTest/Test.h"
2829

2930
#include <sys/syscall.h>
30-
#include <unistd.h>
3131

32-
const size_t PAGE_SIZE = sysconf(_SC_PAGESIZE);
32+
const size_t PAGE_SIZE = LIBC_NAMESPACE::sysconf(_SC_PAGESIZE);
3333

3434
using namespace LIBC_NAMESPACE::testing::ErrnoSetterMatcher;
3535
using LlvmLibcMlockTest = LIBC_NAMESPACE::testing::ErrnoCheckingTest;

libc/test/src/sys/mman/linux/msync_test.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@
1111
#include "src/sys/mman/msync.h"
1212
#include "src/sys/mman/munlock.h"
1313
#include "src/sys/mman/munmap.h"
14+
#include "src/unistd/sysconf.h"
1415
#include "test/UnitTest/ErrnoCheckingTest.h"
1516
#include "test/UnitTest/ErrnoSetterMatcher.h"
1617
#include "test/UnitTest/Test.h"
1718

18-
#include <unistd.h>
19-
20-
const size_t PAGE_SIZE = sysconf(_SC_PAGESIZE);
19+
const size_t PAGE_SIZE = LIBC_NAMESPACE::sysconf(_SC_PAGESIZE);
2120

2221
using namespace LIBC_NAMESPACE::testing::ErrnoSetterMatcher;
2322
using LlvmLibcMsyncTest = LIBC_NAMESPACE::testing::ErrnoCheckingTest;

libc/test/src/sys/mman/linux/remap_file_pages_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
#include "src/sys/mman/munmap.h"
1212
#include "src/sys/mman/remap_file_pages.h"
1313
#include "src/unistd/close.h"
14+
#include "src/unistd/sysconf.h"
1415
#include "test/UnitTest/ErrnoCheckingTest.h"
1516
#include "test/UnitTest/ErrnoSetterMatcher.h"
1617
#include "test/UnitTest/Test.h"
1718

1819
#include <sys/mman.h>
1920
#include <sys/stat.h> // For S_IRWXU
20-
#include <unistd.h>
2121

22-
const size_t PAGE_SIZE = sysconf(_SC_PAGESIZE);
22+
const size_t PAGE_SIZE = LIBC_NAMESPACE::sysconf(_SC_PAGESIZE);
2323

2424
using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Fails;
2525
using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Succeeds;

0 commit comments

Comments
 (0)