[llvm] [llvm][test][NFCI] Use absolute build path instead of a relative path (PR #159126)

Michał Górny via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 19 23:59:48 PDT 2025


mgorny wrote:

This change introduced test failures for me:

```
FAIL: LLVM :: Other/codegen-plugin-loading.ll (41910 of 62452)
******************** TEST 'LLVM :: Other/codegen-plugin-loading.ll' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/var/tmp/portage/llvm-core/llvm-22.0.0.9999/work/llvm_build-.arm64/bin/llc -load %llvm_obj_root/unittests/CodeGen/CGPluginTest/CGTestPlugin.so /var/tmp/portage/llvm-core/llvm-22.0.0.9999/work/llvm/test/Other/codegen-plugin-loading.ll -o - | /var/tmp/portage/llvm-core/llvm-22.0.0.9999/work/llvm_build-.arm64/bin/FileCheck /var/tmp/portage/llvm-core/llvm-22.0.0.9999/work/llvm/test/Other/codegen-plugin-loading.ll
# executed command: /var/tmp/portage/llvm-core/llvm-22.0.0.9999/work/llvm_build-.arm64/bin/llc -load %llvm_obj_root/unittests/CodeGen/CGPluginTest/CGTestPlugin.so /var/tmp/portage/llvm-core/llvm-22.0.0.9999/work/llvm/test/Other/codegen-plugin-loading.ll -o -
# .---command stderr------------
# | Error opening '%llvm_obj_root/unittests/CodeGen/CGPluginTest/CGTestPlugin.so': %llvm_obj_root/unittests/CodeGen/CGPluginTest/CGTestPlugin.so: cannot open shared object file: No such file or directory
# |   -load request ignored.
# `-----------------------------
# executed command: /var/tmp/portage/llvm-core/llvm-22.0.0.9999/work/llvm_build-.arm64/bin/FileCheck /var/tmp/portage/llvm-core/llvm-22.0.0.9999/work/llvm/test/Other/codegen-plugin-loading.ll
# .---command stderr------------
# | /var/tmp/portage/llvm-core/llvm-22.0.0.9999/work/llvm/test/Other/codegen-plugin-loading.ll:4:10: error: CHECK: expected string not found in input
# | ; CHECK: CodeGen Test Pass running on main
# |          ^
# | <stdin>:1:1: note: scanning from here
# |  .file "codegen-plugin-loading.ll"
# | ^
# | <stdin>:3:12: note: possible intended match here
# |  .globl main // -- Begin function main
# |            ^
# | 
# | Input file: <stdin>
# | Check file: /var/tmp/portage/llvm-core/llvm-22.0.0.9999/work/llvm/test/Other/codegen-plugin-loading.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |            1:  .file "codegen-plugin-loading.ll" 
# | check:4'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# |            2:  .text 
# | check:4'0     ~~~~~~~
# |            3:  .globl main // -- Begin function main 
# | check:4'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:4'1                ?                            possible intended match
# |            4:  .p2align 2 
# | check:4'0     ~~~~~~~~~~~~
# |            5:  .type main, at function 
# | check:4'0     ~~~~~~~~~~~~~~~~~~~~~~
# |            6: main: // @main 
# | check:4'0     ~~~~~~~~~~~~~~~
# |            7:  .cfi_startproc 
# | check:4'0     ~~~~~~~~~~~~~~~~
# |            8: // %bb.0: 
# | check:4'0     ~~~~~~~~~~
# |            .
# |            .
# |            .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

********************
```

My educated guess is that `%llvm_obj_root` is not in `config.substitutions`.

https://github.com/llvm/llvm-project/pull/159126


More information about the llvm-commits mailing list