Skip to content

Commit fd17064

Browse files
authored
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.
1 parent dfeb399 commit fd17064

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file_large.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ static void large_file() {
7272
// the data at the end of the source file.
7373
std::string out_data(additional_size, 'z');
7474
{
75-
std::FILE* dest_file = std::fopen(dest.string().c_str(), "rb");
75+
std::FILE* dest_file = std::fopen(dest.string().c_str(), "r");
7676
assert(dest_file != nullptr);
7777
assert(std::fseek(dest_file, sendfile_size_limit, SEEK_SET) == 0);
7878
assert(std::fread(&out_data[0], sizeof(out_data[0]), additional_size, dest_file) == additional_size);

0 commit comments

Comments
 (0)