[libc-commits] [PATCH] D158774: [libc] Add GPU support for `printf` and `fprintf`

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Sep 6 16:59:07 PDT 2023


jhuber6 added inline comments.


================
Comment at: libc/test/integration/startup/gpu/rpc_printf_test.cpp:72
+
+  return 0;
+}
----------------
michaelrj wrote:
> jhuber6 wrote:
> > michaelrj wrote:
> > > is it possible to re-open the file in read mode at the end to check that the output strings are what is expected?
> > It's a little annoying here because I need to test this stuff with multiple threads. Meaning that everything's in a random order.
> Would it be possible to have each thread open a file with a different name (e.g. thread 1 opens `test_data1.txt`)?
Might be possible in theory. I deliberately chose string sizes that would hopefully be obviously wrong if it wasn't parsed correctly to avoid the extra trouble however. I can try to do it if it's necessary, but I'm wondering if that would be handed by another unit test. The importance of this "integration test" is that the integration tests are the only ones I can run with many threads to make sure it doesn't deadlock or anything.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158774/new/

https://reviews.llvm.org/D158774



More information about the libc-commits mailing list