[PATCH] D121662: [WIP][WebAssembly] Add end-to-end codegen tests for wasm_simd128.h

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 16 01:05:25 PDT 2022


jhenderson added a comment.

In D121662#3383307 <https://reviews.llvm.org/D121662#3383307>, @tlively wrote:

> Right now (after trying to upgrade my gdb) I get this error
>
>   $ bin/llvm-lit ~/code/llvm-project/cross-project-tests/intrinsic-header-tests/wasm_simd128.c
>   ...
>   llvm-lit: /usr/local/google/home/tlively/code/llvm-project/llvm/utils/lit/lit/TestingConfig.py:103: fatal: unable to parse config file '/usr/local/google/home/tlively/code/llvm-project/cross-project-tests/lit.cfg.py', traceback: Traceback (most recent call last):
>     File "/usr/local/google/home/tlively/code/llvm-project/llvm/utils/lit/lit/TestingConfig.py", line 92, in load_from_path
>       exec(compile(data, path, 'exec'), cfg_globals, None)
>     File "/usr/local/google/home/tlively/code/llvm-project/cross-project-tests/lit.cfg.py", line 249, in <module>
>       if StrictVersion(gdb_version_string) < StrictVersion('10.1'):
>     File "/usr/lib/python3.9/distutils/version.py", line 40, in __init__
>       self.parse(vstring)
>     File "/usr/lib/python3.9/distutils/version.py", line 137, in parse
>       raise ValueError("invalid version number '%s'" % vstring)
>   ValueError: invalid version number '10.1.90.20210103'

This SO answer states that StrictVersion is undocumented (https://stackoverflow.com/a/11887885), and should be avoided in favour of something else. I'm inclined to agree, although don't have a clear answer as to what that something else should be. The docstrings (https://github.com/python/cpython/blob/main/Lib/distutils/version.py) of StrictVersion require the version number to be made up of exactly 2 or 3 components, which that gdb docstring does not conform to. I think you're going to need to fix this part of the config to resolve this, to do the version check some other way (LooseVersion should be sufficient, although that is as undocumented as StrictVersion).

> Before trying to upgrade my gdb, I had run this command:
>
>   $ ninja check-intrinsic-headers
>   [0/1] Running intrinsic header tests
>   ...
>   XFAIL some tests: use gdb version >= 10.1 to restore test coverage
>   
>   Testing Time: 0.04s
>     Unsupported: 1
>
> So aside from the problems with my invalid gdb version string, it looks like my test is still accidentally depending on having the correct gdb version.

I don't think so: that "XFAIL some tests" message is to do with gdb versions, and not to do with the individual tests being run (see the code around here https://github.com/llvm/llvm-project/blob/989f1c72e0f4236ac35a35cc9998ea34bc62d5cd/cross-project-tests/lit.cfg.py#L253). Your test is probably UNSUPPORTED for other reasons. If you run `llvm-lit -a` on the test directly, rather than via a check target, you'll be told what the reason for it being marked UNSUPPORTED is. My expectation is that `webassembly-registered-target` is not an available feature. This is because the `*-registered-targets` features are part of the main llvm/test (and equivalent clang/test etc) lit.cfg.py, not a part of lit itself. Consequently, such features don't exist within other projects automatically. You'll see code like https://github.com/llvm/llvm-project/blob/bab468f2536219ec824a2b6fe959fcaa7abf5685/llvm/test/lit.cfg.py#L201 in llvm/test/lit.cfg.py to enable it. You will need to add this to the cross-project-tests lit.cfg.py to get these features.

Hope that helps.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121662/new/

https://reviews.llvm.org/D121662



More information about the llvm-commits mailing list