[compiler-rt] 37520a0 - [dfsan] Disable testing origin tracking on non x86_64 arch
Jianzhou Zhao via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 11 13:23:10 PST 2021
Author: Jianzhou Zhao
Date: 2021-03-11T21:22:43Z
New Revision: 37520a0b2b2af025e40b17dbf99013cda9eb66a1
URL: https://github.com/llvm/llvm-project/commit/37520a0b2b2af025e40b17dbf99013cda9eb66a1
DIFF: https://github.com/llvm/llvm-project/commit/37520a0b2b2af025e40b17dbf99013cda9eb66a1.diff
LOG: [dfsan] Disable testing origin tracking on non x86_64 arch
Fix test cases related to https://reviews.llvm.org/D95835.
Added:
Modified:
compiler-rt/test/dfsan/origin_add_label.c
compiler-rt/test/dfsan/origin_branch.c
compiler-rt/test/dfsan/origin_disabled.c
compiler-rt/test/dfsan/origin_invalid.c
compiler-rt/test/dfsan/origin_ld_lost.c
compiler-rt/test/dfsan/origin_ldst.c
compiler-rt/test/dfsan/origin_limit.c
compiler-rt/test/dfsan/origin_memcpy.c
compiler-rt/test/dfsan/origin_memmove.c
compiler-rt/test/dfsan/origin_memset.c
compiler-rt/test/dfsan/origin_overlapped.c
compiler-rt/test/dfsan/origin_set_label.c
compiler-rt/test/dfsan/origin_unaligned_memtrans.c
compiler-rt/test/dfsan/origin_untainted.c
Removed:
################################################################################
diff --git a/compiler-rt/test/dfsan/origin_add_label.c b/compiler-rt/test/dfsan/origin_add_label.c
index 0d1920a7ce12..baf40edc9a77 100644
--- a/compiler-rt/test/dfsan/origin_add_label.c
+++ b/compiler-rt/test/dfsan/origin_add_label.c
@@ -1,10 +1,12 @@
// RUN: %clang_dfsan -gmlt -mllvm -dfsan-track-origins=1 -mllvm -dfsan-fast-16-labels=true %s -o %t && \
// RUN: %run %t >%t.out 2>&1
// RUN: FileCheck %s --check-prefix=CHECK < %t.out
-
+//
// RUN: %clang_dfsan -gmlt -mllvm -dfsan-track-origins=1 -mllvm -dfsan-fast-16-labels=true -mllvm -dfsan-instrument-with-call-threshold=0 %s -o %t && \
// RUN: %run %t >%t.out 2>&1
// RUN: FileCheck %s --check-prefix=CHECK < %t.out
+//
+// REQUIRES: x86_64-target-arch
#include <sanitizer/dfsan_interface.h>
diff --git a/compiler-rt/test/dfsan/origin_branch.c b/compiler-rt/test/dfsan/origin_branch.c
index 6bf5985e217d..3c7e5b62e3ba 100644
--- a/compiler-rt/test/dfsan/origin_branch.c
+++ b/compiler-rt/test/dfsan/origin_branch.c
@@ -1,6 +1,8 @@
// RUN: %clang_dfsan -gmlt -mllvm -dfsan-track-origins=1 -mllvm -dfsan-fast-16-labels=true %s -o %t && \
// RUN: %run %t >%t.out 2>&1
// RUN: FileCheck %s --check-prefix=CHECK < %t.out
+//
+// REQUIRES: x86_64-target-arch
#include <sanitizer/dfsan_interface.h>
diff --git a/compiler-rt/test/dfsan/origin_disabled.c b/compiler-rt/test/dfsan/origin_disabled.c
index e1a8b48ce063..44c5e663d4a4 100644
--- a/compiler-rt/test/dfsan/origin_disabled.c
+++ b/compiler-rt/test/dfsan/origin_disabled.c
@@ -1,6 +1,8 @@
// RUN: %clang_dfsan -gmlt -mllvm -dfsan-fast-16-labels=true %s -o %t && \
// RUN: %run %t >%t.out 2>&1
// RUN: FileCheck %s --check-prefix=CHECK < %t.out
+//
+// REQUIRES: x86_64-target-arch
#include <sanitizer/dfsan_interface.h>
diff --git a/compiler-rt/test/dfsan/origin_invalid.c b/compiler-rt/test/dfsan/origin_invalid.c
index fac015f54df0..d391e92560f1 100644
--- a/compiler-rt/test/dfsan/origin_invalid.c
+++ b/compiler-rt/test/dfsan/origin_invalid.c
@@ -1,6 +1,8 @@
// RUN: %clang_dfsan -gmlt -mllvm -dfsan-fast-16-labels=true -mllvm -dfsan-track-origins=1 %s -o %t && \
// RUN: %run %t >%t.out 2>&1
// RUN: FileCheck %s --check-prefix=CHECK < %t.out
+//
+// REQUIRES: x86_64-target-arch
#include <sanitizer/dfsan_interface.h>
diff --git a/compiler-rt/test/dfsan/origin_ld_lost.c b/compiler-rt/test/dfsan/origin_ld_lost.c
index 384cbad782dd..37fcd6c1c1a4 100644
--- a/compiler-rt/test/dfsan/origin_ld_lost.c
+++ b/compiler-rt/test/dfsan/origin_ld_lost.c
@@ -2,6 +2,8 @@
// RUN: %run %t >%t.out 2>&1
// RUN: FileCheck %s --check-prefix=CHECK < %t.out
//
+// REQUIRES: x86_64-target-arch
+//
// Test origin tracking can lost origins at 2-byte load with addr % 4 == 3.
#include <sanitizer/dfsan_interface.h>
diff --git a/compiler-rt/test/dfsan/origin_ldst.c b/compiler-rt/test/dfsan/origin_ldst.c
index 6cf4d8545850..2e4eca18596d 100644
--- a/compiler-rt/test/dfsan/origin_ldst.c
+++ b/compiler-rt/test/dfsan/origin_ldst.c
@@ -22,6 +22,8 @@
// RUN: %run %t >%t.out 2>&1
// RUN: FileCheck %s --check-prefix=CHECK < %t.out
//
+// REQUIRES: x86_64-target-arch
+//
// Test origin tracking is accurate in terms of partial store/load, and
//
diff erent aligments. Do not test alignments that are not power of 2.
// Compilers do not always allow this.
diff --git a/compiler-rt/test/dfsan/origin_limit.c b/compiler-rt/test/dfsan/origin_limit.c
index 4f14363df957..71920d878e47 100644
--- a/compiler-rt/test/dfsan/origin_limit.c
+++ b/compiler-rt/test/dfsan/origin_limit.c
@@ -8,6 +8,8 @@
//
// RUN: DFSAN_OPTIONS=origin_history_size=0 %run %t >%t.out 2>&1
// RUN: FileCheck %s --check-prefix=CHECK0 < %t.out
+//
+// REQUIRES: x86_64-target-arch
#include <sanitizer/dfsan_interface.h>
diff --git a/compiler-rt/test/dfsan/origin_memcpy.c b/compiler-rt/test/dfsan/origin_memcpy.c
index a3e64e354a09..34edf9d4554a 100644
--- a/compiler-rt/test/dfsan/origin_memcpy.c
+++ b/compiler-rt/test/dfsan/origin_memcpy.c
@@ -1,10 +1,12 @@
// RUN: %clang_dfsan -gmlt -DOFFSET=0 -mllvm -dfsan-track-origins=1 -mllvm -dfsan-fast-16-labels=true %s -o %t && \
// RUN: %run %t >%t.out 2>&1
// RUN: FileCheck %s --check-prefix=CHECK0 < %t.out
-
+//
// RUN: %clang_dfsan -gmlt -DOFFSET=10 -mllvm -dfsan-track-origins=1 -mllvm -dfsan-fast-16-labels=true %s -o %t && \
// RUN: %run %t >%t.out 2>&1
// RUN: FileCheck %s --check-prefix=CHECK10 < %t.out
+//
+// REQUIRES: x86_64-target-arch
#include <sanitizer/dfsan_interface.h>
diff --git a/compiler-rt/test/dfsan/origin_memmove.c b/compiler-rt/test/dfsan/origin_memmove.c
index 4a11d6ef0a88..fee04569ce9d 100644
--- a/compiler-rt/test/dfsan/origin_memmove.c
+++ b/compiler-rt/test/dfsan/origin_memmove.c
@@ -1,10 +1,12 @@
// RUN: %clang_dfsan -gmlt -DOFFSET=0 -mllvm -dfsan-track-origins=1 -mllvm -dfsan-fast-16-labels=true %s -o %t && \
// RUN: %run %t >%t.out 2>&1
// RUN: FileCheck %s --check-prefix=CHECK0 < %t.out
-
+//
// RUN: %clang_dfsan -gmlt -DOFFSET=10 -mllvm -dfsan-track-origins=1 -mllvm -dfsan-fast-16-labels=true %s -o %t && \
// RUN: %run %t >%t.out 2>&1
// RUN: FileCheck %s --check-prefix=CHECK10 < %t.out
+//
+// REQUIRES: x86_64-target-arch
#include <sanitizer/dfsan_interface.h>
diff --git a/compiler-rt/test/dfsan/origin_memset.c b/compiler-rt/test/dfsan/origin_memset.c
index afc9855e04d6..21b384188057 100644
--- a/compiler-rt/test/dfsan/origin_memset.c
+++ b/compiler-rt/test/dfsan/origin_memset.c
@@ -1,10 +1,12 @@
// RUN: %clang_dfsan -gmlt -DOFFSET=0 -mllvm -dfsan-track-origins=1 -mllvm -dfsan-fast-16-labels=true %s -o %t && \
// RUN: %run %t >%t.out 2>&1
// RUN: FileCheck %s --check-prefix=CHECK0 < %t.out
-
+//
// RUN: %clang_dfsan -gmlt -DOFFSET=10 -mllvm -dfsan-track-origins=1 -mllvm -dfsan-fast-16-labels=true %s -o %t && \
// RUN: %run %t >%t.out 2>&1
// RUN: FileCheck %s --check-prefix=CHECK10 < %t.out
+//
+// REQUIRES: x86_64-target-arch
#include <sanitizer/dfsan_interface.h>
diff --git a/compiler-rt/test/dfsan/origin_overlapped.c b/compiler-rt/test/dfsan/origin_overlapped.c
index 98b4d5073376..33bd0ec9cb1a 100644
--- a/compiler-rt/test/dfsan/origin_overlapped.c
+++ b/compiler-rt/test/dfsan/origin_overlapped.c
@@ -1,6 +1,8 @@
// RUN: %clang_dfsan -gmlt -mllvm -dfsan-track-origins=1 -mllvm -dfsan-fast-16-labels=true %s -o %t && \
// RUN: %run %t >%t.out 2>&1
// RUN: FileCheck %s --check-prefix=CHECK < %t.out
+//
+// REQUIRES: x86_64-target-arch
#include <sanitizer/dfsan_interface.h>
diff --git a/compiler-rt/test/dfsan/origin_set_label.c b/compiler-rt/test/dfsan/origin_set_label.c
index 41617e7df147..d6a5d264772e 100644
--- a/compiler-rt/test/dfsan/origin_set_label.c
+++ b/compiler-rt/test/dfsan/origin_set_label.c
@@ -1,10 +1,12 @@
// RUN: %clang_dfsan -gmlt -mllvm -dfsan-track-origins=1 -mllvm -dfsan-fast-16-labels=true %s -o %t && \
// RUN: %run %t >%t.out 2>&1
// RUN: FileCheck %s --check-prefix=CHECK < %t.out
-
+//
// RUN: %clang_dfsan -gmlt -mllvm -dfsan-track-origins=1 -mllvm -dfsan-fast-16-labels=true -mllvm -dfsan-instrument-with-call-threshold=0 %s -o %t && \
// RUN: %run %t >%t.out 2>&1
// RUN: FileCheck %s --check-prefix=CHECK < %t.out
+//
+// REQUIRES: x86_64-target-arch
#include <sanitizer/dfsan_interface.h>
diff --git a/compiler-rt/test/dfsan/origin_unaligned_memtrans.c b/compiler-rt/test/dfsan/origin_unaligned_memtrans.c
index 4d02c711ea0c..fa3db7c32fc7 100644
--- a/compiler-rt/test/dfsan/origin_unaligned_memtrans.c
+++ b/compiler-rt/test/dfsan/origin_unaligned_memtrans.c
@@ -1,10 +1,12 @@
// RUN: %clang_dfsan -gmlt -DOFFSET=0 -mllvm -dfsan-track-origins=1 -mllvm -dfsan-fast-16-labels=true %s -o %t && \
// RUN: %run %t >%t.out 2>&1
// RUN: FileCheck %s --check-prefix=CHECK0 < %t.out
-
+//
// RUN: %clang_dfsan -gmlt -DOFFSET=10 -mllvm -dfsan-track-origins=1 -mllvm -dfsan-fast-16-labels=true %s -o %t && \
// RUN: %run %t >%t.out 2>&1
// RUN: FileCheck %s --check-prefix=CHECK10 < %t.out
+//
+// REQUIRES: x86_64-target-arch
#include <sanitizer/dfsan_interface.h>
diff --git a/compiler-rt/test/dfsan/origin_untainted.c b/compiler-rt/test/dfsan/origin_untainted.c
index 6404618a20c1..d51ab1bd1e05 100644
--- a/compiler-rt/test/dfsan/origin_untainted.c
+++ b/compiler-rt/test/dfsan/origin_untainted.c
@@ -1,6 +1,8 @@
// RUN: %clang_dfsan -gmlt -mllvm -dfsan-fast-16-labels=true -mllvm -dfsan-track-origins=1 %s -o %t && \
// RUN: %run %t >%t.out 2>&1
// RUN: FileCheck %s --check-prefix=CHECK < %t.out
+//
+// REQUIRES: x86_64-target-arch
#include <sanitizer/dfsan_interface.h>
More information about the llvm-commits
mailing list