Skip to content

Commit bfc7540

Browse files
[libc] Fix file collision causing test flake (#106119)
In patch #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 a35398d commit bfc7540

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)