[libc-commits] [libc] [libc] implement `sys/uio/readv` (PR #124718)
Nick Desaulniers via libc-commits
libc-commits at lists.llvm.org
Tue Jan 28 09:08:22 PST 2025
================
@@ -0,0 +1,30 @@
+//===-- Unittests for readv -----------------------------------------------===//
+//
+// 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/fcntl/open.h"
+#include "src/sys/uio/readv.h"
+#include "src/unistd/close.h"
+#include "test/UnitTest/ErrnoSetterMatcher.h"
+#include "test/UnitTest/Test.h"
+
+using namespace LIBC_NAMESPACE::testing::ErrnoSetterMatcher;
+
+TEST(LlvmLibcSysUioReadvTest, SmokeTest) {
+ int fd = LIBC_NAMESPACE::open("/dev/urandom", O_RDONLY);
----------------
nickdesaulniers wrote:
I see now that the existing libc/test/src/sys/uio/writev_test.cpp also opens /dev/random...but doesn't that mean these posix mandated functions won't run on windows? cc @SchrodingerZhu
https://github.com/llvm/llvm-project/pull/124718
More information about the libc-commits
mailing list