llvm-project
llvm-project copied to clipboard
[llvm-lit] Attribute Error in lit internal shell
When using the internal shell with this command LIT_USE_INTERNAL_SHELL=1 an AttributeError is displayed.
Error displayed:
line 1096, in executeScriptInternal
result.command.args[0] == "@echo"
^^^^^^^^^^^^^^^^^^^
AttributeError: 'Seq' object has no attribute 'args'
Fixed this issue by adding the REQUIRES: shell directive because these tests use features that run commands in the background with &, which is not supported with lit's internal shell.
Files with failures in BOLT:
- [x] bolt/test/permission.test
Files with failures in compiler-rt:
- [x] compiler-rt/test/fuzzer/fork-sigusr.test
- [x] compiler-rt/test/fuzzer/merge-sigusr.test
- [x] compiler-rt/test/fuzzer/sigint.test
- [x] compiler-rt/test/fuzzer/sigusr.test
@llvm/issue-subscribers-bolt
Author: None (Harini0924)
The `executeScriptInternal` function in the lit’s `TestRunner.py` needs modification to address an `AttributeError` occurring in multiple test cases, particularly those related to BOLT and libFuzzer. The error indicates that the result.command object, a `Seq` object, is being accessed incorrectly as if it had an args attribute.
Error displayed:
```
line 1096, in executeScriptInternal
result.command.args[0] == "@echo"
^^^^^^^^^^^^^^^^^^^
AttributeError: 'Seq' object has no attribute 'args'
```