summaryrefslogtreecommitdiff
path: root/libc/test/src/stdio/fopen_test.cpp
AgeCommit message (Collapse)Author
2023-09-26[libc] Mass replace enclosing namespace (#67032)Guillaume Chatelet
This is step 4 of https://discourse.llvm.org/t/rfc-customizable-namespace-to-allow-testing-the-libc-when-the-system-libc-is-also-llvms-libc/73079
2023-09-09[libc] Implement stdio writing functions for the GPU port (#65809)Joseph Huber
Summary: This patch implements fwrite, putc, putchar, and fputc on the GPU. These are very straightforward, the main difference for the GPU implementation is that we are currently ignoring `errno`. This patch also introduces a minimal smoke test for `putc` that is an exact copy of the `puts` test except we print the string char by char. This also modifies the `fopen` test to use `fwrite` to mirror its use of `fread` so that it is tested as well.
2023-07-26[libc] Add support for the 'fread' function on the GPUJoseph Huber
This patch adds support for `fread` on the GPU via the RPC mechanism. Here we simply pass the size of the read to the server and then copy it back to the client via the RPC channel. This should allow us to do the basic operations on files now. This will obviously be slow for large sizes due ot the number of RPC calls involved, this could be optimized further by having a special RPC call that can initiate a memcpy between the two pointers. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D155121
2023-07-05[libc] Support fopen / fclose on the GPUJoseph Huber
This patch adds the necessary support for the fopen and fclose functions to work on the GPU via RPC. I added a new test that enables testing this with the minimal features we have on the GPU. I will update it once we have `fread` and `fwrite` to actually check the outputted strings. For now I just relied on checking manually via the outpuot temp file. Reviewed By: JonChesterfield, sivachandra Differential Revision: https://reviews.llvm.org/D154519