Author: Adrian Vogelsgesang
Date: 2022-08-25T17:11:57-07:00
New Revision: 6f88388f61327b375112e76ff4b80741a1b349cb

URL: 
https://github.com/llvm/llvm-project/commit/6f88388f61327b375112e76ff4b80741a1b349cb
DIFF: 
https://github.com/llvm/llvm-project/commit/6f88388f61327b375112e76ff4b80741a1b349cb.diff

LOG: [lldb][test] Fix nullptr test expctation for 32-bit system

Follow-up to https://reviews.llvm.org/D132415

Fixes https://lab.llvm.org/buildbot/#/builders/17/builds/26630

Added: 
    

Modified: 
    lldb/packages/Python/lldbsuite/test/lldbtest.py
    
lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/coroutine_handle/TestCoroutineHandle.py

Removed: 
    


################################################################################
diff  --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py 
b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index 1c090395e6c4c..0d449737cfd0b 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -286,8 +286,12 @@ def check_value(self, test_base, val, error_msg=None):
             test_base.assertEqual(self.expect_name, val.GetName(),
                                   this_error_msg)
         if self.expect_value:
-            test_base.assertEqual(self.expect_value, val.GetValue(),
-                                  this_error_msg)
+            if isinstance(self.expect_value, re.Pattern):
+                test_base.assertRegex(val.GetValue(), self.expect_value,
+                                      this_error_msg)
+            else:
+                test_base.assertEqual(self.expect_value, val.GetValue(),
+                                      this_error_msg)
         if self.expect_type:
             test_base.assertEqual(self.expect_type, val.GetDisplayTypeName(),
                                   this_error_msg)

diff  --git 
a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/coroutine_handle/TestCoroutineHandle.py
 
b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/coroutine_handle/TestCoroutineHandle.py
index 33d580d98df61..50cac6ebff7fd 100644
--- 
a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/coroutine_handle/TestCoroutineHandle.py
+++ 
b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/coroutine_handle/TestCoroutineHandle.py
@@ -63,7 +63,7 @@ def do_test(self, stdlib_type):
         # Check that we still show the remaining data correctly.
         self.expect_expr("gen.hdl",
             result_children=[
-                ValueCheck(name="resume", value = "0x0000000000000000"),
+                ValueCheck(name="resume", value = re.compile("^0x0+$")),
                 ValueCheck(name="destroy", summary = 
test_generator_func_ptr_re),
                 ValueCheck(name="promise", children=[
                     ValueCheck(name="current_value", value = "42"),


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to