Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLDB API tests in lang/swift/async/tasks fail on Windows #9887

Open
weliveindetail opened this issue Jan 27, 2025 · 5 comments
Open

LLDB API tests in lang/swift/async/tasks fail on Windows #9887

weliveindetail opened this issue Jan 27, 2025 · 5 comments

Comments

@weliveindetail
Copy link
Member

Affected tests were added recently:
#9840 added TestSwiftTaskSelect.py
#9845 added TestSwiftTaskBacktrace.py

Test inferiors fail to build with:

<unknown>:0: error: unknown argument: '-gdwarf'

All other tests in lang/swift/async show up as unsupported:

UNSUPPORTED: lldb-api :: lang/swift/async/expr/TestSwiftAsyncExpressions.py (970 of 2238)
UNSUPPORTED: lldb-api :: lang/swift/async/async_fnargs/TestSwiftAsyncFnArgs.py (972 of 2238)
UNSUPPORTED: lldb-api :: lang/swift/async/frame/variable/TestSwiftAsyncFrameVar.py (974 of 2238)
UNSUPPORTED: lldb-api :: lang/swift/async/frame/language_specific_data/TestSwiftAsyncLanguageSpecificData.py (975 of 2238)
UNSUPPORTED: lldb-api :: lang/swift/async/formatters/task/TestSwiftTaskSyntheticProvider.py (976 of 2238)
UNSUPPORTED: lldb-api :: lang/swift/async/stepping/step-in/task-switch/TestSwiftTaskSwitch.py (977 of 2238)
UNSUPPORTED: lldb-api :: lang/swift/async/frame/variables_multiple_frames/TestSwiftAsyncFrameVarMultipleFrames.py (978 of 2238)
UNSUPPORTED: lldb-api :: lang/swift/async/stepping/step_out/TestSteppingOutAsync.py (980 of 2238)
UNSUPPORTED: lldb-api :: lang/swift/async/stepping/step_over/TestSwiftAsyncStepOver.py (981 of 2238)
UNSUPPORTED: lldb-api :: lang/swift/async/stepping/step-in/TestSwiftStepInAsync.py (982 of 2238)
UNSUPPORTED: lldb-api :: lang/swift/async/stepping/step_over_asynclet/TestSwiftAsyncStepOverAsyncLet.py (983 of 2238)
UNSUPPORTED: lldb-api :: lang/swift/async/unwind/backtrace_locals/TestSwiftAsyncBacktraceLocals.py (984 of 2238)
UNSUPPORTED: lldb-api :: lang/swift/async/unwind/hidden_frames/TestSwiftAsyncHiddenFrames.py (985 of 2238)
UNSUPPORTED: lldb-api :: lang/swift/async/unwind/unwind_in_all_instructions/TestSwiftAsyncUnwindAllInstructions.py (986 of 2238)
UNSUPPORTED: lldb-api :: lang/swift/async/unwind/short_unwind/TestSwiftShortAsyncUnwind.py (987 of 2238)
UNSUPPORTED: lldb-api :: lang/swift/async/unwind/sayhello/TestSwiftAsyncUnwind.py (988 of 2238)
UNSUPPORTED: lldb-api :: lang/swift/async/variables/TestSwiftAsyncVariables.py (989 of 2238)

Full error log:

******************** TEST 'lldb-api :: lang/swift/async/tasks/TestSwiftTaskSelect.py' FAILED ********************
Script:
--
T:/PythonAMD64-3.9.10/tools/python.exe C:/Users/swift-ci/jenkins/workspace/swift-PR-windows/llvm-project/lldb\test\API\dotest.py -u CXXFLAGS -u CFLAGS --inferior-env DYLD_LIBRARY_PATH="T:/5/./lib/swift/macosx:T:/5/./lib/lldb/clang/lib/darwin" --inferior-env LD_LIBRARY_PATH="T:/5/./lib/swift/AMD64" --inferior-env SIMCTL_CHILD_DYLD_LIBRARY_PATH="T:/5/./lib/swift/macosx" --env OBJCOPY=T:/5/./bin/llvm-objcopy.exe --env LLVM_LIBS_DIR=T:/5/./lib --env LLDB_LIBS_DIR=T:/5/./lib --env LLVM_INCLUDE_DIR=T:/5/include --env LLVM_TOOLS_DIR=T:/5/./bin --arch x86_64 --build-dir T:/5/lldb-test-build.noindex --lldb-module-cache-dir T:/5/lldb-test-build.noindex/module-cache-lldb\lldb-api --clang-module-cache-dir T:/5/lldb-test-build.noindex/module-cache-clang\lldb-api --swift-libs-dir T:/5/./lib/swift --executable T:/5/./bin/lldb.exe --compiler T:/5/./bin/clang.exe --swift-compiler T:/5/bin/swiftc --dsymutil T:/5/./bin/dsymutil.exe --make T:/GnuWin32Make-4.4.1/bin/make.exe --llvm-tools-dir T:/5/./bin --lldb-obj-root T:/5/tools/lldb --lldb-libs-dir T:/5/./lib --skip-category=swiftmaccatalyst --skip-category=watchpoint C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\llvm-project\lldb\test\API\lang\swift\async\tasks -p TestSwiftTaskSelect.py
--
Exit Code: 1
Command Output (stdout):
--
lldb version 19.1.5
Swift version 6.2-dev (LLVM 578d2a23bdb9c81, Swift ecfc2efd5548db2)
==== LLDB swift-healthcheck log. ===
This file contains the configuration of LLDB's embedded Swift compiler to help diagnosing module import and search path issues. The swift-healthcheck command is meant to be run *after* an error has occurred.
lldb version 19.1.5
Swift version 6.2-dev (LLVM 578d2a23bdb9c81, Swift ecfc2efd5548db2)
Skipping the following test categories: ['frame-diagnose', 'swiftmaccatalyst', 'watchpoint', 'libc++', 'libstdcxx', 'dwo', 'dsym', 'gmodules', 'debugserver', 'objc', 'fork', 'pexpect']
==== LLDB swift-healthcheck log. ===
This file contains the configuration of LLDB's embedded Swift compiler to help diagnosing module import and search path issues. The swift-healthcheck command is meant to be run *after* an error has occurred.
lldb version 19.1.5
Swift version 6.2-dev (LLVM 578d2a23bdb9c81, Swift ecfc2efd5548db2)
--
Command Output (stderr):
--
UNSUPPORTED: LLDB (T:\5\bin\clang.exe-x86_64) :: test_backtrace_selected_task_dsym (TestSwiftTaskSelect.TestCase) (test case does not fall in any category of interest for this run) 
FAIL: LLDB (T:\5\bin\clang.exe-x86_64) :: test_backtrace_selected_task_dwarf (TestSwiftTaskSelect.TestCase)
UNSUPPORTED: LLDB (T:\5\bin\clang.exe-x86_64) :: test_backtrace_selected_task_dwo (TestSwiftTaskSelect.TestCase) (test case does not fall in any category of interest for this run) 
UNSUPPORTED: LLDB (T:\5\bin\clang.exe-x86_64) :: test_navigate_selected_task_stack_dsym (TestSwiftTaskSelect.TestCase) (test case does not fall in any category of interest for this run) 
FAIL: LLDB (T:\5\bin\clang.exe-x86_64) :: test_navigate_selected_task_stack_dwarf (TestSwiftTaskSelect.TestCase)
UNSUPPORTED: LLDB (T:\5\bin\clang.exe-x86_64) :: test_navigate_selected_task_stack_dwo (TestSwiftTaskSelect.TestCase) (test case does not fall in any category of interest for this run) 
======================================================================
ERROR: test_backtrace_selected_task_dwarf (TestSwiftTaskSelect.TestCase)
----------------------------------------------------------------------
Error when building test subject.

Build Command:
T:/GnuWin32Make-4.4.1/bin/make.exe 'VPATH=C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\llvm-project\lldb\test\API\lang\swift\async\tasks' -C 'T:\5\lldb-test-build.noindex\lang\swift\async\tasks\TestSwiftTaskSelect.test_backtrace_selected_task_dwarf' -I 'C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\llvm-project\lldb\test\API\lang\swift\async\tasks' -I 'C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\llvm-project\lldb\packages\Python\lldbsuite\test\make' -f 'C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\llvm-project\lldb\test\API\lang\swift\async\tasks\Makefile' MAKE_DSYM=NO all ARCH=x86_64 'CC="T:\5\bin\clang.exe"' 'SWIFTC="T:/5/bin/swiftc"' 'PYTHON="T:\PythonAMD64-3.9.10\tools\python.exe"' 'CLANG_MODULE_CACHE_DIR=T:/5/lldb-test-build.noindex/module-cache-clang\lldb-api' SWIFT_LIBS_DIR=T:/5/./lib/swift LLDB_OBJ_ROOT=T:/5/tools/lldb OS=Windows_NT HOST_OS=Windows_NT

Build Command Output:
make: Entering directory 'T:/5/lldb-test-build.noindex/lang/swift/async/tasks/TestSwiftTaskSelect.test_backtrace_selected_task_dwarf'
"### Generating output file map"
"T:\PythonAMD64-3.9.10\tools\python.exe" C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\llvm-project\lldb\packages\Python\lldbsuite\test\make/gen-output-map.py C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\llvm-project\lldb\test\API\lang\swift\async\tasks/main.swift T:\5\lldb-test-build.noindex\lang\swift\async\tasks\TestSwiftTaskSelect.test_backtrace_selected_task_dwarf/main.swift.o >T:\5\lldb-test-build.noindex\lang\swift\async\tasks\TestSwiftTaskSelect.test_backtrace_selected_task_dwarf/a-output-file-map.json
"### Compiling" C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\llvm-project\lldb\test\API\lang\swift\async\tasks/main.swift
"### Swift driver expanded incovation will be:"
"T:/5/bin/swiftc" -emit-object C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\llvm-project\lldb\test\API\lang\swift\async\tasks/main.swift -output-file-map T:\5\lldb-test-build.noindex\lang\swift\async\tasks\TestSwiftTaskSelect.test_backtrace_selected_task_dwarf/a-output-file-map.json \
  -gdwarf -Onone -Xfrontend -serialize-debugging-options -parse-as-library   -module-cache-path T:/5/lldb-test-build.noindex/module-cache-clang\lldb-api -tools-directory "T:\5\bin"   \
  -module-name a \
          -emit-module-path T:\5\lldb-test-build.noindex\lang\swift\async\tasks\TestSwiftTaskSelect.test_backtrace_selected_task_dwarf/a.swiftmodule \
  -emit-module-interface-path T:\5\lldb-test-build.noindex\lang\swift\async\tasks\TestSwiftTaskSelect.test_backtrace_selected_task_dwarf/a.swiftinterface -###
<unknown>:0: warning: using (deprecated) legacy driver, Swift installation does not contain swift-driver at: 'C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\build\5\bin\swift-driver-new.exe'
<unknown>:0: error: unknown argument: '-gdwarf'
make: *** [Swift.rules:184: main.swift.o] Error 1
make: Leaving directory 'T:/5/lldb-test-build.noindex/lang/swift/async/tasks/TestSwiftTaskSelect.test_backtrace_selected_task_dwarf'

Test Directory:
C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\llvm-project\lldb\test\API\lang\swift\async\tasks
======================================================================
ERROR: test_navigate_selected_task_stack_dwarf (TestSwiftTaskSelect.TestCase)
----------------------------------------------------------------------
Error when building test subject.

Build Command:
T:/GnuWin32Make-4.4.1/bin/make.exe 'VPATH=C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\llvm-project\lldb\test\API\lang\swift\async\tasks' -C 'T:\5\lldb-test-build.noindex\lang\swift\async\tasks\TestSwiftTaskSelect.test_navigate_selected_task_stack_dwarf' -I 'C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\llvm-project\lldb\test\API\lang\swift\async\tasks' -I 'C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\llvm-project\lldb\packages\Python\lldbsuite\test\make' -f 'C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\llvm-project\lldb\test\API\lang\swift\async\tasks\Makefile' MAKE_DSYM=NO all ARCH=x86_64 'CC="T:\5\bin\clang.exe"' 'SWIFTC="T:/5/bin/swiftc"' 'PYTHON="T:\PythonAMD64-3.9.10\tools\python.exe"' 'CLANG_MODULE_CACHE_DIR=T:/5/lldb-test-build.noindex/module-cache-clang\lldb-api' SWIFT_LIBS_DIR=T:/5/./lib/swift LLDB_OBJ_ROOT=T:/5/tools/lldb OS=Windows_NT HOST_OS=Windows_NT

Build Command Output:
make: Entering directory 'T:/5/lldb-test-build.noindex/lang/swift/async/tasks/TestSwiftTaskSelect.test_navigate_selected_task_stack_dwarf'
"### Generating output file map"
"T:\PythonAMD64-3.9.10\tools\python.exe" C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\llvm-project\lldb\packages\Python\lldbsuite\test\make/gen-output-map.py C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\llvm-project\lldb\test\API\lang\swift\async\tasks/main.swift T:\5\lldb-test-build.noindex\lang\swift\async\tasks\TestSwiftTaskSelect.test_navigate_selected_task_stack_dwarf/main.swift.o >T:\5\lldb-test-build.noindex\lang\swift\async\tasks\TestSwiftTaskSelect.test_navigate_selected_task_stack_dwarf/a-output-file-map.json
"### Compiling" C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\llvm-project\lldb\test\API\lang\swift\async\tasks/main.swift
"### Swift driver expanded incovation will be:"
"T:/5/bin/swiftc" -emit-object C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\llvm-project\lldb\test\API\lang\swift\async\tasks/main.swift -output-file-map T:\5\lldb-test-build.noindex\lang\swift\async\tasks\TestSwiftTaskSelect.test_navigate_selected_task_stack_dwarf/a-output-file-map.json \
  -gdwarf -Onone -Xfrontend -serialize-debugging-options -parse-as-library   -module-cache-path T:/5/lldb-test-build.noindex/module-cache-clang\lldb-api -tools-directory "T:\5\bin"   \
  -module-name a \
          -emit-module-path T:\5\lldb-test-build.noindex\lang\swift\async\tasks\TestSwiftTaskSelect.test_navigate_selected_task_stack_dwarf/a.swiftmodule \
  -emit-module-interface-path T:\5\lldb-test-build.noindex\lang\swift\async\tasks\TestSwiftTaskSelect.test_navigate_selected_task_stack_dwarf/a.swiftinterface -###
<unknown>:0: warning: using (deprecated) legacy driver, Swift installation does not contain swift-driver at: 'C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\build\5\bin\swift-driver-new.exe'
<unknown>:0: error: unknown argument: '-gdwarf'
make: *** [Swift.rules:184: main.swift.o] Error 1
make: Leaving directory 'T:/5/lldb-test-build.noindex/lang/swift/async/tasks/TestSwiftTaskSelect.test_navigate_selected_task_stack_dwarf'

Test Directory:
C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\llvm-project\lldb\test\API\lang\swift\async\tasks
----------------------------------------------------------------------
Ran 6 tests in 2.974s

FAILED (errors=2, skipped=4)

--
********************
@weliveindetail
Copy link
Member Author

Next candidate: #9875

@kastiglione
Copy link

kastiglione commented Jan 27, 2025

I can add a decorator to disable those tests when run on Windows. I'm not familiar with the -gdwarf root of this problem. I'll see what I can find out.

@kastiglione
Copy link

It looks like -gdwarf is coming from this section of Makefile.rules. It's unclear to me why this is a problem specific to the new tests I added.

# If the OS is Windows, we need to pass -gdwarf to clang, otherwise it will build
# with codeview by default but all the tests rely on dwarf.
ifeq "$(OS)" "Windows_NT"
        DEBUG_INFO_FLAG ?= -gdwarf
endif

@weliveindetail
Copy link
Member Author

Thanks. Not clear to me either. Maybe I find the time to investigate soon. Adding a note to your next PR.

@compnerd
Copy link
Member

It is likely a problem because -gdwarf is a clang flag, not a swift flag. The spelling for that is -Xfrontend -debug-info-format -Xfrontend dwarf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants