diff options
author | Pavel Labath <pavel@labath.sk> | 2019-06-19 08:41:13 +0000 |
---|---|---|
committer | Pavel Labath <pavel@labath.sk> | 2019-06-19 08:41:13 +0000 |
commit | 80b6b705f871953aed3b088ebf6f1c3b3ec8c25b (patch) | |
tree | 8ff563daf5b70be6402b2b13e243ad00f6b75463 /lldb/packages/Python/lldbsuite/test | |
parent | 39263ac5d1339292628201e0b2745a6980208655 (diff) | |
download | bcm5719-llvm-80b6b705f871953aed3b088ebf6f1c3b3ec8c25b.tar.gz bcm5719-llvm-80b6b705f871953aed3b088ebf6f1c3b3ec8c25b.zip |
Stabilize TestGdbRemoteLibrariesSvr4Support
on some systems this test fails because the two methods it uses to
cross-reference the data don't match in the case of the vdso module. The
"read from /proc/%pid/maps" method returns "[vdso]", while the method
which reads it from the linker rendezvous structures returns
"linux-vdso.so.1". Neither of the two names match any actual file.
This restricts the test to only consider the libraries that we ourselves
have added to the test, minimizing the impact of system dependencies
that we cannot control.
llvm-svn: 363772
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py index 2ea268a0569..521a150d8ff 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py @@ -20,6 +20,9 @@ class TestGdbRemoteLibrariesSvr4Support(gdbremote_testcase.GdbRemoteTestCaseBase self.prep_debug_monitor_and_inferior(inferior_env=env) self.continue_process_and_wait_for_stop() + def get_expected_libs(self): + return ["libsvr4lib_a.so", 'libsvr4lib_b".so'] + def has_libraries_svr4_support(self): self.add_qSupported_packets() context = self.expect_gdbremote_sequence() @@ -80,7 +83,8 @@ class TestGdbRemoteLibrariesSvr4Support(gdbremote_testcase.GdbRemoteTestCaseBase xml_root = self.get_libraries_svr4_xml() for child in xml_root: name = child.attrib.get("name") - if not name: + base_name = os.path.basename(name) + if os.path.basename(name) not in self.get_expected_libs(): continue load_addr = int(child.attrib.get("l_addr"), 16) self.reset_test_sequence() @@ -98,8 +102,7 @@ class TestGdbRemoteLibrariesSvr4Support(gdbremote_testcase.GdbRemoteTestCaseBase for child in xml_root: name = child.attrib.get("name") libraries_svr4_names.append(os.path.realpath(name)) - expected_libs = ["libsvr4lib_a.so", 'libsvr4lib_b".so'] - for lib in expected_libs: + for lib in self.get_expected_libs(): self.assertIn(self.getBuildDir() + "/" + lib, libraries_svr4_names) @llgs_test |