[libcxx-commits] [libcxx] 89ec509 - [libc++] Get rid of <iostream> in a filesystem test
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Oct 27 07:15:15 PDT 2020
> On Oct 27, 2020, at 10:05, Martin Storsjö <martin at martin.st> wrote:
>
> On Mon, 26 Oct 2020, Louis Dionne via libcxx-commits wrote:
>
>>
>> Author: Louis Dionne
>> Date: 2020-10-26T17:00:12-04:00
>> New Revision: 89ec5091cc95e062712f544167abd692c9092f7f
>>
>> URL: https://github.com/llvm/llvm-project/commit/89ec5091cc95e062712f544167abd692c9092f7f
>> DIFF: https://github.com/llvm/llvm-project/commit/89ec5091cc95e062712f544167abd692c9092f7f.diff
>>
>> LOG: [libc++] Get rid of <iostream> in a filesystem test
>
>> - dest_file.seekg(sendfile_size_limit);
>> - TEST_REQUIRE(dest_file);
>> - dest_file >> out_data;
>> - TEST_CHECK(dest_file.eof());
>> + std::FILE* dest_file = std::fopen(dest.string().c_str(), "rb");
>> + TEST_REQUIRE(dest_file != nullptr);
>> + TEST_REQUIRE(std::fseek(dest_file, sendfile_size_limit, SEEK_SET) == 0);
>> + TEST_REQUIRE(std::fread(out_data.data(), sizeof(out_data[0]), additional_size, dest_file) == additional_size);
>> + std::fclose(dest_file);
>
> Did you notice that this broke running the tests in certain setups (pre-C++14?), e.g. http://lab.llvm.org:8011/#/builders/122/builds/44/steps/8/logs/FAIL__libc____copy_file_large_pass_cpp
> due to out_data.data() being const.
No, I did not. Thanks for the heads up. I'll fix it.
Louis
More information about the libcxx-commits
mailing list