From 5bc157443e02d6288ff8ff1162372a3b6e6a2b03 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Mon, 5 Feb 2018 12:34:09 +0000 Subject: TestLinuxCore -- add a check for thread name We've had a bug (fixed by https://reviews.llvm.org/D42828) where the thread name was being read incorrectly. Add a test for this behavior. llvm-svn: 324230 --- .../postmortem/elf-core/TestLinuxCore.py | 29 ++++++++++++++-------- 1 file changed, 19 insertions(+), 10 deletions(-) (limited to 'lldb/packages/Python/lldbsuite') diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py index 63b93340cef..4d41a158069 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py @@ -44,37 +44,43 @@ class LinuxCoreTestCase(TestBase): @skipIf(triple='^mips') def test_i386(self): """Test that lldb can read the process information from an i386 linux core file.""" - self.do_test("linux-i386", self._i386_pid, self._i386_regions) + self.do_test("linux-i386", self._i386_pid, self._i386_regions, "a.out") def test_mips_o32(self): """Test that lldb can read the process information from an MIPS O32 linux core file.""" - self.do_test("linux-mipsel-gnuabio32", self._mips_o32_pid, self._mips_regions) + self.do_test("linux-mipsel-gnuabio32", self._mips_o32_pid, + self._mips_regions, "linux-mipsel-gn") def test_mips_n32(self): """Test that lldb can read the process information from an MIPS N32 linux core file """ - self.do_test("linux-mips64el-gnuabin32", self._mips64_n32_pid, self._mips_regions) + self.do_test("linux-mips64el-gnuabin32", self._mips64_n32_pid, + self._mips_regions, "linux-mips64el-") def test_mips_n64(self): """Test that lldb can read the process information from an MIPS N64 linux core file """ - self.do_test("linux-mips64el-gnuabi64", self._mips64_n64_pid, self._mips_regions) + self.do_test("linux-mips64el-gnuabi64", self._mips64_n64_pid, + self._mips_regions, "linux-mips64el-") @skipIf(oslist=['windows']) @skipIf(triple='^mips') def test_ppc64le(self): """Test that lldb can read the process information from an ppc64le linux core file.""" - self.do_test("linux-ppc64le", self._ppc64le_pid, self._ppc64le_regions) + self.do_test("linux-ppc64le", self._ppc64le_pid, self._ppc64le_regions, + "linux-ppc64le.ou") @skipIf(oslist=['windows']) @skipIf(triple='^mips') def test_x86_64(self): """Test that lldb can read the process information from an x86_64 linux core file.""" - self.do_test("linux-x86_64", self._x86_64_pid, self._x86_64_regions) + self.do_test("linux-x86_64", self._x86_64_pid, self._x86_64_regions, + "a.out") @skipIf(oslist=['windows']) @skipIf(triple='^mips') def test_s390x(self): """Test that lldb can read the process information from an s390x linux core file.""" - self.do_test("linux-s390x", self._s390x_pid, self._s390x_regions) + self.do_test("linux-s390x", self._s390x_pid, self._s390x_regions, + "a.out") @skipIf(oslist=['windows']) @skipIf(triple='^mips') @@ -100,7 +106,8 @@ class LinuxCoreTestCase(TestBase): # works. f.seek(pid_offset) f.write(struct.pack("