[libc-commits] [libc] [libc] Add implementation of getcpu syscall wrapper (PR #150871)
Aiden Grossman via libc-commits
libc-commits at lists.llvm.org
Tue Jul 29 06:36:44 PDT 2025
================
@@ -0,0 +1,29 @@
+//===-- Unittests for getcpu ----------------------------------------------===//
+//
+// 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/__support/OSUtil/syscall.h"
+#include "src/__support/libc_errno.h"
+#include "src/sched/getcpu.h"
+#include "test/UnitTest/ErrnoSetterMatcher.h"
+
+#include <sched.h>
+
+TEST(LlvmLibcSchedGetCpuTest, SmokeTest) {
----------------
boomanaiden154 wrote:
I've added a `ASSERT_ERRNO_SUCCESS` in the successful call based on what I saw there. Not sure if there's anything else I need to change up.
https://github.com/llvm/llvm-project/pull/150871
More information about the libc-commits
mailing list