[compiler-rt] [ASan][test] Enable ASan tests on SPARC (PR #107405)

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 5 07:07:12 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 0797c184c636889f2897746dc71390ae28005c7c c2483aec5f96940f279f8cef2f4fddd6b20ddd04 --extensions cpp -- compiler-rt/lib/asan/tests/asan_oob_test.cpp compiler-rt/lib/asan/tests/asan_test.cpp compiler-rt/test/asan/TestCases/zero_page_pc.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/compiler-rt/lib/asan/tests/asan_oob_test.cpp b/compiler-rt/lib/asan/tests/asan_oob_test.cpp
index ce4c90c23e..0203662433 100644
--- a/compiler-rt/lib/asan/tests/asan_oob_test.cpp
+++ b/compiler-rt/lib/asan/tests/asan_oob_test.cpp
@@ -13,9 +13,9 @@
 
 #ifdef __sparc__
 // Tests using unaligned accesses cannot work on strict-alignment targets.
-#define SKIP_ON_STRICT_ALIGNMENT(x) DISABLED_##x
+#  define SKIP_ON_STRICT_ALIGNMENT(x) DISABLED_##x
 #else
-#define SKIP_ON_STRICT_ALIGNMENT(x) x
+#  define SKIP_ON_STRICT_ALIGNMENT(x) x
 #endif
 
 NOINLINE void asan_write_sized_aligned(uint8_t *p, size_t size) {
@@ -86,9 +86,7 @@ TEST(AddressSanitizer, OOB_char) {
   OOBTest<U1>();
 }
 
-TEST(AddressSanitizer, SKIP_ON_STRICT_ALIGNMENT(OOB_int)) {
-  OOBTest<U4>();
-}
+TEST(AddressSanitizer, SKIP_ON_STRICT_ALIGNMENT(OOB_int)) { OOBTest<U4>(); }
 
 TEST(AddressSanitizer, OOBRightTest) {
   size_t max_access_size = SANITIZER_WORDSIZE == 64 ? 8 : 4;
diff --git a/compiler-rt/lib/asan/tests/asan_test.cpp b/compiler-rt/lib/asan/tests/asan_test.cpp
index 09d71569f8..9cc4118dbd 100644
--- a/compiler-rt/lib/asan/tests/asan_test.cpp
+++ b/compiler-rt/lib/asan/tests/asan_test.cpp
@@ -629,9 +629,9 @@ NOINLINE void SigLongJmpFunc1(sigjmp_buf buf) {
   siglongjmp(buf, 1);
 }
 
-#if !defined(__ANDROID__) && !defined(__arm__) && !defined(__aarch64__) && \
-    !defined(__mips__) && !defined(__mips64) && !defined(__s390__) &&      \
-    !defined(__riscv) && !defined(__loongarch__) && !defined(__sparc__)
+#  if !defined(__ANDROID__) && !defined(__arm__) && !defined(__aarch64__) && \
+      !defined(__mips__) && !defined(__mips64) && !defined(__s390__) &&      \
+      !defined(__riscv) && !defined(__loongarch__) && !defined(__sparc__)
 NOINLINE void BuiltinLongJmpFunc1(jmp_buf buf) {
   // create three red zones for these two stack objects.
   int a;

``````````

</details>


https://github.com/llvm/llvm-project/pull/107405


More information about the llvm-commits mailing list