-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[test] Avoid writing to a potentially write-protected dir #102073
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
@llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang Author: Karl-Johan Karlsson (karka228) ChangesThe tests avx10_2_512minmax-error.c and length-errors.hlsl don't check the output written to the current directory. The current directory may be write protected e.g. in a sandboxed environment. This patch replace the -emit-llvm option with -emit-llvm-only as these testcases don't care about the outputed llvm IR. Full diff: https://github.com/llvm/llvm-project/pull/102073.diff 2 Files Affected:
diff --git a/clang/test/CodeGen/X86/avx10_2_512minmax-error.c b/clang/test/CodeGen/X86/avx10_2_512minmax-error.c
index 15ed7a0b35d82..7a5f6b5b2345c 100644
--- a/clang/test/CodeGen/X86/avx10_2_512minmax-error.c
+++ b/clang/test/CodeGen/X86/avx10_2_512minmax-error.c
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 %s -flax-vector-conversions=none -ffreestanding -triple=x86_64 -target-feature +avx10.2-512 \
-// RUN: -Wno-invalid-feature-combination -emit-llvm -verify
+// RUN: -Wno-invalid-feature-combination -emit-llvm-only -verify
// RUN: %clang_cc1 %s -flax-vector-conversions=none -ffreestanding -triple=i386 -target-feature +avx10.2-512 \
-// RUN: -Wno-invalid-feature-combination -emit-llvm -verify
+// RUN: -Wno-invalid-feature-combination -emit-llvm-only -verify
#include <immintrin.h>
diff --git a/clang/test/SemaHLSL/BuiltIns/length-errors.hlsl b/clang/test/SemaHLSL/BuiltIns/length-errors.hlsl
index fe0046a2ab5a1..8153726367637 100644
--- a/clang/test/SemaHLSL/BuiltIns/length-errors.hlsl
+++ b/clang/test/SemaHLSL/BuiltIns/length-errors.hlsl
@@ -1,4 +1,4 @@
-// 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-only -disable-llvm-passes -verify -verify-ignore-unexpected
void test_too_few_arg()
{
|
@@ -1,4 +1,4 @@ | |||
// 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-only -disable-llvm-passes -verify -verify-ignore-unexpected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably shouldn't have the -emit-llvm flag at all since it isn't actually checking that output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like neither of these tests should be passing -emit-llvm
at all.
@@ -1,7 +1,7 @@ | |||
// RUN: %clang_cc1 %s -flax-vector-conversions=none -ffreestanding -triple=x86_64 -target-feature +avx10.2-512 \ | |||
// RUN: -Wno-invalid-feature-combination -emit-llvm -verify | |||
// RUN: -Wno-invalid-feature-combination -emit-llvm-only -verify |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realized `-emit-llvm is not required here. You can directly removed it. Sorry for mistake.
The test length-errors.hlsl don't check the output written to the current directory. The current directory may be write protected e.g. in a sandboxed environment. This patch remove the -emit-llvm option as these testcases don't care about the outputed llvm IR. Co-authored-by: Chris B <cbieneman@microsoft.com>
When rebasing the patch I removed the fix in avx10_2_512minmax-error.c as it was already fixed in:
|
The test length-errors.hlsl don't check the output written to the current directory. The current directory may be write protected e.g. in a sandboxed environment.
This patch simply remove the -emit-llvm option as this testcase don't care about the outputed llvm IR.