File tree Expand file tree Collapse file tree 4 files changed +10
-8
lines changed
libc/test/src/sys/mman/linux Expand file tree Collapse file tree 4 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 1616#include " test/UnitTest/ErrnoSetterMatcher.h"
1717#include " test/UnitTest/Test.h"
1818
19+ #include < unistd.h>
20+
1921using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Fails;
2022using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Succeeds;
2123using 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
2627TEST_F (LlvmLibcMincoreTest, UnMappedMemory) {
2728 unsigned char vec;
Original file line number Diff line number Diff line change 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
3434using namespace LIBC_NAMESPACE ::testing::ErrnoSetterMatcher;
3535using LlvmLibcMlockTest = LIBC_NAMESPACE::testing::ErrnoCheckingTest;
Original file line number Diff line number Diff line change 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
2122using namespace LIBC_NAMESPACE ::testing::ErrnoSetterMatcher;
2223using LlvmLibcMsyncTest = LIBC_NAMESPACE::testing::ErrnoCheckingTest;
Original file line number Diff line number Diff line change 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
2424using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Fails;
2525using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Succeeds;
You can’t perform that action at this time.
0 commit comments