[libc-commits] [libc] [libc] Implement temporary `printf` on the GPU (PR #85331)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Fri Mar 15 05:53:53 PDT 2024


================
@@ -0,0 +1,58 @@
+//===-- RPC test to check args to printf ----------------------------------===//
+//
+// 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 "test/IntegrationTest/test.h"
+
+#include "src/__support/GPU/utils.h"
+#include "src/gpu/rpc_fprintf.h"
+#include "src/stdio/fopen.h"
+
+using namespace LIBC_NAMESPACE;
+
+FILE *file = LIBC_NAMESPACE::fopen("testdata/test_data.txt", "w");
+
+TEST_MAIN(int argc, char **argv, char **envp) {
+  ASSERT_TRUE(file && "failed to open file");
----------------
jhuber6 wrote:

Just a sanity check to make sure that the file was actually created, the filename isn't important.

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


More information about the libc-commits mailing list