[clang] [llvm] [test] Avoid writing to a potentially write-protected dir (PR #89242)
https://github.com/karka228 closed https://github.com/llvm/llvm-project/pull/89242 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [test] Avoid writing to a potentially write-protected dir (PR #89242)
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/89242 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [test] Avoid writing to a potentially write-protected dir (PR #89242)
MaskRay wrote: > but since we only care about stdout/stderr, throw away the output file and > just write to /dev/null instead. Since `-emit-llvm-only` is now used, the commit message should be updated. https://github.com/llvm/llvm-project/pull/89242 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [test] Avoid writing to a potentially write-protected dir (PR #89242)
https://github.com/llvm-beanz approved this pull request. https://github.com/llvm/llvm-project/pull/89242 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [test] Avoid writing to a potentially write-protected dir (PR #89242)
https://github.com/karka228 updated https://github.com/llvm/llvm-project/pull/89242 >From 4cc801e00e80f9727ade71213193e8d5cc5610f8 Mon Sep 17 00:00:00 2001 From: Karl-Johan Karlsson Date: Thu, 18 Apr 2024 16:24:13 +0200 Subject: [PATCH 1/2] [test] Avoid writing to a potentially write-protected dir These tests just don't check the output written to the current directory. The current directory may be write protected e.g. in a sandboxed environment. Typically one would write `clang -o %t.o` for a writeable dir, but since we only care about stdout/stderr, throw away the output file and just write to /dev/null instead. --- clang/test/CodeGen/PowerPC/builtins-ppc-htm.c | 2 +- .../PowerPC/builtins-ppc-vec-ins-error.c | 12 +- .../RISCV/riscv-func-attr-target-err.c| 2 +- clang/test/Sema/ppc-attr-target-inline.c | 2 +- clang/test/SemaHLSL/BuiltIns/any-errors.hlsl | 2 +- .../test/SemaHLSL/BuiltIns/clamp-errors.hlsl | 2 +- clang/test/SemaHLSL/BuiltIns/dot-errors.hlsl | 2 +- clang/test/SemaHLSL/BuiltIns/exp-errors.hlsl | 4 ++-- clang/test/SemaHLSL/BuiltIns/frac-errors.hlsl | 2 +- .../BuiltIns/half-float-only-errors.hlsl | 24 +-- .../test/SemaHLSL/BuiltIns/isinf-errors.hlsl | 2 +- clang/test/SemaHLSL/BuiltIns/lerp-errors.hlsl | 2 +- clang/test/SemaHLSL/BuiltIns/mad-errors.hlsl | 2 +- clang/test/SemaHLSL/BuiltIns/pow-errors.hlsl | 2 +- clang/test/SemaHLSL/BuiltIns/rcp-errors.hlsl | 2 +- .../SemaHLSL/BuiltIns/reversebits-errors.hlsl | 2 +- .../test/SemaHLSL/BuiltIns/round-errors.hlsl | 2 +- .../test/SemaHLSL/BuiltIns/rsqrt-errors.hlsl | 2 +- .../MachineVerifier/verify-inlineasmbr.mir| 2 +- 19 files changed, 36 insertions(+), 36 deletions(-) diff --git a/clang/test/CodeGen/PowerPC/builtins-ppc-htm.c b/clang/test/CodeGen/PowerPC/builtins-ppc-htm.c index 51585f27e0bc70..1cdd8c0f40d4c3 100644 --- a/clang/test/CodeGen/PowerPC/builtins-ppc-htm.c +++ b/clang/test/CodeGen/PowerPC/builtins-ppc-htm.c @@ -1,6 +1,6 @@ // REQUIRES: powerpc-registered-target // RUN: %clang_cc1 -target-feature +altivec -target-feature +htm -triple powerpc64-unknown-unknown -emit-llvm %s -o - | FileCheck %s -// RUN: not %clang_cc1 -target-feature +altivec -target-feature -htm -triple powerpc64-unknown-unknown -emit-llvm %s 2>&1 | FileCheck %s --check-prefix=ERROR +// RUN: not %clang_cc1 -target-feature +altivec -target-feature -htm -triple powerpc64-unknown-unknown -emit-llvm %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERROR void test1(long int *r, int code, long int *a, long int *b) { // CHECK-LABEL: define{{.*}} void @test1 diff --git a/clang/test/CodeGen/PowerPC/builtins-ppc-vec-ins-error.c b/clang/test/CodeGen/PowerPC/builtins-ppc-vec-ins-error.c index f5149bf4ce8fda..1194e51ad44542 100644 --- a/clang/test/CodeGen/PowerPC/builtins-ppc-vec-ins-error.c +++ b/clang/test/CodeGen/PowerPC/builtins-ppc-vec-ins-error.c @@ -1,17 +1,17 @@ // REQUIRES: powerpc-registered-target // RUN: %clang_cc1 -flax-vector-conversions=none -target-feature +vsx -target-cpu pwr10 -fsyntax-only \ -// RUN: -triple powerpc64le-unknown-unknown -emit-llvm -ferror-limit 10 %s -verify -D __TEST_ELT_SI +// RUN: -triple powerpc64le-unknown-unknown -emit-llvm -ferror-limit 10 %s -o /dev/null -verify -D __TEST_ELT_SI // RUN: %clang_cc1 -flax-vector-conversions=none -target-feature +vsx -target-cpu pwr10 -fsyntax-only \ -// RUN: -triple powerpc64-unknown-unknown -emit-llvm -ferror-limit 10 %s -verify -D __TEST_ELT_F +// RUN: -triple powerpc64-unknown-unknown -emit-llvm -ferror-limit 10 %s -o /dev/null -verify -D __TEST_ELT_F // RUN: %clang_cc1 -flax-vector-conversions=none -target-feature +vsx -target-cpu pwr10 -fsyntax-only \ -// RUN: -triple powerpc64le-unknown-unknown -emit-llvm -ferror-limit 10 %s -verify -D __TEST_ELT_SLL +// RUN: -triple powerpc64le-unknown-unknown -emit-llvm -ferror-limit 10 %s -o /dev/null -verify -D __TEST_ELT_SLL // RUN: %clang_cc1 -flax-vector-conversions=none -target-feature +vsx -target-cpu pwr10 -fsyntax-only \ -// RUN: -triple powerpc64-unknown-unknown -emit-llvm -ferror-limit 10 %s -verify -D __TEST_ELT_D +// RUN: -triple powerpc64-unknown-unknown -emit-llvm -ferror-limit 10 %s -o /dev/null -verify -D __TEST_ELT_D // RUN: %clang_cc1 -flax-vector-conversions=none -target-feature +vsx -target-cpu pwr10 -fsyntax-only \ -// RUN: -triple powerpc64le-unknown-unknown -emit-llvm -ferror-limit 10 %s -verify -D __TEST_UNALIGNED_UI +// RUN: -triple powerpc64le-unknown-unknown -emit-llvm -ferror-limit 10 %s -o /dev/null -verify -D __TEST_UNALIGNED_UI // RUN: %clang_cc1 -flax-vector-conversions=none -target-feature +vsx -target-cpu pwr10 -fsyntax-only \ -// RUN: -triple powerpc64-unknown-unknown -emit-llvm -ferror-limit 10 %s -verify +// RUN: -triple powerpc64-unknown-unknown -emit-llvm -ferror-limit 10 %s -o /dev/null -verify #include diff --git
[clang] [llvm] [test] Avoid writing to a potentially write-protected dir (PR #89242)
@@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -verify -verify-ignore-unexpected +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -verify -verify-ignore-unexpected -o /dev/null karka228 wrote: Removing `-emit-llvm` will expose more of the compiler pipeline to the testcases and some testcases seems not to be designed to work with that. Instead I found out that there is another option `-emit-llvm-only` that seems to be designed to be used together with `-verify` as it to the same thing as `-emit-llvm` except that it don't produce any output. Is that an acceptable solution? https://github.com/llvm/llvm-project/pull/89242 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [test] Avoid writing to a potentially write-protected dir (PR #89242)
@@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -verify -verify-ignore-unexpected +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -verify -verify-ignore-unexpected -o /dev/null llvm-beanz wrote: This problem is repeated in a bunch of the other updated tests. I'm not going to comment on each one individually. https://github.com/llvm/llvm-project/pull/89242 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [test] Avoid writing to a potentially write-protected dir (PR #89242)
@@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -verify -verify-ignore-unexpected +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -verify -verify-ignore-unexpected -o /dev/null llvm-beanz wrote: Unless I'm mistaken the clang `-verify` option should prevent writing outputs since it is just running the verifier. That said, this test shouldn't be passing `-emit-llvm -disable-llvm-passes` because we aren't actually checking the IR. https://github.com/llvm/llvm-project/pull/89242 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [test] Avoid writing to a potentially write-protected dir (PR #89242)
llvmbot wrote: @llvm/pr-subscribers-clang Author: Karl-Johan Karlsson (karka228) Changes These tests just don't check the output written to the current directory. The current directory may be write protected e.g. in a sandboxed environment. Typically one would write `clang -o %t.o` for a writeable dir, but since we only care about stdout/stderr, throw away the output file and just write to /dev/null instead. --- Full diff: https://github.com/llvm/llvm-project/pull/89242.diff 19 Files Affected: - (modified) clang/test/CodeGen/PowerPC/builtins-ppc-htm.c (+1-1) - (modified) clang/test/CodeGen/PowerPC/builtins-ppc-vec-ins-error.c (+6-6) - (modified) clang/test/CodeGen/RISCV/riscv-func-attr-target-err.c (+1-1) - (modified) clang/test/Sema/ppc-attr-target-inline.c (+1-1) - (modified) clang/test/SemaHLSL/BuiltIns/any-errors.hlsl (+1-1) - (modified) clang/test/SemaHLSL/BuiltIns/clamp-errors.hlsl (+1-1) - (modified) clang/test/SemaHLSL/BuiltIns/dot-errors.hlsl (+1-1) - (modified) clang/test/SemaHLSL/BuiltIns/exp-errors.hlsl (+2-2) - (modified) clang/test/SemaHLSL/BuiltIns/frac-errors.hlsl (+1-1) - (modified) clang/test/SemaHLSL/BuiltIns/half-float-only-errors.hlsl (+12-12) - (modified) clang/test/SemaHLSL/BuiltIns/isinf-errors.hlsl (+1-1) - (modified) clang/test/SemaHLSL/BuiltIns/lerp-errors.hlsl (+1-1) - (modified) clang/test/SemaHLSL/BuiltIns/mad-errors.hlsl (+1-1) - (modified) clang/test/SemaHLSL/BuiltIns/pow-errors.hlsl (+1-1) - (modified) clang/test/SemaHLSL/BuiltIns/rcp-errors.hlsl (+1-1) - (modified) clang/test/SemaHLSL/BuiltIns/reversebits-errors.hlsl (+1-1) - (modified) clang/test/SemaHLSL/BuiltIns/round-errors.hlsl (+1-1) - (modified) clang/test/SemaHLSL/BuiltIns/rsqrt-errors.hlsl (+1-1) - (modified) llvm/test/MachineVerifier/verify-inlineasmbr.mir (+1-1) ``diff diff --git a/clang/test/CodeGen/PowerPC/builtins-ppc-htm.c b/clang/test/CodeGen/PowerPC/builtins-ppc-htm.c index 51585f27e0bc70..1cdd8c0f40d4c3 100644 --- a/clang/test/CodeGen/PowerPC/builtins-ppc-htm.c +++ b/clang/test/CodeGen/PowerPC/builtins-ppc-htm.c @@ -1,6 +1,6 @@ // REQUIRES: powerpc-registered-target // RUN: %clang_cc1 -target-feature +altivec -target-feature +htm -triple powerpc64-unknown-unknown -emit-llvm %s -o - | FileCheck %s -// RUN: not %clang_cc1 -target-feature +altivec -target-feature -htm -triple powerpc64-unknown-unknown -emit-llvm %s 2>&1 | FileCheck %s --check-prefix=ERROR +// RUN: not %clang_cc1 -target-feature +altivec -target-feature -htm -triple powerpc64-unknown-unknown -emit-llvm %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERROR void test1(long int *r, int code, long int *a, long int *b) { // CHECK-LABEL: define{{.*}} void @test1 diff --git a/clang/test/CodeGen/PowerPC/builtins-ppc-vec-ins-error.c b/clang/test/CodeGen/PowerPC/builtins-ppc-vec-ins-error.c index f5149bf4ce8fda..1194e51ad44542 100644 --- a/clang/test/CodeGen/PowerPC/builtins-ppc-vec-ins-error.c +++ b/clang/test/CodeGen/PowerPC/builtins-ppc-vec-ins-error.c @@ -1,17 +1,17 @@ // REQUIRES: powerpc-registered-target // RUN: %clang_cc1 -flax-vector-conversions=none -target-feature +vsx -target-cpu pwr10 -fsyntax-only \ -// RUN: -triple powerpc64le-unknown-unknown -emit-llvm -ferror-limit 10 %s -verify -D __TEST_ELT_SI +// RUN: -triple powerpc64le-unknown-unknown -emit-llvm -ferror-limit 10 %s -o /dev/null -verify -D __TEST_ELT_SI // RUN: %clang_cc1 -flax-vector-conversions=none -target-feature +vsx -target-cpu pwr10 -fsyntax-only \ -// RUN: -triple powerpc64-unknown-unknown -emit-llvm -ferror-limit 10 %s -verify -D __TEST_ELT_F +// RUN: -triple powerpc64-unknown-unknown -emit-llvm -ferror-limit 10 %s -o /dev/null -verify -D __TEST_ELT_F // RUN: %clang_cc1 -flax-vector-conversions=none -target-feature +vsx -target-cpu pwr10 -fsyntax-only \ -// RUN: -triple powerpc64le-unknown-unknown -emit-llvm -ferror-limit 10 %s -verify -D __TEST_ELT_SLL +// RUN: -triple powerpc64le-unknown-unknown -emit-llvm -ferror-limit 10 %s -o /dev/null -verify -D __TEST_ELT_SLL // RUN: %clang_cc1 -flax-vector-conversions=none -target-feature +vsx -target-cpu pwr10 -fsyntax-only \ -// RUN: -triple powerpc64-unknown-unknown -emit-llvm -ferror-limit 10 %s -verify -D __TEST_ELT_D +// RUN: -triple powerpc64-unknown-unknown -emit-llvm -ferror-limit 10 %s -o /dev/null -verify -D __TEST_ELT_D // RUN: %clang_cc1 -flax-vector-conversions=none -target-feature +vsx -target-cpu pwr10 -fsyntax-only \ -// RUN: -triple powerpc64le-unknown-unknown -emit-llvm -ferror-limit 10 %s -verify -D __TEST_UNALIGNED_UI +// RUN: -triple powerpc64le-unknown-unknown -emit-llvm -ferror-limit 10 %s -o /dev/null -verify -D __TEST_UNALIGNED_UI // RUN: %clang_cc1 -flax-vector-conversions=none -target-feature +vsx -target-cpu pwr10 -fsyntax-only \ -// RUN: -triple powerpc64-unknown-unknown -emit-llvm -ferror-limit 10 %s -verify +// RUN: -triple powerpc64-unknown-unknown -emit-llvm -ferror-limit 10 %s -o
[clang] [llvm] [test] Avoid writing to a potentially write-protected dir (PR #89242)
llvmbot wrote: @llvm/pr-subscribers-backend-powerpc Author: Karl-Johan Karlsson (karka228) Changes These tests just don't check the output written to the current directory. The current directory may be write protected e.g. in a sandboxed environment. Typically one would write `clang -o %t.o` for a writeable dir, but since we only care about stdout/stderr, throw away the output file and just write to /dev/null instead. --- Full diff: https://github.com/llvm/llvm-project/pull/89242.diff 19 Files Affected: - (modified) clang/test/CodeGen/PowerPC/builtins-ppc-htm.c (+1-1) - (modified) clang/test/CodeGen/PowerPC/builtins-ppc-vec-ins-error.c (+6-6) - (modified) clang/test/CodeGen/RISCV/riscv-func-attr-target-err.c (+1-1) - (modified) clang/test/Sema/ppc-attr-target-inline.c (+1-1) - (modified) clang/test/SemaHLSL/BuiltIns/any-errors.hlsl (+1-1) - (modified) clang/test/SemaHLSL/BuiltIns/clamp-errors.hlsl (+1-1) - (modified) clang/test/SemaHLSL/BuiltIns/dot-errors.hlsl (+1-1) - (modified) clang/test/SemaHLSL/BuiltIns/exp-errors.hlsl (+2-2) - (modified) clang/test/SemaHLSL/BuiltIns/frac-errors.hlsl (+1-1) - (modified) clang/test/SemaHLSL/BuiltIns/half-float-only-errors.hlsl (+12-12) - (modified) clang/test/SemaHLSL/BuiltIns/isinf-errors.hlsl (+1-1) - (modified) clang/test/SemaHLSL/BuiltIns/lerp-errors.hlsl (+1-1) - (modified) clang/test/SemaHLSL/BuiltIns/mad-errors.hlsl (+1-1) - (modified) clang/test/SemaHLSL/BuiltIns/pow-errors.hlsl (+1-1) - (modified) clang/test/SemaHLSL/BuiltIns/rcp-errors.hlsl (+1-1) - (modified) clang/test/SemaHLSL/BuiltIns/reversebits-errors.hlsl (+1-1) - (modified) clang/test/SemaHLSL/BuiltIns/round-errors.hlsl (+1-1) - (modified) clang/test/SemaHLSL/BuiltIns/rsqrt-errors.hlsl (+1-1) - (modified) llvm/test/MachineVerifier/verify-inlineasmbr.mir (+1-1) ``diff diff --git a/clang/test/CodeGen/PowerPC/builtins-ppc-htm.c b/clang/test/CodeGen/PowerPC/builtins-ppc-htm.c index 51585f27e0bc70..1cdd8c0f40d4c3 100644 --- a/clang/test/CodeGen/PowerPC/builtins-ppc-htm.c +++ b/clang/test/CodeGen/PowerPC/builtins-ppc-htm.c @@ -1,6 +1,6 @@ // REQUIRES: powerpc-registered-target // RUN: %clang_cc1 -target-feature +altivec -target-feature +htm -triple powerpc64-unknown-unknown -emit-llvm %s -o - | FileCheck %s -// RUN: not %clang_cc1 -target-feature +altivec -target-feature -htm -triple powerpc64-unknown-unknown -emit-llvm %s 2>&1 | FileCheck %s --check-prefix=ERROR +// RUN: not %clang_cc1 -target-feature +altivec -target-feature -htm -triple powerpc64-unknown-unknown -emit-llvm %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERROR void test1(long int *r, int code, long int *a, long int *b) { // CHECK-LABEL: define{{.*}} void @test1 diff --git a/clang/test/CodeGen/PowerPC/builtins-ppc-vec-ins-error.c b/clang/test/CodeGen/PowerPC/builtins-ppc-vec-ins-error.c index f5149bf4ce8fda..1194e51ad44542 100644 --- a/clang/test/CodeGen/PowerPC/builtins-ppc-vec-ins-error.c +++ b/clang/test/CodeGen/PowerPC/builtins-ppc-vec-ins-error.c @@ -1,17 +1,17 @@ // REQUIRES: powerpc-registered-target // RUN: %clang_cc1 -flax-vector-conversions=none -target-feature +vsx -target-cpu pwr10 -fsyntax-only \ -// RUN: -triple powerpc64le-unknown-unknown -emit-llvm -ferror-limit 10 %s -verify -D __TEST_ELT_SI +// RUN: -triple powerpc64le-unknown-unknown -emit-llvm -ferror-limit 10 %s -o /dev/null -verify -D __TEST_ELT_SI // RUN: %clang_cc1 -flax-vector-conversions=none -target-feature +vsx -target-cpu pwr10 -fsyntax-only \ -// RUN: -triple powerpc64-unknown-unknown -emit-llvm -ferror-limit 10 %s -verify -D __TEST_ELT_F +// RUN: -triple powerpc64-unknown-unknown -emit-llvm -ferror-limit 10 %s -o /dev/null -verify -D __TEST_ELT_F // RUN: %clang_cc1 -flax-vector-conversions=none -target-feature +vsx -target-cpu pwr10 -fsyntax-only \ -// RUN: -triple powerpc64le-unknown-unknown -emit-llvm -ferror-limit 10 %s -verify -D __TEST_ELT_SLL +// RUN: -triple powerpc64le-unknown-unknown -emit-llvm -ferror-limit 10 %s -o /dev/null -verify -D __TEST_ELT_SLL // RUN: %clang_cc1 -flax-vector-conversions=none -target-feature +vsx -target-cpu pwr10 -fsyntax-only \ -// RUN: -triple powerpc64-unknown-unknown -emit-llvm -ferror-limit 10 %s -verify -D __TEST_ELT_D +// RUN: -triple powerpc64-unknown-unknown -emit-llvm -ferror-limit 10 %s -o /dev/null -verify -D __TEST_ELT_D // RUN: %clang_cc1 -flax-vector-conversions=none -target-feature +vsx -target-cpu pwr10 -fsyntax-only \ -// RUN: -triple powerpc64le-unknown-unknown -emit-llvm -ferror-limit 10 %s -verify -D __TEST_UNALIGNED_UI +// RUN: -triple powerpc64le-unknown-unknown -emit-llvm -ferror-limit 10 %s -o /dev/null -verify -D __TEST_UNALIGNED_UI // RUN: %clang_cc1 -flax-vector-conversions=none -target-feature +vsx -target-cpu pwr10 -fsyntax-only \ -// RUN: -triple powerpc64-unknown-unknown -emit-llvm -ferror-limit 10 %s -verify +// RUN: -triple powerpc64-unknown-unknown -emit-llvm -ferror-limit 10 %s
[clang] [llvm] [test] Avoid writing to a potentially write-protected dir (PR #89242)
https://github.com/karka228 created https://github.com/llvm/llvm-project/pull/89242 These tests just don't check the output written to the current directory. The current directory may be write protected e.g. in a sandboxed environment. Typically one would write `clang -o %t.o` for a writeable dir, but since we only care about stdout/stderr, throw away the output file and just write to /dev/null instead. >From 4cc801e00e80f9727ade71213193e8d5cc5610f8 Mon Sep 17 00:00:00 2001 From: Karl-Johan Karlsson Date: Thu, 18 Apr 2024 16:24:13 +0200 Subject: [PATCH] [test] Avoid writing to a potentially write-protected dir These tests just don't check the output written to the current directory. The current directory may be write protected e.g. in a sandboxed environment. Typically one would write `clang -o %t.o` for a writeable dir, but since we only care about stdout/stderr, throw away the output file and just write to /dev/null instead. --- clang/test/CodeGen/PowerPC/builtins-ppc-htm.c | 2 +- .../PowerPC/builtins-ppc-vec-ins-error.c | 12 +- .../RISCV/riscv-func-attr-target-err.c| 2 +- clang/test/Sema/ppc-attr-target-inline.c | 2 +- clang/test/SemaHLSL/BuiltIns/any-errors.hlsl | 2 +- .../test/SemaHLSL/BuiltIns/clamp-errors.hlsl | 2 +- clang/test/SemaHLSL/BuiltIns/dot-errors.hlsl | 2 +- clang/test/SemaHLSL/BuiltIns/exp-errors.hlsl | 4 ++-- clang/test/SemaHLSL/BuiltIns/frac-errors.hlsl | 2 +- .../BuiltIns/half-float-only-errors.hlsl | 24 +-- .../test/SemaHLSL/BuiltIns/isinf-errors.hlsl | 2 +- clang/test/SemaHLSL/BuiltIns/lerp-errors.hlsl | 2 +- clang/test/SemaHLSL/BuiltIns/mad-errors.hlsl | 2 +- clang/test/SemaHLSL/BuiltIns/pow-errors.hlsl | 2 +- clang/test/SemaHLSL/BuiltIns/rcp-errors.hlsl | 2 +- .../SemaHLSL/BuiltIns/reversebits-errors.hlsl | 2 +- .../test/SemaHLSL/BuiltIns/round-errors.hlsl | 2 +- .../test/SemaHLSL/BuiltIns/rsqrt-errors.hlsl | 2 +- .../MachineVerifier/verify-inlineasmbr.mir| 2 +- 19 files changed, 36 insertions(+), 36 deletions(-) diff --git a/clang/test/CodeGen/PowerPC/builtins-ppc-htm.c b/clang/test/CodeGen/PowerPC/builtins-ppc-htm.c index 51585f27e0bc70..1cdd8c0f40d4c3 100644 --- a/clang/test/CodeGen/PowerPC/builtins-ppc-htm.c +++ b/clang/test/CodeGen/PowerPC/builtins-ppc-htm.c @@ -1,6 +1,6 @@ // REQUIRES: powerpc-registered-target // RUN: %clang_cc1 -target-feature +altivec -target-feature +htm -triple powerpc64-unknown-unknown -emit-llvm %s -o - | FileCheck %s -// RUN: not %clang_cc1 -target-feature +altivec -target-feature -htm -triple powerpc64-unknown-unknown -emit-llvm %s 2>&1 | FileCheck %s --check-prefix=ERROR +// RUN: not %clang_cc1 -target-feature +altivec -target-feature -htm -triple powerpc64-unknown-unknown -emit-llvm %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERROR void test1(long int *r, int code, long int *a, long int *b) { // CHECK-LABEL: define{{.*}} void @test1 diff --git a/clang/test/CodeGen/PowerPC/builtins-ppc-vec-ins-error.c b/clang/test/CodeGen/PowerPC/builtins-ppc-vec-ins-error.c index f5149bf4ce8fda..1194e51ad44542 100644 --- a/clang/test/CodeGen/PowerPC/builtins-ppc-vec-ins-error.c +++ b/clang/test/CodeGen/PowerPC/builtins-ppc-vec-ins-error.c @@ -1,17 +1,17 @@ // REQUIRES: powerpc-registered-target // RUN: %clang_cc1 -flax-vector-conversions=none -target-feature +vsx -target-cpu pwr10 -fsyntax-only \ -// RUN: -triple powerpc64le-unknown-unknown -emit-llvm -ferror-limit 10 %s -verify -D __TEST_ELT_SI +// RUN: -triple powerpc64le-unknown-unknown -emit-llvm -ferror-limit 10 %s -o /dev/null -verify -D __TEST_ELT_SI // RUN: %clang_cc1 -flax-vector-conversions=none -target-feature +vsx -target-cpu pwr10 -fsyntax-only \ -// RUN: -triple powerpc64-unknown-unknown -emit-llvm -ferror-limit 10 %s -verify -D __TEST_ELT_F +// RUN: -triple powerpc64-unknown-unknown -emit-llvm -ferror-limit 10 %s -o /dev/null -verify -D __TEST_ELT_F // RUN: %clang_cc1 -flax-vector-conversions=none -target-feature +vsx -target-cpu pwr10 -fsyntax-only \ -// RUN: -triple powerpc64le-unknown-unknown -emit-llvm -ferror-limit 10 %s -verify -D __TEST_ELT_SLL +// RUN: -triple powerpc64le-unknown-unknown -emit-llvm -ferror-limit 10 %s -o /dev/null -verify -D __TEST_ELT_SLL // RUN: %clang_cc1 -flax-vector-conversions=none -target-feature +vsx -target-cpu pwr10 -fsyntax-only \ -// RUN: -triple powerpc64-unknown-unknown -emit-llvm -ferror-limit 10 %s -verify -D __TEST_ELT_D +// RUN: -triple powerpc64-unknown-unknown -emit-llvm -ferror-limit 10 %s -o /dev/null -verify -D __TEST_ELT_D // RUN: %clang_cc1 -flax-vector-conversions=none -target-feature +vsx -target-cpu pwr10 -fsyntax-only \ -// RUN: -triple powerpc64le-unknown-unknown -emit-llvm -ferror-limit 10 %s -verify -D __TEST_UNALIGNED_UI +// RUN: -triple powerpc64le-unknown-unknown -emit-llvm -ferror-limit 10 %s -o /dev/null -verify -D __TEST_UNALIGNED_UI // RUN: %clang_cc1