[compiler-rt] r367863 - compiler-rt: Rename cc files below test/sanitizer_common to cpp

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 5 06:57:04 PDT 2019


Author: nico
Date: Mon Aug  5 06:57:03 2019
New Revision: 367863

URL: http://llvm.org/viewvc/llvm-project?rev=367863&view=rev
Log:
compiler-rt: Rename cc files below test/sanitizer_common to cpp

See r367803 and similar other changes.

Added:
    compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/abort_on_error.cpp
      - copied, changed from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/abort_on_error.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/fputs_puts_null.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/fputs_puts_null.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/print-stack-trace.cpp
      - copied, changed from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/print-stack-trace.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/FreeBSD/capsicum.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/FreeBSD/capsicum.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/FreeBSD/fdevname.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/FreeBSD/fdevname.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/abort_on_error.cpp
      - copied, changed from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/abort_on_error.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/aligned_alloc-alignment.cpp
      - copied, changed from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/aligned_alloc-alignment.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/allow_user_segv.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/allow_user_segv.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/assert.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/assert.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/decorate_proc_maps.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/decorate_proc_maps.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/deepbind.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/deepbind.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/ill.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/ill.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mallopt.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mallopt.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mlock_test.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mlock_test.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mprobe.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mprobe.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/name_to_handle_at.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/name_to_handle_at.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/new_delete_test.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/new_delete_test.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/open_memstream.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/open_memstream.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/pthread_mutex.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/pthread_mutex.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/ptrace.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/ptrace.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/pvalloc-overflow.cpp
      - copied, changed from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/pvalloc-overflow.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/recv_msg_trunc.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/recv_msg_trunc.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sched_getparam.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sched_getparam.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/signal_segv_handler.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/signal_segv_handler.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/timerfd.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/timerfd.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/unexpected_format_specifier_test.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/unexpected_format_specifier_test.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/asysctl.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/asysctl.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/cdb.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/cdb.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/faccessat.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/faccessat.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/fparseln.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/fparseln.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/funopen2.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/funopen2.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/getgrouplist.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/getgrouplist.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/getgroupmembership.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/getgroupmembership.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/getvfsstat.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/getvfsstat.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/gid_from_group.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/gid_from_group.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/group_from_gid.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/group_from_gid.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/md2.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/md2.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/md4.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/md4.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/md5.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/md5.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/mi_vector_hash.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/mi_vector_hash.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/netent.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/netent.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/paccept.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/paccept.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/protoent.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/protoent.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/rmd160.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/rmd160.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/sha1.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/sha1.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/sha2.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/sha2.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/statvfs1.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/statvfs1.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strmode.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strmode.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strtoi.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strtoi.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/sysctlgetmibinfo.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/sysctlgetmibinfo.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/ttyent.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/ttyent.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/uid_from_user.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/uid_from_user.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/user_from_uid.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/user_from_uid.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/access.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/access.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/arc4random.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/arc4random.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname_r.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname_r.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dump_instruction_bytes.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dump_instruction_bytes.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dump_registers.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dump_registers.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/feof_fileno_ferror.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/feof_fileno_ferror.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fgetc_ungetc_getc.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fgetc_ungetc_getc.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fgetln.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fgetln.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fgets.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fgets.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fpe.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fpe.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fputc_putc_putchar.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fputc_putc_putchar.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fputs_puts.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fputs_puts.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fseek.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fseek.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fts.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fts.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/funopen.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/funopen.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getc_unlocked.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getc_unlocked.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getfsent.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getfsent.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getmntinfo.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getmntinfo.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getpass.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getpass.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getpw_getgr.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getpw_getgr.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getusershell.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getusershell.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/illegal_read_test.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/illegal_read_test.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/illegal_write_test.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/illegal_write_test.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/lstat.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/lstat.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/nl_langinfo.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/nl_langinfo.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/popen.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/popen.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/posix_memalign-alignment.cpp
      - copied, changed from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/posix_memalign-alignment.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/putc_putchar_unlocked.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/putc_putchar_unlocked.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/regex.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/regex.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_fd_test.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_fd_test.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/setvbuf.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/setvbuf.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sl_add.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sl_add.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strlcat.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strlcat.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strlcpy.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strlcpy.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strtonum.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strtonum.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sysctl.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sysctl.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/vis.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/vis.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/weak_hook_test.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/weak_hook_test.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/allocator_returns_null.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/allocator_returns_null.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/corelimit.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/corelimit.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/get_module_and_offset_for_pc.cpp
      - copied, changed from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/get_module_and_offset_for_pc.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/hard_rss_limit_mb_test.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/hard_rss_limit_mb_test.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/malloc_hook.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/malloc_hook.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/options-help.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/options-help.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/options-include.cpp
      - copied, changed from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/options-include.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/options-invalid.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/options-invalid.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cpp
      - copied, changed from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/pthread_mutexattr_get.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/pthread_mutexattr_get.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/reallocarray-overflow.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/reallocarray-overflow.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_no_prune.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_no_prune.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_stack_depth.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_stack_depth.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_symbolize.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_symbolize.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-dso.cpp
      - copied, changed from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-dso.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-init.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-init.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard.cpp
      - copied, changed from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc.cpp
      - copied, changed from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc_inline.cpp
      - copied, changed from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc_inline.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_stack.cpp
      - copied unchanged from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_stack.cc
Removed:
    compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/abort_on_error.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/fputs_puts_null.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/print-stack-trace.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/FreeBSD/capsicum.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/FreeBSD/fdevname.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/abort_on_error.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/aligned_alloc-alignment.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/allow_user_segv.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/assert.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/decorate_proc_maps.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/deepbind.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/ill.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mallopt.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mlock_test.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mprobe.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/name_to_handle_at.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/new_delete_test.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/open_memstream.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/pthread_mutex.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/ptrace.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/pvalloc-overflow.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/recv_msg_trunc.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sched_getparam.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/signal_segv_handler.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/timerfd.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/unexpected_format_specifier_test.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/asysctl.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/cdb.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/faccessat.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/fparseln.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/funopen2.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/getgrouplist.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/getgroupmembership.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/getvfsstat.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/gid_from_group.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/group_from_gid.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/md2.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/md4.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/md5.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/mi_vector_hash.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/netent.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/paccept.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/protoent.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/rmd160.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/sha1.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/sha2.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/statvfs1.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strmode.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strtoi.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/sysctlgetmibinfo.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/ttyent.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/uid_from_user.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/user_from_uid.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/access.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/arc4random.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname_r.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dump_instruction_bytes.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dump_registers.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/feof_fileno_ferror.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fgetc_ungetc_getc.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fgetln.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fgets.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fpe.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fputc_putc_putchar.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fputs_puts.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fseek.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fts.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/funopen.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getc_unlocked.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getfsent.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getmntinfo.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getpass.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getpw_getgr.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getusershell.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/illegal_read_test.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/illegal_write_test.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/lstat.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/nl_langinfo.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/popen.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/posix_memalign-alignment.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/putc_putchar_unlocked.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/regex.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_fd_test.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/setvbuf.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sl_add.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strlcat.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strlcpy.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strtonum.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sysctl.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/vis.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/weak_hook_test.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/allocator_returns_null.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/corelimit.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/get_module_and_offset_for_pc.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/hard_rss_limit_mb_test.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/malloc_hook.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/options-help.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/options-include.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/options-invalid.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/pthread_mutexattr_get.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/reallocarray-overflow.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_no_prune.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_stack_depth.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_symbolize.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-dso.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-init.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc_inline.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_stack.cc
Modified:
    compiler-rt/trunk/test/asan/TestCases/Linux/aligned_delete_test.cc

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/aligned_delete_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/aligned_delete_test.cc?rev=367863&r1=367862&r2=367863&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/aligned_delete_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/aligned_delete_test.cc Mon Aug  5 06:57:03 2019
@@ -56,7 +56,7 @@ struct alignas(1024) S1024_1024 { char a
 
 int main(int argc, char **argv) {
   // Check the mismatched calls only, all the valid cases are verified in
-  // test/sanitizer_common/TestCases/Linux/new_delete_test.cc.
+  // test/sanitizer_common/TestCases/Linux/new_delete_test.cpp.
 
   operator delete(break_optimization(new S12_128), std::nothrow);
   // CHECK: AddressSanitizer: new-delete-type-mismatch

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/abort_on_error.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/abort_on_error.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/abort_on_error.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/abort_on_error.cc (removed)
@@ -1,27 +0,0 @@
-// Check that sanitizers on OS X crash the process by default (i.e.
-// abort_on_error=1). See also Linux/abort_on_error.cc.
-
-// RUN: %clangxx -DUSING_%tool_name %s -o %t
-
-// Intentionally don't inherit the default options.
-// RUN: env %tool_options='' not --crash %run %t 2>&1
-
-// When we use lit's default options, we shouldn't crash.
-// RUN: not %run %t 2>&1
-
-// Leak detection isn't treated as an error so `abort_on_error=1` doesn't work.
-// UNSUPPORTED: lsan
-
-int global;
-
-int main() {
-#if defined(USING_ubsan)
-  int value = 5;
-  int computation = value / 0; // Division by zero.
-#else
-  volatile int *a = new int[100];
-  delete[] a;
-  global = a[0]; // use-after-free: triggers ASan/TSan report.
-#endif
-  return 0;
-}

Copied: compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/abort_on_error.cpp (from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/abort_on_error.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/abort_on_error.cpp?p2=compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/abort_on_error.cpp&p1=compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/abort_on_error.cc&r1=367862&r2=367863&rev=367863&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/abort_on_error.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/abort_on_error.cpp Mon Aug  5 06:57:03 2019
@@ -1,5 +1,5 @@
 // Check that sanitizers on OS X crash the process by default (i.e.
-// abort_on_error=1). See also Linux/abort_on_error.cc.
+// abort_on_error=1). See also Linux/abort_on_error.cpp.
 
 // RUN: %clangxx -DUSING_%tool_name %s -o %t
 

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/fputs_puts_null.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/fputs_puts_null.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/fputs_puts_null.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/fputs_puts_null.cc (removed)
@@ -1,16 +0,0 @@
-// On Darwin, the man page states that "both fputs() and puts() print `(null)'
-// if str is NULL."
-//
-// RUN: %clangxx -g %s -o %t && %run %t | FileCheck %s
-// CHECK: {{^\(null\)---\(null\)$}}
-
-#include <assert.h>
-#include <stdio.h>
-
-int main(void) {
-  assert(fputs(NULL, stdout) >= 0);
-  fputs("---", stdout);
-  assert(puts(NULL) >= 0);
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/print-stack-trace.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/print-stack-trace.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/print-stack-trace.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/print-stack-trace.cc (removed)
@@ -1,19 +0,0 @@
-// RUN: %clangxx -O0 %s -o %t && %env_tool_opts=stack_trace_format=DEFAULT %run %t 2>&1 | FileCheck %s
-// RUN: %env_tool_opts=stack_trace_format='"frame:%n lineno:%l"' %run %t 2>&1 | FileCheck %s --check-prefix=CUSTOM
-
-#include <sanitizer/common_interface_defs.h>
-
-static inline void FooBarBaz() {
-  __sanitizer_print_stack_trace();
-}
-
-int main() {
-  FooBarBaz();
-  return 0;
-}
-// CHECK: {{    #0 0x.* in __sanitizer_print_stack_trace}}
-// CHECK: {{    #1 0x.* in FooBarBaz(\(\))? .*}}print-stack-trace.cc:[[@LINE-8]]
-// CHECK: {{    #2 0x.* in main.*}}print-stack-trace.cc:[[@LINE-5]]
-
-// CUSTOM: frame:1 lineno:[[@LINE-11]]
-// CUSTOM: frame:2 lineno:[[@LINE-8]]

Copied: compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/print-stack-trace.cpp (from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/print-stack-trace.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/print-stack-trace.cpp?p2=compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/print-stack-trace.cpp&p1=compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/print-stack-trace.cc&r1=367862&r2=367863&rev=367863&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/print-stack-trace.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Darwin/print-stack-trace.cpp Mon Aug  5 06:57:03 2019
@@ -12,8 +12,8 @@ int main() {
   return 0;
 }
 // CHECK: {{    #0 0x.* in __sanitizer_print_stack_trace}}
-// CHECK: {{    #1 0x.* in FooBarBaz(\(\))? .*}}print-stack-trace.cc:[[@LINE-8]]
-// CHECK: {{    #2 0x.* in main.*}}print-stack-trace.cc:[[@LINE-5]]
+// CHECK: {{    #1 0x.* in FooBarBaz(\(\))? .*}}print-stack-trace.cpp:[[@LINE-8]]
+// CHECK: {{    #2 0x.* in main.*}}print-stack-trace.cpp:[[@LINE-5]]
 
 // CUSTOM: frame:1 lineno:[[@LINE-11]]
 // CUSTOM: frame:2 lineno:[[@LINE-8]]

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/FreeBSD/capsicum.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/FreeBSD/capsicum.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/FreeBSD/capsicum.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/FreeBSD/capsicum.cc (removed)
@@ -1,68 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-
-#include <sys/capsicum.h>
-#include <sys/ioctl.h>
-
-#include <assert.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <termios.h>
-#include <unistd.h>
-
-void test_cap_ioctls() {
-  cap_rights_t rights;
-  unsigned long ncmds[] = {TIOCGETA, TIOCGWINSZ, FIODTYPE};
-  unsigned long rcmds = 0;
-  cap_rights_t *rptr = cap_rights_init(&rights, CAP_IOCTL, CAP_READ);
-  assert(rptr);
-
-  int rv = cap_rights_limit(STDIN_FILENO, &rights);
-  assert(rv == 0);
-  rv = cap_ioctls_limit(STDIN_FILENO, ncmds, 3);
-  assert(rv == 0);
-  ssize_t rz = cap_ioctls_get(STDIN_FILENO, &rcmds, 3);
-  assert(rz == 3);
-  printf("ioctls test: %ld commands authorized\n", rz);
-}
-
-void test_cap_rights() {
-  cap_rights_t rights, little, remove, grights;
-  cap_rights_t *rptr = cap_rights_init(&rights, CAP_IOCTL, CAP_READ);
-  assert(rptr);
-  cap_rights_t *gptr = cap_rights_init(&remove, CAP_IOCTL);
-  assert(gptr);
-  cap_rights_t *sptr = cap_rights_init(&little, CAP_READ);
-  assert(sptr);
-  bool hasit = cap_rights_contains(rptr, sptr);
-  assert(hasit == true);
-  cap_rights_t *pptr = cap_rights_remove(&rights, gptr);
-  hasit = cap_rights_contains(pptr, sptr);
-  assert(hasit == true);
-  cap_rights_t *aptr = cap_rights_merge(&rights, gptr);
-  assert(aptr);
-  bool correct = cap_rights_is_valid(&rights);
-  assert(correct == true);
-
-  int rv = cap_rights_limit(STDIN_FILENO, &rights);
-  assert(rv == 0);
-  rv = cap_rights_get(STDIN_FILENO, &grights);
-  assert(rv == 0);
-  assert(memcmp(&grights, &rights, sizeof(grights)) == 0);
-  cap_rights_t *iptr = cap_rights_set(&rights, CAP_IOCTL);
-  assert(iptr);
-  cap_rights_t *eptr = cap_rights_clear(&rights, CAP_READ);
-  assert(eptr);
-  hasit = cap_rights_is_set(&rights, CAP_IOCTL);
-  assert(hasit == true);
-  printf("rights test: %d\n", rv);
-}
-
-int main(void) {
-  test_cap_ioctls();
-
-  test_cap_rights();
-
-  // CHECK: ioctls test: {{.*}} commands authorized
-  // CHECK: rights test: {{.*}}
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/FreeBSD/fdevname.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/FreeBSD/fdevname.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/FreeBSD/fdevname.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/FreeBSD/fdevname.cc (removed)
@@ -1,44 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-
-#include <assert.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/stat.h>
-
-void test_fdevname() {
-  int fd = open("/dev/null", O_RDONLY);
-  char *name;
-  
-  printf("test_fdevname\n");
-  assert(fd != -1);
-  assert((name = fdevname(fd)));
-  close(fd);
-
-  printf("%s\n", name);
-}
-
-void test_fdevname_r() {
-  int fd = open("/dev/null", O_RDONLY);
-  char *name;
-  char buf[5];
-
-  printf("test_fdevname_r\n");
-  assert(fd != -1);
-  assert((name = fdevname_r(fd, buf, sizeof(buf))));
-  close(fd);
-
-  printf("%s\n", name);
-}
-
-int main(void) {
-  test_fdevname();
-  test_fdevname_r();
-  // CHECK: test_fdevname
-  // CHECK: null
-  // CHECK: test_fdevname_r
-  // CHECK: null
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/abort_on_error.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/abort_on_error.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/abort_on_error.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/abort_on_error.cc (removed)
@@ -1,23 +0,0 @@
-// Check that sanitizers call _exit() on Linux by default (i.e.
-// abort_on_error=0). See also Darwin/abort_on_error.cc.
-
-// RUN: %clangxx %s -o %t
-
-// Intentionally don't inherit the default options.
-// RUN: env %tool_options='' not %run %t 2>&1
-
-// When we use lit's default options, we shouldn't crash either. On Linux
-// lit doesn't set options anyway.
-// RUN: not %run %t 2>&1
-
-// Android needs abort_on_error=0
-// UNSUPPORTED: android
-
-namespace __sanitizer {
-void Die();
-}
-
-int main() {
-  __sanitizer::Die();
-  return 0;
-}

Copied: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/abort_on_error.cpp (from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/abort_on_error.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/abort_on_error.cpp?p2=compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/abort_on_error.cpp&p1=compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/abort_on_error.cc&r1=367862&r2=367863&rev=367863&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/abort_on_error.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/abort_on_error.cpp Mon Aug  5 06:57:03 2019
@@ -1,5 +1,5 @@
 // Check that sanitizers call _exit() on Linux by default (i.e.
-// abort_on_error=0). See also Darwin/abort_on_error.cc.
+// abort_on_error=0). See also Darwin/abort_on_error.cpp.
 
 // RUN: %clangxx %s -o %t
 

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/aligned_alloc-alignment.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/aligned_alloc-alignment.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/aligned_alloc-alignment.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/aligned_alloc-alignment.cc (removed)
@@ -1,43 +0,0 @@
-// RUN: %clangxx %collect_stack_traces -O0 %s -o %t
-
-// Alignment is not a power of 2:
-// RUN: %env_tool_opts=allocator_may_return_null=0 not %run %t 17 2>&1 | FileCheck %s
-// Size is not a multiple of alignment:
-// RUN: %env_tool_opts=allocator_may_return_null=0 not %run %t 8 2>&1 | FileCheck %s
-// Alignment is 0:
-// RUN: %env_tool_opts=allocator_may_return_null=0 not %run %t 0 2>&1 | FileCheck %s
-
-// The same for allocator_may_return_null=1:
-// RUN: %env_tool_opts=allocator_may_return_null=1 %run %t 17 2>&1 | FileCheck %s --check-prefix=CHECK-NULL
-// RUN: %env_tool_opts=allocator_may_return_null=1 %run %t 8 2>&1 | FileCheck %s --check-prefix=CHECK-NULL
-// RUN: %env_tool_opts=allocator_may_return_null=1 %run %t 0 2>&1 | FileCheck %s --check-prefix=CHECK-NULL
-
-// REQUIRES: stable-runtime
-
-// UNSUPPORTED: android, ubsan
-
-#include <assert.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-extern void *aligned_alloc(size_t alignment, size_t size);
-
-int main(int argc, char **argv) {
-  assert(argc == 2);
-  const int alignment = atoi(argv[1]);
-
-  void *p = aligned_alloc(alignment, 100);
-  // CHECK: {{ERROR: .*Sanitizer: invalid alignment requested in aligned_alloc}}
-  // Handle a case when aligned_alloc is aliased by memalign.
-  // CHECK: {{#0 .*}}{{aligned_alloc|memalign}}
-  // CHECK: {{#1 .*main .*aligned_alloc-alignment.cc:}}[[@LINE-4]]
-  // CHECK: {{SUMMARY: .*Sanitizer: invalid-aligned-alloc-alignment}}
-
-  // The NULL pointer is printed differently on different systems, while (long)0
-  // is always the same.
-  fprintf(stderr, "errno: %d, p: %lx\n", errno, (long)p);
-  // CHECK-NULL: errno: 22, p: 0
-
-  return 0;
-}

Copied: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/aligned_alloc-alignment.cpp (from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/aligned_alloc-alignment.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/aligned_alloc-alignment.cpp?p2=compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/aligned_alloc-alignment.cpp&p1=compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/aligned_alloc-alignment.cc&r1=367862&r2=367863&rev=367863&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/aligned_alloc-alignment.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/aligned_alloc-alignment.cpp Mon Aug  5 06:57:03 2019
@@ -31,7 +31,7 @@ int main(int argc, char **argv) {
   // CHECK: {{ERROR: .*Sanitizer: invalid alignment requested in aligned_alloc}}
   // Handle a case when aligned_alloc is aliased by memalign.
   // CHECK: {{#0 .*}}{{aligned_alloc|memalign}}
-  // CHECK: {{#1 .*main .*aligned_alloc-alignment.cc:}}[[@LINE-4]]
+  // CHECK: {{#1 .*main .*aligned_alloc-alignment.cpp:}}[[@LINE-4]]
   // CHECK: {{SUMMARY: .*Sanitizer: invalid-aligned-alloc-alignment}}
 
   // The NULL pointer is printed differently on different systems, while (long)0

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/allow_user_segv.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/allow_user_segv.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/allow_user_segv.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/allow_user_segv.cc (removed)
@@ -1,88 +0,0 @@
-// Regression test for
-// https://code.google.com/p/address-sanitizer/issues/detail?id=180
-
-// RUN: %clangxx -O0 %s -o %t
-
-// RUN: %env_tool_opts=handle_segv=0 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK0
-// RUN: %env_tool_opts=handle_segv=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1
-// RUN: %env_tool_opts=handle_segv=2 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK2
-
-// RUN: %env_tool_opts=handle_segv=0:allow_user_segv_handler=0 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK0
-// RUN: %env_tool_opts=handle_segv=1:allow_user_segv_handler=0 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK2
-// RUN: %env_tool_opts=handle_segv=2:allow_user_segv_handler=0 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK2
-
-// RUN: %env_tool_opts=handle_segv=0:allow_user_segv_handler=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK0
-// RUN: %env_tool_opts=handle_segv=1:allow_user_segv_handler=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1
-// RUN: %env_tool_opts=handle_segv=2:allow_user_segv_handler=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK2
-
-// Flaky errors in debuggerd with "waitpid returned unexpected pid (0)" in logcat.
-// UNSUPPORTED: android && i386-target-arch
-
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-struct sigaction original_sigaction_sigbus;
-struct sigaction original_sigaction_sigsegv;
-
-void User_OnSIGSEGV(int signum, siginfo_t *siginfo, void *context) {
-  fprintf(stderr, "User sigaction called\n");
-  struct sigaction original_sigaction = {};
-  if (signum == SIGBUS)
-    original_sigaction = original_sigaction_sigbus;
-  else if (signum == SIGSEGV)
-    original_sigaction = original_sigaction_sigsegv;
-  else {
-    printf("Invalid signum");
-    exit(1);
-  }
-  if (original_sigaction.sa_flags | SA_SIGINFO) {
-    if (original_sigaction.sa_sigaction)
-      original_sigaction.sa_sigaction(signum, siginfo, context);
-  } else {
-    if (original_sigaction.sa_handler)
-      original_sigaction.sa_handler(signum);
-  }
-  exit(1);
-}
-
-int DoSEGV() {
-  volatile int *x = 0;
-  return *x;
-}
-
-bool InstallHandler(int signum, struct sigaction *original_sigaction) {
-  struct sigaction user_sigaction = {};
-  user_sigaction.sa_sigaction = User_OnSIGSEGV;
-  user_sigaction.sa_flags = SA_SIGINFO;
-  if (sigaction(signum, &user_sigaction, original_sigaction)) {
-    perror("sigaction");
-    return false;
-  }
-  return true;
-}
-
-int main() {
-  // Let's install handlers for both SIGSEGV and SIGBUS, since pre-Yosemite
-  // 32-bit Darwin triggers SIGBUS instead.
-  if (InstallHandler(SIGSEGV, &original_sigaction_sigsegv) &&
-      InstallHandler(SIGBUS, &original_sigaction_sigbus)) {
-    fprintf(stderr, "User sigaction installed\n");
-  }
-  return DoSEGV();
-}
-
-// CHECK0-NOT: Sanitizer:DEADLYSIGNAL
-// CHECK0-NOT: Sanitizer: SEGV on unknown address
-// CHECK0: User sigaction installed
-// CHECK0-NEXT: User sigaction called
-
-// CHECK1: User sigaction installed
-// CHECK1-NEXT: User sigaction called
-// CHECK1-NEXT: Sanitizer:DEADLYSIGNAL
-// CHECK1: Sanitizer: SEGV on unknown address
-
-// CHECK2-NOT: User sigaction called
-// CHECK2: User sigaction installed
-// CHECK2-NEXT: Sanitizer:DEADLYSIGNAL
-// CHECK2: Sanitizer: SEGV on unknown address

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/assert.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/assert.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/assert.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/assert.cc (removed)
@@ -1,25 +0,0 @@
-// Test the handle_abort option.
-
-// RUN: %clangxx %s -o %t
-// RUN:                              not --crash %run %t 2>&1 | FileCheck --check-prefix=CHECK0 %s
-// RUN: %env_tool_opts=handle_abort=0 not --crash %run %t 2>&1 | FileCheck --check-prefix=CHECK0 %s
-// RUN: %env_tool_opts=handle_abort=1 not         %run %t 2>&1 | FileCheck --check-prefix=CHECK1 %s
-
-#include <assert.h>
-#include <stdio.h>
-#include <sanitizer/asan_interface.h>
-
-void death() {
-  fprintf(stderr, "DEATH CALLBACK\n");
-}
-
-int main(int argc, char **argv) {
-  __sanitizer_set_death_callback(death);
-  assert(argc == 100);
-}
-
-// CHECK0-NOT: Sanitizer:DEADLYSIGNAL
-// CHECK1: ERROR: {{.*}}Sanitizer: ABRT
-// CHECK1: {{ #0 }}
-// CHECK1: DEATH CALLBACK
-// CHECK0-NOT: Sanitizer

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/decorate_proc_maps.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/decorate_proc_maps.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/decorate_proc_maps.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/decorate_proc_maps.cc (removed)
@@ -1,65 +0,0 @@
-// RUN: %clangxx -g %s -o %t
-// RUN: %env_tool_opts=decorate_proc_maps=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%tool_name
-
-// REQUIRES: stable-runtime
-// XFAIL: android && asan
-
-#include <errno.h>
-#include <fcntl.h>
-#include <pthread.h>
-#include <stdio.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-bool CopyFdToFd(int in_fd, int out_fd) {
-  const size_t kBufSize = 0x10000;
-  static char buf[kBufSize];
-  while (true) {
-    ssize_t got = read(in_fd, buf, kBufSize);
-    if (got > 0) {
-      write(out_fd, buf, got);
-    } else if (got == 0) {
-      break;
-    } else if (errno != EAGAIN || errno != EWOULDBLOCK || errno != EINTR) {
-      fprintf(stderr, "error reading file, errno %d\n", errno);
-      return false;
-    }
-  }
-  return true;
-}
-
-void *ThreadFn(void *arg) {
-  (void)arg;
-  int fd = open("/proc/self/maps", O_RDONLY);
-  bool res = CopyFdToFd(fd, 2);
-  close(fd);
-  return (void *)!res;
-}
-
-int main(void) {
-  pthread_t t;
-  void *res;
-  pthread_create(&t, 0, ThreadFn, 0);
-  pthread_join(t, &res);
-  return (int)(size_t)res;
-}
-
-// CHECK-asan: rw-p {{.*}} [low shadow]
-// CHECK-asan: ---p {{.*}} [shadow gap]
-// CHECK-asan: rw-p {{.*}} [high shadow]
-
-// CHECK-msan: ---p {{.*}} [invalid]
-// CHECK-msan: rw-p {{.*}} [shadow{{.*}}]
-// CHECK-msan: ---p {{.*}} [origin{{.*}}]
-
-// CHECK-tsan: rw-p {{.*}} [shadow]
-// CHECK-tsan: rw-p {{.*}} [meta shadow]
-// CHECK-tsan: rw-p {{.*}} [trace 0]
-// CHECK-tsan: rw-p {{.*}} [trace header 0]
-// CHECK-tsan: rw-p {{.*}} [trace 1]
-// CHECK-tsan: rw-p {{.*}} [trace header 1]
-
-// Nothing interesting with standalone LSan and UBSan.
-// CHECK-lsan: decorate_proc_maps
-// CHECK-ubsan: decorate_proc_maps

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/deepbind.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/deepbind.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/deepbind.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/deepbind.cc (removed)
@@ -1,12 +0,0 @@
-// RUN: %clangxx %s -o %t && %run not %t 1 2>&1 | FileCheck %s
-// UNSUPPORTED: lsan,ubsan,android
-
-#include <dlfcn.h>
-#include <stdio.h>
-#include <string>
-
-int main (int argc, char *argv[]) {
-  // CHECK: You are trying to dlopen a <arbitrary path> shared library with RTLD_DEEPBIND flag
-  void *lib = dlopen("<arbitrary path>", RTLD_NOW | RTLD_DEEPBIND);
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cc (removed)
@@ -1,20 +0,0 @@
-// Regression test for a crash in getpwnam_r and similar interceptors.
-// RUN: %clangxx -O0 -g %s -o %t && %run %t
-
-#include <assert.h>
-#include <errno.h>
-#include <pwd.h>
-#include <signal.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-int main(void) {
-  struct passwd pwd;
-  struct passwd *pwdres;
-  char buf[10000];
-  int res = getpwnam_r("no-such-user", &pwd, buf, sizeof(buf), &pwdres);
-  assert(res == 0 || res == ENOENT);
-  assert(pwdres == 0);
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/ill.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/ill.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/ill.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/ill.cc (removed)
@@ -1,27 +0,0 @@
-// Test the handle_sigill option.
-
-// RUN: %clangxx %s -o %t -O1
-// RUN:                                not --crash %run %t 2>&1 | FileCheck --check-prefix=CHECK0 %s
-// RUN: %env_tool_opts=handle_sigill=0 not --crash %run %t 2>&1 | FileCheck --check-prefix=CHECK0 %s
-// RUN: %env_tool_opts=handle_sigill=1 not         %run %t 2>&1 | FileCheck --check-prefix=CHECK1 %s
-
-// FIXME: seems to fail on ARM
-// REQUIRES: x86_64-target-arch
-#include <assert.h>
-#include <stdio.h>
-#include <sanitizer/asan_interface.h>
-
-void death() {
-  fprintf(stderr, "DEATH CALLBACK\n");
-}
-
-int main(int argc, char **argv) {
-  __sanitizer_set_death_callback(death);
-  __builtin_trap();
-}
-
-// CHECK0-NOT: Sanitizer:DEADLYSIGNAL
-// CHECK1: ERROR: {{.*}}Sanitizer: ILL
-// CHECK1: {{#[0-9]+.* main .*ill\.cc:[0-9]+}}
-// CHECK1: DEATH CALLBACK
-// CHECK0-NOT: Sanitizer

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mallopt.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mallopt.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mallopt.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mallopt.cc (removed)
@@ -1,10 +0,0 @@
-// Check that mallopt does not return invalid values (ex. -1).
-// RUN: %clangxx -O2 %s -o %t && %run %t
-#include <assert.h>
-#include <malloc.h>
-
-int main() {
-  // Try a random mallopt option, possibly invalid.
-  int res = mallopt(-42, 0);
-  assert(res == 0 || res == 1);
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mlock_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mlock_test.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mlock_test.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mlock_test.cc (removed)
@@ -1,13 +0,0 @@
-// RUN: %clang  %s -o %t && %run %t
-// XFAIL: ubsan,lsan
-
-#include <assert.h>
-#include <sys/mman.h>
-
-int main() {
-  assert(0 == mlockall(MCL_CURRENT));
-  assert(0 == mlock((void *)0x12345, 0x5678));
-  assert(0 == munlockall());
-  assert(0 == munlock((void *)0x987, 0x654));
-}
-

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mprobe.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mprobe.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mprobe.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mprobe.cc (removed)
@@ -1,42 +0,0 @@
-// RUN: %clangxx %s -o %t && %run %t 2>&1 | FileCheck %s
-// UNSUPPORTED: android, ubsan
-
-#include <stdio.h>
-#include <stdlib.h>
-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 2)
-#include <mcheck.h>
-#else
-#define MCHECK_OK 0
-extern "C" int mcheck(void (*abortfunc)(int mstatus));
-extern "C" int mcheck_pedantic(void (*abortfunc)(int mstatus));
-extern "C" int mprobe(void *ptr);
-#endif
-
-void check_heap() {
-  void *p = malloc(1000);
-  int res = mprobe(p);
-  if (res == MCHECK_OK)
-    printf("Success!\n");
-  free(p);
-}
-
-int main(int argc, char *argv[]) {
-  void *p;
-  if (mcheck(NULL) != 0) {
-    fprintf(stderr, "mcheck() failed\n");
-    exit(EXIT_FAILURE);
-  }
-
-  check_heap();
-  // CHECK: Success!
-
-  if (mcheck_pedantic(NULL) != 0) {
-    fprintf(stderr, "mcheck_pedantic() failed\n");
-    exit(EXIT_FAILURE);
-  }
-
-  check_heap();
-  // CHECK: Success!
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/name_to_handle_at.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/name_to_handle_at.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/name_to_handle_at.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/name_to_handle_at.cc (removed)
@@ -1,21 +0,0 @@
-// RUN: %clangxx -O0 %s -o %t && %run %t
-// UNSUPPORTED: android
-
-#include <assert.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-
-int main(int argc, char **argv) {
-  int mount_id;
-  struct file_handle *handle = reinterpret_cast<struct file_handle *>(
-      malloc(sizeof(*handle) + MAX_HANDLE_SZ));
-
-  handle->handle_bytes = MAX_HANDLE_SZ;
-  int res = name_to_handle_at(AT_FDCWD, "/dev/null", handle, &mount_id, 0);
-  assert(!res);
-
-  free(handle);
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/new_delete_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/new_delete_test.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/new_delete_test.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/new_delete_test.cc (removed)
@@ -1,80 +0,0 @@
-// RUN: %clangxx -std=c++1z -faligned-allocation -O0 %s -o %t && %run %t
-// RUN: %clangxx -std=c++1z -faligned-allocation -fsized-deallocation -O0 %s -o %t && %run %t
-
-// ubsan does not intercept new/delete.
-// UNSUPPORTED: ubsan
-
-// Check that all new/delete variants are defined and work with supported
-// sanitizers. Sanitizer-specific failure modes tests are supposed to go to
-// the particular sanitizier's test suites.
-
-#include <cstddef>
-
-// Define all new/delete to do not depend on the version provided by the
-// platform. The implementation is provided by the sanitizer anyway.
-
-namespace std {
-struct nothrow_t {};
-static const nothrow_t nothrow;
-enum class align_val_t : size_t {};
-}  // namespace std
-
-void *operator new(size_t);
-void *operator new[](size_t);
-void *operator new(size_t, std::nothrow_t const&);
-void *operator new[](size_t, std::nothrow_t const&);
-void *operator new(size_t, std::align_val_t);
-void *operator new[](size_t, std::align_val_t);
-void *operator new(size_t, std::align_val_t, std::nothrow_t const&);
-void *operator new[](size_t, std::align_val_t, std::nothrow_t const&);
-
-void operator delete(void*) throw();
-void operator delete[](void*) throw();
-void operator delete(void*, std::nothrow_t const&);
-void operator delete[](void*, std::nothrow_t const&);
-void operator delete(void*, size_t) throw();
-void operator delete[](void*, size_t) throw();
-void operator delete(void*, std::align_val_t) throw();
-void operator delete[](void*, std::align_val_t) throw();
-void operator delete(void*, std::align_val_t, std::nothrow_t const&);
-void operator delete[](void*, std::align_val_t, std::nothrow_t const&);
-void operator delete(void*, size_t, std::align_val_t) throw();
-void operator delete[](void*, size_t, std::align_val_t) throw();
-
-
-template<typename T>
-inline T* break_optimization(T *arg) {
-  __asm__ __volatile__("" : : "r" (arg) : "memory");
-  return arg;
-}
-
-
-struct S12 { int a, b, c; };
-struct alignas(128) S12_128 { int a, b, c; };
-struct alignas(256) S12_256 { int a, b, c; };
-struct alignas(512) S1024_512 { char a[1024]; };
-struct alignas(1024) S1024_1024 { char a[1024]; };
-
-
-int main(int argc, char **argv) {
-  delete break_optimization(new S12);
-  operator delete(break_optimization(new S12), std::nothrow);
-  delete [] break_optimization(new S12[100]);
-  operator delete[](break_optimization(new S12[100]), std::nothrow);
-
-  delete break_optimization(new S12_128);
-  operator delete(break_optimization(new S12_128),
-                  std::align_val_t(alignof(S12_128)));
-  operator delete(break_optimization(new S12_128),
-                  std::align_val_t(alignof(S12_128)), std::nothrow);
-  operator delete(break_optimization(new S12_128), sizeof(S12_128),
-                  std::align_val_t(alignof(S12_128)));
-
-  delete [] break_optimization(new S12_128[100]);
-  operator delete[](break_optimization(new S12_128[100]),
-                    std::align_val_t(alignof(S12_128)));
-  operator delete[](break_optimization(new S12_128[100]),
-                    std::align_val_t(alignof(S12_128)), std::nothrow);
-  operator delete[](break_optimization(new S12_128[100]), sizeof(S12_128[100]),
-                    std::align_val_t(alignof(S12_128)));
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/open_memstream.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/open_memstream.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/open_memstream.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/open_memstream.cc (removed)
@@ -1,70 +0,0 @@
-// RUN: %clangxx -m64 -O0 -g -xc++ %s -o %t && %run %t
-// RUN: %clangxx -m64 -O3 -g -xc++ %s -o %t && %run %t
-// REQUIRES: x86_64-target-arch
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#ifndef __has_feature
-#define __has_feature(x) 0
-#endif
-
-#if __has_feature(memory_sanitizer)
-#include <sanitizer/msan_interface.h>
-static void check_mem_is_good(void *p, size_t s) {
-  __msan_check_mem_is_initialized(p, s);
-}
-#elif __has_feature(address_sanitizer)
-#include <sanitizer/asan_interface.h>
-static void check_mem_is_good(void *p, size_t s) {
-  assert(__asan_region_is_poisoned(p, s) == 0);
-}
-#else
-static void check_mem_is_good(void *p, size_t s) {}
-#endif
-
-static void run(bool flush) {
-  char *buf;
-  size_t buf_len;
-  fprintf(stderr, " &buf %p, &buf_len %p\n", &buf, &buf_len);
-  FILE *fp = open_memstream(&buf, &buf_len);
-  fprintf(fp, "hello");
-  if (flush) {
-    fflush(fp);
-    check_mem_is_good(&buf, sizeof(buf));
-    check_mem_is_good(&buf_len, sizeof(buf_len));
-    check_mem_is_good(buf, buf_len);
-  }
-
-  char *p = new char[1024];
-  memset(p, 'a', 1023);
-  p[1023] = 0;
-  for (int i = 0; i < 100; ++i)
-    fprintf(fp, "%s", p);
-  delete[] p;
-
-  if (flush) {
-    fflush(fp);
-    fprintf(stderr, " %p addr %p, len %zu\n", &buf, buf, buf_len);
-    check_mem_is_good(&buf, sizeof(buf));
-    check_mem_is_good(&buf_len, sizeof(buf_len));
-    check_mem_is_good(buf, buf_len);\
-  }
-
-  fclose(fp);
-  check_mem_is_good(&buf, sizeof(buf));
-  check_mem_is_good(&buf_len, sizeof(buf_len));
-  check_mem_is_good(buf, buf_len);
-
-  free(buf);
-}
-
-int main(void) {
-  for (int i = 0; i < 100; ++i)
-    run(false);
-  for (int i = 0; i < 100; ++i)
-    run(true);
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/pthread_mutex.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/pthread_mutex.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/pthread_mutex.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/pthread_mutex.cc (removed)
@@ -1,34 +0,0 @@
-// RUN: %clangxx -O1 %s -o %t && %run %t
-// RUN: %clangxx -O1 -DUSE_GLIBC %s -o %t && %run %t
-// UNSUPPORTED: android
-
-#include <pthread.h>
-
-#ifdef USE_GLIBC
-extern "C" int __pthread_mutex_lock(pthread_mutex_t *__mutex);
-extern "C" int __pthread_mutex_unlock(pthread_mutex_t *__mutex);
-#define LOCK __pthread_mutex_lock
-#define UNLOCK __pthread_mutex_unlock
-#else
-#define LOCK pthread_mutex_lock
-#define UNLOCK pthread_mutex_unlock
-#endif
-
-pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;
-int x;
-
-static void *Start(void *arg) {
-  LOCK(&m);
-  ++x;
-  UNLOCK(&m);
-  return nullptr;
-}
-
-int main() {
-  pthread_t threads[2] = {};
-  for (pthread_t &t : threads)
-    pthread_create(&t, 0, &Start, 0);
-  for (pthread_t &t : threads)
-    pthread_join(t, 0);
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/ptrace.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/ptrace.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/ptrace.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/ptrace.cc (removed)
@@ -1,127 +0,0 @@
-// RUN: %clangxx -O0 %s -o %t && %run %t
-
-// UNSUPPORTED: android
-
-#include <assert.h>
-#include <signal.h>
-#include <stdio.h>
-#include <sys/ptrace.h>
-#include <sys/types.h>
-#include <sys/user.h>
-#include <sys/wait.h>
-#include <sys/uio.h>
-#include <unistd.h>
-#include <elf.h>
-#if __mips64 || __arm__
- #include <asm/ptrace.h>
- #include <sys/procfs.h>
-#endif
-#ifdef __aarch64__
-// GLIBC 2.20+ sys/user does not include asm/ptrace.h
- #include <asm/ptrace.h>
-#endif
-
-int main(void) {
-  pid_t pid;
-  pid = fork();
-  if (pid == 0) { // child
-    ptrace(PTRACE_TRACEME, 0, NULL, NULL);
-    execl("/bin/true", "true", NULL);
-  } else {
-    wait(NULL);
-    int res;
-
-#if __x86_64__
-    user_regs_struct regs;
-    res = ptrace(PTRACE_GETREGS, pid, NULL, &regs);
-    assert(!res);
-    if (regs.rip)
-      printf("%zx\n", regs.rip);
-
-    user_fpregs_struct fpregs;
-    res = ptrace(PTRACE_GETFPREGS, pid, NULL, &fpregs);
-    assert(!res);
-    if (fpregs.mxcsr)
-      printf("%x\n", fpregs.mxcsr);
-#endif // __x86_64__
-
-#if (__powerpc64__ || __mips64 || __arm__)
-    struct pt_regs regs;
-    res = ptrace((enum __ptrace_request)PTRACE_GETREGS, pid, NULL, &regs);
-    assert(!res);
-#if (__powerpc64__)
-    if (regs.nip)
-      printf("%lx\n", regs.nip);
-#elif (__mips64)
-    if (regs.cp0_epc)
-    printf("%lx\n", regs.cp0_epc);
-#elif (__arm__)
-    if (regs.ARM_pc)
-    printf("%lx\n", regs.ARM_pc);
-#endif
-#if (__powerpc64 || __mips64)
-    elf_fpregset_t fpregs;
-    res = ptrace((enum __ptrace_request)PTRACE_GETFPREGS, pid, NULL, &fpregs);
-    assert(!res);
-    if ((elf_greg_t)fpregs[32]) // fpscr
-      printf("%lx\n", (elf_greg_t)fpregs[32]);
-#elif (__arm__)
-    char regbuf[ARM_VFPREGS_SIZE];
-    res = ptrace((enum __ptrace_request)PTRACE_GETVFPREGS, pid, 0, regbuf);
-    assert(!res);
-    unsigned fpscr = *(unsigned*)(regbuf + (32 * 8));
-    printf ("%x\n", fpscr);
-#endif
-#endif // (__powerpc64__ || __mips64 || __arm__)
-
-#if (__aarch64__)
-    struct iovec regset_io;
-
-    struct user_pt_regs regs;
-    regset_io.iov_base = ®s;
-    regset_io.iov_len = sizeof(regs);
-    res = ptrace(PTRACE_GETREGSET, pid, (void*)NT_PRSTATUS, (void*)&regset_io);
-    assert(!res);
-    if (regs.pc)
-      printf("%llx\n", regs.pc);
-
-    struct user_fpsimd_state fpregs;
-    regset_io.iov_base = &fpregs;
-    regset_io.iov_len = sizeof(fpregs);
-    res = ptrace(PTRACE_GETREGSET, pid, (void*)NT_FPREGSET, (void*)&regset_io);
-    assert(!res);
-    if (fpregs.fpsr)
-      printf("%x\n", fpregs.fpsr);
-#endif // (__aarch64__)
-
-#if (__s390__)
-    struct iovec regset_io;
-
-    struct _user_regs_struct regs;
-    regset_io.iov_base = ®s;
-    regset_io.iov_len = sizeof(regs);
-    res = ptrace(PTRACE_GETREGSET, pid, (void*)NT_PRSTATUS, (void*)&regset_io);
-    assert(!res);
-    if (regs.psw.addr)
-      printf("%lx\n", regs.psw.addr);
-
-    struct _user_fpregs_struct fpregs;
-    regset_io.iov_base = &fpregs;
-    regset_io.iov_len = sizeof(fpregs);
-    res = ptrace(PTRACE_GETREGSET, pid, (void*)NT_FPREGSET, (void*)&regset_io);
-    assert(!res);
-    if (fpregs.fpc)
-      printf("%x\n", fpregs.fpc);
-#endif // (__s390__)
-
-    siginfo_t siginfo;
-    res = ptrace(PTRACE_GETSIGINFO, pid, NULL, &siginfo);
-    assert(!res);
-    assert(siginfo.si_pid == pid);
-
-    ptrace(PTRACE_CONT, pid, NULL, NULL);
-
-    wait(NULL);
-  }
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/pvalloc-overflow.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/pvalloc-overflow.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/pvalloc-overflow.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/pvalloc-overflow.cc (removed)
@@ -1,47 +0,0 @@
-// RUN: %clangxx %collect_stack_traces -O0 %s -o %t
-// RUN: %env_tool_opts=allocator_may_return_null=0 not %run %t m1 2>&1 | FileCheck %s
-// RUN: %env_tool_opts=allocator_may_return_null=1     %run %t m1 2>&1 | FileCheck %s --check-prefix=CHECK-NULL
-// RUN: %env_tool_opts=allocator_may_return_null=0 not %run %t psm1 2>&1 | FileCheck %s
-// RUN: %env_tool_opts=allocator_may_return_null=1     %run %t psm1 2>&1 | FileCheck %s --check-prefix=CHECK-NULL
-
-// REQUIRES: stable-runtime
-
-// UNSUPPORTED: android, freebsd, netbsd, ubsan
-
-// Checks that pvalloc overflows are caught. If the allocator is allowed to
-// return null, the errno should be set to ENOMEM.
-
-#include <assert.h>
-#include <errno.h>
-#include <malloc.h>
-#include <stdio.h>
-#include <stdint.h>
-#include <string.h>
-#include <unistd.h>
-
-int main(int argc, char *argv[]) {
-  assert(argc == 2);
-  const char *action = argv[1];
-
-  const size_t page_size = sysconf(_SC_PAGESIZE);
-
-  void *p = nullptr;
-  if (!strcmp(action, "m1")) {
-    p = pvalloc((uintptr_t)-1);
-  } else if (!strcmp(action, "psm1")) {
-    p = pvalloc((uintptr_t)-(page_size - 1));
-  } else {
-    assert(0);
-  }
-  // CHECK: {{ERROR: .*Sanitizer: pvalloc parameters overflow: size .* rounded up to system page size .* cannot be represented in type size_t}}
-  // CHECK: {{#0 .*pvalloc}}
-  // CHECK: {{#1 .*main .*pvalloc-overflow.cc:}}
-  // CHECK: {{SUMMARY: .*Sanitizer: pvalloc-overflow}}
-
-  // The NULL pointer is printed differently on different systems, while (long)0
-  // is always the same.
-  fprintf(stderr, "errno: %d, p: %lx\n", errno, (long)p);
-  // CHECK-NULL: errno: 12, p: 0
-
-  return 0;
-}

Copied: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/pvalloc-overflow.cpp (from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/pvalloc-overflow.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/pvalloc-overflow.cpp?p2=compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/pvalloc-overflow.cpp&p1=compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/pvalloc-overflow.cc&r1=367862&r2=367863&rev=367863&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/pvalloc-overflow.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/pvalloc-overflow.cpp Mon Aug  5 06:57:03 2019
@@ -35,7 +35,7 @@ int main(int argc, char *argv[]) {
   }
   // CHECK: {{ERROR: .*Sanitizer: pvalloc parameters overflow: size .* rounded up to system page size .* cannot be represented in type size_t}}
   // CHECK: {{#0 .*pvalloc}}
-  // CHECK: {{#1 .*main .*pvalloc-overflow.cc:}}
+  // CHECK: {{#1 .*main .*pvalloc-overflow.cpp:}}
   // CHECK: {{SUMMARY: .*Sanitizer: pvalloc-overflow}}
 
   // The NULL pointer is printed differently on different systems, while (long)0

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/recv_msg_trunc.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/recv_msg_trunc.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/recv_msg_trunc.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/recv_msg_trunc.cc (removed)
@@ -1,36 +0,0 @@
-// Test that ASan doesn't raise false alarm when MSG_TRUNC is present.
-//
-// RUN: %clangxx %s -o %t && %run %t 2>&1
-//
-// UNSUPPORTED: android
-
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/ip.h>
-#include <assert.h>
-
-int main() {
-  int fd_0 = socket(AF_INET, SOCK_DGRAM, 0);
-  int fd_1 = socket(AF_INET, SOCK_DGRAM, 0);
-  struct sockaddr_in sin;
-  socklen_t len = sizeof(sin);
-  char *buf = (char *)malloc(1);
-
-  sin.sin_family = AF_INET;
-  // Choose a random port to bind.
-  sin.sin_port = 0;
-  sin.sin_addr.s_addr = INADDR_ANY;
-
-  assert(bind(fd_1, (struct sockaddr *)&sin, sizeof(sin)) == 0);
-  // Get the address and port binded.
-  assert(getsockname(fd_1, (struct sockaddr *)&sin, &len) == 0);
-  assert(sendto(fd_0, "hello", strlen("hello"), MSG_DONTWAIT,
-                (struct sockaddr *)&sin, sizeof(sin)) != -1);
-  assert(recv(fd_1, buf, 1, MSG_TRUNC) != -1);
-  free(buf);
-
-  return 0;
-}
-

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sched_getparam.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sched_getparam.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sched_getparam.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sched_getparam.cc (removed)
@@ -1,13 +0,0 @@
-// RUN: %clangxx -O0 %s -o %t && %run %t
-
-#include <assert.h>
-#include <sched.h>
-#include <stdio.h>
-
-int main(void) {
-  struct sched_param param;
-  int res = sched_getparam(0, &param);
-  assert(res == 0);
-  if (param.sched_priority == 42) printf(".\n");
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc (removed)
@@ -1,62 +0,0 @@
-// RUN: %clangxx -O0 -g %s -lutil -o %t && %run %t
-// This test depends on the glibc layout of struct sem_t and checks that we
-// don't leave sem_t::private uninitialized.
-// UNSUPPORTED: android, lsan-x86, ubsan, target-is-mips64, target-is-mips64el
-#include <features.h>
-#include <assert.h>
-#include <semaphore.h>
-#include <string.h>
-#include <stdint.h>
-
-// On powerpc64be semval_t must be 64 bits even with "old" versions of glibc.
-#if __PPC64__ && __BIG_ENDIAN__
-typedef uint64_t semval_t;
-
-// This condition needs to correspond to __HAVE_64B_ATOMICS macro in glibc.
-#elif (defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__) || \
-     defined(__s390x__) || defined(__sparc64__) || defined(__alpha__) || \
-     defined(__ia64__) || defined(__m68k__)) && __GLIBC_PREREQ(2, 21)
-typedef uint64_t semval_t;
-#else
-typedef unsigned semval_t;
-#endif
-
-// glibc 2.21 has introduced some changes in the way the semaphore value is
-// handled for 32-bit platforms, but since these changes are not ABI-breaking
-// they are not versioned. On newer platforms such as ARM, there is only one
-// version of the symbol, so it's enough to check the glibc version. However,
-// for old platforms such as i386, glibc contains two or even three versions of
-// the sem_init symbol, and the sanitizers always pick the oldest one.
-// Therefore, it is not enough to rely on the __GLIBC_PREREQ macro - we should
-// instead check the platform as well to make sure we only expect the new
-// behavior on platforms where the older symbols do not exist.
-#if defined(__arm__) && __GLIBC_PREREQ(2, 21)
-#define GET_SEM_VALUE(V) ((V) >> 1)
-#else
-#define GET_SEM_VALUE(V) (V)
-#endif
-
-void my_sem_init(bool priv, int value, semval_t *a, unsigned char *b) {
-  sem_t sem;
-  memset(&sem, 0xAB, sizeof(sem));
-  sem_init(&sem, priv, value);
-
-  char *p = (char *)&sem;
-  memcpy(a, p, sizeof(semval_t));
-  memcpy(b, p + sizeof(semval_t), sizeof(char));
-
-  sem_destroy(&sem);
-}
-
-int main() {
-  semval_t a;
-  unsigned char b;
-
-  my_sem_init(false, 42, &a, &b);
-  assert(GET_SEM_VALUE(a) == 42);
-  assert(b != 0xAB);
-
-  my_sem_init(true, 43, &a, &b);
-  assert(GET_SEM_VALUE(a) == 43);
-  assert(b != 0xAB);
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/signal_segv_handler.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/signal_segv_handler.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/signal_segv_handler.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/signal_segv_handler.cc (removed)
@@ -1,55 +0,0 @@
-// RUN: %clangxx -O1 %s -o %t && TSAN_OPTIONS="flush_memory_ms=1 memory_limit_mb=1" %run %t 2>&1 | FileCheck %s
-
-// JVM uses SEGV to preempt threads. All threads do a load from a known address
-// periodically. When runtime needs to preempt threads, it unmaps the page.
-// Threads start triggering SEGV one by one. The signal handler blocks
-// threads while runtime does its thing. Then runtime maps the page again
-// and resumes the threads.
-// Previously this pattern conflicted with stop-the-world machinery,
-// because it briefly reset SEGV handler to SIG_DFL.
-// As the consequence JVM just silently died.
-
-// This test sets memory flushing rate to maximum, then does series of
-// "benign" SEGVs that are handled by signal handler, and ensures that
-// the process survive.
-
-#include <assert.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/mman.h>
-#include <unistd.h>
-
-unsigned long page_size;
-void *guard;
-
-void handler(int signo, siginfo_t *info, void *uctx) {
-  mprotect(guard, page_size, PROT_READ | PROT_WRITE);
-}
-
-int main() {
-  page_size = sysconf(_SC_PAGESIZE);
-  struct sigaction a, old;
-  memset(&a, 0, sizeof(a));
-  memset(&old, 0, sizeof(old));
-  a.sa_sigaction = handler;
-  a.sa_flags = SA_SIGINFO;
-  sigaction(SIGSEGV, &a, &old);
-
-  memset(&a, 0, sizeof(a));
-  sigaction(SIGSEGV, 0, &a);
-  assert(a.sa_sigaction == handler);
-  assert(a.sa_flags & SA_SIGINFO);
-
-  guard = mmap(0, 3 * page_size, PROT_NONE, MAP_ANON | MAP_PRIVATE, -1, 0);
-  guard = (char*)guard + page_size;  // work around a kernel bug 
-  for (int i = 0; i < 1000000; i++) {
-    mprotect(guard, page_size, PROT_NONE);
-    *(int*)guard = 1;
-  }
-  sigaction(SIGSEGV, &old, 0);
-  fprintf(stderr, "DONE\n");
-}
-
-// CHECK: DONE

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cc (removed)
@@ -1,72 +0,0 @@
-// Check soft_rss_limit_mb. Not all sanitizers implement it yet.
-// RUN: %clangxx -O2 %s -o %t
-//
-// Run with limit should fail:
-// RUN: %env_tool_opts=soft_rss_limit_mb=220:quarantine_size=1:allocator_may_return_null=1     %run %t 2>&1 | FileCheck %s -check-prefix=CHECK_MAY_RETURN_1
-// RUN: %env_tool_opts=soft_rss_limit_mb=220:quarantine_size=1:allocator_may_return_null=0 not %run %t 2>&1 | FileCheck %s -check-prefix=CHECK_MAY_RETURN_0
-
-// This run uses getrusage. We can only test getrusage when allocator_may_return_null=0
-// because getrusage gives us max-rss, not current-rss.
-// RUN: %env_tool_opts=soft_rss_limit_mb=220:quarantine_size=1:allocator_may_return_null=0:can_use_proc_maps_statm=0 not %run %t 2>&1 | FileCheck %s -check-prefix=CHECK_MAY_RETURN_0
-// REQUIRES: stable-runtime
-
-// FIXME: make it work for other sanitizers.
-// XFAIL: lsan
-// XFAIL: tsan
-// XFAIL: msan
-// XFAIL: ubsan
-
-// https://github.com/google/sanitizers/issues/981
-// UNSUPPORTED: android-26
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-
-static const int kMaxNumAllocs = 1 << 9;
-static const int kAllocSize = 1 << 20;  // Large enough to go via mmap.
-
-static char *allocs[kMaxNumAllocs];
-
-int main() {
-  int num_allocs = kMaxNumAllocs / 4;
-  for (int i = 0; i < 3; i++, num_allocs *= 2) {
-    fprintf(stderr, "[%d] allocating %d times\n", i, num_allocs);
-    int zero_results = 0;
-    for (int j = 0; j < num_allocs; j++) {
-      if ((j % (num_allocs / 8)) == 0) {
-        usleep(100000);
-        fprintf(stderr, "  [%d]\n", j);
-      }
-      allocs[j] = (char*)malloc(kAllocSize);
-      if (allocs[j])
-        memset(allocs[j], -1, kAllocSize);
-      else
-        zero_results++;
-    }
-    if (zero_results)
-      fprintf(stderr, "Some of the malloc calls returned null: %d\n",
-              zero_results);
-    if (zero_results != num_allocs)
-      fprintf(stderr, "Some of the malloc calls returned non-null: %d\n",
-              num_allocs - zero_results);
-    for (int j = 0; j < num_allocs; j++) {
-      free(allocs[j]);
-    }
-  }
-}
-
-// CHECK_MAY_RETURN_1: allocating 128 times
-// CHECK_MAY_RETURN_1: Some of the malloc calls returned non-null: 128
-// CHECK_MAY_RETURN_1: allocating 256 times
-// CHECK_MAY_RETURN_1: Some of the malloc calls returned null:
-// CHECK_MAY_RETURN_1: Some of the malloc calls returned non-null:
-// CHECK_MAY_RETURN_1: allocating 512 times
-// CHECK_MAY_RETURN_1: Some of the malloc calls returned null:
-// CHECK_MAY_RETURN_1: Some of the malloc calls returned non-null:
-
-// CHECK_MAY_RETURN_0: allocating 128 times
-// CHECK_MAY_RETURN_0: Some of the malloc calls returned non-null: 128
-// CHECK_MAY_RETURN_0: allocating 256 times
-// CHECK_MAY_RETURN_0: {{SUMMARY: .*Sanitizer: rss-limit-exceeded}}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cc (removed)
@@ -1,29 +0,0 @@
-// RUN: %clangxx -O2 %s -o %t && %run %t 2>&1 | FileCheck %s
-
-#include <stdio.h>
-
-#if !defined(__GLIBC_PREREQ)
-#define __GLIBC_PREREQ(a, b) 0
-#endif
-
-// getauxval() used instead of sysconf() in GetPageSize() is defined starting
-// glbc version 2.16.
-#if __GLIBC_PREREQ(2, 16)
-extern "C" long sysconf(int name) {
-  fprintf(stderr, "sysconf wrapper called\n");
-  return 0;
-}
-#endif  // defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 16)
-
-int main() {
-  // All we need to check is that the sysconf() interceptor defined above was
-  // not called. Should it get called, it will crash right there, any
-  // instrumented code executed before sanitizer init is finished will crash
-  // accessing non-initialized sanitizer internals. Even if it will not crash
-  // in some configuration, it should never be called anyway.
-  fprintf(stderr, "Passed\n");
-  // CHECK-NOT: sysconf wrapper called
-  // CHECK: Passed
-  // CHECK-NOT: sysconf wrapper called
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/timerfd.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/timerfd.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/timerfd.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/timerfd.cc (removed)
@@ -1,52 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t | FileCheck %s
-#include <assert.h>
-#include <stdio.h>
-#include <string.h>
-#include <time.h>
-#include <sys/timerfd.h>
-#include <unistd.h>
-
-int main (int argc, char** argv)
-{
-  int fd = timerfd_create(CLOCK_REALTIME, 0);
-  assert(fd >= 0);
-
-  struct itimerspec its;
-  its.it_value.tv_sec = 0;
-  its.it_value.tv_nsec = 1000000;
-  its.it_interval.tv_sec = its.it_value.tv_sec;
-  its.it_interval.tv_nsec = its.it_value.tv_nsec;
-
-  int res = timerfd_settime(fd, 0, &its, NULL);
-  assert(res != -1);
-
-  struct itimerspec its2;
-  res = timerfd_settime(fd, 0, &its, &its2);
-  assert(res != -1);
-  assert(its2.it_interval.tv_sec == its.it_interval.tv_sec);
-  assert(its2.it_interval.tv_nsec == its.it_interval.tv_nsec);
-  assert(its2.it_value.tv_sec <= its.it_value.tv_sec);
-  assert(its2.it_value.tv_nsec <= its.it_value.tv_nsec);
-
-  struct itimerspec its3;
-  res = timerfd_gettime(fd, &its3);
-  assert(res != -1);
-  assert(its3.it_interval.tv_sec == its.it_interval.tv_sec);
-  assert(its3.it_interval.tv_nsec == its.it_interval.tv_nsec);
-  assert(its3.it_value.tv_sec <= its.it_value.tv_sec);
-  assert(its3.it_value.tv_nsec <= its.it_value.tv_nsec);
-
-
-  unsigned long long buf;
-  res = read(fd, &buf, sizeof(buf));
-  assert(res == 8);
-  assert(buf >= 1);
-
-  res = close(fd);
-  assert(res != -1);
-
-  printf("DONE\n");
-  // CHECK: DONE
-  
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/unexpected_format_specifier_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/unexpected_format_specifier_test.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/unexpected_format_specifier_test.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/unexpected_format_specifier_test.cc (removed)
@@ -1,13 +0,0 @@
-// RUN: %clang -w -O0 %s -o %t && %run %t 2>&1 | FileCheck %s
-// UNSUPPORTED: lsan
-// UNSUPPORTED: msan
-// UNSUPPORTED: ubsan
-#include <stdio.h>
-int main() {
-  int a;
-  printf("%Q\n", 1);
-  printf("%Q\n", 1);
-  printf("%Q\n", 1);
-}
-// CHECK: unexpected format specifier in printf interceptor: %Q (reported once per process)
-// CHECK-NOT: unexpected format specifier in printf interceptor

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/asysctl.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/asysctl.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/asysctl.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/asysctl.cc (removed)
@@ -1,44 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-
-#include <sys/param.h>
-#include <sys/types.h>
-
-#include <sys/sysctl.h>
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-void test_asysctl() {
-  int mib[] = {CTL_KERN, KERN_OSTYPE};
-  size_t len;
-  char *buf = (char *)asysctl(mib, __arraycount(mib), &len);
-  assert(buf);
-
-  printf("asysctl: '%s' size: '%zu'\n", buf, len);
-
-  free(buf);
-}
-
-void test_asysctlbyname() {
-  size_t len;
-  char *buf = (char *)asysctlbyname("kern.ostype", &len);
-  assert(buf);
-
-  printf("asysctlbyname: '%s' size: '%zu'\n", buf, len);
-
-  free(buf);
-}
-
-int main(void) {
-  printf("asysctl\n");
-
-  test_asysctl();
-  test_asysctlbyname();
-
-  return 0;
-
-  // CHECK: asysctl
-  // CHECK: asysctl: '{{.*}}' size: '{{.*}}'
-  // CHECK: asysctlbyname: '{{.*}}' size: '{{.*}}'
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/cdb.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/cdb.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/cdb.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/cdb.cc (removed)
@@ -1,134 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-
-#include <sys/param.h>
-
-#include <sys/types.h>
-
-#include <sys/mman.h>
-#include <sys/stat.h>
-
-#include <assert.h>
-#include <cdbr.h>
-#include <cdbw.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-static char *name;
-
-const char data1[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07};
-const char data2[] = {0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17};
-const char key1[] = {0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27};
-const char key2[] = {0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37};
-
-void test_cdbw() {
-  uint32_t idx;
-
-  struct cdbw *cdbw = cdbw_open();
-  assert(cdbw);
-
-  int rv = cdbw_put_data(cdbw, data1, __arraycount(data1), &idx);
-  assert(!rv);
-
-  rv = cdbw_put_key(cdbw, key1, __arraycount(key1), idx);
-  assert(!rv);
-
-  rv = cdbw_put(cdbw, key2, __arraycount(key2), data2, __arraycount(data2));
-  assert(!rv);
-
-  name = strdup("/tmp/temp.XXXXXX");
-  assert(name);
-
-  name = mktemp(name);
-  assert(name);
-
-  int fd = open(name, O_RDWR | O_CREAT, 0644);
-  assert(fd != -1);
-
-  cdbw_output(cdbw, fd, "TEST1", cdbw_stable_seeder);
-
-  cdbw_close(cdbw);
-
-  rv = close(fd);
-  assert(rv != -1);
-}
-
-void test_cdbr1() {
-  struct cdbr *cdbr = cdbr_open(name, CDBR_DEFAULT);
-  assert(cdbr);
-
-  uint32_t idx = cdbr_entries(cdbr);
-  assert(idx > 0);
-  printf("entries: %" PRIu32 "\n", idx);
-
-  const void *data;
-  size_t data_len;
-  int rv = cdbr_get(cdbr, idx - 1, &data, &data_len);
-  assert(rv == 0);
-
-  printf("data: ");
-  for (size_t i = 0; i < data_len; i++)
-    printf("%02" PRIx8, ((uint8_t *)data)[i]);
-  printf("\n");
-
-  rv = cdbr_find(cdbr, key1, __arraycount(key1), &data, &data_len);
-
-  printf("data: ");
-  for (size_t i = 0; i < data_len; i++)
-    printf("%02" PRIx8, ((uint8_t *)data)[i]);
-  printf("\n");
-
-  cdbr_close(cdbr);
-}
-
-#define COOKIE ((void *)1)
-
-static void cdbr_unmap(void *cookie, void *base, size_t sz) {
-  assert(cookie == COOKIE);
-  int rv = munmap(base, sz);
-  assert(rv != -1);
-}
-
-void test_cdbr2() {
-  struct stat sb;
-
-  int fd = open(name, O_RDONLY);
-  assert(fd != -1);
-
-  int rv = fstat(fd, &sb);
-  assert(rv != -1);
-
-  size_t sz = sb.st_size;
-  assert(sz < SSIZE_MAX);
-
-  void *base = mmap(NULL, sz, PROT_READ, MAP_FILE | MAP_SHARED, fd, 0);
-  assert(base != MAP_FAILED);
-
-  rv = close(fd);
-  assert(rv != -1);
-
-  struct cdbr *cdbr = cdbr_open_mem(base, sz, CDBR_DEFAULT, cdbr_unmap, COOKIE);
-  assert(cdbr);
-
-  printf("entries: %" PRIu32 "\n", cdbr_entries(cdbr));
-
-  cdbr_close(cdbr);
-}
-
-int main(void) {
-  printf("cdb\n");
-
-  test_cdbw();
-  test_cdbr1();
-  test_cdbr2();
-
-  // CHECK: cdb
-  // CHECK: entries: 2
-  // CHECK: data: 1011121314151617
-  // CHECK: data: 0001020304050607
-  // CHECK: entries: 2
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/faccessat.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/faccessat.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/faccessat.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/faccessat.cc (removed)
@@ -1,6 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t
-
-#include <fcntl.h>
-#include <unistd.h>
-
-int main(void) { return faccessat(AT_FDCWD, "/root", F_OK, 0); }

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/fparseln.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/fparseln.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/fparseln.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/fparseln.cc (removed)
@@ -1,25 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int main(void) {
-  printf("fparseln\n");
-
-  FILE *fp = fopen("/etc/fstab", "r");
-  assert(fp);
-
-  int flags = FPARSELN_UNESCALL;
-  const char *delim = "\\\\#";
-  size_t lineno = 0, len;
-  char *line;
-  while ((line = fparseln(fp, &len, &lineno, delim, flags))) {
-    printf("lineno: %zu, length: %zu, line: %s\n", lineno, len, line);
-    free(line);
-  }
-
-  // CHECK: fparseln
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/funopen2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/funopen2.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/funopen2.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/funopen2.cc (removed)
@@ -1,110 +0,0 @@
-// RUN: %clangxx -g %s -o %t && %run %t | FileCheck %s
-
-// CHECK: READ CALLED; len={{[0-9]*}}
-// CHECK-NEXT: READ: test
-// CHECK-NEXT: WRITE CALLED: test
-// CHECK-NEXT: READ CALLED; len={{[0-9]*}}
-// CHECK-NEXT: READ: test
-// CHECK-NEXT: WRITE CALLED: test
-// CHECK-NEXT: CLOSE CALLED
-// CHECK-NEXT: SEEK CALLED; off=100, whence=0
-// CHECK-NEXT: READ CALLED; len={{[0-9]*}}
-// CHECK-NEXT: READ: test
-// CHECK-NEXT: WRITE CALLED: test
-// CHECK-NEXT: FLUSH CALLED
-// CHECK-NEXT: WRITE CALLED: test
-// CHECK-NEXT: FLUSH CALLED
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-int cookie_var;
-
-ssize_t f_read(void *cookie, void *buf, size_t len) {
-  assert(cookie == &cookie_var);
-  assert(len >= 6);
-  printf("READ CALLED; len=%zd\n", len);
-  return strlcpy((char*)buf, "test\n", len);
-}
-
-ssize_t f_write(void *cookie, const void *buf, size_t len) {
-  assert(cookie == &cookie_var);
-  char *data = strndup((char*)buf, len);
-  assert(data);
-  printf("WRITE CALLED: %s\n", data);
-  free(data);
-  return len;
-}
-
-off_t f_seek(void *cookie, off_t off, int whence) {
-  assert(cookie == &cookie_var);
-  assert(whence == SEEK_SET);
-  printf("SEEK CALLED; off=%d, whence=%d\n", (int)off, whence);
-  return off;
-}
-
-int f_flush(void *cookie) {
-  assert(cookie == &cookie_var);
-  printf("FLUSH CALLED\n");
-  return 0;
-}
-
-int f_close(void *cookie) {
-  assert(cookie == &cookie_var);
-  printf("CLOSE CALLED\n");
-  return 0;
-}
-
-int main(void) {
-  FILE *fp;
-  char buf[10];
-
-  // 1. read-only variant
-  fp = fropen2(&cookie_var, f_read);
-  assert(fp);
-  // verify that fileno() does not crash or report nonsense
-  assert(fileno(fp) == -1);
-  assert(fgets(buf, sizeof(buf), fp));
-  printf("READ: %s", buf);
-  assert(!fclose(fp));
-
-  // 2. write-only variant
-  fp = fwopen2(&cookie_var, f_write);
-  assert(fp);
-  assert(fileno(fp) == -1);
-  assert(fputs("test", fp) >= 0);
-  assert(!fclose(fp));
-
-  // 3. read+write+close
-  fp = funopen2(&cookie_var, f_read, f_write, NULL, NULL, f_close);
-  assert(fp);
-  assert(fileno(fp) == -1);
-  assert(fgets(buf, sizeof(buf), fp));
-  printf("READ: %s", buf);
-  assert(fputs("test", fp) >= 0);
-  assert(!fflush(fp));
-  assert(!fclose(fp));
-
-  // 4. read+seek
-  fp = funopen2(&cookie_var, f_read, NULL, f_seek, NULL, NULL);
-  assert(fp);
-  assert(fileno(fp) == -1);
-  assert(fseek(fp, 100, SEEK_SET) == 0);
-  assert(fgets(buf, sizeof(buf), fp));
-  printf("READ: %s", buf);
-  assert(!fclose(fp));
-
-  // 5. write+flush
-  fp = funopen2(&cookie_var, NULL, f_write, NULL, f_flush, NULL);
-  assert(fp);
-  assert(fileno(fp) == -1);
-  assert(fputs("test", fp) >= 0);
-  assert(!fflush(fp));
-  assert(fputs("test", fp) >= 0);
-  // NB: fclose() also implicitly calls flush
-  assert(!fclose(fp));
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/getgrouplist.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/getgrouplist.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/getgrouplist.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/getgrouplist.cc (removed)
@@ -1,29 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t
-
-#include <stdlib.h>
-#include <unistd.h>
-#include <grp.h>
-
-int main(void) {
-  gid_t *groups;
-  gid_t nobody;
-  int ngroups;
-
-  ngroups = sysconf(_SC_NGROUPS_MAX);
-  groups = (gid_t *)malloc(ngroups * sizeof(gid_t));
-  if (!groups)
-    exit(1);
-
-  if (gid_from_group("nobody", &nobody) == -1)
-    exit(1);
-
-  if (getgrouplist("nobody", nobody, groups, &ngroups))
-    exit(1);
-
-  if (groups && ngroups) {
-    free(groups);
-    exit(0);
-  }
-
-  return -1;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/getgroupmembership.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/getgroupmembership.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/getgroupmembership.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/getgroupmembership.cc (removed)
@@ -1,32 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t
-
-// XFAIL: netbsd && msan
-
-#include <stdlib.h>
-#include <unistd.h>
-#include <grp.h>
-
-int main(void) {
-  gid_t *groups;
-  gid_t nobody;
-  int ngroups;
-  int maxgrp;
-
-  maxgrp = sysconf(_SC_NGROUPS_MAX);
-  groups = (gid_t *)malloc(maxgrp * sizeof(gid_t));
-  if (!groups)
-    exit(1);
-
-  if (gid_from_group("nobody", &nobody) == -1)
-    exit(1);
-
-  if (getgroupmembership("nobody", nobody, groups, maxgrp, &ngroups))
-    exit(1);
-
-  if (groups && ngroups) {
-    free(groups);
-    exit(0);
-  }
-
-  return -1;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/getvfsstat.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/getvfsstat.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/getvfsstat.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/getvfsstat.cc (removed)
@@ -1,36 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-
-#include <sys/types.h>
-
-#include <sys/statvfs.h>
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int main(void) {
-  printf("getvfsstat\n");
-
-  int rv = getvfsstat(NULL, 0, ST_WAIT);
-  assert(rv != -1);
-
-  size_t sz = rv * sizeof(struct statvfs);
-  struct statvfs *buf = (struct statvfs *)malloc(sz);
-  assert(buf);
-
-  rv = getvfsstat(buf, sz, ST_WAIT);
-  assert(rv != -1);
-
-  for (int i = 0; i < rv; i++) {
-    printf("Filesystem %d\n", i);
-    printf("\tfstypename=%s\n", buf[i].f_fstypename);
-    printf("\tmntonname=%s\n", buf[i].f_mntonname);
-    printf("\tmntfromname=%s\n", buf[i].f_mntfromname);
-  }
-
-  free(buf);
-
-  // CHECK: getvfsstat
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/gid_from_group.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/gid_from_group.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/gid_from_group.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/gid_from_group.cc (removed)
@@ -1,16 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t
-
-#include <grp.h>
-#include <stdlib.h>
-
-int main(void) {
-  gid_t nobody;
-
-  if (gid_from_group("nobody", &nobody) == -1)
-    exit(1);
-
-  if (nobody)
-    exit(0);
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/group_from_gid.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/group_from_gid.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/group_from_gid.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/group_from_gid.cc (removed)
@@ -1,17 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t
-
-#include <grp.h>
-#include <stdlib.h>
-#include <string.h>
-
-int main(void) {
-  const char *nobody;
-
-  if (!(nobody = group_from_gid(0, 0)))
-    exit(1);
-
-  if (strlen(nobody))
-    exit(0);
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/md2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/md2.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/md2.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/md2.cc (removed)
@@ -1,114 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-
-#include <sys/param.h>
-
-#include <assert.h>
-#include <endian.h>
-#include <md2.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-void test1() {
-  MD2_CTX ctx;
-  uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66};
-  uint8_t digest[MD2_DIGEST_LENGTH];
-
-  MD2Init(&ctx);
-  MD2Update(&ctx, entropy, __arraycount(entropy));
-  MD2Final(digest, &ctx);
-
-  printf("test1: '");
-  for (size_t i = 0; i < __arraycount(digest); i++)
-    printf("%02x", digest[i]);
-  printf("'\n");
-}
-
-void test2() {
-  MD2_CTX ctx;
-  uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66};
-  char digest[MD2_DIGEST_STRING_LENGTH];
-
-  MD2Init(&ctx);
-  MD2Update(&ctx, entropy, __arraycount(entropy));
-  char *p = MD2End(&ctx, digest);
-  assert(p == digest);
-
-  printf("test2: '%s'\n", digest);
-}
-
-void test3() {
-  MD2_CTX ctx;
-  uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66};
-
-  MD2Init(&ctx);
-  MD2Update(&ctx, entropy, __arraycount(entropy));
-  char *p = MD2End(&ctx, NULL);
-  assert(strlen(p) == MD2_DIGEST_STRING_LENGTH - 1);
-
-  printf("test3: '%s'\n", p);
-
-  free(p);
-}
-
-void test4() {
-  char digest[MD2_DIGEST_STRING_LENGTH];
-
-  char *p = MD2File("/etc/fstab", digest);
-  assert(p == digest);
-
-  printf("test4: '%s'\n", p);
-}
-
-void test5() {
-  char *p = MD2File("/etc/fstab", NULL);
-  assert(strlen(p) == MD2_DIGEST_STRING_LENGTH - 1);
-
-  printf("test5: '%s'\n", p);
-
-  free(p);
-}
-
-void test6() {
-  uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66};
-  char digest[MD2_DIGEST_STRING_LENGTH];
-
-  char *p = MD2Data(entropy, __arraycount(entropy), digest);
-  assert(p == digest);
-
-  printf("test6: '%s'\n", p);
-}
-
-void test7() {
-  uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66};
-
-  char *p = MD2Data(entropy, __arraycount(entropy), NULL);
-  assert(strlen(p) == MD2_DIGEST_STRING_LENGTH - 1);
-
-  printf("test7: '%s'\n", p);
-
-  free(p);
-}
-
-int main(void) {
-  printf("MD2\n");
-
-  test1();
-  test2();
-  test3();
-  test4();
-  test5();
-  test6();
-  test7();
-
-  // CHECK: MD2
-  // CHECK: test1: 'e303e49b34f981c2740cdf809200d51b'
-  // CHECK: test2: 'e303e49b34f981c2740cdf809200d51b'
-  // CHECK: test3: 'e303e49b34f981c2740cdf809200d51b'
-  // CHECK: test4: '{{.*}}'
-  // CHECK: test5: '{{.*}}'
-  // CHECK: test6: 'e303e49b34f981c2740cdf809200d51b'
-  // CHECK: test7: 'e303e49b34f981c2740cdf809200d51b'
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/md4.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/md4.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/md4.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/md4.cc (removed)
@@ -1,114 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-
-#include <sys/param.h>
-
-#include <assert.h>
-#include <endian.h>
-#include <md4.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-void test1() {
-  MD4_CTX ctx;
-  uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66};
-  uint8_t digest[MD4_DIGEST_LENGTH];
-
-  MD4Init(&ctx);
-  MD4Update(&ctx, entropy, __arraycount(entropy));
-  MD4Final(digest, &ctx);
-
-  printf("test1: '");
-  for (size_t i = 0; i < __arraycount(digest); i++)
-    printf("%02x", digest[i]);
-  printf("'\n");
-}
-
-void test2() {
-  MD4_CTX ctx;
-  uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66};
-  char digest[MD4_DIGEST_STRING_LENGTH];
-
-  MD4Init(&ctx);
-  MD4Update(&ctx, entropy, __arraycount(entropy));
-  char *p = MD4End(&ctx, digest);
-  assert(p == digest);
-
-  printf("test2: '%s'\n", digest);
-}
-
-void test3() {
-  MD4_CTX ctx;
-  uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66};
-
-  MD4Init(&ctx);
-  MD4Update(&ctx, entropy, __arraycount(entropy));
-  char *p = MD4End(&ctx, NULL);
-  assert(strlen(p) == MD4_DIGEST_STRING_LENGTH - 1);
-
-  printf("test3: '%s'\n", p);
-
-  free(p);
-}
-
-void test4() {
-  char digest[MD4_DIGEST_STRING_LENGTH];
-
-  char *p = MD4File("/etc/fstab", digest);
-  assert(p == digest);
-
-  printf("test4: '%s'\n", p);
-}
-
-void test5() {
-  char *p = MD4File("/etc/fstab", NULL);
-  assert(strlen(p) == MD4_DIGEST_STRING_LENGTH - 1);
-
-  printf("test5: '%s'\n", p);
-
-  free(p);
-}
-
-void test6() {
-  uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66};
-  char digest[MD4_DIGEST_STRING_LENGTH];
-
-  char *p = MD4Data(entropy, __arraycount(entropy), digest);
-  assert(p == digest);
-
-  printf("test6: '%s'\n", p);
-}
-
-void test7() {
-  uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66};
-
-  char *p = MD4Data(entropy, __arraycount(entropy), NULL);
-  assert(strlen(p) == MD4_DIGEST_STRING_LENGTH - 1);
-
-  printf("test7: '%s'\n", p);
-
-  free(p);
-}
-
-int main(void) {
-  printf("MD4\n");
-
-  test1();
-  test2();
-  test3();
-  test4();
-  test5();
-  test6();
-  test7();
-
-  // CHECK: MD4
-  // CHECK: test1: 'bf78fda2ca35eb7a026bfcdd3d17283d'
-  // CHECK: test2: 'bf78fda2ca35eb7a026bfcdd3d17283d'
-  // CHECK: test3: 'bf78fda2ca35eb7a026bfcdd3d17283d'
-  // CHECK: test4: '{{.*}}'
-  // CHECK: test5: '{{.*}}'
-  // CHECK: test6: 'bf78fda2ca35eb7a026bfcdd3d17283d'
-  // CHECK: test7: 'bf78fda2ca35eb7a026bfcdd3d17283d'
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/md5.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/md5.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/md5.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/md5.cc (removed)
@@ -1,114 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-
-#include <sys/param.h>
-
-#include <assert.h>
-#include <endian.h>
-#include <md5.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-void test1() {
-  MD5_CTX ctx;
-  uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66};
-  uint8_t digest[MD5_DIGEST_LENGTH];
-
-  MD5Init(&ctx);
-  MD5Update(&ctx, entropy, __arraycount(entropy));
-  MD5Final(digest, &ctx);
-
-  printf("test1: '");
-  for (size_t i = 0; i < __arraycount(digest); i++)
-    printf("%02x", digest[i]);
-  printf("'\n");
-}
-
-void test2() {
-  MD5_CTX ctx;
-  uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66};
-  char digest[MD5_DIGEST_STRING_LENGTH];
-
-  MD5Init(&ctx);
-  MD5Update(&ctx, entropy, __arraycount(entropy));
-  char *p = MD5End(&ctx, digest);
-  assert(p);
-
-  printf("test2: '%s'\n", digest);
-}
-
-void test3() {
-  MD5_CTX ctx;
-  uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66};
-
-  MD5Init(&ctx);
-  MD5Update(&ctx, entropy, __arraycount(entropy));
-  char *p = MD5End(&ctx, NULL);
-  assert(strlen(p) == MD5_DIGEST_STRING_LENGTH - 1);
-
-  printf("test3: '%s'\n", p);
-
-  free(p);
-}
-
-void test4() {
-  char digest[MD5_DIGEST_STRING_LENGTH];
-
-  char *p = MD5File("/etc/fstab", digest);
-  assert(p == digest);
-
-  printf("test4: '%s'\n", p);
-}
-
-void test5() {
-  char *p = MD5File("/etc/fstab", NULL);
-  assert(strlen(p) == MD5_DIGEST_STRING_LENGTH - 1);
-
-  printf("test5: '%s'\n", p);
-
-  free(p);
-}
-
-void test6() {
-  uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66};
-  char digest[MD5_DIGEST_STRING_LENGTH];
-
-  char *p = MD5Data(entropy, __arraycount(entropy), digest);
-  assert(p == digest);
-
-  printf("test6: '%s'\n", p);
-}
-
-void test7() {
-  uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66};
-
-  char *p = MD5Data(entropy, __arraycount(entropy), NULL);
-  assert(strlen(p) == MD5_DIGEST_STRING_LENGTH - 1);
-
-  printf("test7: '%s'\n", p);
-
-  free(p);
-}
-
-int main(void) {
-  printf("MD5\n");
-
-  test1();
-  test2();
-  test3();
-  test4();
-  test5();
-  test6();
-  test7();
-
-  // CHECK: MD5
-  // CHECK: test1: '86e65b1ef4a830af347ac05ab4f0e999'
-  // CHECK: test2: '86e65b1ef4a830af347ac05ab4f0e999'
-  // CHECK: test3: '86e65b1ef4a830af347ac05ab4f0e999'
-  // CHECK: test4: '{{.*}}'
-  // CHECK: test5: '{{.*}}'
-  // CHECK: test6: '86e65b1ef4a830af347ac05ab4f0e999'
-  // CHECK: test7: '86e65b1ef4a830af347ac05ab4f0e999'
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/mi_vector_hash.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/mi_vector_hash.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/mi_vector_hash.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/mi_vector_hash.cc (removed)
@@ -1,19 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-
-#include <inttypes.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int main(void) {
-  unsigned char key[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99};
-  uint32_t hashes[3];
-  mi_vector_hash(key, __arraycount(key), 0, hashes);
-  for (size_t i = 0; i < __arraycount(hashes); i++)
-    printf("hashes[%zu]='%" PRIx32 "'\n", i, hashes[i]);
-
-  // CHECK: hashes[0]='{{.*}}'
-  // CHECK: hashes[1]='{{.*}}'
-  // CHECK: hashes[2]='{{.*}}'
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/netent.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/netent.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/netent.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/netent.cc (removed)
@@ -1,84 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-
-#include <inttypes.h>
-#include <netdb.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#define STRING_OR_NULL(x) ((x) ? (x) : "null")
-
-void test1() {
-  struct netent *ntp = getnetent();
-
-  printf("%s ", ntp->n_name);
-
-  for (char **cp = ntp->n_aliases; *cp != NULL; cp++)
-    printf("%s ", STRING_OR_NULL(*cp));
-
-  printf("%d ", ntp->n_addrtype);
-  printf("%" PRIu32 "\n", ntp->n_net);
-
-  endnetent();
-}
-
-void test2() {
-  struct netent *ntp = getnetbyname("loopback");
-
-  printf("%s ", ntp->n_name);
-
-  for (char **cp = ntp->n_aliases; *cp != NULL; cp++)
-    printf("%s ", STRING_OR_NULL(*cp));
-
-  printf("%d ", ntp->n_addrtype);
-  printf("%" PRIu32 "\n", ntp->n_net);
-
-  endnetent();
-}
-
-void test3() {
-  struct netent *ntp = getnetbyaddr(127, 2);
-
-  printf("%s ", ntp->n_name);
-
-  for (char **cp = ntp->n_aliases; *cp != NULL; cp++)
-    printf("%s ", STRING_OR_NULL(*cp));
-
-  printf("%d ", ntp->n_addrtype);
-  printf("%" PRIu32 "\n", ntp->n_net);
-
-  endnetent();
-}
-
-void test4() {
-  setnetent(1);
-
-  struct netent *ntp = getnetent();
-
-  printf("%s ", ntp->n_name);
-
-  for (char **cp = ntp->n_aliases; *cp != NULL; cp++)
-    printf("%s ", STRING_OR_NULL(*cp));
-
-  printf("%d ", ntp->n_addrtype);
-  printf("%" PRIu32 "\n", ntp->n_net);
-
-  endnetent();
-}
-
-int main(void) {
-  printf("netent\n");
-
-  test1();
-  test2();
-  test3();
-  test4();
-
-  // CHECK: netent
-  // CHECK: loopback 2 127
-  // CHECK: loopback 2 127
-  // CHECK: loopback 2 127
-  // CHECK: loopback 2 127
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/paccept.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/paccept.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/paccept.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/paccept.cc (removed)
@@ -1,74 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t
-
-#include <netinet/in.h>
-#include <sys/socket.h>
-#include <sys/wait.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-int main(void) {
-  int child;
-  int fd, sfd;
-  socklen_t len;
-  struct sockaddr_in server = {}, client = {};
-  sigset_t set;
-
-  child = fork();
-  if (child == 0) {
-    fd = socket(AF_INET, SOCK_STREAM, 0);
-    if (fd == -1)
-      _exit(1);
-
-    server.sin_family = AF_INET;
-    server.sin_addr.s_addr = INADDR_ANY;
-    server.sin_port = htons(2222);
-
-    if (connect(fd, (struct sockaddr *)&server, sizeof(server)) == -1)
-      _exit(1);
-
-    close(fd);
-
-    _exit(0);
-  }
-
-  fd = socket(AF_INET, SOCK_STREAM, 0);
-  if (fd == -1) {
-    kill(child, SIGKILL);
-    wait(NULL);
-    exit(1);
-  }
-
-  server.sin_family = AF_INET;
-  server.sin_addr.s_addr = INADDR_ANY;
-  server.sin_port = htons(2222);
-
-  if (bind(fd, (const struct sockaddr *)&server, sizeof(server)) == -1) {
-    kill(child, SIGKILL);
-    wait(NULL);
-    exit(1);
-  }
-
-  listen(fd, 3);
-
-  if (sigemptyset(&set) == -1) {
-    kill(child, SIGKILL);
-    wait(NULL);
-    exit(1);
-  }
-
-  len = sizeof(client);
-  sfd = paccept(fd, (struct sockaddr *)&client, &len, &set, SOCK_NONBLOCK);
-  if (sfd == -1) {
-    kill(child, SIGKILL);
-    wait(NULL);
-    exit(1);
-  }
-
-  wait(NULL);
-
-  close(sfd);
-  close(fd);
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/protoent.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/protoent.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/protoent.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/protoent.cc (removed)
@@ -1,89 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-
-#include <netdb.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#define STRING_OR_NULL(x) ((x) ? (x) : "null")
-
-void test1() {
-  struct protoent *ptp = getprotoent();
-
-  printf("%s ", STRING_OR_NULL(ptp->p_name));
-
-  for (char **cp = ptp->p_aliases; *cp != NULL; cp++)
-    printf("%s ", STRING_OR_NULL(*cp));
-
-  printf("%d\n", ptp->p_proto);
-  endprotoent();
-}
-
-void test2() {
-  struct protoent *ptp = getprotobyname("icmp");
-
-  printf("%s ", STRING_OR_NULL(ptp->p_name));
-
-  for (char **cp = ptp->p_aliases; *cp != NULL; cp++)
-    printf("%s ", STRING_OR_NULL(*cp));
-
-  printf("%d\n", ptp->p_proto);
-  endprotoent();
-}
-
-void test3() {
-  struct protoent *ptp = getprotobynumber(1);
-
-  printf("%s ", STRING_OR_NULL(ptp->p_name));
-
-  for (char **cp = ptp->p_aliases; *cp != NULL; cp++)
-    printf("%s ", STRING_OR_NULL(*cp));
-
-  printf("%d\n", ptp->p_proto);
-  endprotoent();
-}
-
-void test4() {
-  setprotoent(1);
-  struct protoent *ptp = getprotobynumber(1);
-
-  ptp = getprotobynumber(2);
-
-  printf("%s ", STRING_OR_NULL(ptp->p_name));
-
-  for (char **cp = ptp->p_aliases; *cp != NULL; cp++)
-    printf("%s ", STRING_OR_NULL(*cp));
-
-  printf("%d\n", ptp->p_proto);
-  endprotoent();
-}
-
-void test5() {
-  struct protoent *ptp = getprotobyname("ttp");
-
-  printf("%s ", STRING_OR_NULL(ptp->p_name));
-
-  for (char **cp = ptp->p_aliases; *cp != NULL; cp++)
-    printf("%s ", STRING_OR_NULL(*cp));
-
-  printf("%d\n", ptp->p_proto);
-  endprotoent();
-}
-
-int main(void) {
-  printf("protoent\n");
-
-  test1();
-  test2();
-  test3();
-  test4();
-  test5();
-
-  // CHECK: protoent
-  // CHECK: hopopt HOPOPT 0
-  // CHECK: icmp ICMP 1
-  // CHECK: icmp ICMP 1
-  // CHECK: igmp IGMP 2
-  // CHECK: ttp TTP iptm IPTM 84
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/rmd160.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/rmd160.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/rmd160.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/rmd160.cc (removed)
@@ -1,133 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-
-#include <assert.h>
-#include <rmd160.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-void test1() {
-  RMD160_CTX ctx;
-  uint8_t entropy[] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 };
-  uint8_t digest[RMD160_DIGEST_LENGTH];
-
-  RMD160Init(&ctx);
-  RMD160Update(&ctx, entropy, __arraycount(entropy));
-  RMD160Final(digest, &ctx);
-
-  printf("test1: '");
-  for (size_t i = 0; i < __arraycount(digest); i++)
-    printf("%02x", digest[i]);
-  printf("'\n");
-}
-
-void test2() {
-  RMD160_CTX ctx;
-  uint8_t entropy[] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 };
-  char digest[RMD160_DIGEST_STRING_LENGTH];
-
-  RMD160Init(&ctx);
-  RMD160Update(&ctx, entropy, __arraycount(entropy));
-  char *p = RMD160End(&ctx, digest);
-  assert(p == digest);
-
-  printf("test2: '%s'\n", digest);
-}
-
-void test3() {
-  RMD160_CTX ctx;
-  uint8_t entropy[] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 };
-
-  RMD160Init(&ctx);
-  RMD160Update(&ctx, entropy, __arraycount(entropy));
-  char *p = RMD160End(&ctx, NULL);
-  assert(strlen(p) == RMD160_DIGEST_STRING_LENGTH - 1);
-
-  printf("test3: '%s'\n", p);
-
-  free(p);
-}
-
-void test4() {
-  char digest[RMD160_DIGEST_STRING_LENGTH];
-
-  char *p = RMD160File("/etc/fstab", digest);
-  assert(p == digest);
-
-  printf("test4: '%s'\n", p);
-}
-
-void test5() {
-  char *p = RMD160File("/etc/fstab", NULL);
-  assert(strlen(p) == RMD160_DIGEST_STRING_LENGTH - 1);
-
-  printf("test5: '%s'\n", p);
-
-  free(p);
-}
-
-void test6() {
-  char digest[RMD160_DIGEST_STRING_LENGTH];
-
-  char *p = RMD160FileChunk("/etc/fstab", digest, 10, 20);
-  assert(p == digest);
-
-  printf("test6: '%s'\n", p);
-}
-
-void test7() {
-  char *p = RMD160FileChunk("/etc/fstab", NULL, 10, 20);
-  assert(strlen(p) == RMD160_DIGEST_STRING_LENGTH - 1);
-
-  printf("test7: '%s'\n", p);
-
-  free(p);
-}
-
-void test8() {
-  uint8_t entropy[] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 };
-  char digest[RMD160_DIGEST_STRING_LENGTH];
-
-  char *p = RMD160Data(entropy, __arraycount(entropy), digest);
-  assert(p == digest);
-
-  printf("test8: '%s'\n", p);
-}
-
-void test9() {
-  uint8_t entropy[] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 };
-
-  char *p = RMD160Data(entropy, __arraycount(entropy), NULL);
-  assert(strlen(p) == RMD160_DIGEST_STRING_LENGTH - 1);
-
-  printf("test9: '%s'\n", p);
-
-  free(p);
-}
-
-int main(void) {
-  printf("RMD160\n");
-
-  test1();
-  test2();
-  test3();
-  test4();
-  test5();
-  test6();
-  test7();
-  test8();
-  test9();
-
-  // CHECK: RMD160
-  // CHECK: test1: '2787e5a006365df6e8e799315b669dc34866783c'
-  // CHECK: test2: '2787e5a006365df6e8e799315b669dc34866783c'
-  // CHECK: test3: '2787e5a006365df6e8e799315b669dc34866783c'
-  // CHECK: test4: '{{.*}}'
-  // CHECK: test5: '{{.*}}'
-  // CHECK: test6: '{{.*}}'
-  // CHECK: test7: '{{.*}}'
-  // CHECK: test8: '2787e5a006365df6e8e799315b669dc34866783c'
-  // CHECK: test9: '2787e5a006365df6e8e799315b669dc34866783c'
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/sha1.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/sha1.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/sha1.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/sha1.cc (removed)
@@ -1,171 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-
-#include <assert.h>
-#include <sha1.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-void test1() {
-  SHA1_CTX ctx;
-  uint8_t entropy[] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 };
-  uint8_t digest[SHA1_DIGEST_LENGTH];
-
-  SHA1Init(&ctx);
-  SHA1Update(&ctx, entropy, __arraycount(entropy));
-  SHA1Final(digest, &ctx);
-
-  printf("test1: '");
-  for (size_t i = 0; i < __arraycount(digest); i++)
-    printf("%02x", digest[i]);
-  printf("'\n");
-}
-
-void local_SHA1Update(SHA1_CTX *context, const uint8_t *data, unsigned int len)
-{
-    unsigned int a, b;
-
-    b = context->count[0];
-    context->count[0] += len << 3;
-    if (context->count[0] < b)
-        context->count[1] += (len >> 29) + 1;
-    b = (b >> 3) & 63;
-    if ((b + len) > 63) {
-        memcpy(&context->buffer[b], data, (a = 64 - b));
-        SHA1Transform(context->state, context->buffer);
-        for ( ; a + 63 < len; a += 64)
-            SHA1Transform(context->state, &data[a]);
-        b = 0;
-    } else {
-        a = 0;
-    }
-    memcpy(&context->buffer[b], &data[a], len - a);
-}
-
-void test2() {
-  SHA1_CTX ctx;
-  uint8_t entropy[] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 };
-  uint8_t digest[SHA1_DIGEST_LENGTH];
-
-  SHA1Init(&ctx);
-  local_SHA1Update(&ctx, entropy, __arraycount(entropy));
-  SHA1Final(digest, &ctx);
-
-  printf("test2: '");
-  for (size_t i = 0; i < __arraycount(digest); i++)
-    printf("%02x", digest[i]);
-  printf("'\n");
-}
-
-void test3() {
-  SHA1_CTX ctx;
-  uint8_t entropy[] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 };
-  char digest[SHA1_DIGEST_STRING_LENGTH];
-
-  SHA1Init(&ctx);
-  SHA1Update(&ctx, entropy, __arraycount(entropy));
-  char *p = SHA1End(&ctx, digest);
-  assert(p == digest);
-
-  printf("test3: '%s'\n", digest);
-}
-
-void test4() {
-  SHA1_CTX ctx;
-  uint8_t entropy[] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 };
-
-  SHA1Init(&ctx);
-  SHA1Update(&ctx, entropy, __arraycount(entropy));
-  char *p = SHA1End(&ctx, NULL);
-  assert(strlen(p) == SHA1_DIGEST_STRING_LENGTH - 1);
-
-  printf("test4: '%s'\n", p);
-
-  free(p);
-}
-
-void test5() {
-  char digest[SHA1_DIGEST_STRING_LENGTH];
-
-  char *p = SHA1File("/etc/fstab", digest);
-  assert(p == digest);
-
-  printf("test5: '%s'\n", p);
-}
-
-void test6() {
-  char *p = SHA1File("/etc/fstab", NULL);
-  assert(strlen(p) == SHA1_DIGEST_STRING_LENGTH - 1);
-
-  printf("test6: '%s'\n", p);
-
-  free(p);
-}
-
-void test7() {
-  char digest[SHA1_DIGEST_STRING_LENGTH];
-
-  char *p = SHA1FileChunk("/etc/fstab", digest, 10, 20);
-  assert(p == digest);
-
-  printf("test7: '%s'\n", p);
-}
-
-void test8() {
-  char *p = SHA1FileChunk("/etc/fstab", NULL, 10, 20);
-  assert(strlen(p) == SHA1_DIGEST_STRING_LENGTH - 1);
-
-  printf("test8: '%s'\n", p);
-
-  free(p);
-}
-
-void test9() {
-  uint8_t entropy[] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 };
-  char digest[SHA1_DIGEST_STRING_LENGTH];
-
-  char *p = SHA1Data(entropy, __arraycount(entropy), digest);
-  assert(p == digest);
-
-  printf("test9: '%s'\n", p);
-}
-
-void test10() {
-  uint8_t entropy[] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 };
-
-  char *p = SHA1Data(entropy, __arraycount(entropy), NULL);
-  assert(strlen(p) == SHA1_DIGEST_STRING_LENGTH - 1);
-
-  printf("test10: '%s'\n", p);
-
-  free(p);
-}
-
-int main(void) {
-  printf("SHA1\n");
-
-  test1();
-  test2();
-  test3();
-  test4();
-  test5();
-  test6();
-  test7();
-  test8();
-  test9();
-  test10();
-
-  // CHECK: SHA1
-  // CHECK: test1: '57d1b759bf3d1811135748cb0328c73b51fa6f57'
-  // CHECK: test2: '57d1b759bf3d1811135748cb0328c73b51fa6f57'
-  // CHECK: test3: '57d1b759bf3d1811135748cb0328c73b51fa6f57'
-  // CHECK: test4: '57d1b759bf3d1811135748cb0328c73b51fa6f57'
-  // CHECK: test5: '{{.*}}'
-  // CHECK: test6: '{{.*}}'
-  // CHECK: test7: '{{.*}}'
-  // CHECK: test8: '{{.*}}'
-  // CHECK: test9: '57d1b759bf3d1811135748cb0328c73b51fa6f57'
-  // CHECK: test10: '57d1b759bf3d1811135748cb0328c73b51fa6f57'
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/sha2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/sha2.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/sha2.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/sha2.cc (removed)
@@ -1,206 +0,0 @@
-// RUN: %clangxx -O0 -g %s -DSHASIZE=224 -o %t && %run %t 2>&1 | FileCheck %s -check-prefix=CHECK-224
-// RUN: %clangxx -O0 -g %s -DSHASIZE=256 -o %t && %run %t 2>&1 | FileCheck %s -check-prefix=CHECK-256
-// RUN: %clangxx -O0 -g %s -DSHASIZE=384 -o %t && %run %t 2>&1 | FileCheck %s -check-prefix=CHECK-384
-// RUN: %clangxx -O0 -g %s -DSHASIZE=512 -o %t && %run %t 2>&1 | FileCheck %s -check-prefix=CHECK-512
-
-#include <sys/param.h>
-
-#include <assert.h>
-#include <endian.h>
-#include <sha2.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#ifndef SHASIZE
-#error SHASIZE must be defined
-#endif
-
-#define _SHA_CTX(x) SHA##x##_CTX
-#define SHA_CTX(x) _SHA_CTX(x)
-
-#define _SHA_DIGEST_LENGTH(x) SHA##x##_DIGEST_LENGTH
-#define SHA_DIGEST_LENGTH(x) _SHA_DIGEST_LENGTH(x)
-
-#define _SHA_DIGEST_STRING_LENGTH(x) SHA##x##_DIGEST_STRING_LENGTH
-#define SHA_DIGEST_STRING_LENGTH(x) _SHA_DIGEST_STRING_LENGTH(x)
-
-#define _SHA_Init(x) SHA##x##_Init
-#define SHA_Init(x) _SHA_Init(x)
-
-#define _SHA_Update(x) SHA##x##_Update
-#define SHA_Update(x) _SHA_Update(x)
-
-#define _SHA_Final(x) SHA##x##_Final
-#define SHA_Final(x) _SHA_Final(x)
-
-#define _SHA_End(x) SHA##x##_End
-#define SHA_End(x) _SHA_End(x)
-
-#define _SHA_File(x) SHA##x##_File
-#define SHA_File(x) _SHA_File(x)
-
-#define _SHA_FileChunk(x) SHA##x##_FileChunk
-#define SHA_FileChunk(x) _SHA_FileChunk(x)
-
-#define _SHA_Data(x) SHA##x##_Data
-#define SHA_Data(x) _SHA_Data(x)
-
-void test1() {
-  SHA_CTX(SHASIZE) ctx;
-  uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66};
-  uint8_t digest[SHA_DIGEST_LENGTH(SHASIZE)];
-
-  SHA_Init(SHASIZE)(&ctx);
-  SHA_Update(SHASIZE)(&ctx, entropy, __arraycount(entropy));
-  SHA_Final(SHASIZE)(digest, &ctx);
-
-  printf("test1: '");
-  for (size_t i = 0; i < __arraycount(digest); i++)
-    printf("%02x", digest[i]);
-  printf("'\n");
-}
-
-void test2() {
-  SHA_CTX(SHASIZE) ctx;
-  uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66};
-  char digest[SHA_DIGEST_STRING_LENGTH(SHASIZE)];
-
-  SHA_Init(SHASIZE)(&ctx);
-  SHA_Update(SHASIZE)(&ctx, entropy, __arraycount(entropy));
-  char *p = SHA_End(SHASIZE)(&ctx, digest);
-  assert(p == digest);
-
-  printf("test2: '%s'\n", digest);
-}
-
-void test3() {
-  SHA_CTX(SHASIZE) ctx;
-  uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66};
-
-  SHA_Init(SHASIZE)(&ctx);
-  SHA_Update(SHASIZE)(&ctx, entropy, __arraycount(entropy));
-  char *p = SHA_End(SHASIZE)(&ctx, NULL);
-  assert(strlen(p) == SHA_DIGEST_STRING_LENGTH(SHASIZE) - 1);
-
-  printf("test3: '%s'\n", p);
-
-  free(p);
-}
-
-void test4() {
-  char digest[SHA_DIGEST_STRING_LENGTH(SHASIZE)];
-
-  char *p = SHA_File(SHASIZE)("/etc/fstab", digest);
-  assert(p == digest);
-
-  printf("test4: '%s'\n", p);
-}
-
-void test5() {
-  char *p = SHA_File(SHASIZE)("/etc/fstab", NULL);
-  assert(strlen(p) == SHA_DIGEST_STRING_LENGTH(SHASIZE) - 1);
-
-  printf("test5: '%s'\n", p);
-
-  free(p);
-}
-
-void test6() {
-  char digest[SHA_DIGEST_STRING_LENGTH(SHASIZE)];
-
-  char *p = SHA_FileChunk(SHASIZE)("/etc/fstab", digest, 10, 20);
-  assert(p == digest);
-
-  printf("test6: '%s'\n", p);
-}
-
-void test7() {
-  char *p = SHA_FileChunk(SHASIZE)("/etc/fstab", NULL, 10, 20);
-  assert(strlen(p) == SHA_DIGEST_STRING_LENGTH(SHASIZE) - 1);
-
-  printf("test7: '%s'\n", p);
-
-  free(p);
-}
-
-void test8() {
-  uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66};
-  char digest[SHA_DIGEST_STRING_LENGTH(SHASIZE)];
-
-  char *p = SHA_Data(SHASIZE)(entropy, __arraycount(entropy), digest);
-  assert(p == digest);
-
-  printf("test8: '%s'\n", p);
-}
-
-void test9() {
-  uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66};
-
-  char *p = SHA_Data(SHASIZE)(entropy, __arraycount(entropy), NULL);
-  assert(strlen(p) == SHA_DIGEST_STRING_LENGTH(SHASIZE) - 1);
-
-  printf("test9: '%s'\n", p);
-
-  free(p);
-}
-
-int main(void) {
-  printf("SHA" ___STRING(SHASIZE) "\n");
-
-  test1();
-  test2();
-  test3();
-  test4();
-  test5();
-  test6();
-  test7();
-  test8();
-  test9();
-
-  // CHECK-224: SHA224
-  // CHECK-224: test1: '760dfb93100a6bf5996c90f678e529dc945bb2f74a211eedcf0f3a48'
-  // CHECK-224: test2: '760dfb93100a6bf5996c90f678e529dc945bb2f74a211eedcf0f3a48'
-  // CHECK-224: test3: '760dfb93100a6bf5996c90f678e529dc945bb2f74a211eedcf0f3a48'
-  // CHECK-224: test4: '{{.*}}'
-  // CHECK-224: test5: '{{.*}}'
-  // CHECK-224: test6: '{{.*}}'
-  // CHECK-224: test7: '{{.*}}'
-  // CHECK-224: test8: '760dfb93100a6bf5996c90f678e529dc945bb2f74a211eedcf0f3a48'
-  // CHECK-224: test9: '760dfb93100a6bf5996c90f678e529dc945bb2f74a211eedcf0f3a48'
-
-  // CHECK-256: SHA256
-  // CHECK-256: test1: 'bb000ddd92a0a2a346f0b531f278af06e370f86932ccafccc892d68d350f80f8'
-  // CHECK-256: test2: 'bb000ddd92a0a2a346f0b531f278af06e370f86932ccafccc892d68d350f80f8'
-  // CHECK-256: test3: 'bb000ddd92a0a2a346f0b531f278af06e370f86932ccafccc892d68d350f80f8'
-  // CHECK-256: test4: '{{.*}}'
-  // CHECK-256: test5: '{{.*}}'
-  // CHECK-256: test6: '{{.*}}'
-  // CHECK-256: test7: '{{.*}}'
-  // CHECK-256: test8: 'bb000ddd92a0a2a346f0b531f278af06e370f86932ccafccc892d68d350f80f8'
-  // CHECK-256: test9: 'bb000ddd92a0a2a346f0b531f278af06e370f86932ccafccc892d68d350f80f8'
-
-  // CHECK-384: SHA384
-  // CHECK-384: test1: 'f450c023b168ebd56ff916ca9b1f1f0010b8c592d28205cc91fa3056f629eed108e8bac864f01ca37a3edee596739e12'
-  // CHECK-384: test2: 'f450c023b168ebd56ff916ca9b1f1f0010b8c592d28205cc91fa3056f629eed108e8bac864f01ca37a3edee596739e12'
-  // CHECK-384: test3: 'f450c023b168ebd56ff916ca9b1f1f0010b8c592d28205cc91fa3056f629eed108e8bac864f01ca37a3edee596739e12'
-  // CHECK-384: test4: '{{.*}}'
-  // CHECK-384: test5: '{{.*}}'
-  // CHECK-384: test6: '{{.*}}'
-  // CHECK-384: test7: '{{.*}}'
-  // CHECK-384: test8: 'f450c023b168ebd56ff916ca9b1f1f0010b8c592d28205cc91fa3056f629eed108e8bac864f01ca37a3edee596739e12'
-  // CHECK-384: test9: 'f450c023b168ebd56ff916ca9b1f1f0010b8c592d28205cc91fa3056f629eed108e8bac864f01ca37a3edee596739e12'
-
-  // CHECK-512: SHA512
-  // CHECK-512: test1: '0e3f68731c0e2a6a4eab5d713c9a80dc78086b5fa7d2b5ab127277958e68d1b1dee1882b083b0106cd4319de42c0c8f452871364f5baa8a6379690612c6b844e'
-  // CHECK-512: test2: '0e3f68731c0e2a6a4eab5d713c9a80dc78086b5fa7d2b5ab127277958e68d1b1dee1882b083b0106cd4319de42c0c8f452871364f5baa8a6379690612c6b844e'
-  // CHECK-512: test3: '0e3f68731c0e2a6a4eab5d713c9a80dc78086b5fa7d2b5ab127277958e68d1b1dee1882b083b0106cd4319de42c0c8f452871364f5baa8a6379690612c6b844e'
-  // CHECK-512: test4: '{{.*}}'
-  // CHECK-512: test5: '{{.*}}'
-  // CHECK-512: test6: '{{.*}}'
-  // CHECK-512: test7: '{{.*}}'
-  // CHECK-512: test8: '0e3f68731c0e2a6a4eab5d713c9a80dc78086b5fa7d2b5ab127277958e68d1b1dee1882b083b0106cd4319de42c0c8f452871364f5baa8a6379690612c6b844e'
-  // CHECK-512: test9: '0e3f68731c0e2a6a4eab5d713c9a80dc78086b5fa7d2b5ab127277958e68d1b1dee1882b083b0106cd4319de42c0c8f452871364f5baa8a6379690612c6b844e'
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/statvfs1.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/statvfs1.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/statvfs1.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/statvfs1.cc (removed)
@@ -1,58 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-
-#include <sys/param.h>
-#include <sys/types.h>
-
-#include <sys/statvfs.h>
-
-#include <assert.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-void test_statvfs1() {
-  printf("statvfs1\n");
-
-  struct statvfs buf;
-  int rv = statvfs1("/etc/fstab", &buf, ST_WAIT);
-  assert(rv != -1);
-
-  printf("fstypename='%s'\n", buf.f_fstypename);
-  printf("mntonname='%s'\n", buf.f_mntonname);
-  printf("mntfromname='%s'\n", buf.f_mntfromname);
-}
-
-void test_fstatvfs1() {
-  printf("fstatvfs1\n");
-
-  int fd = open("/etc/fstab", O_RDONLY);
-  assert(fd > 0);
-
-  struct statvfs buf;
-  int rv = fstatvfs1(fd, &buf, ST_WAIT);
-  assert(rv != -1);
-
-  printf("fstypename='%s'\n", buf.f_fstypename);
-  printf("mntonname='%s'\n", buf.f_mntonname);
-  printf("mntfromname='%s'\n", buf.f_mntfromname);
-
-  rv = close(fd);
-  assert(rv != -1);
-}
-
-int main(void) {
-  test_statvfs1();
-  test_fstatvfs1();
-
-  // CHECK: statvfs1
-  // CHECK: fstypename='{{.*}}'
-  // CHECK: mntonname='{{.*}}'
-  // CHECK: mntfromname='{{.*}}'
-  // CHECK: fstatvfs1
-  // CHECK: fstypename='{{.*}}'
-  // CHECK: mntonname='{{.*}}'
-  // CHECK: mntfromname='{{.*}}'
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strmode.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strmode.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strmode.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strmode.cc (removed)
@@ -1,20 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-int main(void) {
-  struct stat st;
-  char modep[15];
-
-  if (stat("/etc/hosts", &st))
-    exit(1);
-
-  strmode(st.st_mode, modep);
-
-  printf("%s\n", modep);
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strtoi.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strtoi.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strtoi.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strtoi.cc (removed)
@@ -1,43 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-
-#include <inttypes.h>
-#include <stdio.h>
-
-void test_strtoi(const char *nptr, int base, intmax_t lo, intmax_t hi) {
-  char *p;
-  int status;
-  intmax_t i = strtoi(nptr, &p, base, lo, hi, &status);
-  printf("strtoi: conversion of '%s' to a number %s, using %jd, p=%#" PRIx8
-         "\n",
-         nptr, status ? "failed" : "successful", i, *p);
-}
-
-void test_strtou(const char *nptr, int base, intmax_t lo, intmax_t hi) {
-  char *p;
-  int status;
-  uintmax_t i = strtou(nptr, &p, base, lo, hi, &status);
-  printf("strtou: conversion of '%s' to a number %s, using %ju, p=%#" PRIx8
-         "\n",
-         nptr, status ? "failed" : "successful", i, *p);
-}
-
-int main(void) {
-  printf("strtoi\n");
-
-  test_strtoi("100", 0, 1, 100);
-  test_strtoi("100", 0, 1, 10);
-  test_strtoi("100xyz", 0, 1, 100);
-  test_strtou("100", 0, 1, 100);
-  test_strtou("100", 0, 1, 10);
-  test_strtou("100xyz", 0, 1, 100);
-
-  // CHECK: strtoi
-  // CHECK: strtoi: conversion of '100' to a number successful, using 100, p=0
-  // CHECK: strtoi: conversion of '100' to a number failed, using 10, p=0
-  // CHECK: strtoi: conversion of '100xyz' to a number failed, using 100, p=0x78
-  // CHECK: strtou: conversion of '100' to a number successful, using 100, p=0
-  // CHECK: strtou: conversion of '100' to a number failed, using 10, p=0
-  // CHECK: strtou: conversion of '100xyz' to a number failed, using 100, p=0x78
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/sysctlgetmibinfo.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/sysctlgetmibinfo.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/sysctlgetmibinfo.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/sysctlgetmibinfo.cc (removed)
@@ -1,36 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-
-#include <sys/param.h>
-#include <sys/types.h>
-
-#include <sys/sysctl.h>
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-void test_sysctlgetmibinfo() {
-  int mib[CTL_MAXNAME];
-  unsigned int mib_len = __arraycount(mib);
-  int rv = sysctlgetmibinfo("kern.ostype", &mib[0], &mib_len, NULL, NULL, NULL,
-                       SYSCTL_VERSION);
-  assert(!rv);
-
-  char buf[100];
-  size_t len = sizeof(buf);
-  rv = sysctl(mib, mib_len, buf, &len, NULL, 0);
-  assert(!rv);
-
-  printf("sysctlgetmibinfo: '%s' size: '%zu'\n", buf, len);
-}
-
-int main(void) {
-  printf("sysctlgetmibinfo\n");
-
-  test_sysctlgetmibinfo();
-
-  return 0;
-
-  // CHECK: sysctlgetmibinfo
-  // CHECK: sysctlgetmibinfo: '{{.*}}' size: '{{.*}}'
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/ttyent.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/ttyent.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/ttyent.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/ttyent.cc (removed)
@@ -1,70 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <ttyent.h>
-
-#define STRING_OR_NULL(x) ((x) ? (x) : "null")
-
-void test1() {
-  struct ttyent *typ = getttyent();
-
-  printf("%s %s %s %d %s %s %s\n", STRING_OR_NULL(typ->ty_name),
-         STRING_OR_NULL(typ->ty_getty), STRING_OR_NULL(typ->ty_type),
-         typ->ty_status, STRING_OR_NULL(typ->ty_window),
-         STRING_OR_NULL(typ->ty_comment), STRING_OR_NULL(typ->ty_class));
-
-  endttyent();
-}
-
-void test2() {
-  struct ttyent *typ = getttynam("console");
-
-  printf("%s %s %s %d %s %s %s\n", STRING_OR_NULL(typ->ty_name),
-         STRING_OR_NULL(typ->ty_getty), STRING_OR_NULL(typ->ty_type),
-         typ->ty_status, STRING_OR_NULL(typ->ty_window),
-         STRING_OR_NULL(typ->ty_comment), STRING_OR_NULL(typ->ty_class));
-
-  endttyent();
-}
-
-void test3() {
-  if (!setttyent())
-    exit(1);
-
-  struct ttyent *typ = getttyent();
-
-  printf("%s %s %s %d %s %s %s\n", STRING_OR_NULL(typ->ty_name),
-         STRING_OR_NULL(typ->ty_getty), STRING_OR_NULL(typ->ty_type),
-         typ->ty_status, STRING_OR_NULL(typ->ty_window),
-         STRING_OR_NULL(typ->ty_comment), STRING_OR_NULL(typ->ty_class));
-
-  endttyent();
-}
-
-void test4() {
-  if (!setttyentpath(_PATH_TTYS))
-    exit(1);
-
-  struct ttyent *typ = getttyent();
-
-  printf("%s %s %s %d %s %s %s\n", STRING_OR_NULL(typ->ty_name),
-         STRING_OR_NULL(typ->ty_getty), STRING_OR_NULL(typ->ty_type),
-         typ->ty_status, STRING_OR_NULL(typ->ty_window),
-         STRING_OR_NULL(typ->ty_comment), STRING_OR_NULL(typ->ty_class));
-
-  endttyent();
-}
-
-int main(void) {
-  printf("ttyent\n");
-
-  test1();
-  test2();
-  test3();
-  test4();
-
-  // CHECK: ttyent
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/uid_from_user.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/uid_from_user.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/uid_from_user.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/uid_from_user.cc (removed)
@@ -1,16 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t
-
-#include <pwd.h>
-#include <stdlib.h>
-
-int main(void) {
-  uid_t nobody;
-
-  if (uid_from_user("nobody", &nobody) == -1)
-    exit(1);
-
-  if (nobody)
-    exit(0);
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/user_from_uid.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/user_from_uid.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/user_from_uid.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/user_from_uid.cc (removed)
@@ -1,17 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t
-
-#include <pwd.h>
-#include <stdlib.h>
-#include <string.h>
-
-int main(void) {
-  const char *nobody;
-
-  if (!(nobody = user_from_uid(0, 0)))
-    exit(1);
-
-  if (strlen(nobody))
-    exit(0);
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/access.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/access.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/access.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/access.cc (removed)
@@ -1,5 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t
-
-#include <unistd.h>
-
-int main(void) { return access("/dev/null", F_OK); }

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/arc4random.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/arc4random.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/arc4random.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/arc4random.cc (removed)
@@ -1,71 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-//
-// UNSUPPORTED: linux, darwin, solaris
-
-#include <cstdlib>
-#include <ctime>
-#include <cstdio>
-#include <inttypes.h>
-
-void print_buf(unsigned char *buf, size_t buflen) {
-  printf("buf '");
-  for (auto i = 0; i < buflen; i ++)
-    printf("%" PRIx8, buf[i]);
-  printf("'\n");
-}
-
-void test_seed() {
-#ifdef __NetBSD__
-  time_t now = ::time(nullptr);
-  arc4random_addrandom((unsigned char *)&now, sizeof(now));
-#endif
-}
-
-void test_arc4random() {
-  printf("test_arc4random\n");
-  auto i = arc4random();
-  print_buf((unsigned char *)&i, sizeof(i));
-}
-
-void test_arc4random_uniform() {
-  printf("test_arc4random_uniform\n");
-  auto i = arc4random_uniform(1024);
-  print_buf((unsigned char *)&i, sizeof(i));
-}
-
-void test_arc4random_buf10() {
-  printf("test_arc4random_buf10\n");
-  char buf[10];
-#ifdef __NetBSD__
-  arc4random_stir();
-#endif
-  arc4random_buf(buf, sizeof(buf));
-  print_buf((unsigned char *)buf, sizeof(buf));
-}
-
-void test_arc4random_buf256() {
-  printf("test_arc4random_buf256\n");
-  char buf[256];
-#ifdef __NetBSD__
-  arc4random_stir();
-#endif
-  arc4random_buf(buf, sizeof(buf));
-  print_buf((unsigned char *)buf, sizeof(buf));
-}
-
-int main(void) {
-  test_seed();
-  test_arc4random();
-  test_arc4random_uniform();
-  test_arc4random_buf10();
-  test_arc4random_buf256();
-  return 0;
-  // CHECK: test_arc4random
-  // CHECK: buf '{{.*}}'
-  // CHECK: test_arc4random_uniform
-  // CHECK: buf '{{.*}}'
-  // CHECK: test_arc4random_buf10
-  // CHECK: buf '{{.*}}'
-  // CHECK: test_arc4random_buf256
-  // CHECK: buf '{{.*}}'
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cc (removed)
@@ -1,36 +0,0 @@
-// Test dedup_token_length
-// RUN: %clangxx -O0 %s -o %t
-// RUN: env %tool_options='abort_on_error=0'                       not %run %t 2>&1   | FileCheck %s --check-prefix=CHECK0 --match-full-lines
-// RUN: env %tool_options='abort_on_error=0, dedup_token_length=0' not %run %t 2>&1   | FileCheck %s --check-prefix=CHECK0 --match-full-lines
-// RUN: env %tool_options='abort_on_error=0, dedup_token_length=1' not %run %t 2>&1   | FileCheck %s --check-prefix=CHECK1 --match-full-lines
-// RUN: env %tool_options='abort_on_error=0, dedup_token_length=2' not %run %t 2>&1   | FileCheck %s --check-prefix=CHECK2 --match-full-lines
-// RUN: env %tool_options='abort_on_error=0, dedup_token_length=3' not %run %t 2>&1   | FileCheck %s --check-prefix=CHECK3 --match-full-lines
-
-// REQUIRES: stable-runtime
-
-// XFAIL: netbsd && !asan
-
-volatile int *null = 0;
-
-namespace Xyz {
-  template<class A, class B> void Abc() {
-    *null = 0;
-  }
-}
-
-extern "C" void bar() {
-  Xyz::Abc<int, int>();
-}
-
-void FOO() {
-  bar();
-}
-
-int main(int argc, char **argv) {
-  FOO();
-}
-
-// CHECK0-NOT: DEDUP_TOKEN:
-// CHECK1: DEDUP_TOKEN: void Xyz::Abc<int, int>()
-// CHECK2: DEDUP_TOKEN: void Xyz::Abc<int, int>()--bar
-// CHECK3: DEDUP_TOKEN: void Xyz::Abc<int, int>()--bar--FOO()

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname.cc (removed)
@@ -1,21 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-// UNSUPPORTED: linux, solaris
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-
-int main(void) {
-  struct stat st;
-  char *name;
-
-  assert(!stat("/dev/null", &st));
-  assert((name = devname(st.st_rdev, S_ISCHR(st.st_mode) ? S_IFCHR : S_IFBLK)));
-
-  printf("%s\n", name);
-
-  // CHECK: null
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname_r.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname_r.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname_r.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname_r.cc (removed)
@@ -1,31 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-// UNSUPPORTED: linux, solaris
-
-#include <sys/cdefs.h>
-#include <sys/stat.h>
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int main(void) {
-  struct stat st;
-  char name[100];
-  mode_t type;
-
-  assert(!stat("/dev/null", &st));
-
-  type = S_ISCHR(st.st_mode) ? S_IFCHR : S_IFBLK;
-
-#if defined(__NetBSD__)
-  assert(!devname_r(st.st_rdev, type, name, sizeof(name)));
-#else
-  assert(devname_r(st.st_rdev, type, name, sizeof(name)));
-#endif
-
-  printf("%s\n", name);
-
-  // CHECK: null
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dump_instruction_bytes.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dump_instruction_bytes.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dump_instruction_bytes.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dump_instruction_bytes.cc (removed)
@@ -1,21 +0,0 @@
-// Check that sanitizer prints the faulting instruction bytes on
-// dump_instruction_bytes=1
-
-// RUN: %clangxx  %s -o %t
-// RUN: %env_tool_opts=dump_instruction_bytes=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-DUMP
-// RUN: not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-NODUMP
-
-// REQUIRES: x86-target-arch
-
-int main() {
-#if defined(__x86_64__)
-  asm("movq $0, %rax");
-  asm("movl $0xcafebabe, 0x0(%rax)");
-#elif defined(i386)
-  asm("movl $0, %eax");
-  asm("movl $0xcafebabe, 0x0(%eax)");
-#endif
-  // CHECK-DUMP: First 16 instruction bytes at pc: c7 00 be ba fe ca
-  // CHECK-NODUMP-NOT: First 16 instruction bytes
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dump_registers.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dump_registers.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dump_registers.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dump_registers.cc (removed)
@@ -1,20 +0,0 @@
-// Check that sanitizer prints registers dump_registers on dump_registers=1
-// RUN: %clangxx  %s -o %t
-// RUN: %env_tool_opts=dump_registers=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-NODUMP
-// RUN: %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-DUMP
-//
-// FIXME: Implement.
-// UNSUPPORTED: asan
-// UNSUPPORTED: lsan
-// UNSUPPORTED: msan
-// UNSUPPORTED: tsan
-// UNSUPPORTED: ubsan
-
-#include <signal.h>
-
-int main() {
-  raise(SIGSEGV);
-  // CHECK-DUMP: Register values
-  // CHECK-NODUMP-NOT: Register values
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/feof_fileno_ferror.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/feof_fileno_ferror.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/feof_fileno_ferror.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/feof_fileno_ferror.cc (removed)
@@ -1,41 +0,0 @@
-// RUN: %clangxx -g %s -o %t && %run %t
-
-#include <assert.h>
-#include <stdio.h>
-#include <unistd.h>
-
-int main(int argc, char **argv) {
-  FILE *fp = fopen(argv[0], "r");
-  assert(fp);
-
-  // file should be good upon opening
-  assert(!feof(fp) && !ferror(fp));
-
-  // read until EOF
-  char buf[BUFSIZ];
-  while (fread(buf, 1, sizeof buf, fp) != 0) {}
-  assert(feof(fp));
-
-  // clear EOF
-  clearerr(fp);
-  assert(!feof(fp) && !ferror(fp));
-
-  // get file descriptor
-  int fd = fileno(fp);
-  assert(fd != -1);
-
-  // break the file by closing underlying descriptor
-  assert(close(fd) != -1);
-
-  // verify that an error is signalled
-  assert(fread(buf, 1, sizeof buf, fp) == 0);
-  assert(ferror(fp));
-
-  // clear error
-  clearerr(fp);
-  assert(!feof(fp) && !ferror(fp));
-
-  // fclose() will return EBADF because of closed fd
-  assert(fclose(fp) == -1);
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fgetc_ungetc_getc.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fgetc_ungetc_getc.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fgetc_ungetc_getc.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fgetc_ungetc_getc.cc (removed)
@@ -1,19 +0,0 @@
-// RUN: %clangxx -g %s -o %t && %run %t
-
-#include <assert.h>
-#include <stdio.h>
-
-int main(int argc, char **argv) {
-  FILE *fp = fopen(argv[0], "r");
-  assert(fp);
-
-  // the file should be at least one character long, always
-  assert(fgetc(fp) != EOF);
-  // POSIX guarantees being able to ungetc() at least one character
-  assert(ungetc('X', fp) != EOF);
-  // check whether ungetc() worked
-  assert(getc(fp) == 'X');
-
-  assert(!fclose(fp));
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fgetln.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fgetln.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fgetln.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fgetln.cc (removed)
@@ -1,20 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t
-// UNSUPPORTED: linux
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int main(void) {
-  FILE *fp = fopen("/etc/hosts", "r");
-  assert(fp);
-
-  size_t len;
-  char *s = fgetln(fp, &len);
-
-  printf("%.*s\n", (int)len, s);
-
-  assert(!fclose(fp));
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fgets.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fgets.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fgets.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fgets.cc (removed)
@@ -1,16 +0,0 @@
-// RUN: %clangxx -g %s -o %t && %run %t
-
-#include <assert.h>
-#include <stdio.h>
-
-int main(int argc, char **argv) {
-  FILE *fp = fopen(argv[0], "r");
-  assert(fp);
-
-  char buf[2];
-  char *s = fgets(buf, sizeof(buf), fp);
-  assert(s);
-
-  assert(!fclose(fp));
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fpe.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fpe.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fpe.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fpe.cc (removed)
@@ -1,29 +0,0 @@
-// Test the handle_sigfpe option.
-// RUN: %clangxx %s -o %t
-// RUN:                               not         %run %t 2>&1 | FileCheck --check-prefix=CHECK1 %s
-// RUN: %env_tool_opts=handle_sigfpe=0 not --crash %run %t 2>&1 | FileCheck --check-prefix=CHECK0 %s
-// RUN: %env_tool_opts=handle_sigfpe=1 not         %run %t 2>&1 | FileCheck --check-prefix=CHECK1 %s
-
-// FIXME: seems to fail on ARM
-// REQUIRES: x86_64-target-arch
-#include <assert.h>
-#include <stdio.h>
-#include <sanitizer/asan_interface.h>
-
-void death() {
-  fprintf(stderr, "DEATH CALLBACK\n");
-}
-
-int main(int argc, char **argv) {
-  __sanitizer_set_death_callback(death);
-  volatile int one = 1;
-  volatile int zero = 0;
-  volatile int sink;
-  sink = one / zero;
-}
-
-// CHECK0-NOT: Sanitizer:DEADLYSIGNAL
-// CHECK1: ERROR: {{.*}}Sanitizer: FPE
-// CHECK1: {{#[0-9]+.* main .*fpe\.cc}}:[[@LINE-5]]
-// CHECK1: DEATH CALLBACK
-// CHECK0-NOT: Sanitizer

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fputc_putc_putchar.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fputc_putc_putchar.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fputc_putc_putchar.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fputc_putc_putchar.cc (removed)
@@ -1,13 +0,0 @@
-// RUN: %clangxx -g %s -o %t && %run %t | FileCheck %s
-// CHECK: abc
-
-#include <assert.h>
-#include <stdio.h>
-
-int main(void) {
-  assert(fputc('a', stdout) != EOF);
-  assert(putc('b', stdout) != EOF);
-  assert(putchar('c') != EOF);
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fputs_puts.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fputs_puts.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fputs_puts.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fputs_puts.cc (removed)
@@ -1,12 +0,0 @@
-// RUN: %clangxx -g %s -o %t && %run %t | FileCheck %s
-// CHECK: {{^foobar$}}
-
-#include <assert.h>
-#include <stdio.h>
-
-int main(void) {
-  assert(fputs("foo", stdout) >= 0);
-  assert(puts("bar") >= 0);
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fseek.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fseek.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fseek.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fseek.cc (removed)
@@ -1,53 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-//
-// UNSUPPORTED: linux, darwin, solaris
-
-#include <assert.h>
-#include <inttypes.h>
-#include <stdio.h>
-
-int main(void) {
-  printf("fseek\n");
-
-  FILE *fp = fopen("/etc/fstab", "r");
-  assert(fp);
-
-  int rv = fseek(fp, 10, SEEK_SET);
-  assert(!rv);
-
-  printf("position: %ld\n", ftell(fp));
-
-  rewind(fp);
-
-  printf("position: %ld\n", ftell(fp));
-
-  rv = fseeko(fp, 15, SEEK_SET);
-  assert(!rv);
-
-  printf("position: %" PRIuMAX "\n", (uintmax_t)ftello(fp));
-
-  fpos_t pos;
-  rv = fgetpos(fp, &pos);
-  assert(!rv);
-
-  rewind(fp);
-
-  printf("position: %" PRIuMAX "\n", (uintmax_t)ftello(fp));
-
-  rv = fsetpos(fp, &pos);
-  assert(!rv);
-
-  printf("position: %" PRIuMAX "\n", (uintmax_t)ftello(fp));
-
-  rv = fclose(fp);
-  assert(!rv);
-
-  // CHECK: fseek
-  // CHECK: position: 10
-  // CHECK: position: 0
-  // CHECK: position: 15
-  // CHECK: position: 0
-  // CHECK: position: 15
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fts.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fts.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fts.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fts.cc (removed)
@@ -1,42 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-//
-// UNSUPPORTED: linux, darwin, solaris
-
-#include <sys/param.h>
-#include <sys/types.h>
-
-#include <sys/stat.h>
-
-#include <assert.h>
-#include <fts.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int main() {
-  char *const paths[] = {(char *)"/etc", 0};
-  FTS *ftsp = fts_open(paths, FTS_LOGICAL, NULL);
-  assert(ftsp);
-
-  FTSENT *chp = fts_children(ftsp, 0);
-  assert(chp);
-
-  size_t n = 0;
-  for (FTSENT *p = fts_read(ftsp); p; p = fts_read(ftsp)) {
-    /* Skip recursively subdirectories */
-    if (p->fts_info == FTS_D && p->fts_level != FTS_ROOTLEVEL) /* pre-order */
-      fts_set(ftsp, p, FTS_SKIP);
-    else if (p->fts_info == FTS_DP) /* post-order */
-      continue;
-    else if (p->fts_info == FTS_F) /* regular file */
-      n++;
-  }
-
-  int rv = fts_close(ftsp);
-  assert(!rv);
-
-  printf("Number of files in /etc: '%zu'\n", n);
-
-  return EXIT_SUCCESS;
-
-  // CHECK: Number of files in /etc: '{{.*}}'
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/funopen.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/funopen.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/funopen.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/funopen.cc (removed)
@@ -1,91 +0,0 @@
-// RUN: %clangxx -g %s -o %t && %run %t | FileCheck %s
-
-// CHECK: READ CALLED; len={{[0-9]*}}
-// CHECK-NEXT: READ: test
-// CHECK-NEXT: WRITE CALLED: test
-// CHECK-NEXT: READ CALLED; len={{[0-9]*}}
-// CHECK-NEXT: READ: test
-// CHECK-NEXT: WRITE CALLED: test
-// CHECK-NEXT: CLOSE CALLED
-// CHECK-NEXT: SEEK CALLED; off=100, whence=0
-// CHECK-NEXT: READ CALLED; len={{[0-9]*}}
-// CHECK-NEXT: READ: test
-//
-// UNSUPPORTED: linux, darwin, solaris
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-int cookie_var;
-
-int f_read(void *cookie, char *buf, int len) {
-  assert(cookie == &cookie_var);
-  assert(len >= 6);
-  printf("READ CALLED; len=%d\n", len);
-  return strlcpy(buf, "test\n", len);
-}
-
-int f_write(void *cookie, const char *buf, int len) {
-  assert(cookie == &cookie_var);
-  char *data = strndup(buf, len);
-  assert(data);
-  printf("WRITE CALLED: %s\n", data);
-  free(data);
-  return len;
-}
-
-off_t f_seek(void *cookie, off_t off, int whence) {
-  assert(cookie == &cookie_var);
-  assert(whence == SEEK_SET);
-  printf("SEEK CALLED; off=%d, whence=%d\n", (int)off, whence);
-  return off;
-}
-
-int f_close(void *cookie) {
-  assert(cookie == &cookie_var);
-  printf("CLOSE CALLED\n");
-  return 0;
-}
-
-int main(void) {
-  FILE *fp;
-  char buf[10];
-
-  // 1. read-only variant
-  fp = fropen(&cookie_var, f_read);
-  assert(fp);
-  // verify that fileno() does not crash or report nonsense
-  assert(fileno(fp) == -1);
-  assert(fgets(buf, sizeof(buf), fp));
-  printf("READ: %s", buf);
-  assert(!fclose(fp));
-
-  // 2. write-only variant
-  fp = fwopen(&cookie_var, f_write);
-  assert(fp);
-  assert(fileno(fp) == -1);
-  assert(fputs("test", fp) >= 0);
-  assert(!fclose(fp));
-
-  // 3. read+write+close
-  fp = funopen(&cookie_var, f_read, f_write, NULL, f_close);
-  assert(fp);
-  assert(fileno(fp) == -1);
-  assert(fgets(buf, sizeof(buf), fp));
-  printf("READ: %s", buf);
-  assert(fputs("test", fp) >= 0);
-  assert(!fclose(fp));
-
-  // 4. read+seek
-  fp = funopen(&cookie_var, f_read, NULL, f_seek, NULL);
-  assert(fp);
-  assert(fileno(fp) == -1);
-  assert(fseek(fp, 100, SEEK_SET) == 0);
-  assert(fgets(buf, sizeof(buf), fp));
-  printf("READ: %s", buf);
-  assert(!fclose(fp));
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getc_unlocked.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getc_unlocked.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getc_unlocked.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getc_unlocked.cc (removed)
@@ -1,20 +0,0 @@
-// RUN: %clangxx -g %s -o %t && %run %t
-
-#include <assert.h>
-#include <stdio.h>
-
-int main(int argc, char **argv) {
-  FILE *fp = fopen(argv[0], "r");
-  assert(fp);
-
-  // the file should be at least one character long, always
-  assert(getc_unlocked(fp) != EOF);
-  // POSIX guarantees being able to ungetc() at least one character
-  // NB: ungetc_unlocked is apparently not present
-  assert(ungetc('X', fp) != EOF);
-  // check whether ungetc() works with getc_unlocked()
-  assert(getc_unlocked(fp) == 'X');
-
-  assert(!fclose(fp));
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getfsent.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getfsent.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getfsent.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getfsent.cc (removed)
@@ -1,36 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-//
-// UNSUPPORTED: linux, darwin, solaris
-
-#include <assert.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <fstab.h>
-
-int main(void) {
-  printf("getfsent\n");
-
-  setfsent();
-  struct fstab *fentry = getfsent();
-
-  assert(fentry);
-
-  setfsent();
-  struct fstab *pentry = getfsspec(fentry->fs_spec);
-  assert(pentry);
-  setfsent();
-  struct fstab *wentry = getfsfile(fentry->fs_file);
-  assert(wentry);
-  assert(!memcmp(fentry, wentry, sizeof(*wentry)));
-  assert(!memcmp(pentry, wentry, sizeof(*pentry)));
-
-  printf("First entry: device block '%s', mounted with '%s'\n",
-    fentry->fs_spec, fentry->fs_mntops);
-
-  endfsent();
-
-  return 0;
-  // CHECK: getfsent
-  // CHECK: First entry: device block '{{.*}}', mounted with '{{.*}}'
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getmntinfo.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getmntinfo.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getmntinfo.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getmntinfo.cc (removed)
@@ -1,35 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-//
-// UNSUPPORTED: linux, solaris
-
-#include <sys/types.h>
-
-#if defined(__NetBSD__)
-#include <sys/statvfs.h>
-#else
-#include <sys/mount.h>
-#endif
-
-#include <err.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int main(void) {
-  printf("getmntinfo\n");
-
-#if defined(__NetBSD__)
-  struct statvfs *fss;
-#else
-  struct statfs *fss;
-#endif
-  int nfss = getmntinfo(&fss, MNT_NOWAIT);
-  if (nfss <= 0)
-    errx(1, "getmntinfo");
-
-  for (int i = 0; i < nfss; i++)
-    printf("%d: %s\n", i, fss[i].f_fstypename);
-
-  // CHECK: getmntinfo
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getpass.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getpass.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getpass.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getpass.cc (removed)
@@ -1,46 +0,0 @@
-// RUN: %clangxx -O0 -g %s -lutil -o %t && %run %t | FileCheck %s
-
-// REQUIRES: stable-runtime
-// XFAIL: android && asan
-
-#include <assert.h>
-#include <stdio.h>
-#include <string.h>
-#if __linux__
-#include <pty.h>
-#elif defined(__FreeBSD__)
-#include <libutil.h>
-#include <pwd.h>
-#include <sys/ioctl.h>
-#include <sys/termios.h>
-#include <sys/types.h>
-#else
-#include <util.h>
-#endif
-#include <unistd.h>
-
-int
-main (int argc, char** argv)
-{
-    int master;
-    int pid = forkpty(&master, NULL, NULL, NULL);
-
-    if(pid == -1) {
-      fprintf(stderr, "forkpty failed\n");
-      return 1;
-    } else if (pid > 0) {
-      char buf[1024];
-      int res = read(master, buf, sizeof(buf));
-      write(1, buf, res);
-      write(master, "password\n", 9);
-      while ((res = read(master, buf, sizeof(buf))) > 0) write(1, buf, res);
-    } else {
-      char *s = getpass("prompt");
-      assert(strcmp(s, "password") == 0);
-      write(1, "done\n", 5);
-    }
-    return 0;
-}
-
-// CHECK: prompt
-// CHECK: done

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getpw_getgr.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getpw_getgr.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getpw_getgr.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getpw_getgr.cc (removed)
@@ -1,115 +0,0 @@
-// RUN: %clangxx %s -o %t && %run %t
-
-#include <assert.h>
-#include <grp.h>
-#include <memory>
-#include <pwd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-std::unique_ptr<char []> any_group;
-const int N = 123456;
-
-void Check(const char *str) {
-  if (!str)
-    return;
-  assert(strlen(str) != N);
-}
-
-void Check(const passwd *result) {
-  Check(result->pw_name);
-  Check(result->pw_passwd);
-  assert(result->pw_uid != N);
-  assert(result->pw_gid != N);
-#if !defined(__ANDROID__)
-  Check(result->pw_gecos);
-#endif
-  Check(result->pw_dir);
-
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
-  assert(result->pw_change != N);
-  Check(result->pw_class);
-  assert(result->pw_expire != N);
-#endif
-
-#if defined(__FreeBSD__)
-  assert(result->pw_fields != N);
-#endif
-
-  // SunOS also has pw_age and pw_comment which are documented as unused.
-}
-
-void Check(const group *result) {
-  Check(result->gr_name);
-  Check(result->gr_passwd);
-  assert(result->gr_gid != N);
-  for (char **mem = result->gr_mem; *mem; ++mem)
-    Check(*mem);
-  if (!any_group) {
-    auto length = strlen(result->gr_name);
-    any_group.reset(new char[length + 1]);
-    memcpy(any_group.get(), result->gr_name, length + 1);
-  }
-}
-
-template <class T, class Fn, class... Args>
-void test(Fn f, Args... args) {
-  T *result = f(args...);
-  Check(result);
-}
-
-template <class T, class Fn, class... Args>
-void test_r(Fn f, Args... args) {
-  T gr;
-  T *result;
-  char buff[10000];
-  assert(!f(args..., &gr, buff, sizeof(buff), &result));
-  Check(&gr);
-  Check(result);
-}
-
-int main(int argc, const char *argv[]) {
-  test<passwd>(&getpwuid, 0);
-  test<passwd>(&getpwnam, "root");
-  test<group>(&getgrgid, 0);
-  test<group>(&getgrnam, any_group.get());
-
-#if !defined(__ANDROID__)
-  setpwent();
-  test<passwd>(&getpwent);
-  setgrent();
-  test<group>(&getgrent);
-
-#if !defined(__APPLE__)
-  setpwent();
-  test_r<passwd>(&getpwent_r);
-  setgrent();
-  test_r<group>(&getgrent_r);
-#endif
-
-  test_r<passwd>(&getpwuid_r, 0);
-  test_r<passwd>(&getpwnam_r, "root");
-
-  test_r<group>(&getgrgid_r, 0);
-  test_r<group>(&getgrnam_r, any_group.get());
-
-#if defined(__linux__)
-  auto pwd_file = [] {
-    return std::unique_ptr<FILE, decltype(&fclose)>(fopen("/etc/passwd", "r"),
-                                                    &fclose);
-  };
-  auto gr_file = [] {
-    return std::unique_ptr<FILE, decltype(&fclose)>(fopen("/etc/group", "r"),
-                                                    &fclose);
-  };
-  test<passwd>(&fgetpwent, pwd_file().get());
-  test<group>(&fgetgrent, gr_file().get());
-  test_r<passwd>(&fgetpwent_r, pwd_file().get());
-  test_r<group>(&fgetgrent_r, gr_file().get());
-#endif
-
-#endif // __ANDROID__
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getusershell.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getusershell.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getusershell.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getusershell.cc (removed)
@@ -1,23 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-
-// UNSUPPORTED: android
-
-#include <assert.h>
-#include <errno.h>
-#include <stdio.h>
-#include <unistd.h>
-
-int main(void) {
-  printf("getusershell\n");
-
-  setusershell();
-  char *fentry = getusershell();
-
-  printf("First entry: '%s'\n", fentry);
-
-  endusershell();
-
-  return 0;
-  // CHECK: getusershell
-  // CHECK: First entry: '{{.*}}'
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/illegal_read_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/illegal_read_test.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/illegal_read_test.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/illegal_read_test.cc (removed)
@@ -1,15 +0,0 @@
-// Test that there was an illegal READ memory access.
-// RUN: %clangxx -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// REQUIRES: stable-runtime
-// XFAIL: powerpc64, s390x
-
-volatile int *null = 0;
-volatile int a;
-
-int main(int argc, char **argv) {
-  a = *null;
-  return 0;
-}
-
-// CHECK: The signal is caused by a READ memory access.

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/illegal_write_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/illegal_write_test.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/illegal_write_test.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/illegal_write_test.cc (removed)
@@ -1,14 +0,0 @@
-// Test that there was an illegal WRITE memory access.
-// RUN: %clangxx -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// REQUIRES: stable-runtime
-// XFAIL: powerpc64, s390x
-
-volatile int *null = 0;
-
-int main(int argc, char **argv) {
-  *null = 0;
-  return 0;
-}
-
-// CHECK: The signal is caused by a WRITE memory access.

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/lstat.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/lstat.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/lstat.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/lstat.cc (removed)
@@ -1,14 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t
-
-#include <assert.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-
-int main(void) {
-  struct stat st;
-
-  assert(!lstat("/dev/null", &st));
-  assert(S_ISCHR(st.st_mode));
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/nl_langinfo.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/nl_langinfo.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/nl_langinfo.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/nl_langinfo.cc (removed)
@@ -1,20 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-//
-// UNSUPPORTED: linux, darwin, solaris
-
-#include <langinfo.h>
-
-#include <stdio.h>
-
-int main(void) {
-  printf("nl_langinfo\n");
-
-  char *info = nl_langinfo(DAY_1);
-
-  printf("DAY_1='%s'\n", info);
-
-  // CHECK: nl_langinfo
-  // CHECK: DAY_1='{{.*}}'
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/popen.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/popen.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/popen.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/popen.cc (removed)
@@ -1,23 +0,0 @@
-// RUN: %clangxx -g %s -o %t && %run %t | FileCheck %s
-// CHECK: 1
-// CHECK-NEXT: 2
-
-#include <assert.h>
-#include <stdio.h>
-
-int main(void) {
-  // use a tool that produces different output than input to verify
-  // that everything worked correctly
-  FILE *fp = popen("sort", "w");
-  assert(fp);
-
-  // verify that fileno() returns a meaningful descriptor (needed
-  // for the implementation of TSan)
-  assert(fileno(fp) != -1);
-
-  assert(fputs("2\n", fp) >= 0);
-  assert(fputs("1\n", fp) >= 0);
-  assert(pclose(fp) == 0);
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/posix_memalign-alignment.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/posix_memalign-alignment.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/posix_memalign-alignment.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/posix_memalign-alignment.cc (removed)
@@ -1,47 +0,0 @@
-// RUN: %clangxx %collect_stack_traces -O0 %s -o %t
-
-// Alignment is not a power of two:
-// RUN: %env_tool_opts=allocator_may_return_null=0 not %run %t 17 2>&1 | FileCheck %s
-// Alignment is not a power of two, although is a multiple of sizeof(void*):
-// RUN: %env_tool_opts=allocator_may_return_null=0 not %run %t 24 2>&1 | FileCheck %s
-// Alignment is not a multiple of sizeof(void*), although is a power of 2:
-// RUN: %env_tool_opts=allocator_may_return_null=0 not %run %t 2 2>&1 | FileCheck %s
-// Alignment is 0:
-// RUN: %env_tool_opts=allocator_may_return_null=0 not %run %t 0 2>&1 | FileCheck %s
-
-// The same for allocator_may_return_null=1:
-// RUN: %env_tool_opts=allocator_may_return_null=1 %run %t 17 2>&1 | FileCheck %s --check-prefix=CHECK-NULL
-// RUN: %env_tool_opts=allocator_may_return_null=1 %run %t 24 2>&1 | FileCheck %s --check-prefix=CHECK-NULL
-// RUN: %env_tool_opts=allocator_may_return_null=1 %run %t 2 2>&1 | FileCheck %s --check-prefix=CHECK-NULL
-// RUN: %env_tool_opts=allocator_may_return_null=1 %run %t 0 2>&1 | FileCheck %s --check-prefix=CHECK-NULL
-
-// REQUIRES: stable-runtime
-
-// UNSUPPORTED: ubsan
-
-#include <assert.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int main(int argc, char **argv) {
-  assert(argc == 2);
-  const int alignment = atoi(argv[1]);
-
-  void* const kInitialPtrValue = reinterpret_cast<void*>(0x2a);
-  void *p = kInitialPtrValue;
-
-  errno = 0;
-  int res = posix_memalign(&p, alignment, 100);
-  // CHECK: {{ERROR: .*Sanitizer: invalid alignment requested in posix_memalign}}
-  // CHECK: {{#0 .*posix_memalign}}
-  // CHECK: {{#1 .*main .*posix_memalign-alignment.cc:}}[[@LINE-3]]
-  // CHECK: {{SUMMARY: .*Sanitizer: invalid-posix-memalign-alignment}}
-
-  // The NULL pointer is printed differently on different systems, while (long)0
-  // is always the same.
-  fprintf(stderr, "errno: %d, res: %d, p: %lx\n", errno, res, (long)p);
-  // CHECK-NULL: errno: 0, res: 22, p: 2a
-
-  return 0;
-}

Copied: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/posix_memalign-alignment.cpp (from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/posix_memalign-alignment.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/posix_memalign-alignment.cpp?p2=compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/posix_memalign-alignment.cpp&p1=compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/posix_memalign-alignment.cc&r1=367862&r2=367863&rev=367863&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/posix_memalign-alignment.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/posix_memalign-alignment.cpp Mon Aug  5 06:57:03 2019
@@ -35,7 +35,7 @@ int main(int argc, char **argv) {
   int res = posix_memalign(&p, alignment, 100);
   // CHECK: {{ERROR: .*Sanitizer: invalid alignment requested in posix_memalign}}
   // CHECK: {{#0 .*posix_memalign}}
-  // CHECK: {{#1 .*main .*posix_memalign-alignment.cc:}}[[@LINE-3]]
+  // CHECK: {{#1 .*main .*posix_memalign-alignment.cpp:}}[[@LINE-3]]
   // CHECK: {{SUMMARY: .*Sanitizer: invalid-posix-memalign-alignment}}
 
   // The NULL pointer is printed differently on different systems, while (long)0

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/putc_putchar_unlocked.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/putc_putchar_unlocked.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/putc_putchar_unlocked.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/putc_putchar_unlocked.cc (removed)
@@ -1,12 +0,0 @@
-// RUN: %clangxx -g %s -o %t && %run %t | FileCheck %s
-// CHECK: bc
-
-#include <assert.h>
-#include <stdio.h>
-
-int main(void) {
-  assert(putc_unlocked('b', stdout) != EOF);
-  assert(putchar_unlocked('c') != EOF);
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/regex.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/regex.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/regex.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/regex.cc (removed)
@@ -1,71 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-//
-// UNSUPPORTED: darwin, solaris
-
-#include <assert.h>
-#include <regex.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#ifndef __arraycount
-#define __arraycount(a) ((sizeof(a) / sizeof(a[0])))
-#endif
-
-void test_matched(const regex_t *preg, const char *string) {
-  int rv = regexec(preg, string, 0, NULL, 0);
-  if (!rv)
-    printf("%s: matched\n", string);
-  else if (rv == REG_NOMATCH)
-    printf("%s: not-matched\n", string);
-  else
-    abort();
-}
-
-void test_print_matches(const regex_t *preg, const char *string) {
-  regmatch_t rm[10];
-  int rv = regexec(preg, string, __arraycount(rm), rm, 0);
-  if (!rv) {
-    for (size_t i = 0; i < __arraycount(rm); i++) {
-      // This condition shall be simplified, but verify that the data fields
-      // are accessible.
-      if (rm[i].rm_so == -1 && rm[i].rm_eo == -1)
-        continue;
-      printf("matched[%zu]='%.*s'\n", i, (int)(rm[i].rm_eo - rm[i].rm_so),
-             string + rm[i].rm_so);
-    }
-  } else if (rv == REG_NOMATCH)
-    printf("%s: not-matched\n", string);
-  else
-    abort();
-}
-
-int main(void) {
-  printf("regex\n");
-
-  regex_t regex;
-  int rv = regcomp(&regex, "[[:upper:]]\\([[:upper:]]\\)", 0);
-  assert(!rv);
-
-  test_matched(&regex, "abc");
-  test_matched(&regex, "ABC");
-
-  test_print_matches(&regex, "ABC");
-
-  regfree(&regex);
-
-  rv = regcomp(&regex, "[[:upp:]]", 0);
-  assert(rv);
-
-  char errbuf[1024];
-  regerror(rv, &regex, errbuf, sizeof errbuf);
-  printf("error: %s\n", errbuf);
-
-  // CHECK: regex
-  // CHECK: abc: not-matched
-  // CHECK: ABC: matched
-  // CHECK: matched[0]='AB'
-  // CHECK: matched[1]='B'
-  // CHECK: error:{{.*}}
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc (removed)
@@ -1,47 +0,0 @@
-// RUN: %clangxx -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// REQUIRES: stable-runtime
-
-// XFAIL: ubsan
-// FIXME: On Darwin, LSAn detects the leak, but does not invoke the death_callback.
-// XFAIL: darwin && lsan
-
-#include <sanitizer/common_interface_defs.h>
-#include <stdio.h>
-
-volatile char *zero = 0;
-
-void Death() {
-  fprintf(stderr, "DEATH CALLBACK EXECUTED\n");
-}
-// CHECK: DEATH CALLBACK EXECUTED
-
-char global;
-volatile char *sink;
-
-__attribute__((noinline))
-void MaybeInit(int *uninitialized) {
-  if (zero)
-    *uninitialized = 1;
-}
-
-__attribute__((noinline))
-void Leak() {
-  // Trigger lsan report. Two attempts in case the address of the first
-  // allocation remained on the stack.
-  sink = new char[100];
-  sink = new char[100];
-}
-
-int main(int argc, char **argv) {
-  int uninitialized;
-  __sanitizer_set_death_callback(Death);
-  MaybeInit(&uninitialized);
-  if (uninitialized)  // trigger msan report.
-    global = 77;
-  sink = new char[100];
-  delete[] sink;
-  global = sink[0];  // use-after-free: trigger asan/tsan report.
-  Leak();
-  sink = 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_fd_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_fd_test.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_fd_test.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_fd_test.cc (removed)
@@ -1,34 +0,0 @@
-// Test __sanitizer_set_report_fd:
-// RUN: %clangxx -O2 %s -o %t
-// RUN: not %run %t 2>&1   | FileCheck %s
-// RUN: not %run %t stdout | FileCheck %s
-// RUN: not %run %t %t-out && FileCheck < %t-out %s
-
-// REQUIRES: stable-runtime
-// XFAIL: android && asan
-
-#include <sanitizer/common_interface_defs.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <assert.h>
-
-volatile int *null = 0;
-
-int main(int argc, char **argv) {
-  if (argc == 2) {
-    if (!strcmp(argv[1], "stdout")) {
-      __sanitizer_set_report_fd(reinterpret_cast<void*>(1));
-    } else {
-      int fd = open(argv[1], O_CREAT | O_WRONLY | O_TRUNC, S_IRWXU);
-      assert(fd > 0);
-      __sanitizer_set_report_fd(reinterpret_cast<void*>(fd));
-    }
-  }
-  *null = 0;
-}
-
-// CHECK: ERROR: {{.*}} SEGV on unknown address

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/setvbuf.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/setvbuf.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/setvbuf.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/setvbuf.cc (removed)
@@ -1,81 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-
-// UNSUPPORTED: solaris
-
-#include <stdio.h>
-
-void print_something() {
-  for (size_t i = 0; i < 10 * BUFSIZ; i++)
-    printf("Hello world %zu\n", i);
-}
-
-void print_one_byte(char *buf) {
-  printf("First byte is %c\n", buf[0]);
-}
-
-void test_setbuf() {
-  char buf[BUFSIZ];
-
-  setbuf(stdout, NULL);
-
-  print_something();
-
-  setbuf(stdout, buf);
-
-  print_something();
-
-  print_one_byte(buf);
-}
-
-void test_setbuffer() {
-  char buf[BUFSIZ];
-
-  setbuffer(stdout, NULL, 0);
-
-  print_something();
-
-  setbuffer(stdout, buf, BUFSIZ);
-
-  print_something();
-
-  print_one_byte(buf);
-}
-
-void test_setlinebuf() {
-  setlinebuf(stdout);
-
-  print_something();
-}
-
-void test_setvbuf() {
-  char buf[BUFSIZ];
-
-  setvbuf(stdout, NULL, _IONBF, 0);
-
-  print_something();
-
-  setvbuf(stdout, buf, _IOLBF, BUFSIZ);
-
-  print_something();
-
-  print_one_byte(buf);
-
-  setvbuf(stdout, buf, _IOFBF, BUFSIZ);
-
-  print_something();
-
-  print_one_byte(buf);
-}
-
-int main(void) {
-  printf("setvbuf\n");
-
-  test_setbuf();
-  test_setbuffer();
-  test_setlinebuf();
-  test_setvbuf();
-
-  // CHECK: setvbuf
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sl_add.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sl_add.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sl_add.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sl_add.cc (removed)
@@ -1,26 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-//
-// UNSUPPORTED: linux, darwin, solaris
-
-#include <assert.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <stringlist.h>
-
-int main(void) {
-  printf("sl_add\n");
-
-  StringList *sl = sl_init();
-  assert(sl);
-  char *p = strdup("entry");
-  assert(!sl_add(sl, p));
-  char *entry = sl_find(sl, "entry");
-  assert(!strcmp(entry, p));
-  printf("Found '%s'\n", entry);
-  sl_free(sl, 1);
-
-  return 0;
-  // CHECK: sl_add
-  // CHECK: Found '{{.*}}'
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strlcat.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strlcat.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strlcat.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strlcat.cc (removed)
@@ -1,54 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t
-
-// UNSUPPORTED: linux
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-void test1() {
-  const char src[] = "abc";
-  char dst[7] = {'x', 'y', 'z', 0};
-  size_t len;
-
-  len = strlcat(dst, src, sizeof(dst));
-  printf("%s %zu ", dst, len);
-}
-
-void test2() {
-  const char src[] = "abc";
-  char dst[7] = {0};
-  size_t len;
-
-  len = strlcat(dst, src, sizeof(dst));
-  printf("%s %zu ", dst, len);
-}
-
-void test3() {
-  const char src[] = "abc";
-  char dst[4] = {'x', 'y', 'z', 0};
-  size_t len;
-
-  len = strlcat(dst, src, sizeof(dst));
-  printf("%s %zu ", dst, len);
-}
-
-void test4() {
-  const char src[] = "";
-  char dst[4] = {'x', 'y', 'z', 0};
-  size_t len;
-
-  len = strlcat(dst, src, sizeof(dst));
-  printf("%s %zu\n", dst, len);
-}
-
-int main(void) {
-  test1();
-  test2();
-  test3();
-  test4();
-
-  // CHECK: xyzabc 6 abc 3 xyz 3 xyz 3
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strlcpy.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strlcpy.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strlcpy.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strlcpy.cc (removed)
@@ -1,54 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t
-
-// UNSUPPORTED: linux
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-void test1() {
-  const char src[] = "abc";
-  char dst[7] = {'x', 'y', 'z', 0};
-  size_t len;
-
-  len = strlcpy(dst, src, sizeof(dst));
-  printf("%s %zu ", dst, len);
-}
-
-void test2() {
-  const char src[] = "abc";
-  char dst[7] = {0};
-  size_t len;
-
-  len = strlcat(dst, src, sizeof(dst));
-  printf("%s %zu ", dst, len);
-}
-
-void test3() {
-  const char src[] = "abc";
-  char dst[4] = {'x', 'y', 'z', 0};
-  size_t len;
-
-  len = strlcat(dst, src, sizeof(dst));
-  printf("%s %zu ", dst, len);
-}
-
-void test4() {
-  const char src[] = "";
-  char dst[4] = {'x', 'y', 'z', 0};
-  size_t len;
-
-  len = strlcat(dst, src, sizeof(dst));
-  printf("%s %zu\n", dst, len);
-}
-
-int main(void) {
-  test1();
-  test2();
-  test3();
-  test4();
-
-  // CHECK: abc 3 abc 3 xyz 3  0
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strtonum.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strtonum.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strtonum.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strtonum.cc (removed)
@@ -1,54 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-//
-// UNSUPPORTED: linux, darwin, solaris
-
-#define _OPENBSD_SOURCE
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int main(void) {
-  const char *errstr;
-
-  printf("strtonum\n");
-
-  long long l = strtonum("100", 1, 100, &errstr);
-  assert(!errstr);
-  printf("%lld\n", l);
-
-  l = strtonum("200", 1, 100, &errstr);
-  assert(errstr);
-  printf("%s\n", errstr);
-
-  l = strtonum("300", 1000, 1001, &errstr);
-  assert(errstr);
-  printf("%s\n", errstr);
-
-  l = strtonum("abc", 1000, 1001, &errstr);
-  assert(errstr);
-  printf("%s\n", errstr);
-
-  l = strtonum("1000", 1001, 1000, &errstr);
-  assert(errstr);
-  printf("%s\n", errstr);
-
-  l = strtonum("1000abc", 1000, 1001, &errstr);
-  assert(errstr);
-  printf("%s\n", errstr);
-
-  l = strtonum("1000.0", 1000, 1001, &errstr);
-  assert(errstr);
-  printf("%s\n", errstr);
-
-  // CHECK: strtonum
-  // CHECK: 100
-  // CHECK: too large
-  // CHECK: too small
-  // CHECK: invalid
-  // CHECK: invalid
-  // CHECK: invalid
-  // CHECK: invalid
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sysctl.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sysctl.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sysctl.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sysctl.cc (removed)
@@ -1,64 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-//
-// UNSUPPORTED: linux, solaris
-
-#include <sys/param.h>
-#include <sys/types.h>
-
-#include <sys/sysctl.h>
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#ifndef __arraycount
-#define __arraycount(a) (sizeof(a) / sizeof(a[0]))
-#endif
-
-void test_sysctl() {
-  char buf[100];
-  size_t len = sizeof(buf);
-  int mib[] = {CTL_KERN, KERN_OSTYPE};
-  int rv = sysctl(mib, __arraycount(mib), buf, &len, NULL, 0);
-  assert(!rv);
-
-  printf("sysctl: '%s' size: '%zu'\n", buf, len);
-}
-
-void test_sysctlbyname() {
-  char buf[100];
-  size_t len = sizeof(buf);
-  int rv = sysctlbyname("kern.ostype", buf, &len, NULL, 0);
-  assert(!rv);
-
-  printf("sysctlbyname: '%s' size: '%zu'\n", buf, len);
-}
-
-void test_sysctlnametomib() {
-  int mib[CTL_MAXNAME];
-  size_t mib_len = __arraycount(mib);
-  int rv = sysctlnametomib("kern.ostype", &mib[0], &mib_len);
-  assert(!rv);
-
-  char buf[100];
-  size_t len = sizeof(buf);
-  rv = sysctl(mib, mib_len, buf, &len, NULL, 0);
-  assert(!rv);
-
-  printf("sysctlnametomib: '%s' size: '%zu'\n", buf, len);
-}
-
-int main(void) {
-  printf("sysctl\n");
-
-  test_sysctl();
-  test_sysctlbyname();
-  test_sysctlnametomib();
-
-  // CHECK: sysctl
-  // CHECK: sysctl: '{{.*}}' size: '{{.*}}'
-  // CHECK: sysctlbyname: '{{.*}}' size: '{{.*}}'
-  // CHECK: sysctlnametomib: '{{.*}}' size: '{{.*}}'
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/vis.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/vis.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/vis.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/vis.cc (removed)
@@ -1,247 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-//
-// UNSUPPORTED: linux, solaris, darwin
-
-#include <ctype.h>
-#include <err.h>
-#include <inttypes.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <vis.h>
-
-void test_vis() {
-  char visout[5];
-  int ch = toascii(0x1);
-  vis(visout, ch, VIS_SAFE | VIS_NOSLASH, 0);
-  printf("vis: %s\n", visout);
-}
-
-void test_nvis() {
-  char visout[5];
-  int ch = toascii(0x2);
-  nvis(visout, sizeof visout, ch, VIS_SAFE | VIS_NOSLASH, 0);
-  printf("nvis: %s\n", visout);
-}
-
-void test_strvis() {
-  char visout[5];
-  strvis(visout, "\3", VIS_SAFE | VIS_NOSLASH);
-  printf("strvis: %s\n", visout);
-}
-
-void test_stravis() {
-  char *visout;
-  stravis(&visout, "\4", VIS_SAFE | VIS_NOSLASH);
-  printf("stravis: %s\n", visout);
-  free(visout);
-}
-
-void test_strnvis() {
-  char visout[5];
-  strnvis(visout, sizeof visout, "\5", VIS_SAFE | VIS_NOSLASH);
-  printf("strnvis: %s\n", visout);
-}
-
-void test_strvisx() {
-  char visout[5];
-  char src[] = "\6";
-  strvisx(visout, src, sizeof src - 1 /* skip final \0 */,
-          VIS_SAFE | VIS_NOSLASH);
-  printf("strvisx: %s\n", visout);
-}
-
-void test_strnvisx() {
-  char visout[5];
-  char src[] = "\1";
-  strnvisx(visout, sizeof visout, src, sizeof src - 1 /* skip final \0 */,
-           VIS_SAFE | VIS_NOSLASH);
-  printf("strnvisx: %s\n", visout);
-}
-
-void test_strenvisx() {
-  char visout[5];
-  char src[] = "\2";
-  strenvisx(visout, sizeof visout, src, sizeof src - 1 /* skip final \0 */,
-            VIS_SAFE | VIS_NOSLASH, NULL);
-  printf("strenvisx: %s\n", visout);
-}
-
-void test_svis() {
-  char visout[5];
-  int ch = toascii(0x3);
-  svis(visout, ch, VIS_SAFE | VIS_NOSLASH, 0, "x");
-  printf("svis: %s\n", visout);
-}
-
-void test_snvis() {
-  char visout[5];
-  int ch = toascii(0x2);
-  snvis(visout, sizeof visout, ch, VIS_SAFE | VIS_NOSLASH, 0, "x");
-  printf("snvis: %s\n", visout);
-}
-
-void test_strsvis() {
-  char visout[5];
-  strsvis(visout, "\4", VIS_SAFE | VIS_NOSLASH, "x");
-  printf("strsvis: %s\n", visout);
-}
-
-void test_strsnvis() {
-  char visout[5];
-  strsnvis(visout, sizeof visout, "\5", VIS_SAFE | VIS_NOSLASH, "x");
-  printf("strsnvis: %s\n", visout);
-}
-
-void test_strsvisx() {
-  char visout[5];
-  char src[] = "\5";
-  strsvisx(visout, src, sizeof src - 1 /* skip final \0 */,
-           VIS_SAFE | VIS_NOSLASH, "x");
-  printf("strsvisx: %s\n", visout);
-}
-
-void test_strsnvisx() {
-  char visout[5];
-  char src[] = "\6";
-  strsnvisx(visout, sizeof visout, src, sizeof src - 1 /* skip final \0 */,
-            VIS_SAFE | VIS_NOSLASH, "x");
-  printf("strsnvisx: %s\n", visout);
-}
-
-void test_strsenvisx() {
-  char visout[5];
-  char src[] = "\1";
-  strsenvisx(visout, sizeof visout, src, sizeof src - 1 /* skip final \0 */,
-             VIS_SAFE | VIS_NOSLASH, "x", NULL);
-  printf("strsenvisx: %s\n", visout);
-}
-
-void test_unvis() {
-  char visout[5];
-  int ch = toascii(0x1);
-  vis(visout, ch, VIS_SAFE, 0);
-
-  int state = 0;
-  char out;
-  char *p = visout;
-  while ((ch = *(p++)) != '\0') {
-  again:
-    switch (unvis(&out, ch, &state, 0)) {
-    case 0:
-    case UNVIS_NOCHAR:
-      break;
-    case UNVIS_VALID:
-      printf("unvis: %" PRIx8 "\n", (unsigned char)out);
-      break;
-    case UNVIS_VALIDPUSH:
-      printf("unvis: %" PRIx8 "\n", (unsigned char)out);
-      goto again;
-    case UNVIS_SYNBAD:
-      errx(1, "Bad character sequence!");
-    }
-  }
-  if (unvis(&out, '\0', &state, UNVIS_END) == UNVIS_VALID)
-    printf("unvis: %" PRIx8 "\n", (unsigned char)out);
-}
-
-void test_strunvis() {
-  char visout[5];
-  int ch = toascii(0x2);
-  vis(visout, ch, VIS_SAFE, 0);
-
-  char p[5];
-  strunvis(p, visout);
-
-  char *pp = p;
-  while ((ch = *(pp++)) != '\0')
-    printf("strunvis: %" PRIx8 "\n", (unsigned char)ch);
-}
-
-void test_strnunvis() {
-  char visout[5];
-  int ch = toascii(0x3);
-  vis(visout, ch, VIS_SAFE, 0);
-
-  char p[5];
-  strnunvis(p, sizeof p, visout);
-
-  char *pp = p;
-  while ((ch = *(pp++)) != '\0')
-    printf("strnunvis: %" PRIx8 "\n", (unsigned char)ch);
-}
-
-void test_strunvisx() {
-  char visout[5];
-  int ch = toascii(0x4);
-  vis(visout, ch, VIS_SAFE, 0);
-
-  char p[5];
-  strunvisx(p, visout, VIS_SAFE);
-
-  char *pp = p;
-  while ((ch = *(pp++)) != '\0')
-    printf("strunvisx: %" PRIx8 "\n", (unsigned char)ch);
-}
-
-void test_strnunvisx() {
-  char visout[5];
-  int ch = toascii(0x5);
-  vis(visout, ch, VIS_SAFE, 0);
-
-  char p[5];
-  strnunvisx(p, sizeof p, visout, VIS_SAFE);
-
-  char *pp = p;
-  while ((ch = *(pp++)) != '\0')
-    printf("strnunvisx: %" PRIx8 "\n", (unsigned char)ch);
-}
-
-int main(void) {
-  printf("vis\n");
-
-  test_vis();
-  test_nvis();
-  test_strvis();
-  test_stravis();
-  test_strnvis();
-  test_strvisx();
-  test_strnvisx();
-  test_strenvisx();
-  test_svis();
-  test_snvis();
-  test_strsvis();
-  test_strsnvis();
-  test_strsvisx();
-  test_strsnvisx();
-  test_strsenvisx();
-  test_unvis();
-  test_strunvis();
-  test_strnunvis();
-  test_strunvisx();
-  test_strnunvisx();
-
-  // CHECK: vis
-  // CHECK: vis: ^A
-  // CHECK: nvis: ^B
-  // CHECK: strvis: ^C
-  // CHECK: stravis: ^D
-  // CHECK: strnvis: ^E
-  // CHECK: strvisx: ^F
-  // CHECK: strnvisx: ^A
-  // CHECK: strenvisx: ^B
-  // CHECK: svis: ^C
-  // CHECK: snvis: ^B
-  // CHECK: strsvis: ^D
-  // CHECK: strsnvis: ^E
-  // CHECK: strsvisx: ^E
-  // CHECK: strsnvisx: ^F
-  // CHECK: strsenvisx: ^A
-  // CHECK: unvis: 1
-  // CHECK: strunvis: 2
-  // CHECK: strnunvis: 3
-  // CHECK: strunvisx: 4
-  // CHECK: strnunvisx: 5
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/weak_hook_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/weak_hook_test.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/weak_hook_test.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/weak_hook_test.cc (removed)
@@ -1,92 +0,0 @@
-// Test the weak hooks.
-// RUN: %clangxx %s -o %t
-// RUN: %run %t
-
-// Hooks are not implemented for lsan.
-// XFAIL: lsan
-// XFAIL: ubsan
-
-#include <assert.h>
-#include <string.h>
-#if defined(_GNU_SOURCE)
-#include <strings.h> // for bcmp
-#endif
-
-bool seen_memcmp, seen_strncmp, seen_strncasecmp, seen_strcmp, seen_strcasecmp,
-    seen_strstr, seen_strcasestr, seen_memmem;
-
-extern "C" {
-void __sanitizer_weak_hook_memcmp(void *called_pc, const void *s1,
-                                  const void *s2, size_t n, int result) {
-  seen_memcmp = true;
-}
-void __sanitizer_weak_hook_strncmp(void *called_pc, const char *s1,
-                                   const char *s2, size_t n, int result) {
-  seen_strncmp = true;
-}
-void __sanitizer_weak_hook_strncasecmp(void *called_pc, const char *s1,
-                                       const char *s2, size_t n, int result){
-  seen_strncasecmp = true;
-}
-void __sanitizer_weak_hook_strcmp(void *called_pc, const char *s1,
-                                  const char *s2, int result){
-  seen_strcmp = true;
-}
-void __sanitizer_weak_hook_strcasecmp(void *called_pc, const char *s1,
-                                      const char *s2, int result){
-  seen_strcasecmp = true;
-}
-void __sanitizer_weak_hook_strstr(void *called_pc, const char *s1,
-                                  const char *s2, char *result){
-  seen_strstr = true;
-}
-void __sanitizer_weak_hook_strcasestr(void *called_pc, const char *s1,
-                                      const char *s2, char *result){
-  seen_strcasestr = true;
-}
-void __sanitizer_weak_hook_memmem(void *called_pc, const void *s1, size_t len1,
-                                  const void *s2, size_t len2, void *result){
-  seen_memmem = true;
-}
-} // extern "C"
-
-char s1[] = "ABCDEF";
-char s2[] = "CDE";
-
-static volatile int int_sink;
-static volatile void *ptr_sink;
-
-int main() {
-  assert(sizeof(s2) < sizeof(s1));
-
-  int_sink = memcmp(s1, s2, sizeof(s2));
-  assert(seen_memcmp);
-
-#if (defined(__linux__) && !defined(__ANDROID__) && defined(_GNU_SOURCE)) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
-  seen_memcmp = false;
-  int_sink = bcmp(s1, s2, sizeof(s2));
-  assert(seen_memcmp);
-#endif
-
-  int_sink = strncmp(s1, s2, sizeof(s2));
-  assert(seen_strncmp);
-
-  int_sink = strncasecmp(s1, s2, sizeof(s2));
-  assert(seen_strncasecmp);
-
-  int_sink = strcmp(s1, s2);
-  assert(seen_strcmp);
-
-  int_sink = strcasecmp(s1, s2);
-  assert(seen_strcasecmp);
-
-  ptr_sink = strstr(s1, s2);
-  assert(seen_strstr);
-
-  ptr_sink = strcasestr(s1, s2);
-  assert(seen_strcasestr);
-
-  ptr_sink = memmem(s1, sizeof(s1), s2, sizeof(s2));
-  assert(seen_memmem);
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/allocator_returns_null.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/allocator_returns_null.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/allocator_returns_null.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/allocator_returns_null.cc (removed)
@@ -1,114 +0,0 @@
-// Test the behavior of malloc/calloc/realloc/new when the allocation size
-// exceeds the sanitizer's allocator max allowed one.
-// By default (allocator_may_return_null=0) the process should crash. With
-// allocator_may_return_null=1 the allocator should return nullptr and set errno
-// to the appropriate error code.
-//
-// RUN: %clangxx -O0 %s -o %t
-// RUN: not %run %t malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mCRASH
-// RUN: %env_tool_opts=allocator_may_return_null=0 not %run %t malloc 2>&1 \
-// RUN:   | FileCheck %s --check-prefix=CHECK-mCRASH
-// RUN: %env_tool_opts=allocator_may_return_null=1     %run %t malloc 2>&1 \
-// RUN:   | FileCheck %s --check-prefix=CHECK-NULL
-// RUN: %env_tool_opts=allocator_may_return_null=0 not %run %t calloc 2>&1 \
-// RUN:   | FileCheck %s --check-prefix=CHECK-cCRASH
-// RUN: %env_tool_opts=allocator_may_return_null=1     %run %t calloc 2>&1 \
-// RUN:   | FileCheck %s --check-prefix=CHECK-NULL
-// RUN: %env_tool_opts=allocator_may_return_null=0 not %run %t calloc-overflow 2>&1 \
-// RUN:   | FileCheck %s --check-prefix=CHECK-coCRASH
-// RUN: %env_tool_opts=allocator_may_return_null=1     %run %t calloc-overflow 2>&1 \
-// RUN:   | FileCheck %s --check-prefix=CHECK-NULL
-// RUN: %env_tool_opts=allocator_may_return_null=0 not %run %t realloc 2>&1 \
-// RUN:   | FileCheck %s --check-prefix=CHECK-rCRASH
-// RUN: %env_tool_opts=allocator_may_return_null=1     %run %t realloc 2>&1 \
-// RUN:   | FileCheck %s --check-prefix=CHECK-NULL
-// RUN: %env_tool_opts=allocator_may_return_null=0 not %run %t realloc-after-malloc 2>&1 \
-// RUN:   | FileCheck %s --check-prefix=CHECK-mrCRASH
-// RUN: %env_tool_opts=allocator_may_return_null=1     %run %t realloc-after-malloc 2>&1 \
-// RUN:   | FileCheck %s --check-prefix=CHECK-NULL
-// RUN: %env_tool_opts=allocator_may_return_null=0 not %run %t new 2>&1 \
-// RUN:   | FileCheck %s --check-prefix=CHECK-nCRASH
-// RUN: %env_tool_opts=allocator_may_return_null=1 not %run %t new 2>&1 \
-// RUN:   | FileCheck %s --check-prefix=CHECK-nCRASH-OOM
-// RUN: %env_tool_opts=allocator_may_return_null=0 not %run %t new-nothrow 2>&1 \
-// RUN:   | FileCheck %s --check-prefix=CHECK-nnCRASH
-// RUN: %env_tool_opts=allocator_may_return_null=1     %run %t new-nothrow 2>&1 \
-// RUN:   | FileCheck %s --check-prefix=CHECK-NULL
-
-// TODO(alekseyshl): win32 is disabled due to failing errno tests, fix it there.
-// UNSUPPORTED: ubsan, windows-msvc
-
-#include <assert.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <limits>
-#include <new>
-
-int main(int argc, char **argv) {
-  assert(argc == 2);
-  const char *action = argv[1];
-  fprintf(stderr, "%s:\n", action);
-
-  // The maximum value of all supported sanitizers (search for
-  // kMaxAllowedMallocSize). For ASan + LSan, ASan limit is used.
-  static const size_t kMaxAllowedMallocSizePlusOne =
-#if __LP64__ || defined(_WIN64)
-      (1ULL << 40) + 1;
-#else
-      (3UL << 30) + 1;
-#endif
-
-  void *x = nullptr;
-  if (!strcmp(action, "malloc")) {
-    x = malloc(kMaxAllowedMallocSizePlusOne);
-  } else if (!strcmp(action, "calloc")) {
-    x = calloc((kMaxAllowedMallocSizePlusOne / 4) + 1, 4);
-  } else if (!strcmp(action, "calloc-overflow")) {
-    volatile size_t kMaxSizeT = std::numeric_limits<size_t>::max();
-    size_t kArraySize = 4096;
-    volatile size_t kArraySize2 = kMaxSizeT / kArraySize + 10;
-    x = calloc(kArraySize, kArraySize2);
-  } else if (!strcmp(action, "realloc")) {
-    x = realloc(0, kMaxAllowedMallocSizePlusOne);
-  } else if (!strcmp(action, "realloc-after-malloc")) {
-    char *t = (char*)malloc(100);
-    *t = 42;
-    x = realloc(t, kMaxAllowedMallocSizePlusOne);
-    assert(*t == 42);
-    free(t);
-  } else if (!strcmp(action, "new")) {
-    x = operator new(kMaxAllowedMallocSizePlusOne);
-  } else if (!strcmp(action, "new-nothrow")) {
-    x = operator new(kMaxAllowedMallocSizePlusOne, std::nothrow);
-  } else {
-    assert(0);
-  }
-
-  // The NULL pointer is printed differently on different systems, while (long)0
-  // is always the same.
-  fprintf(stderr, "errno: %d, x: %lx\n", errno, (long)x);
-
-  return 0;
-}
-
-// CHECK-mCRASH: malloc:
-// CHECK-mCRASH: {{SUMMARY: .*Sanitizer: allocation-size-too-big}}
-// CHECK-cCRASH: calloc:
-// CHECK-cCRASH: {{SUMMARY: .*Sanitizer: allocation-size-too-big}}
-// CHECK-coCRASH: calloc-overflow:
-// CHECK-coCRASH: {{SUMMARY: .*Sanitizer: calloc-overflow}}
-// CHECK-rCRASH: realloc:
-// CHECK-rCRASH: {{SUMMARY: .*Sanitizer: allocation-size-too-big}}
-// CHECK-mrCRASH: realloc-after-malloc:
-// CHECK-mrCRASH: {{SUMMARY: .*Sanitizer: allocation-size-too-big}}
-// CHECK-nCRASH: new:
-// CHECK-nCRASH: {{SUMMARY: .*Sanitizer: allocation-size-too-big}}
-// CHECK-nCRASH-OOM: new:
-// CHECK-nCRASH-OOM: {{SUMMARY: .*Sanitizer: out-of-memory}}
-// CHECK-nnCRASH: new-nothrow:
-// CHECK-nnCRASH: {{SUMMARY: .*Sanitizer: allocation-size-too-big}}
-
-// CHECK-NULL: {{malloc|calloc|calloc-overflow|realloc|realloc-after-malloc|new-nothrow}}
-// CHECK-NULL: errno: 12, x: 0

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/corelimit.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/corelimit.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/corelimit.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/corelimit.cc (removed)
@@ -1,16 +0,0 @@
-// RUN: %clangxx -O0 %s -o %t && %run %t
-// UNSUPPORTED: lsan,ubsan
-
-#include <assert.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-
-int main() {
-  struct rlimit lim_core;
-  getrlimit(RLIMIT_CORE, &lim_core);
-  void *p;
-  if (sizeof(p) == 8) {
-    assert(0 == lim_core.rlim_cur);
-  }
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/get_module_and_offset_for_pc.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/get_module_and_offset_for_pc.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/get_module_and_offset_for_pc.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/get_module_and_offset_for_pc.cc (removed)
@@ -1,66 +0,0 @@
-// RUN: mkdir -p %t-dir
-// RUN: %clangxx -DSHARED %s -shared -o %t-dir/get_module_and_offset_for_pc.so -fPIC
-// RUN: %clangxx -DSO_DIR=\"%t-dir\" -O0 %s -o %t
-// RUN: %run %t 2>&1 | FileCheck %s
-
-// UNSUPPORTED: i386-darwin
-// XFAIL: android
-
-// Tests __sanitizer_get_module_and_offset_for_pc.
-
-#include <assert.h>
-#include <dlfcn.h>
-#include <sanitizer/common_interface_defs.h>
-#include <stdio.h>
-
-#ifdef SHARED
-extern "C" {
-int foo() { return 1; }
-}
-#else
-
-void Test(void *pc, const char *name) {
-  char module_name[1024];
-  void *offset;
-  int ok = __sanitizer_get_module_and_offset_for_pc(
-      pc, module_name, sizeof(module_name), &offset);
-  if (!ok) {
-    printf("NOT FOUND %s: %p\n", name, pc);
-  } else {
-    printf("FOUND %s: %s %p\n", name, module_name, offset);
-  }
-}
-
-void TestCallerPc() { Test(__builtin_return_address(0), "callerpc"); }
-
-void TestDlsym() {
-  void *handle = dlopen(SO_DIR "/get_module_and_offset_for_pc.so", RTLD_LAZY);
-  assert(handle);
-  void *foo = dlsym(handle, "foo");
-  assert(foo);
-  Test(foo, "foo");
-  dlclose(handle);
-}
-
-// Call __sanitizer_get_module_and_offset_for_pc lots of times
-// to make sure it is not too slow.
-void TestLoop() {
-  void *pc = __builtin_return_address(0);
-  char module_name[1024];
-  void *offset;
-  for (int i = 0; i < 1000000; ++i) {
-    __sanitizer_get_module_and_offset_for_pc(pc, module_name,
-                                             sizeof(module_name), &offset);
-  }
-}
-
-int main() {
-  Test(0, "null");
-  TestCallerPc();
-  TestDlsym();
-  TestLoop();
-}
-#endif
-// CHECK: NOT FOUND null: {{.*}}
-// CHECK-NEXT: FOUND callerpc: {{.*}}/get_module_and_offset_for_pc.cc.tmp {{.*}}
-// CHECK-NEXT: FOUND foo: {{.*}}/get_module_and_offset_for_pc.so {{.*}}

Copied: compiler-rt/trunk/test/sanitizer_common/TestCases/get_module_and_offset_for_pc.cpp (from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/get_module_and_offset_for_pc.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/get_module_and_offset_for_pc.cpp?p2=compiler-rt/trunk/test/sanitizer_common/TestCases/get_module_and_offset_for_pc.cpp&p1=compiler-rt/trunk/test/sanitizer_common/TestCases/get_module_and_offset_for_pc.cc&r1=367862&r2=367863&rev=367863&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/get_module_and_offset_for_pc.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/get_module_and_offset_for_pc.cpp Mon Aug  5 06:57:03 2019
@@ -62,5 +62,5 @@ int main() {
 }
 #endif
 // CHECK: NOT FOUND null: {{.*}}
-// CHECK-NEXT: FOUND callerpc: {{.*}}/get_module_and_offset_for_pc.cc.tmp {{.*}}
+// CHECK-NEXT: FOUND callerpc: {{.*}}/get_module_and_offset_for_pc.cpp.tmp {{.*}}
 // CHECK-NEXT: FOUND foo: {{.*}}/get_module_and_offset_for_pc.so {{.*}}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/hard_rss_limit_mb_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/hard_rss_limit_mb_test.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/hard_rss_limit_mb_test.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/hard_rss_limit_mb_test.cc (removed)
@@ -1,43 +0,0 @@
-// Check hard_rss_limit_mb. Not all sanitizers implement it yet.
-// RUN: %clangxx -O2 %s -o %t
-//
-// Run with limit should fail:
-// RUN: %env_tool_opts=hard_rss_limit_mb=100                           not %run %t 2>&1 | FileCheck %s
-// This run uses getrusage:
-// RUN: %env_tool_opts=hard_rss_limit_mb=100:can_use_proc_maps_statm=0 not %run %t 2>&1 | FileCheck %s
-//
-// Run w/o limit or with a large enough limit should pass:
-// RUN: %env_tool_opts=hard_rss_limit_mb=1000 %run %t
-// RUN: %run %t
-//
-// FIXME: make it work for other sanitizers.
-// XFAIL: lsan
-// XFAIL: tsan
-// XFAIL: msan
-// XFAIL: ubsan
-
-// UNSUPPORTED: freebsd, solaris, darwin
-
-#include <string.h>
-#include <stdio.h>
-#include <unistd.h>
-
-const int kNumAllocs = 200 * 1000;
-const int kAllocSize = 1000;
-volatile char *sink[kNumAllocs];
-
-int main(int argc, char **argv) {
-  for (int i = 0; i < kNumAllocs; i++) {
-    if ((i % 1000) == 0) {
-      // Don't write to stderr! Doing that triggers a kernel race condition
-      // between this thread and the rss-limit thread, and may lose part of the
-      // output. See https://lkml.org/lkml/2014/2/17/324.
-      printf("[%d]\n", i);
-    }
-    char *x = new char[kAllocSize];
-    memset(x, 0, kAllocSize);
-    sink[i] = x;
-  }
-  sleep(1);  // Make sure the background thread has time to kill the process.
-// CHECK: hard rss limit exhausted
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/malloc_hook.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/malloc_hook.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/malloc_hook.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/malloc_hook.cc (removed)
@@ -1,61 +0,0 @@
-// RUN: %clangxx -O2 %s -o %t && %run %t 2>&1 | FileCheck %s
-
-// Malloc/free hooks are not supported on Windows.
-// XFAIL: windows-msvc
-// XFAIL: ubsan
-
-#include <stdlib.h>
-#include <unistd.h>
-#include <sanitizer/allocator_interface.h>
-
-extern "C" {
-const volatile void *global_ptr;
-
-#define WRITE(s) write(1, s, sizeof(s))
-
-// Note: avoid calling functions that allocate memory in malloc/free
-// to avoid infinite recursion.
-void __sanitizer_malloc_hook(const volatile void *ptr, size_t sz) {
-  if (__sanitizer_get_ownership(ptr) && sz == 4) {
-    WRITE("MallocHook\n");
-    global_ptr = ptr;
-  }
-}
-void __sanitizer_free_hook(const volatile void *ptr) {
-  if (__sanitizer_get_ownership(ptr) && ptr == global_ptr)
-    WRITE("FreeHook\n");
-}
-}  // extern "C"
-
-volatile int *x;
-
-void MallocHook1(const volatile void *ptr, size_t sz) { WRITE("MH1\n"); }
-void MallocHook2(const volatile void *ptr, size_t sz) { WRITE("MH2\n"); }
-void FreeHook1(const volatile void *ptr) { WRITE("FH1\n"); }
-void FreeHook2(const volatile void *ptr) { WRITE("FH2\n"); }
-// Call this function with uninitialized arguments to poison
-// TLS shadow for function parameters before calling operator
-// new and, eventually, user-provided hook.
-__attribute__((noinline)) void allocate(int *unused1, int *unused2) {
-  x = new int;
-}
-
-int main() {
-  __sanitizer_install_malloc_and_free_hooks(MallocHook1, FreeHook1);
-  __sanitizer_install_malloc_and_free_hooks(MallocHook2, FreeHook2);
-  int *undef1, *undef2;
-  allocate(undef1, undef2);
-  // CHECK: MallocHook
-  // CHECK: MH1
-  // CHECK: MH2
-  // Check that malloc hook was called with correct argument.
-  if (global_ptr != (void*)x) {
-    _exit(1);
-  }
-  *x = 0;
-  delete x;
-  // CHECK: FreeHook
-  // CHECK: FH1
-  // CHECK: FH2
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/options-help.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/options-help.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/options-help.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/options-help.cc (removed)
@@ -1,8 +0,0 @@
-// RUN: %clangxx -O0 %s -o %t
-// RUN: %env_tool_opts=help=1 %run %t 2>&1 | FileCheck %s
-
-int main() {
-}
-
-// CHECK: Available flags for {{.*}}Sanitizer:
-// CHECK: handle_segv

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/options-include.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/options-include.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/options-include.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/options-include.cc (removed)
@@ -1,49 +0,0 @@
-// RUN: %clangxx -O0 %s -o %t
-
-// Recursive include: options1 includes options2
-// RUN: echo "symbolize=1" > %t.options1.txt
-// RUN: echo "include='%t.options2.txt'" >>%t.options1.txt
-// RUN: echo "help=1" >%t.options2.txt
-// RUN: echo "help=1" >%t.options.options-include.cc.tmp
-// RUN: cat %t.options1.txt
-// RUN: cat %t.options2.txt
-
-// RUN: %env_tool_opts=help=0:include='"%t.options1.txt"' %run %t 2>&1 | tee %t.out
-// RUN: FileCheck %s --check-prefix=CHECK-WITH-HELP --check-prefix=CHECK-FOUND <%t.out
-
-// RUN: %env_tool_opts=include='"%t.options1.txt"',help=0 %run %t 2>&1 | tee %t.out
-// RUN: FileCheck %s --check-prefix=CHECK-WITHOUT-HELP --check-prefix=CHECK-FOUND <%t.out
-
-// RUN: %env_tool_opts=include='"%t.options-not-found.txt"',help=1 not %run %t 2>&1 | tee %t.out
-// RUN: FileCheck %s --check-prefix=CHECK-NOT-FOUND < %t.out
-
-// include_if_exists does not fail when the file is missing
-// RUN: %env_tool_opts=include_if_exists='"%t.options-not-found.txt"',help=1 %run %t 2>&1 | tee %t.out
-// RUN: FileCheck %s --check-prefix=CHECK-WITH-HELP --check-prefix=CHECK-FOUND < %t.out
-
-// %b (binary basename substitution)
-// RUN: %env_tool_opts=include='"%t.options.%b"' %run %t 2>&1 | tee %t.out
-// RUN: FileCheck %s --check-prefix=CHECK-WITH-HELP --check-prefix=CHECK-FOUND < %t.out
-
-// RUN: %env_tool_opts=include='"%t.options-not-found.%b"' not %run %t 2>&1 | tee %t.out
-// RUN: FileCheck %s --check-prefix=CHECK-WITHOUT-HELP --check-prefix=CHECK-NOT-FOUND < %t.out
-
-// RUN: %env_tool_opts=include_if_exists='"%t.options.%b"' %run %t 2>&1 | tee %t.out
-// RUN: FileCheck %s --check-prefix=CHECK-WITH-HELP --check-prefix=CHECK-FOUND < %t.out
-
-// RUN: %env_tool_opts=include_if_exists='"%t.options-not-found.%b"' %run %t 2>&1 | tee %t.out
-// RUN: FileCheck %s --check-prefix=CHECK-WITHOUT-HELP --check-prefix=CHECK-FOUND < %t.out
-
-// Android tests run on remote device so includes will not work.
-// UNSUPPORTED: android
-
-#include <stdio.h>
-
-int main() {
-  fprintf(stderr, "done\n");
-}
-
-// CHECK-WITH-HELP: Available flags for
-// CHECK-WITHOUT-HELP-NOT: Available flags for
-// CHECK-FOUND-NOT: Failed to read options from
-// CHECK-NOT-FOUND: Failed to read options from

Copied: compiler-rt/trunk/test/sanitizer_common/TestCases/options-include.cpp (from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/options-include.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/options-include.cpp?p2=compiler-rt/trunk/test/sanitizer_common/TestCases/options-include.cpp&p1=compiler-rt/trunk/test/sanitizer_common/TestCases/options-include.cc&r1=367862&r2=367863&rev=367863&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/options-include.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/options-include.cpp Mon Aug  5 06:57:03 2019
@@ -4,7 +4,7 @@
 // RUN: echo "symbolize=1" > %t.options1.txt
 // RUN: echo "include='%t.options2.txt'" >>%t.options1.txt
 // RUN: echo "help=1" >%t.options2.txt
-// RUN: echo "help=1" >%t.options.options-include.cc.tmp
+// RUN: echo "help=1" >%t.options.options-include.cpp.tmp
 // RUN: cat %t.options1.txt
 // RUN: cat %t.options2.txt
 

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/options-invalid.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/options-invalid.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/options-invalid.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/options-invalid.cc (removed)
@@ -1,15 +0,0 @@
-// RUN: %clangxx -O0 %s -o %t
-// RUN: %env_tool_opts=invalid_option_name=10,verbosity=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-V1
-// RUN: %env_tool_opts=invalid_option_name=10 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-V0
-
-#include <stdio.h>
-
-int main() {
-  fprintf(stderr, "done\n");
-}
-
-// CHECK-V1: WARNING: found 1 unrecognized
-// CHECK-V1:     invalid_option_name
-// CHECK-V0-NOT: WARNING: found 1 unrecognized
-// CHECK-V0-NOT:     invalid_option_name
-// CHECK: done

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cc (removed)
@@ -1,29 +0,0 @@
-// RUN: %clangxx -O0 %s -o %t && %env_tool_opts=stack_trace_format=DEFAULT %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx -O3 %s -o %t && %env_tool_opts=stack_trace_format=DEFAULT %run %t 2>&1 | FileCheck %s
-// RUN: %env_tool_opts=stack_trace_format=frame%n_lineno%l %run %t 2>&1 | FileCheck %s --check-prefix=CUSTOM
-// RUN: %env_tool_opts=symbolize_inline_frames=false:stack_trace_format=DEFAULT %run %t 2>&1 | FileCheck %s --check-prefix=NOINLINE
-
-// UNSUPPORTED: darwin
-
-// TODO(yln): temporary failing due to refactoring
-// UNSUPPORTED: ubsan
-
-#include <sanitizer/common_interface_defs.h>
-
-static inline void FooBarBaz() {
-  __sanitizer_print_stack_trace();
-}
-
-int main() {
-  FooBarBaz();
-  return 0;
-}
-// CHECK: {{    #0 0x.* in __sanitizer_print_stack_trace}}
-// CHECK: {{    #1 0x.* in FooBarBaz(\(\))? .*}}print-stack-trace.cc:[[@LINE-8]]
-// CHECK: {{    #2 0x.* in main.*}}print-stack-trace.cc:[[@LINE-5]]
-
-// CUSTOM: frame1_lineno[[@LINE-11]]
-// CUSTOM: frame2_lineno[[@LINE-8]]
-
-// NOINLINE: #0 0x{{.*}} in __sanitizer_print_stack_trace
-// NOINLINE: #1 0x{{.*}} in main{{.*}}print-stack-trace.cc:[[@LINE-15]]

Copied: compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cpp (from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cpp?p2=compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cpp&p1=compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cc&r1=367862&r2=367863&rev=367863&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cpp Mon Aug  5 06:57:03 2019
@@ -19,11 +19,11 @@ int main() {
   return 0;
 }
 // CHECK: {{    #0 0x.* in __sanitizer_print_stack_trace}}
-// CHECK: {{    #1 0x.* in FooBarBaz(\(\))? .*}}print-stack-trace.cc:[[@LINE-8]]
-// CHECK: {{    #2 0x.* in main.*}}print-stack-trace.cc:[[@LINE-5]]
+// CHECK: {{    #1 0x.* in FooBarBaz(\(\))? .*}}print-stack-trace.cpp:[[@LINE-8]]
+// CHECK: {{    #2 0x.* in main.*}}print-stack-trace.cpp:[[@LINE-5]]
 
 // CUSTOM: frame1_lineno[[@LINE-11]]
 // CUSTOM: frame2_lineno[[@LINE-8]]
 
 // NOINLINE: #0 0x{{.*}} in __sanitizer_print_stack_trace
-// NOINLINE: #1 0x{{.*}} in main{{.*}}print-stack-trace.cc:[[@LINE-15]]
+// NOINLINE: #1 0x{{.*}} in main{{.*}}print-stack-trace.cpp:[[@LINE-15]]

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/pthread_mutexattr_get.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/pthread_mutexattr_get.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/pthread_mutexattr_get.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/pthread_mutexattr_get.cc (removed)
@@ -1,22 +0,0 @@
-// RUN: %clangxx -O0 %s -o %t && %run %t
-
-// pthread_mutexattr_setpshared and pthread_mutexattr_getpshared unavailable
-// UNSUPPORTED: netbsd
-
-#include <assert.h>
-#include <pthread.h>
-
-int main(void) {
-  pthread_mutexattr_t ma;
-  int res = pthread_mutexattr_init(&ma);
-  assert(res == 0);
-  res = pthread_mutexattr_setpshared(&ma, 1);
-  assert(res == 0);
-  int pshared;
-  res = pthread_mutexattr_getpshared(&ma, &pshared);
-  assert(res == 0);
-  assert(pshared == 1);
-  res = pthread_mutexattr_destroy(&ma);
-  assert(res == 0);
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/reallocarray-overflow.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/reallocarray-overflow.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/reallocarray-overflow.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/reallocarray-overflow.cc (removed)
@@ -1,19 +0,0 @@
-// RUN: %clangxx  -O0 %s -o %t
-// RUN: %env_tool_opts=allocator_may_return_null=0 not %run %t 2>&1 | FileCheck %s
-// RUN: %env_tool_opts=allocator_may_return_null=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-NULL
-
-// REQUIRES: stable-runtime && !ubsan && !darwin
-
-#include <stdio.h>
-
-extern "C" void *reallocarray(void *, size_t, size_t);
-
-int main() {
-  void *p = reallocarray(nullptr, -1, 1000);
-  // CHECK: {{ERROR: .*Sanitizer: reallocarray parameters overflow: count \* size \(.* \* 1000\) cannot be represented in type size_t}}
-
-  printf("reallocarray returned: %zu\n", (size_t)p);
-  // CHECK-NULL: reallocarray returned: 0
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc (removed)
@@ -1,43 +0,0 @@
-// Tests -fsanitize-coverage=inline-8bit-counters,pc-table
-//
-// REQUIRES: has_sancovcc,stable-runtime
-// UNSUPPORTED: i386-darwin
-//
-// RUN: %clangxx -O0 %s -fsanitize-coverage=inline-8bit-counters,pc-table -o %t
-// RUN: %run %t 2>&1 | FileCheck %s
-// XFAIL: tsan
-
-#include <stdio.h>
-#include <stdint.h>
-#include <assert.h>
-
-const char *first_counter;
-
-extern "C"
-void __sanitizer_cov_8bit_counters_init(const char *start, const char *end) {
-  printf("INIT: %p %p\n", start, end);
-  assert(end - start > 1);
-  first_counter = start;
-}
-
-uintptr_t FirstPC;
-uintptr_t FirstPCFlag;
-
-extern "C" void __sanitizer_cov_pcs_init(const uintptr_t *pcs_beg,
-                                         const uintptr_t *pcs_end) {
-  const uintptr_t *B = (const uintptr_t *)pcs_beg;
-  const uintptr_t *E = (const uintptr_t *)pcs_end;
-  assert(B + 1 < E);
-  FirstPC = B[0];
-  FirstPCFlag = B[1];
-}
-
-
-int main() {
-  assert(first_counter);
-  assert(*first_counter == 1);
-  assert(FirstPC == (uintptr_t)&main);
-  assert(FirstPCFlag == 1);
-  fprintf(stderr, "PASS\n");
-  // CHECK: PASS
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_no_prune.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_no_prune.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_no_prune.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_no_prune.cc (removed)
@@ -1,16 +0,0 @@
-// Tests -fsanitize-coverage=no-prune
-
-// REQUIRES: has_sancovcc,stable-runtime
-// UNSUPPORTED: i386-darwin
-// XFAIL: ubsan,tsan
-// XFAIL: android && asan
-
-// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=trace-pc,bb,no-prune 2>&1 | grep "call void @__sanitizer_cov_trace_pc" | count 3
-// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=trace-pc,bb          2>&1 | grep "call void @__sanitizer_cov_trace_pc" | count 2
-// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=trace-pc,no-prune    2>&1 | grep "call void @__sanitizer_cov_trace_pc" | count 4
-// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=trace-pc             2>&1 | grep "call void @__sanitizer_cov_trace_pc" | count 3
-
-void foo(int *a) {
-  if (a)
-    *a = 1;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_stack_depth.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_stack_depth.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_stack_depth.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_stack_depth.cc (removed)
@@ -1,32 +0,0 @@
-// Tests -fsanitize-coverage=stack-depth
-//
-// XFAIL: tsan
-//
-// RUN: %clangxx -O0 -std=c++11 -fsanitize-coverage=stack-depth %s -o %t
-// RUN: %run %t 2>&1 | FileCheck %s --implicit-check-not Assertion{{.*}}failed
-// RUN: %clangxx -O0 -std=c++11 -fsanitize-coverage=trace-pc-guard,stack-depth \
-// RUN:     %s -o %t
-// RUN: %run %t 2>&1 | FileCheck %s --implicit-check-not Assertion{{.*}}failed
-
-#include <cstdint>
-#include <cstdio>
-#include <cassert>
-
-thread_local uintptr_t __sancov_lowest_stack;
-uintptr_t last_stack;
-
-void foo(int recurse) {
-  assert(__sancov_lowest_stack < last_stack);
-  last_stack = __sancov_lowest_stack;
-  if (recurse <= 0) return;
-  foo(recurse - 1);
-}
-
-int main() {
-  last_stack = __sancov_lowest_stack;
-  foo(100);
-  printf("Success!\n");
-  return 0;
-}
-
-// CHECK: Success!

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_symbolize.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_symbolize.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_symbolize.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_symbolize.cc (removed)
@@ -1,28 +0,0 @@
-// Tests trace pc guard coverage collection.
-//
-// REQUIRES: x86_64-linux
-// XFAIL: tsan
-//
-// RUN: DIR=%t_workdir
-// RUN: rm -rf $DIR
-// RUN: mkdir -p $DIR
-// RUN: cd $DIR
-// RUN: %clangxx -O0 -fsanitize-coverage=trace-pc-guard %s -o %t
-// RUN: %env_tool_opts=coverage=1 %t 2>&1 | FileCheck %s
-// RUN: rm -rf $DIR
-
-#include <stdio.h>
-
-int foo() {
-  fprintf(stderr, "foo\n");
-  return 1;
-}
-
-int main() {
-  fprintf(stderr, "main\n");
-  foo();
-  foo();
-}
-
-// CHECK: main
-// CHECK: SanitizerCoverage: ./sanitizer_coverage_symbolize.{{.*}}.sancov: 2 PCs written

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-dso.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-dso.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-dso.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-dso.cc (removed)
@@ -1,74 +0,0 @@
-// Tests trace pc guard coverage collection.
-
-// REQUIRES: has_sancovcc,stable-runtime
-// UNSUPPORTED: ubsan
-// XFAIL: tsan,darwin,powerpc64,s390x,mips
-// XFAIL: android && asan
-
-// RUN: DIR=%t_workdir
-// RUN: CLANG_ARGS="-O0 -fsanitize-coverage=trace-pc-guard"
-// RUN: rm -rf $DIR
-// RUN: mkdir -p $DIR
-// RUN: cd $DIR
-// RUN: %clangxx -DSHARED1 $CLANG_ARGS -shared %s -o %t_1.so -fPIC
-// RUN: %clangxx -DSHARED2 $CLANG_ARGS -shared %s -o %t_2.so -fPIC
-// RUN: %clangxx -DMAIN $CLANG_ARGS %s -o %t %t_1.so %t_2.so
-// RUN: %env_tool_opts=coverage=1 %t 2>&1 | FileCheck %s
-// RUN: %sancovcc  -covered-functions -strip_path_prefix=TestCases/ *.sancov \
-// RUN:            %t %t_1.so %t_2.so 2>&1 | \
-// RUN:   FileCheck --check-prefix=CHECK-SANCOV %s
-// RUN: rm -rf $DIR
-
-#include <stdio.h>
-
-extern "C" {
-  int bar();
-  int baz();
-}
-
-#ifdef MAIN
-
-int foo() {
-  fprintf(stderr, "foo\n");
-  return 1;
-}
-
-int main() {
-  fprintf(stderr, "main\n");
-  foo();
-  bar();
-  baz();
-}
-
-#endif // MAIN
-
-extern "C" {
-
-#ifdef SHARED1
-int bar() {
-  fprintf(stderr, "bar\n");
-  return 1;
-}
-#endif
-
-#ifdef SHARED2
-int baz() {
-  fprintf(stderr, "baz\n");
-  return 1;
-}
-#endif
-
-} // extern "C"
-
-// CHECK: main
-// CHECK-NEXT: foo
-// CHECK-NEXT: bar
-// CHECK-NEXT: baz
-// CHECK-DAG: SanitizerCoverage: ./sanitizer_coverage_trace_pc_guard-dso.{{.*}}.sancov: 2 PCs written
-// CHECK-DAG: SanitizerCoverage: ./sanitizer_coverage_trace_pc_guard-dso.{{.*}}_2.so.{{.*}}.sancov: 1 PCs written
-// CHECK-DAG: SanitizerCoverage: ./sanitizer_coverage_trace_pc_guard-dso.{{.*}}_1.so.{{.*}}.sancov: 1 PCs written
-//
-// CHECK-SANCOV: Ignoring {{.*}}_1.so and its coverage because __sanitizer_cov* functions were not found.
-// CHECK-SANCOV: Ignoring {{.*}}_2.so and its coverage because __sanitizer_cov* functions were not found.
-// CHECK-SANCOV-NEXT: sanitizer_coverage_trace_pc_guard-dso.cc:[[@LINE-42]] foo
-// CHECK-SANCOV-NEXT: sanitizer_coverage_trace_pc_guard-dso.cc:[[@LINE-38]] main

Copied: compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-dso.cpp (from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-dso.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-dso.cpp?p2=compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-dso.cpp&p1=compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-dso.cc&r1=367862&r2=367863&rev=367863&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-dso.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-dso.cpp Mon Aug  5 06:57:03 2019
@@ -70,5 +70,5 @@ int baz() {
 //
 // CHECK-SANCOV: Ignoring {{.*}}_1.so and its coverage because __sanitizer_cov* functions were not found.
 // CHECK-SANCOV: Ignoring {{.*}}_2.so and its coverage because __sanitizer_cov* functions were not found.
-// CHECK-SANCOV-NEXT: sanitizer_coverage_trace_pc_guard-dso.cc:[[@LINE-42]] foo
-// CHECK-SANCOV-NEXT: sanitizer_coverage_trace_pc_guard-dso.cc:[[@LINE-38]] main
+// CHECK-SANCOV-NEXT: sanitizer_coverage_trace_pc_guard-dso.cpp:[[@LINE-42]] foo
+// CHECK-SANCOV-NEXT: sanitizer_coverage_trace_pc_guard-dso.cpp:[[@LINE-38]] main

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-init.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-init.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-init.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-init.cc (removed)
@@ -1,73 +0,0 @@
-// Tests trace pc guard coverage collection.
-//
-// REQUIRES: has_sancovcc,stable-runtime,x86_64-linux
-// XFAIL: tsan
-//
-// RUN: DIR=%t_workdir
-// RUN: CLANG_ARGS="-O0 -fsanitize-coverage=trace-pc-guard"
-// RUN: rm -rf $DIR
-// RUN: mkdir -p $DIR
-// RUN: cd $DIR
-// RUN: %clangxx -DSHARED1 $CLANG_ARGS -shared %s -o %t_1.so -fPIC
-// RUN: %clangxx -DSTATIC1 $CLANG_ARGS %s -c -o %t_2.o
-// RUN: %clangxx -DMAIN $CLANG_ARGS %s -o %t %t_1.so %t_2.o
-// RUN: %env_tool_opts=coverage=1 %t 2>&1 | FileCheck %s
-// RUN: rm -rf $DIR
-
-#include <stdio.h>
-#include <stdint.h>
-#include <stdlib.h>
-
-extern "C" {
-  int bar();
-  int baz();
-}
-
-#ifdef MAIN
-
-extern "C" void __sanitizer_cov_trace_pc_guard_init(uint32_t *start, uint32_t *stop) {
-  fprintf(stderr, "__sanitizer_cov_trace_pc_guard_init\n");
-}
-
-extern "C" void __sanitizer_cov_trace_pc_guard(uint32_t *guard) { }
-
-
-int foo() {
-  fprintf(stderr, "foo\n");
-  return 1;
-}
-
-int main() {
-  fprintf(stderr, "main\n");
-  foo();
-  bar();
-  baz();
-}
-
-#endif // MAIN
-
-extern "C" {
-
-#ifdef SHARED1
-int bar() {
-  fprintf(stderr, "bar\n");
-  return 1;
-}
-#endif
-
-#ifdef STATIC1
-int baz() {
-  fprintf(stderr, "baz\n");
-  return 1;
-}
-#endif
-
-} // extern "C"
-
-// Init is called once per DSO.
-// CHECK: __sanitizer_cov_trace_pc_guard_init
-// CHECK-NEXT: __sanitizer_cov_trace_pc_guard_init
-// CHECK-NEXT: main
-// CHECK-NEXT: foo
-// CHECK-NEXT: bar
-// CHECK-NEXT: baz

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard.cc (removed)
@@ -1,41 +0,0 @@
-// Tests trace pc guard coverage collection.
-
-// REQUIRES: has_sancovcc,stable-runtime
-// UNSUPPORTED: ubsan,i386-darwin
-// XFAIL: tsan,powerpc64,s390x,mips
-// XFAIL: android && asan
-
-// RUN: DIR=%t_workdir
-// RUN: rm -rf $DIR
-// RUN: mkdir -p $DIR
-// RUN: cd $DIR
-// RUN: %clangxx -O0 -fsanitize-coverage=trace-pc-guard %s -o %t
-// RUN: %env_tool_opts=coverage=1 %t 2>&1 | FileCheck %s
-// RUN: %sancovcc  -covered-functions -strip_path_prefix=TestCases/ *.sancov %t 2>&1 | \
-// RUN:   FileCheck --check-prefix=CHECK-SANCOV %s
-// RUN: %env_tool_opts=coverage=0 %t 2>&1 | FileCheck --check-prefix=CHECK-NOCOV %s
-// RUN: rm -rf $DIR
-// Make some room to stabilize line numbers
-
-#include <stdio.h>
-
-int foo() {
-  fprintf(stderr, "foo\n");
-  return 1;
-}
-
-int main() {
-  fprintf(stderr, "main\n");
-  foo();
-  foo();
-}
-
-// CHECK: main
-// CHECK-NEXT: foo
-// CHECK-NEXT: foo
-// CHECK-NEXT: SanitizerCoverage: ./sanitizer_coverage_trace_pc_guard.{{.*}}.sancov: 2 PCs written
-//
-// CHECK-SANCOV: sanitizer_coverage_trace_pc_guard.cc:[[@LINE-16]] foo
-// CHECK-SANCOV-NEXT: sanitizer_coverage_trace_pc_guard.cc:[[@LINE-12]] main
-//
-// CHECK-NOCOV-NOT: SanitizerCoverage

Copied: compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard.cpp (from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard.cpp?p2=compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard.cpp&p1=compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard.cc&r1=367862&r2=367863&rev=367863&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard.cpp Mon Aug  5 06:57:03 2019
@@ -35,7 +35,7 @@ int main() {
 // CHECK-NEXT: foo
 // CHECK-NEXT: SanitizerCoverage: ./sanitizer_coverage_trace_pc_guard.{{.*}}.sancov: 2 PCs written
 //
-// CHECK-SANCOV: sanitizer_coverage_trace_pc_guard.cc:[[@LINE-16]] foo
-// CHECK-SANCOV-NEXT: sanitizer_coverage_trace_pc_guard.cc:[[@LINE-12]] main
+// CHECK-SANCOV: sanitizer_coverage_trace_pc_guard.cpp:[[@LINE-16]] foo
+// CHECK-SANCOV-NEXT: sanitizer_coverage_trace_pc_guard.cpp:[[@LINE-12]] main
 //
 // CHECK-NOCOV-NOT: SanitizerCoverage

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc.cc (removed)
@@ -1,57 +0,0 @@
-// RUN: %clangxx -O0 %s -o %t
-// RUN: %env_tool_opts=strip_path_prefix=/TestCases/ %run %t 2>&1 | FileCheck %s
-//
-// Tests __sanitizer_symbolize_pc.
-#include <stdio.h>
-#include <sanitizer/common_interface_defs.h>
-
-int GLOBAL_VAR_ABC;
-
-void SymbolizeSmallBuffer() {
-  char data[] = "abcdef";
-  __sanitizer_symbolize_pc(__builtin_return_address(0), "%p %F %L", data, 0);
-  printf("UNCHANGED '%s'\n", data);
-  __sanitizer_symbolize_pc(__builtin_return_address(0), "%p %F %L", data, 1);
-  printf("EMPTY '%s'\n", data);
-  __sanitizer_symbolize_pc(__builtin_return_address(0), "%p %F %L", data,
-                           sizeof(data));
-  printf("PARTIAL '%s'\n", data);
-}
-
-void SymbolizeCaller() {
-  char data[100];
-  __sanitizer_symbolize_pc(__builtin_return_address(0), "%p %F %L", data,
-                           sizeof(data));
-  printf("FIRST_FORMAT %s\n", data);
-  __sanitizer_symbolize_pc(__builtin_return_address(0),
-                           "FUNC:%f LINE:%l FILE:%s", data, sizeof(data));
-  printf("SECOND_FORMAT %s\n", data);
-  __sanitizer_symbolize_pc(__builtin_return_address(0),
-                          "LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"
-                          "OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"
-                          "OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"
-                          "OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"
-                          "OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG"
-                          "FUNC:%f LINE:%l FILE:%s", data, sizeof(data));
-  printf("LONG_FORMAT %s\n", data);
-}
-
-void SymbolizeData() {
-  char data[100];
-  __sanitizer_symbolize_global(&GLOBAL_VAR_ABC, "%g %s:%l", data, sizeof(data));
-  printf("GLOBAL: %s\n", data);
-}
-
-int main() {
-  // CHECK: UNCHANGED 'abcdef'
-  // CHECK: EMPTY ''
-  // CHECK: PARTIAL '0x{{.*}}'
-  SymbolizeSmallBuffer();
-
-  // CHECK: FIRST_FORMAT 0x{{.*}} in main symbolize_pc.cc:[[@LINE+2]]
-  // CHECK: SECOND_FORMAT FUNC:main LINE:[[@LINE+1]] FILE:symbolize_pc.cc
-  SymbolizeCaller();
-
-  // CHECK: GLOBAL: GLOBAL_VAR_ABC
-  SymbolizeData();
-}

Copied: compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc.cpp (from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc.cpp?p2=compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc.cpp&p1=compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc.cc&r1=367862&r2=367863&rev=367863&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc.cpp Mon Aug  5 06:57:03 2019
@@ -48,8 +48,8 @@ int main() {
   // CHECK: PARTIAL '0x{{.*}}'
   SymbolizeSmallBuffer();
 
-  // CHECK: FIRST_FORMAT 0x{{.*}} in main symbolize_pc.cc:[[@LINE+2]]
-  // CHECK: SECOND_FORMAT FUNC:main LINE:[[@LINE+1]] FILE:symbolize_pc.cc
+  // CHECK: FIRST_FORMAT 0x{{.*}} in main symbolize_pc.cpp:[[@LINE+2]]
+  // CHECK: SECOND_FORMAT FUNC:main LINE:[[@LINE+1]] FILE:symbolize_pc.cpp
   SymbolizeCaller();
 
   // CHECK: GLOBAL: GLOBAL_VAR_ABC

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc_inline.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc_inline.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc_inline.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc_inline.cc (removed)
@@ -1,32 +0,0 @@
-// RUN: %clangxx -O3  %s -o %t
-// RUN: %env_tool_opts=strip_path_prefix=/TestCases/ %run %t 2>&1 | FileCheck %s
-// RUN: %env_tool_opts=strip_path_prefix=/TestCases/:symbolize_inline_frames=0 \
-// RUN:   %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK-NOINLINE
-
-// XFAIL: darwin
-
-#include <sanitizer/common_interface_defs.h>
-#include <stdio.h>
-#include <string.h>
-
-char buffer[10000];
-
-__attribute__((noinline)) static void Symbolize() {
-  __sanitizer_symbolize_pc(__builtin_return_address(0), "%p %F %L", buffer,
-                           sizeof(buffer));
-  for (char *p = buffer; strlen(p); p += strlen(p) + 1)
-    printf("%s\n", p);
-}
-
-// CHECK-NOINLINE: {{0x[0-9a-f]+}} in main symbolize_pc_inline.cc:[[@LINE+2]]
-// CHECK: [[ADDR:0x[0-9a-f]+]] in C2 symbolize_pc_inline.cc:[[@LINE+1]]
-static inline void C2() { Symbolize(); }
-
-// CHECK: [[ADDR]] in C3 symbolize_pc_inline.cc:[[@LINE+1]]
-static inline void C3() { C2(); }
-
-// CHECK: [[ADDR]] in C4 symbolize_pc_inline.cc:[[@LINE+1]]
-static inline void C4() { C3(); }
-
-// CHECK: [[ADDR]] in main symbolize_pc_inline.cc:[[@LINE+1]]
-int main() { C4(); }

Copied: compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc_inline.cpp (from r367862, compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc_inline.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc_inline.cpp?p2=compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc_inline.cpp&p1=compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc_inline.cc&r1=367862&r2=367863&rev=367863&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc_inline.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_pc_inline.cpp Mon Aug  5 06:57:03 2019
@@ -18,15 +18,15 @@ __attribute__((noinline)) static void Sy
     printf("%s\n", p);
 }
 
-// CHECK-NOINLINE: {{0x[0-9a-f]+}} in main symbolize_pc_inline.cc:[[@LINE+2]]
-// CHECK: [[ADDR:0x[0-9a-f]+]] in C2 symbolize_pc_inline.cc:[[@LINE+1]]
+// CHECK-NOINLINE: {{0x[0-9a-f]+}} in main symbolize_pc_inline.cpp:[[@LINE+2]]
+// CHECK: [[ADDR:0x[0-9a-f]+]] in C2 symbolize_pc_inline.cpp:[[@LINE+1]]
 static inline void C2() { Symbolize(); }
 
-// CHECK: [[ADDR]] in C3 symbolize_pc_inline.cc:[[@LINE+1]]
+// CHECK: [[ADDR]] in C3 symbolize_pc_inline.cpp:[[@LINE+1]]
 static inline void C3() { C2(); }
 
-// CHECK: [[ADDR]] in C4 symbolize_pc_inline.cc:[[@LINE+1]]
+// CHECK: [[ADDR]] in C4 symbolize_pc_inline.cpp:[[@LINE+1]]
 static inline void C4() { C3(); }
 
-// CHECK: [[ADDR]] in main symbolize_pc_inline.cc:[[@LINE+1]]
+// CHECK: [[ADDR]] in main symbolize_pc_inline.cpp:[[@LINE+1]]
 int main() { C4(); }

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_stack.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_stack.cc?rev=367862&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_stack.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/symbolize_stack.cc (removed)
@@ -1,31 +0,0 @@
-// RUN: %clangxx -O0 %s -o %t && %run %t 2>&1 | FileCheck %s
-
-// Test that symbolizer does not crash on frame with large function name.
-
-// On Darwin LSan reports a false positive
-// XFAIL: darwin && lsan
-
-#include <sanitizer/common_interface_defs.h>
-#include <vector>
-
-template <int N> struct A {
-  template <class T> void RecursiveTemplateFunction(const T &t);
-};
-
-template <int N>
-template <class T>
-__attribute__((noinline)) void A<N>::RecursiveTemplateFunction(const T &) {
-  std::vector<T> t;
-  return A<N - 1>().RecursiveTemplateFunction(t);
-}
-
-template <>
-template <class T>
-__attribute__((noinline)) void A<0>::RecursiveTemplateFunction(const T &) {
-  __sanitizer_print_stack_trace();
-}
-
-int main() {
-  // CHECK: {{vector<.*vector<.*vector<.*vector<.*vector<}}
-  A<10>().RecursiveTemplateFunction(0);
-}




More information about the llvm-commits mailing list