Skip to content

Commit 8933f2b

Browse files
committed
comment test better
1 parent caaa557 commit 8933f2b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

compiler-rt/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_path_fail.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
// RUN: %clangxx -O2 %s -o %t
2+
3+
// Case 1: Try setting a path that is an invalid/inaccessible directory.
24
// RUN: not %env %run %t 2>&1 | FileCheck %s --check-prefix=ERROR1
5+
6+
// Case 2: Try setting a path that is too large.
37
// RUN: not %env %run %t A 2>&1 | FileCheck %s --check-prefix=ERROR2
48

59
#include <sanitizer/common_interface_defs.h>
@@ -8,11 +12,11 @@
812
int main(int argc, char **argv) {
913
char buff[4096];
1014
if (argc == 1) {
11-
// Try setting again with an invalid/inaccessible directory.
15+
// Case 1
1216
sprintf(buff, "%s/report", argv[0]);
1317
// ERROR1: Can't create directory: {{.*}}
1418
} else {
15-
// Try setting a path that is too large.
19+
// Case 2
1620
snprintf(buff, sizeof(buff), "%04095d", 42);
1721
// ERROR2: Path is too long: 00000000...
1822
}

0 commit comments

Comments
 (0)