Skip to content

[compiler-rt][sanitizer_common] Alter sanitizer_set_report_path_test to not assume a fixed file path #139282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ int main(int argc, char **argv) {
// Try setting again with an invalid/inaccessible directory.
char buff_bad[1000];
sprintf(buff_bad, "%s/report", argv[0]);
fprintf(stderr, "Expected bad report path: %s\n", buff_bad);
// CHECK: Expected bad report path: [[BADPATH:.*]]/report
__sanitizer_set_report_path(buff_bad);
assert(strncmp(buff, __sanitizer_get_report_path(), strlen(buff)) == 0);
}

// CHECK: ERROR: Can't create directory: {{.*}}Posix/Output/sanitizer_set_report_path_test.cpp.tmp
// CHECK: ERROR: Can't create directory: [[BADPATH]]
Loading