[compiler-rt] [llvm-lit] Add REQUIRES: shell in compiler-rt tests that use the `ulimit` command in lit internal shell (PR #105339)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 20 13:34:58 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 898d6eb7be2198255c7badbbaecbce57aa8a3fb1 ff93c18900641e1200529cad6256e985c76b5716 --extensions cpp,c -- compiler-rt/test/asan/TestCases/Linux/allocator_oom_test.cpp compiler-rt/test/asan/TestCases/Posix/deep_call_stack.cpp compiler-rt/test/hwasan/TestCases/print-memory-usage.c compiler-rt/test/msan/Linux/reexec_unlimited_stack.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/compiler-rt/test/asan/TestCases/Linux/allocator_oom_test.cpp b/compiler-rt/test/asan/TestCases/Linux/allocator_oom_test.cpp
index 31541dd20e..5f3a1c50ce 100644
--- a/compiler-rt/test/asan/TestCases/Linux/allocator_oom_test.cpp
+++ b/compiler-rt/test/asan/TestCases/Linux/allocator_oom_test.cpp
@@ -7,7 +7,7 @@
// Limit this test to Linux since we're relying on allocator internal
// limits (shadow memory size, allocation limits etc.)
-REQUIRES: shell
+REQUIRES : shell
// RUN: %clangxx_asan -O0 %s -o %t
// RUN: ulimit -v 22024290304
// RUN: not %run %t malloc 2>&1 \
@@ -40,7 +40,8 @@ REQUIRES: shell
#include <stdio.h>
#include <assert.h>
-int main(int argc, char **argv) {
+ int
+ main(int argc, char **argv) {
assert(argc == 2);
const char *action = argv[1];
fprintf(stderr, "%s:\n", action);
diff --git a/compiler-rt/test/asan/TestCases/Posix/deep_call_stack.cpp b/compiler-rt/test/asan/TestCases/Posix/deep_call_stack.cpp
index 02284e8f0c..5ae6ea9edc 100644
--- a/compiler-rt/test/asan/TestCases/Posix/deep_call_stack.cpp
+++ b/compiler-rt/test/asan/TestCases/Posix/deep_call_stack.cpp
@@ -1,4 +1,4 @@
-REQUIRES: shell
+REQUIRES : shell
// Check that UAR mode can handle very deep recusrion.
// RUN: %clangxx_asan -O2 %s -o %t
// RUN: ulimit -s 4096
@@ -11,8 +11,8 @@ REQUIRES: shell
#include <stdio.h>
-__attribute__((noinline))
-void RecursiveFunc(int depth, int *ptr) {
+ __attribute__((noinline)) void
+ RecursiveFunc(int depth, int *ptr) {
if ((depth % 1000) == 0)
printf("[%05d] ptr: %p\n", depth, ptr);
if (depth == 0)
diff --git a/compiler-rt/test/hwasan/TestCases/print-memory-usage.c b/compiler-rt/test/hwasan/TestCases/print-memory-usage.c
index 7c095e0312..5b1d9dc412 100644
--- a/compiler-rt/test/hwasan/TestCases/print-memory-usage.c
+++ b/compiler-rt/test/hwasan/TestCases/print-memory-usage.c
@@ -1,4 +1,4 @@
-REQUIRES: shell
+REQUIRES : shell
// Tests __hwasan_print_memory_usage.
// RUN: %clang_hwasan %s -o %t
// RUN: ulimit -s 1000
@@ -11,7 +11,7 @@ REQUIRES: shell
#include <sanitizer/hwasan_interface.h>
-int state;
+ int state;
__thread volatile char *sink;
__attribute__((noinline))
diff --git a/compiler-rt/test/msan/Linux/reexec_unlimited_stack.cpp b/compiler-rt/test/msan/Linux/reexec_unlimited_stack.cpp
index 30c47abe02..687cd44067 100644
--- a/compiler-rt/test/msan/Linux/reexec_unlimited_stack.cpp
+++ b/compiler-rt/test/msan/Linux/reexec_unlimited_stack.cpp
@@ -1,4 +1,4 @@
-REQUIRES: shell
+REQUIRES : shell
// MSAN re-execs on unlimited stacks. We use that to verify ReExec() uses the
// right path.
// RUN: %clangxx_msan -O0 %s -o %t && ulimit -s unlimited && %run %t | FileCheck %s
@@ -13,7 +13,8 @@ REQUIRES: shell
#include <sys/auxv.h>
#endif
-int main() {
+ int
+ main() {
#if __GLIBC_PREREQ(2, 16)
// Make sure AT_EXECFN didn't get overwritten by re-exec.
puts(reinterpret_cast<const char *>(getauxval(AT_EXECFN)));
``````````
</details>
https://github.com/llvm/llvm-project/pull/105339
More information about the llvm-commits
mailing list