Skip to content

Commit 2fb8219

Browse files
committed
[sanitizer] Use /tmp/ not /tmp/dir/ in tests
Tests fail if the user doesn't own /tmp/dir/. On hosts with multiple users running the test suite, who owns /tmp/dir/ can become a race.
1 parent 86f7f08 commit 2fb8219

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler-rt/lib/sanitizer_common/tests/sanitizer_libc_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ TEST(SanitizerCommon, ReportFile) {
346346
ReportFile report_file = {&report_file_mu, kStderrFd, "", "", 0};
347347
char tmpfile[128];
348348
temp_file_name(tmpfile, sizeof(tmpfile),
349-
"dir/sanitizer_common.reportfile.tmp.");
349+
"sanitizer_common.reportfile.tmp.");
350350
report_file.SetReportPath(tmpfile);
351351
const char *path = report_file.GetReportPath();
352352
EXPECT_EQ(internal_strncmp(tmpfile, path, strlen(tmpfile)), 0);

0 commit comments

Comments
 (0)