Skip to content
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 @@ -14,15 +14,12 @@ int main(int argc, char **argv) {
sprintf(buff, "%s.report_path/report", argv[0]);
__sanitizer_set_report_path(buff);
assert(strncmp(buff, __sanitizer_get_report_path(), strlen(buff)) == 0);
printf("Path %s\n", __sanitizer_get_report_path());
fflush(stdout);

// Try setting again with an invalid/inaccessible directory.
sprintf(buff, "%s/report", argv[0]);
__sanitizer_set_report_path(buff);
printf("Path %s\n", __sanitizer_get_report_path());
char buff_bad[1000];
sprintf(buff_bad, "%s/report", argv[0]);
__sanitizer_set_report_path(buff_bad);
assert(strncmp(buff, __sanitizer_get_report_path(), strlen(buff)) == 0);
}

// CHECK: Path {{.*}}Posix/Output/sanitizer_set_report_path_test.cpp.tmp.report_path/report.
// CHECK: ERROR: Can't create directory: {{.*}}Posix/Output/sanitizer_set_report_path_test.cpp.tmp
// CHECK-NOT: Path {{.*}}Posix/Output/sanitizer_set_report_path_test.cpp.tmp