[PATCH] D37765: [compiler-rt] Add test for not fully implemented dump_registers

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 12 13:43:30 PDT 2017


vitalybuka created this revision.
Herald added subscribers: dberris, kubamracek.

https://reviews.llvm.org/D37765

Files:
  compiler-rt/test/sanitizer_common/TestCases/Posix/dump_registers.cc


Index: compiler-rt/test/sanitizer_common/TestCases/Posix/dump_registers.cc
===================================================================
--- /dev/null
+++ compiler-rt/test/sanitizer_common/TestCases/Posix/dump_registers.cc
@@ -0,0 +1,20 @@
+// 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;
+}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37765.114899.patch
Type: text/x-patch
Size: 796 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170912/1216ec43/attachment.bin>


More information about the llvm-commits mailing list