[Lldb-commits] [lldb] 9367b57 - [lldb] [test] Fix qRegisterInfo lldb-server tests to handle missing registers
Michał Górny via lldb-commits
lldb-commits at lists.llvm.org
Mon Nov 23 00:28:39 PST 2020
Author: Michał Górny
Date: 2020-11-23T09:26:23+01:00
New Revision: 9367b57dadb7a8515fa454cb4bb8e4cc45bf57d2
URL: https://github.com/llvm/llvm-project/commit/9367b57dadb7a8515fa454cb4bb8e4cc45bf57d2
DIFF: https://github.com/llvm/llvm-project/commit/9367b57dadb7a8515fa454cb4bb8e4cc45bf57d2.diff
LOG: [lldb] [test] Fix qRegisterInfo lldb-server tests to handle missing registers
Fix qRegisterInfo tests to handle Exx error response when querying
registers that are not supported on the platform in question. This
is how FreeBSD and NetBSD platforms reporting missing registers right
now, and there certainly is value from verifying the remaining
registers.
This change fixes the test for FreeBSD but NetBSD has other regressions
that still need to be researched.
Differential Revision: https://reviews.llvm.org/D91922
Added:
Modified:
lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
Removed:
################################################################################
diff --git a/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py b/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
index 13fe9c3c0398..9fb8cc1892ea 100644
--- a/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
+++ b/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
@@ -585,9 +585,15 @@ def p_returns_correct_data_size_for_each_qRegisterInfo(self):
p_response = context.get("p_response")
self.assertIsNotNone(p_response)
+ # Skip erraneous (unsupported) registers.
+ # TODO: remove this once we make unsupported registers disappear.
+ if p_response.startswith("E") and len(p_response) == 3:
+ continue
+
if "dynamic_size_dwarf_expr_bytes" in reg_info:
self.updateRegInfoBitsize(reg_info, byte_order)
- self.assertEqual(len(p_response), 2 * int(reg_info["bitsize"]) / 8)
+ self.assertEqual(len(p_response), 2 * int(reg_info["bitsize"]) / 8,
+ reg_info)
# Increment loop
reg_index += 1
@@ -601,7 +607,7 @@ def test_p_returns_correct_data_size_for_each_qRegisterInfo_launch_debugserver(
self.set_inferior_startup_launch()
self.p_returns_correct_data_size_for_each_qRegisterInfo()
- @expectedFailureAll(oslist=["freebsd", "netbsd"])
+ @expectedFailureAll(oslist=["netbsd"])
@llgs_test
def test_p_returns_correct_data_size_for_each_qRegisterInfo_launch_llgs(
self):
@@ -619,7 +625,7 @@ def test_p_returns_correct_data_size_for_each_qRegisterInfo_attach_debugserver(
self.set_inferior_startup_attach()
self.p_returns_correct_data_size_for_each_qRegisterInfo()
- @expectedFailureAll(oslist=["freebsd", "netbsd"])
+ @expectedFailureAll(oslist=["netbsd"])
@llgs_test
def test_p_returns_correct_data_size_for_each_qRegisterInfo_attach_llgs(
self):
More information about the lldb-commits
mailing list