Skip to content

Conversation

oontvoo
Copy link
Member

@oontvoo oontvoo commented Sep 15, 2025

[clang][nfc] Fix tests to avoid writing output to unreachable location, which might cause them to fail

@llvmbot llvmbot added clang Clang issues not falling into any other category clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' labels Sep 15, 2025
@llvmbot
Copy link
Member

llvmbot commented Sep 15, 2025

@llvm/pr-subscribers-clang

Author: Vy Nguyen (oontvoo)

Changes

[clang][nfc] Fix tests to avoid writing output to unreachable location, which might cause them to fail


Full diff: https://github.com/llvm/llvm-project/pull/158698.diff

1 Files Affected:

  • (modified) clang/test/Driver/clang_f_opts.c (+2-2)
diff --git a/clang/test/Driver/clang_f_opts.c b/clang/test/Driver/clang_f_opts.c
index eb3994ddabcd3..581b031eb7a86 100644
--- a/clang/test/Driver/clang_f_opts.c
+++ b/clang/test/Driver/clang_f_opts.c
@@ -55,8 +55,8 @@
 // RUN: %clang -### -S -fexperimental-loop-fusion %s 2>&1 | FileCheck -check-prefix=CHECK-FUSE-LOOPS %s
 // CHECK-FUSE-LOOPS: "-fexperimental-loop-fusion"
 //
-// RUN: %clang -c -fexperimental-loop-fusion -mllvm -print-pipeline-passes -O3 %s 2>&1 | FileCheck --check-prefixes=LOOP-FUSION-ON %s
-// RUN: %clang -c -mllvm -print-pipeline-passes -O3 %s 2>&1 | FileCheck --check-prefixes=LOOP-FUSION-OFF %s
+// RUN: %clang -c -fexperimental-loop-fusion -mllvm -print-pipeline-passes -O3 %s -o /dev/null 2>&1 | FileCheck --check-prefixes=LOOP-FUSION-ON %s
+// RUN: %clang -c -mllvm -print-pipeline-passes -O3 %s -o /dev/null 2>&1 | FileCheck --check-prefixes=LOOP-FUSION-OFF %s
 
 // LOOP-FUSION-ON: loop-fusion
 // LOOP-FUSION-OFF-NOT: loop-fusion

@llvmbot
Copy link
Member

llvmbot commented Sep 15, 2025

@llvm/pr-subscribers-clang-driver

Author: Vy Nguyen (oontvoo)

Changes

[clang][nfc] Fix tests to avoid writing output to unreachable location, which might cause them to fail


Full diff: https://github.com/llvm/llvm-project/pull/158698.diff

1 Files Affected:

  • (modified) clang/test/Driver/clang_f_opts.c (+2-2)
diff --git a/clang/test/Driver/clang_f_opts.c b/clang/test/Driver/clang_f_opts.c
index eb3994ddabcd3..581b031eb7a86 100644
--- a/clang/test/Driver/clang_f_opts.c
+++ b/clang/test/Driver/clang_f_opts.c
@@ -55,8 +55,8 @@
 // RUN: %clang -### -S -fexperimental-loop-fusion %s 2>&1 | FileCheck -check-prefix=CHECK-FUSE-LOOPS %s
 // CHECK-FUSE-LOOPS: "-fexperimental-loop-fusion"
 //
-// RUN: %clang -c -fexperimental-loop-fusion -mllvm -print-pipeline-passes -O3 %s 2>&1 | FileCheck --check-prefixes=LOOP-FUSION-ON %s
-// RUN: %clang -c -mllvm -print-pipeline-passes -O3 %s 2>&1 | FileCheck --check-prefixes=LOOP-FUSION-OFF %s
+// RUN: %clang -c -fexperimental-loop-fusion -mllvm -print-pipeline-passes -O3 %s -o /dev/null 2>&1 | FileCheck --check-prefixes=LOOP-FUSION-ON %s
+// RUN: %clang -c -mllvm -print-pipeline-passes -O3 %s -o /dev/null 2>&1 | FileCheck --check-prefixes=LOOP-FUSION-OFF %s
 
 // LOOP-FUSION-ON: loop-fusion
 // LOOP-FUSION-OFF-NOT: loop-fusion

@oontvoo
Copy link
Member Author

oontvoo commented Sep 15, 2025

P.S: Tested locally so merging now

@oontvoo oontvoo merged commit 06f671e into llvm:main Sep 15, 2025
7 of 9 checks passed
@oontvoo oontvoo deleted the fix_test branch September 16, 2025 17:25
oontvoo added a commit to oontvoo/llvm-project that referenced this pull request Sep 16, 2025
…n, which might cause them to fail

Note: this was originally done in (llvm#158698) but was reverted in the pr/158844 (which re-applied the original rev)
oontvoo added a commit that referenced this pull request Sep 16, 2025
#159138)

Note: this was originally done in (#158698) but was reverted in the
pr/158844 (which re-applied the original rev)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants