diff options
author | Pavel Labath <labath@google.com> | 2018-03-26 12:00:52 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2018-03-26 12:00:52 +0000 |
commit | 5af3fb2b94bf21c0be40da03302e7169bc7d61a3 (patch) | |
tree | 3e5eb2d2b6a9aa210fb9fcf1673e99d0f79aacb1 /lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py | |
parent | a057877a2eba15dabde61e9c265be9026313fe4d (diff) | |
download | bcm5719-llvm-5af3fb2b94bf21c0be40da03302e7169bc7d61a3.tar.gz bcm5719-llvm-5af3fb2b94bf21c0be40da03302e7169bc7d61a3.zip |
[LLDB][PPC64] Fix TestGdbRemoteAuxvSupport
Summary: PPC64's auxvec has a special key that must be ignored.
Reviewers: clayborg, labath
Reviewed By: clayborg, labath
Subscribers: alexandreyy, lbianc
Differential Revision: https://reviews.llvm.org/D43771
Patch by Leandro Lupori <leandro.lupori@gmail.com>.
llvm-svn: 328486
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py index 4dbf6428b91..b7c53c17901 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py @@ -1077,6 +1077,18 @@ class GdbRemoteTestCaseBase(TestBase): auxv_dict = {} + # PowerPC64le's auxvec has a special key that must be ignored. + # This special key may be used multiple times, resulting in + # multiple key/value pairs with the same key, which would otherwise + # break this test check for repeated keys. + # + # AT_IGNOREPPC = 22 + ignored_keys_for_arch = { 'powerpc64le' : [22] } + arch = self.getArchitecture() + ignore_keys = None + if arch in ignored_keys_for_arch: + ignore_keys = ignored_keys_for_arch[arch] + while len(auxv_data) > 0: # Chop off key. raw_key = auxv_data[:word_size] @@ -1090,6 +1102,9 @@ class GdbRemoteTestCaseBase(TestBase): key = unpack_endian_binary_string(endian, raw_key) value = unpack_endian_binary_string(endian, raw_value) + if ignore_keys and key in ignore_keys: + continue + # Handle ending entry. if key == 0: self.assertEqual(value, 0) |