[PATCH] D31785: Mark two tests as requiring a shell

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 6 16:03:58 PDT 2017


rnk added inline comments.


================
Comment at: compiler-rt/test/asan/TestCases/Linux/read_binary_name_regtest.c:5
 // sure ASan is still able to
 // RUN: not ls /usr/include/linux/seccomp.h || ( %clang_asan %s -o %t && not %run %t 2>&1 | FileCheck %s )
+// REQUIRES: shell
----------------
I feel like a more LLVM-y way to do this would be to feature test seccomp in cmake and use `REQUIRES: seccomp` or something, but it's totally not worth it for one test.


================
Comment at: compiler-rt/test/asan/TestCases/Linux/swapcontext_annotation.cc:7
 // RUN: %clangxx_asan -std=c++11 -lpthread -O3 %s -o %t && %run %t 2>&1 | FileCheck %s
 // RUN: %clangxx_asan -std=c++11 -lpthread -O0 %s -o %t && %run %t 2>&1 | FileCheck <( seq 60 | xargs -i -- grep LOOPCHECK %s ) --check-prefix LOOPCHECK
 // RUN: %clangxx_asan -std=c++11 -lpthread -O1 %s -o %t && %run %t 2>&1 | FileCheck <( seq 60 | xargs -i -- grep LOOPCHECK %s ) --check-prefix LOOPCHECK
----------------
I think we can just replace this with a temporary file:
  // RUN: seq 60 | xargs -i -- grep LOOPCHECK %s > %t.checks
  // RUN: %clangxx_asan ... | FileCheck %t.checks --check-prefix=LOOPCHECK
  // RUN: %clangxx_asan ... | FileCheck %t.checks --check-prefix=LOOPCHECK
  // RUN: %clangxx_asan ... | FileCheck %t.checks --check-prefix=LOOPCHECK

That's more or less what `<()` is doing.


https://reviews.llvm.org/D31785





More information about the llvm-commits mailing list