1 // RUN: %clangxx -O0 %s -o %t
2 // RUN: %env_tool_opts=help=1,include_if_exists=___some_path_that_does_not_exist___ %run %t 2>&1 | FileCheck %s
3 // RUN: %env_tool_opts=help=1,symbolize=0 %run %t 2>&1 | FileCheck --check-prefix=CHECK-CV %s
4 // RUN: %env_tool_opts=help=1,sancov_path=/long/path/that/requires/truncation/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaB \
5 // RUN: %run %t 2>&1 | FileCheck --check-prefix=CHECK-TRUNCATION %s
10 // CHECK: Available flags for {{.*}}Sanitizer:
14 // CHECK: {{^[ \t]+symbolize$}}
15 // CHECK-NEXT: (Current Value: true)
18 // CHECK: {{^[ \t]+log_path$}}
19 // CHECK-NEXT: (Current Value: {{.+}})
22 // CHECK: {{^[ \t]+verbosity$}}
23 // CHECK-NEXT: (Current Value: {{-?[0-9]+}})
25 // HandleSignalMode option
26 // CHECK: {{^[ \t]+handle_segv$}}
27 // CHECK-NEXT: (Current Value: {{0|1|2}})
30 // CHECK: {{^[ \t]+mmap_limit_mb$}}
31 // CHECK-NEXT: (Current Value: 0x{{[0-9a-fA-F]+}})
33 // FlagHandlerInclude option
34 // CHECK: include_if_exists
35 // CHECK-NEXT: (Current Value: ___some_path_that_does_not_exist___)
37 // Test we show the current value and not the default.
38 // CHECK-CV: {{^[ \t]+symbolize$}}
39 // CHECK-CV-NEXT: (Current Value: false)
41 // Test truncation of long paths.
42 // CHECK-TRUNCATION: sancov_path
43 // CHECK-TRUNCATION-NEXT: (Current Value Truncated: /long/path/that/requires/truncation/aaa{{a+}})