Author: David Spickett Date: 2025-07-03T10:00:50Z New Revision: a17c598145b03a96346e3bdd0fbc20d4e8d69fd5
URL: https://github.com/llvm/llvm-project/commit/a17c598145b03a96346e3bdd0fbc20d4e8d69fd5 DIFF: https://github.com/llvm/llvm-project/commit/a17c598145b03a96346e3bdd0fbc20d4e8d69fd5.diff LOG: [lldb][test] Enable TestExpressionInSyscall.py on Windows Relates to https://github.com/llvm/llvm-project/issues/22139 Just had to use the right win32 call instead of getpid. The original problem was something with expressions in general which was fixed at some point. Also make the test one method, there's no need to split it up. Added: Modified: lldb/test/API/commands/expression/expr-in-syscall/TestExpressionInSyscall.py Removed: ################################################################################ diff --git a/lldb/test/API/commands/expression/expr-in-syscall/TestExpressionInSyscall.py b/lldb/test/API/commands/expression/expr-in-syscall/TestExpressionInSyscall.py index 9f9848912a115..c22987550efa8 100644 --- a/lldb/test/API/commands/expression/expr-in-syscall/TestExpressionInSyscall.py +++ b/lldb/test/API/commands/expression/expr-in-syscall/TestExpressionInSyscall.py @@ -7,16 +7,10 @@ class ExprSyscallTestCase(TestBase): - @expectedFailureAll( - oslist=["windows"], - bugnumber="llvm.org/pr21765, getpid() does not exist on Windows", - ) @expectedFailureNetBSD def test_setpgid(self): self.build() - self.expr_syscall() - def expr_syscall(self): # Create a target by the debugger. target = self.createTestTarget() @@ -65,7 +59,12 @@ def expr_syscall(self): # try evaluating a couple of expressions in this state self.expect_expr("release_flag = 1", result_value="1") - self.expect_expr("(int)getpid()", result_value=str(process.GetProcessID())) + func = ( + "GetCurrentProcessId" + if lldbplatformutil.getPlatform() == "windows" + else "getpid" + ) + self.expect_expr(f"(int){func}()", result_value=str(process.GetProcessID())) # and run the process to completion process.Continue() _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits