<commit_before>// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard -DSHARED %s -shared -o %dynamiclib -fPIC %ld_flags_rpath_so
// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s %ld_flags_rpath_exe -o %t
// RUN: rm -rf %T/coverage-reset && mkdir -p %T/coverage-reset && cd %T/coverage-reset
// RUN: %env_asan_opts=coverage=1:verbosity=1 %run %t 2>&1 | FileCheck %s
//
// UNSUPPORTED: ios

#include <stdio.h>

#include <sanitizer/coverage_interface.h>

#ifdef SHARED
void bar1() { printf("bar1\n"); }
void bar2() { printf("bar2\n"); }
#else
__attribute__((noinline)) void foo1() { printf("foo1\n"); }
__attribute__((noinline)) void foo2() { printf("foo2\n"); }
void bar1();
void bar2();

int main(int argc, char **argv) {
  fprintf(stderr, "RESET");
  __sanitizer_cov_reset();
  foo1();
  foo2();
  bar1();
  bar2();
  __sanitizer_cov_dump();
// CHECK: RESET
// CHECK: SanitizerCoverage: ./coverage-reset.cc{{.*}}.sancov: 2 PCs written
// CHECK: SanitizerCoverage: ./libcoverage-reset.cc{{.*}}.sancov: 2 PCs written

  fprintf(stderr, "RESET");
  __sanitizer_cov_reset();
  foo1();
  bar1();
  __sanitizer_cov_dump();
// CHECK: RESET
// CHECK: SanitizerCoverage: ./coverage-reset.cc{{.*}}.sancov: 1 PCs written
// CHECK: SanitizerCoverage: ./libcoverage-reset.cc{{.*}}.sancov: 1 PCs written

  fprintf(stderr, "RESET");
  __sanitizer_cov_reset();
  foo1();
  foo2();
  __sanitizer_cov_dump();
// CHECK: RESET
// CHECK: SanitizerCoverage: ./coverage-reset.cc{{.*}}.sancov: 2 PCs written

  fprintf(stderr, "RESET");
  __sanitizer_cov_reset();
  bar1();
  bar2();
  __sanitizer_cov_dump();
// CHECK: RESET
// CHECK: SanitizerCoverage: ./libcoverage-reset.cc{{.*}}.sancov: 2 PCs written

  fprintf(stderr, "RESET");
  __sanitizer_cov_reset();
// CHECK: RESET

  bar2();
// CHECK: SanitizerCoverage: ./libcoverage-reset.cc{{.*}}.sancov: 1 PCs written
}
#endif<commit_msg>[sancov] Add missing line breaks in test. NFC.<commit_after>// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard -DSHARED %s -shared -o %dynamiclib -fPIC %ld_flags_rpath_so
// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s %ld_flags_rpath_exe -o %t
// RUN: rm -rf %T/coverage-reset && mkdir -p %T/coverage-reset && cd %T/coverage-reset
// RUN: %env_asan_opts=coverage=1:verbosity=1 %run %t 2>&1 | FileCheck %s
//
// UNSUPPORTED: ios

#include <stdio.h>

#include <sanitizer/coverage_interface.h>

#ifdef SHARED
void bar1() { printf("bar1\n"); }
void bar2() { printf("bar2\n"); }
#else
__attribute__((noinline)) void foo1() { printf("foo1\n"); }
__attribute__((noinline)) void foo2() { printf("foo2\n"); }
void bar1();
void bar2();

int main(int argc, char **argv) {
  fprintf(stderr, "RESET\n");
  __sanitizer_cov_reset();
  foo1();
  foo2();
  bar1();
  bar2();
  __sanitizer_cov_dump();
// CHECK: RESET
// CHECK: SanitizerCoverage: ./coverage-reset.cc{{.*}}.sancov: 2 PCs written
// CHECK: SanitizerCoverage: ./libcoverage-reset.cc{{.*}}.sancov: 2 PCs written

  fprintf(stderr, "RESET\n");
  __sanitizer_cov_reset();
  foo1();
  bar1();
  __sanitizer_cov_dump();
// CHECK: RESET
// CHECK: SanitizerCoverage: ./coverage-reset.cc{{.*}}.sancov: 1 PCs written
// CHECK: SanitizerCoverage: ./libcoverage-reset.cc{{.*}}.sancov: 1 PCs written

  fprintf(stderr, "RESET\n");
  __sanitizer_cov_reset();
  foo1();
  foo2();
  __sanitizer_cov_dump();
// CHECK: RESET
// CHECK: SanitizerCoverage: ./coverage-reset.cc{{.*}}.sancov: 2 PCs written

  fprintf(stderr, "RESET\n");
  __sanitizer_cov_reset();
  bar1();
  bar2();
  __sanitizer_cov_dump();
// CHECK: RESET
// CHECK: SanitizerCoverage: ./libcoverage-reset.cc{{.*}}.sancov: 2 PCs written

  fprintf(stderr, "RESET\n");
  __sanitizer_cov_reset();
// CHECK: RESET

  bar2();
// CHECK: SanitizerCoverage: ./libcoverage-reset.cc{{.*}}.sancov: 1 PCs written
}
#endif
{'fraction_non_alphanumeric': 0.19121109076641382, 'fraction_numerical': 0.01674077949254512, 'mean_word_length': 4.45506419400856, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5926417', 'n_tokens_mistral': 1576, 'n_tokens_neox': 1501, 'n_words': 304}