[libc-commits] [libc] [libc] Simplify mman tests (PR #161748)

via libc-commits libc-commits at lists.llvm.org
Thu Oct 2 16:09:16 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- libc/test/src/sys/mman/linux/mincore_test.cpp libc/test/src/sys/mman/linux/mlock_test.cpp libc/test/src/sys/mman/linux/msync_test.cpp libc/test/src/sys/mman/linux/remap_file_pages_test.cpp
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libc/test/src/sys/mman/linux/mincore_test.cpp b/libc/test/src/sys/mman/linux/mincore_test.cpp
index d4e334bc7..fb8625299 100644
--- a/libc/test/src/sys/mman/linux/mincore_test.cpp
+++ b/libc/test/src/sys/mman/linux/mincore_test.cpp
@@ -20,7 +20,7 @@ using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Fails;
 using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Succeeds;
 using LlvmLibcMincoreTest = LIBC_NAMESPACE::testing::ErrnoCheckingTest;
 
-//TODO: Replace with sysconf call once the function is properly implemented.
+// TODO: Replace with sysconf call once the function is properly implemented.
 constexpr size_t PAGE_SIZE = 4096;
 
 TEST_F(LlvmLibcMincoreTest, UnMappedMemory) {
diff --git a/libc/test/src/sys/mman/linux/mlock_test.cpp b/libc/test/src/sys/mman/linux/mlock_test.cpp
index d87906789..f4a072ec1 100644
--- a/libc/test/src/sys/mman/linux/mlock_test.cpp
+++ b/libc/test/src/sys/mman/linux/mlock_test.cpp
@@ -28,7 +28,7 @@
 
 #include <sys/syscall.h>
 
-//TODO: Replace with sysconf call once the function is properly implemented.
+// TODO: Replace with sysconf call once the function is properly implemented.
 constexpr size_t PAGE_SIZE = 4096;
 
 using namespace LIBC_NAMESPACE::testing::ErrnoSetterMatcher;
diff --git a/libc/test/src/sys/mman/linux/msync_test.cpp b/libc/test/src/sys/mman/linux/msync_test.cpp
index 9b56168a5..764a67d02 100644
--- a/libc/test/src/sys/mman/linux/msync_test.cpp
+++ b/libc/test/src/sys/mman/linux/msync_test.cpp
@@ -15,7 +15,7 @@
 #include "test/UnitTest/ErrnoSetterMatcher.h"
 #include "test/UnitTest/Test.h"
 
-//TODO: Replace with sysconf call once the function is properly implemented.
+// TODO: Replace with sysconf call once the function is properly implemented.
 constexpr size_t PAGE_SIZE = 4096;
 
 using namespace LIBC_NAMESPACE::testing::ErrnoSetterMatcher;
diff --git a/libc/test/src/sys/mman/linux/remap_file_pages_test.cpp b/libc/test/src/sys/mman/linux/remap_file_pages_test.cpp
index 133f4698d..094bcb2c7 100644
--- a/libc/test/src/sys/mman/linux/remap_file_pages_test.cpp
+++ b/libc/test/src/sys/mman/linux/remap_file_pages_test.cpp
@@ -18,7 +18,7 @@
 #include <sys/mman.h>
 #include <sys/stat.h> // For S_IRWXU
 
-//TODO: Replace with sysconf call once the function is properly implemented.
+// TODO: Replace with sysconf call once the function is properly implemented.
 constexpr size_t PAGE_SIZE = 4096;
 
 using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Fails;

``````````

</details>


https://github.com/llvm/llvm-project/pull/161748


More information about the libc-commits mailing list