Skip to content

Commit fe5c47c

Browse files
[libc] Fix file collision causing test flake
In patch llvm#105293 tests for vfscanf were added, meant to be identical to the fscanf tests. Unfortunately, the author forgot to rename the target file causing an occasional test flake where one test writes to the file while the other is trying to read it. This patch fixes the issue by renaming the target test file for the vfscanf test.
1 parent 89c27d6 commit fe5c47c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libc/test/src/stdio/vfscanf_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ static int call_vfscanf(::FILE *stream, const char *__restrict format, ...) {
4343
return ret;
4444
}
4545

46-
TEST(LlvmLibcFScanfTest, WriteToFile) {
47-
const char *FILENAME = "fscanf_output.test";
46+
TEST(LlvmLibcVFScanfTest, WriteToFile) {
47+
const char *FILENAME = "vfscanf_output.test";
4848
auto FILE_PATH = libc_make_test_file_path(FILENAME);
4949
::FILE *file = scanf_test::fopen(FILE_PATH, "w");
5050
ASSERT_FALSE(file == nullptr);

0 commit comments

Comments
 (0)