[libc-commits] [libc] [libc] process mrelease (PR #119147)

Michael Jones via libc-commits libc-commits at lists.llvm.org
Mon Dec 9 10:54:35 PST 2024


================
@@ -0,0 +1,21 @@
+//===-- Unittests for process_mrelease ------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/sys/mman/process_mrelease.h"
+#include "test/UnitTest/ErrnoSetterMatcher.h"
+#include "test/UnitTest/LibcTest.h"
+
+#include <sys/syscall.h>
+
+using namespace LIBC_NAMESPACE::testing::ErrnoSetterMatcher;
+
+#if defined(SYS_process_mrelease)
----------------
michaelrj-google wrote:

you shouldn't need this condition here. If `SYS_process_mrelease` isn't defined, you'll get a compile error when building `process_mrelease.cpp`.

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


More information about the libc-commits mailing list