Skip to content

[LLDB] Mark TestCallStdStringFunction as XPASS on Windows #146835

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 1 commit into from
Jul 3, 2025

Conversation

Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented Jul 3, 2025

#146562 made TestCallStdStringFunction unexpectedly pass on Windows.

The test now passes, because expression str now prints the "raw" string object, which happens to include the string "Hello world". Previously, this resulted in an error:

(lldb) expression str
(std::string) $0 = {
  _Mypair = {
    _Myval2 = {
      _Bx = (_Buf = "Hello world", _Ptr = "", _Alias = "Hello world")
      _Mysize = 11
      _Myres = 15
    }
  }
}
(lldb) type summary add std::string --summary-string "${var._M_dataplus._M_p}"
^^^ previous summary ^^^
(lldb) expression str
(std::string) $1 = error: summary string parsing error

#143177 will eventually add the correct summary for MSVC STL strings.

Relates to #22139

@Nerixyz Nerixyz requested a review from JDevlieghere as a code owner July 3, 2025 08:55
@llvmbot llvmbot added the lldb label Jul 3, 2025
@llvmbot
Copy link
Member

llvmbot commented Jul 3, 2025

@llvm/pr-subscribers-lldb

Author: nerix (Nerixyz)

Changes

#146562 made TestCallStdStringFunction unexpectedly pass on Windows.

The test now passes, because expression str now prints the "raw" string object, which happens to include the string "Hello world". Previously, this resulted in an error:

(lldb) expression str
(std::string) $0 = {
  _Mypair = {
    _Myval2 = {
      _Bx = (_Buf = "Hello world", _Ptr = "", _Alias = "Hello world")
      _Mysize = 11
      _Myres = 15
    }
  }
}
(lldb) type summary add std::string --summary-string "${var._M_dataplus._M_p}"
^^^ previous summary ^^^
(lldb) expression str
(std::string) $1 = error: summary string parsing error

#143177 will eventually add the correct summary for MSVC STL strings.


Full diff: https://github.com/llvm/llvm-project/pull/146835.diff

1 Files Affected:

  • (modified) lldb/test/API/commands/expression/call-function/TestCallStdStringFunction.py (+1-1)
diff --git a/lldb/test/API/commands/expression/call-function/TestCallStdStringFunction.py b/lldb/test/API/commands/expression/call-function/TestCallStdStringFunction.py
index ca2d2d0177eec..bb352b787d72f 100644
--- a/lldb/test/API/commands/expression/call-function/TestCallStdStringFunction.py
+++ b/lldb/test/API/commands/expression/call-function/TestCallStdStringFunction.py
@@ -9,10 +9,10 @@
 
 
 class ExprCommandCallFunctionTestCase(TestBase):
+
     @expectedFailureAll(
         compiler="icc", bugnumber="llvm.org/pr14437, fails with ICC 13.1"
     )
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
     @skipIf(compiler="clang", compiler_version=["<", "9.0"])
     def test_with(self):
         """Test calling std::String member function."""

@Nerixyz
Copy link
Contributor Author

Nerixyz commented Jul 3, 2025

@slydiman I can't add reviewers, but this should fix the buildbot on Windows. I'm also trying to get Windows premerge checks for LLDB working, so this should hopefully be catched earlier.

Copy link

github-actions bot commented Jul 3, 2025

✅ With the latest revision this PR passed the Python code formatter.

@Nerixyz Nerixyz force-pushed the fix/lldb-std-string-fn-xfail branch from d061652 to 293940c Compare July 3, 2025 08:58
@DavidSpickett
Copy link
Collaborator

We saw the same thing on Windows on Arm.

@DavidSpickett DavidSpickett merged commit 94d8231 into llvm:main Jul 3, 2025
9 checks passed
@Nerixyz Nerixyz deleted the fix/lldb-std-string-fn-xfail branch July 3, 2025 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants