Skip to content

Commit 1ed9829

Browse files
committed
[𝘀𝗽𝗿] initial version
Created using spr 1.3.6-beta.1
1 parent bed17c0 commit 1ed9829

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@
1616
#include "test/UnitTest/ErrnoSetterMatcher.h"
1717
#include "test/UnitTest/Test.h"
1818

19+
#include <unistd.h>
20+
1921
using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Fails;
2022
using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Succeeds;
2123
using LlvmLibcMincoreTest = LIBC_NAMESPACE::testing::ErrnoCheckingTest;
2224

23-
// TODO: Replace with sysconf call once the function is properly implemented.
24-
constexpr size_t PAGE_SIZE = 4096;
25+
const size_t PAGE_SIZE = sysconf(_SC_PAGESIZE);
2526

2627
TEST_F(LlvmLibcMincoreTest, UnMappedMemory) {
2728
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
@@ -27,9 +27,9 @@
2727
#include "test/UnitTest/Test.h"
2828

2929
#include <sys/syscall.h>
30+
#include <unistd.h>
3031

31-
// TODO: Replace with sysconf call once the function is properly implemented.
32-
constexpr size_t PAGE_SIZE = 4096;
32+
const size_t PAGE_SIZE = 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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@
1515
#include "test/UnitTest/ErrnoSetterMatcher.h"
1616
#include "test/UnitTest/Test.h"
1717

18-
// TODO: Replace with sysconf call once the function is properly implemented.
19-
constexpr size_t PAGE_SIZE = 4096;
18+
#include <unistd.h>
19+
20+
const size_t PAGE_SIZE = sysconf(_SC_PAGESIZE);
2021

2122
using namespace LIBC_NAMESPACE::testing::ErrnoSetterMatcher;
2223
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
@@ -17,9 +17,9 @@
1717

1818
#include <sys/mman.h>
1919
#include <sys/stat.h> // For S_IRWXU
20+
#include <unistd.h>
2021

21-
// TODO: Replace with sysconf call once the function is properly implemented.
22-
constexpr size_t PAGE_SIZE = 4096;
22+
const size_t PAGE_SIZE = sysconf(_SC_PAGESIZE);
2323

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

0 commit comments

Comments
 (0)