diff --git a/testing/file_test/run_test.cpp b/testing/file_test/run_test.cpp index c01d88176394..db987fe5d1a7 100644 --- a/testing/file_test/run_test.cpp +++ b/testing/file_test/run_test.cpp @@ -122,7 +122,7 @@ auto RunTestFile(const FileTestBase& test_base, bool dump_output, input_stream = tmpfile(); fwrite(split->content.c_str(), sizeof(char), split->content.size(), input_stream); - rewind(input_stream); + CARBON_CHECK(!fseek(input_stream, 0, SEEK_SET)); } else if (!fs->addFile(split->filename, /*ModificationTime=*/0, llvm::MemoryBuffer::getMemBuffer( split->content, split->filename,