Skip to content

[lldb][test] Fix remote Shell tests failures on Windows host #115716

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

Merged
merged 3 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lldb/test/Shell/Commands/command-disassemble-mixed.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// invalid mixed disassembly line

// XFAIL: system-windows
// XFAIL: target-windows

// RUN: %clang_host -g %s -o %t
// RUN: %lldb %t -o "dis -m -n main" -o "exit" | FileCheck %s
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/Shell/Commands/command-expr-diagnostics.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# XFAIL: system-windows
# XFAIL: target-windows
# RUN: echo quit | %lldb -o "expression a+b" \
# RUN: | FileCheck %s --strict-whitespace --check-prefix=CHECK1
# (lldb) expression a+b
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# REQUIRES: system-windows
# REQUIRES: target-windows

## This checks that when starting lldb (or using `target create`) with a
## program name which is on $PATH, or not specify the .exe suffix of a program
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/Shell/Expr/TestAnonNamespaceParamFunc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// linkage. In this case, a function whose argument
// is not legally usable outside this TU.

// XFAIL: system-windows
// XFAIL: target-windows

// RUN: %build %s -o %t
// RUN: %lldb %t -o run -o "expression func(a)" -o exit | FileCheck %s
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/Shell/Expr/TestIRMemoryMapWindows.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# REQUIRES: system-windows
# REQUIRES: target-windows

# RUN: %clang_cl_host /Zi /GS- %p/Inputs/call-function.cpp /c /o %t.obj
# RUN: %msvc_link /debug:full %t.obj /out:%t
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// clang-format off

// REQUIRES: system-windows
// REQUIRES: target-windows
// RUN: %build --compiler=clang-cl -o %t.exe -- %s
// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -o "run" -- write | FileCheck --check-prefix=WRITE %s
// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -o "run" -- read | FileCheck --check-prefix=READ %s
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/Shell/Process/Windows/process_load.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// clang-format off

// REQUIRES: system-windows
// REQUIRES: target-windows
// RUN: %build --compiler=clang-cl -o %t.exe -- %s
// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -o "b main" -o "process launch" -o "process load kernel32.dll" | FileCheck %s

Expand Down
2 changes: 1 addition & 1 deletion lldb/test/Shell/SymbolFile/DWARF/packed.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// XFAIL: system-windows
// XFAIL: target-windows
// RUN: %clangxx_host -gdwarf -o %t %s
// RUN: %lldb %t \
// RUN: -o "expr alignof(packed)" \
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/Shell/SymbolFile/NativePDB/local-variables.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// clang-format off

// REQUIRES: system-windows
// REQUIRES: target-windows
// RUN: %build -o %t.exe -- %s
// RUN: %lldb -f %t.exe -s \
// RUN: %p/Inputs/local-variables.lldbinit 2>&1 | FileCheck %s
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// clang-format off
// REQUIRES: lld, system-windows
// REQUIRES: lld, target-windows

// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
// RUN: %lldb -f %t.exe -s \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
REQUIRES: system-windows, lld, (target-arm || target-aarch64)
REQUIRES: target-windows, lld, (target-arm || target-aarch64)
RUN: %build --compiler=clang-cl --arch=32 --nodefaultlib --output=%t.exe %S/Inputs/CallingConventionsTest.cpp
RUN: %build --compiler=clang-cl --arch=64 --nodefaultlib --output=%t.exe %S/Inputs/CallingConventionsTest.cpp
RUN: lldb-test symbols -dump-ast %t.exe | FileCheck %s
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/Shell/SymbolFile/PDB/class-layout.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
REQUIRES: system-windows, msvc
REQUIRES: target-windows, msvc
RUN: %build --compiler=clang-cl --mode=compile --arch=32 --nodefaultlib --output=%T/ClassLayoutTest.cpp.obj %S/Inputs/ClassLayoutTest.cpp
RUN: %build --compiler=msvc --mode=link --arch=32 --nodefaultlib --output=%T/ClassLayoutTest.cpp.exe %T/ClassLayoutTest.cpp.obj
RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck %s
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/Shell/SymbolFile/PDB/compilands.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
REQUIRES: system-windows, msvc
REQUIRES: target-windows, msvc
RUN: %build --compiler=clang-cl --mode=compile --arch=32 --nodefaultlib --output=%T/CompilandsTest.cpp.obj %S/Inputs/CompilandsTest.cpp
RUN: %build --compiler=msvc --mode=link --arch=32 --nodefaultlib --output=%T/CompilandsTest.cpp.exe %T/CompilandsTest.cpp.obj
RUN: env LLDB_USE_NATIVE_PDB_READER=1 lldb-test symbols %T/CompilandsTest.cpp.exe | FileCheck %s
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/Shell/SymbolFile/PDB/expressions.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
REQUIRES: system-windows, msvc
REQUIRES: target-windows, msvc
RUN: %build --compiler=msvc --nodefaultlib --output=%t.exe %S/Inputs/ExpressionsTest.cpp
RUN: not %lldb -b -s %S/Inputs/ExpressionsTest0.script -s %S/Inputs/ExpressionsTest1.script -s %S/Inputs/ExpressionsTest2.script -- %t.exe 2>&1 | FileCheck %s

Expand Down
2 changes: 1 addition & 1 deletion lldb/test/Shell/SymbolFile/PDB/func-symbols.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
REQUIRES: system-windows, lld
REQUIRES: target-windows, lld
RUN: %build --compiler=clang-cl --arch=32 --nodefaultlib --output=%T/FuncSymbolsTest.exe %S/Inputs/FuncSymbolsTestMain.cpp %S/Inputs/FuncSymbols.cpp
RUN: lldb-test symbols %T/FuncSymbolsTest.exe | FileCheck --check-prefix=CHECK-ONE %s
RUN: lldb-test symbols %T/FuncSymbolsTest.exe | FileCheck --check-prefix=CHECK-TWO %s
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
REQUIRES: system-windows, lld
REQUIRES: target-windows, lld
RUN: %clang_cl_host /c /Zi /Gy %S/Inputs/FunctionLevelLinkingTest.cpp /o %t.obj
RUN: lld-link /debug:full /nodefaultlib /entry:main /order:@%S/Inputs/FunctionLevelLinkingTest.ord %t.obj /out:%t.exe
RUN: env LLDB_USE_NATIVE_PDB_READER=1 lldb-test symbols -verify %t.exe
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/Shell/SymbolFile/PDB/pointers.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
REQUIRES: system-windows, msvc
REQUIRES: target-windows, msvc
RUN: %build --compiler=clang-cl --mode=compile --arch=32 --nodefaultlib --output=%T/PointerTypeTest.cpp.obj %S/Inputs/PointerTypeTest.cpp
RUN: %build --compiler=msvc --mode=link --arch=32 --nodefaultlib --output=%T/PointerTypeTest.cpp.exe %T/PointerTypeTest.cpp.obj
RUN: lldb-test symbols %T/PointerTypeTest.cpp.exe | FileCheck %s
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/Shell/SymbolFile/PDB/type-quals.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
REQUIRES: system-windows, msvc
REQUIRES: target-windows, msvc
RUN: %build --compiler=clang-cl --mode=compile --arch=32 --nodefaultlib --output=%T/TypeQualsTest.cpp.obj %S/Inputs/TypeQualsTest.cpp
RUN: %build --compiler=msvc --mode=link --arch=32 --nodefaultlib --output=%T/TypeQualsTest.cpp.exe %T/TypeQualsTest.cpp.obj
RUN: lldb-test symbols %T/TypeQualsTest.cpp.exe | FileCheck %s
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/Shell/SymbolFile/PDB/udt-layout.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
REQUIRES: system-windows, lld
REQUIRES: target-windows, lld
RUN: %build --compiler=clang-cl --output=%t.exe %S/Inputs/UdtLayoutTest.cpp
RUN: %lldb -b -s %S/Inputs/UdtLayoutTest.script -- %t.exe | FileCheck %s

Expand Down
2 changes: 1 addition & 1 deletion lldb/test/Shell/SymbolFile/PDB/variables-locations.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
REQUIRES: system-windows, lld
REQUIRES: target-windows, lld
RUN: %build --compiler=clang-cl --output=%t.exe %S/Inputs/VariablesLocationsTest.cpp
RUN: %lldb -b -s %S/Inputs/VariablesLocationsTest.script -- %t.exe | FileCheck %s
RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -b -s %S/Inputs/VariablesLocationsTest.script -- %t.exe | FileCheck %s
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/Shell/SymbolFile/PDB/vbases.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
REQUIRES: system-windows, lld
REQUIRES: target-windows, lld
RUN: %build --compiler=clang-cl --output=%t.exe %S/Inputs/VBases.cpp
RUN: %lldb -b -s %S/Inputs/VBases.script -- %t.exe | FileCheck %s

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# REQUIRES: system-windows
# REQUIRES: target-windows

# Checks that dependent modules preloaded by LLDB are not duplicated when the
# process actually loads the DLL.
Expand Down
3 changes: 3 additions & 0 deletions lldb/test/Shell/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@
if re.match(r"^arm(hf.*-linux)|(.*-linux-gnuabihf)", config.target_triple):
config.available_features.add("armhf-linux")

if re.match(r".*-(windows|mingw32)", config.target_triple):
config.available_features.add("target-windows")

if re.match(r".*-(windows-msvc)$", config.target_triple):
config.available_features.add("windows-msvc")

Expand Down
Loading