aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZibi Sarbinowski <zibi@ca.ibm.com>2024-07-25 09:25:11 -0400
committerGitHub <noreply@github.com>2024-07-25 09:25:11 -0400
commitfd17064dfa08c252c12b71167bc588f57e6a082c (patch)
tree8484a9ea6399b7c88309c1c4f1f8b6e6a124d2e8
parentdfeb3991fb489a703f631ab0c34b58f80568038d (diff)
downloadllvm-fd17064dfa08c252c12b71167bc588f57e6a082c.zip
llvm-fd17064dfa08c252c12b71167bc588f57e6a082c.tar.gz
llvm-fd17064dfa08c252c12b71167bc588f57e6a082c.tar.bz2
Fix fs.op.copy_file/copy_file_large.pass.cpp on z/OS (#100382)
This PR is required to fix copy_file_large.pass.cpp which is failing on z/OS in all ASCII variations. The problem is that a destination file is opened in binary mode and auto-conversion does not happen when this lit is compiled with -fzos-le-char-mode=ascii. In addition opening a destination file will match a text mode of `fopen()` of a source file.
-rw-r--r--libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file_large.pass.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file_large.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file_large.pass.cpp
index db15ee1..53bf828 100644
--- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file_large.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file_large.pass.cpp
@@ -72,7 +72,7 @@ static void large_file() {
// the data at the end of the source file.
std::string out_data(additional_size, 'z');
{
- std::FILE* dest_file = std::fopen(dest.string().c_str(), "rb");
+ std::FILE* dest_file = std::fopen(dest.string().c_str(), "r");
assert(dest_file != nullptr);
assert(std::fseek(dest_file, sendfile_size_limit, SEEK_SET) == 0);
assert(std::fread(&out_data[0], sizeof(out_data[0]), additional_size, dest_file) == additional_size);