[lldb-dev] Need help with failing LLDB tests on Windows

Vadim Chugunov via lldb-dev lldb-dev at lists.llvm.org
Tue Nov 3 18:25:46 PST 2020


Is there _lldb.pyd in D:\src\llvm\build\ninja_dbg\Lib\site-packages\lldb ?

On Tue, Nov 3, 2020 at 4:53 PM Adrian McCarthy via lldb-dev <
lldb-dev at lists.llvm.org> wrote:

> For the past couple weeks, I've been trying to figure out why
> approximately 900+ LLDB tests have been failing for me on my local Windows
> builds.  Bisect turned up nothing--the "good" version that was working for
> me no longer works.  Since nobody else seems to be seeing these failures, I
> suspect it's something environmental.
>
> There are three categories of errors.  I'm currently focused on failures
> that look like this:
>
> FAIL: lldb-api :: lang/objc/unicode-string/TestUnicodeString.py (732 of
>> 2180)
>> ******************** TEST 'lldb-api ::
>> lang/objc/unicode-string/TestUnicodeString.py' FAILED ********************
>> Script:
>> --
>> C:/Program Files/Python38/python.exe
>> D:/src/llvm/llvm-project/lldb\test\API\dotest.py -S nm -u CXXFLAGS -u
>> CFLAGS --enable-crash-dialog --env
>> LLVM_LIBS_DIR=D:/src/llvm/build/ninja_dbg/./lib --arch x86_64 --build-dir
>> D:/src/llvm/build/ninja_dbg/lldb-test-build.noindex -s
>> D:/src/llvm/build/ninja_dbg/lldb-test-traces --lldb-module-cache-dir
>> D:/src/llvm/build/ninja_dbg/lldb-test-build.noindex/module-cache-lldb\lldb-api
>> --clang-module-cache-dir
>> D:/src/llvm/build/ninja_dbg/lldb-test-build.noindex/module-cache-clang\lldb-api
>> --executable D:/src/llvm/build/ninja_dbg/./bin/lldb.exe --compiler
>> D:/src/llvm/build/ninja_dbg/bin/clang.exe --dsymutil
>> D:/src/llvm/build/ninja_dbg/./bin/dsymutil.exe --filecheck
>> D:/src/llvm/build/ninja_dbg/./bin/FileCheck.exe --yaml2obj
>> D:/src/llvm/build/ninja_dbg/./bin/yaml2obj.exe --lldb-libs-dir
>> D:/src/llvm/build/ninja_dbg/./lib
>> D:\src\llvm\llvm-project\lldb\test\API\lang\objc\unicode-string -p
>> TestUnicodeString.py
>> --
>> Exit Code: 1
>>
>> Command Output (stdout):
>> --
>> lldb version 12.0.0 (https://github.com/llvm/llvm-project.git revision
>> 0fdcd1ae1c988fa19d0c97e99999e8678b93a0da)
>>   clang revision 0fdcd1ae1c988fa19d0c97e99999e8678b93a0da
>>   llvm revision 0fdcd1ae1c988fa19d0c97e99999e8678b93a0da
>>
>> --
>> Command Output (stderr):
>> --
>> Traceback (most recent call last):
>>   File "D:\src\llvm\build\ninja_dbg\Lib\site-packages\lldb\__init__.py",
>> line 35, in <module>
>>     import _lldb
>> ModuleNotFoundError: No module named '_lldb'
>>
>> During handling of the above exception, another exception occurred:
>>
>> Traceback (most recent call last):
>>   File "D:/src/llvm/llvm-project/lldb\test\API\dotest.py", line 7, in
>> <module>
>>     lldbsuite.test.run_suite()
>>   File
>> "D:\src\llvm\llvm-project\lldb\packages\Python\lldbsuite\test\dotest.py",
>> line 874, in run_suite
>>     import lldb
>>   File "D:\src\llvm\build\ninja_dbg\Lib\site-packages\lldb\__init__.py",
>> line 38, in <module>
>>     from . import _lldb
>> ImportError: cannot import name '_lldb' from partially initialized module
>> 'lldb' (most likely due to a circular import)
>> (D:\src\llvm\build\ninja_dbg\Lib\site-packages\lldb\__init__.py)
>
>
> It looks like the code in question is generated by Swig (so perhaps it
> depends on the version of Swig?).  The relevant bit seems to be:
>
> try:
>>     # Try an absolute import first.  If we're being loaded from lldb,
>>     # _lldb should be a built-in module.
>>     import _lldb
>> except ImportError:
>>     # Relative import should work if we are being loaded by Python.
>>     from . import _lldb
>
>
> I don't have much background in Python modules or how Swig produces the
> bindings.  It seems suspicious to me that both import attempts are failing
> (and that we need two).  I'm hoping someone can offer some clues about
> what's going on here and how it's supposed to work.  Is the hint about an
> import cycle relevant or a red herring?
>
> Python 3.8.2
> Swig 3.0.12
>
> Thanks,
> Adrian.
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20201103/ee9ce6dd/attachment.html>


More information about the lldb-dev mailing list