From 81b02590d84bc9b5d10143f9759cc36ff80c33ad Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Mon, 18 Feb 2019 15:04:33 +0000 Subject: Fix TestLinuxCore for python3 - dictionaries don't have iteritems() - division returns floats llvm-svn: 354273 --- .../test/functionalities/postmortem/elf-core/TestLinuxCore.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/postmortem') 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 2c25ccc253f..b9ff019153d 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 @@ -2,7 +2,7 @@ Test basics of linux core file debugging. """ -from __future__ import print_function +from __future__ import division, print_function import shutil import struct @@ -190,7 +190,7 @@ class LinuxCoreTestCase(TestBase): values["xmm6"] = "{0xf8 0xf1 0x8b 0x4f 0xf8 0xf1 0x8b 0x4f 0xf8 0xf1 0x8b 0x4f 0xf8 0xf1 0x8b 0x4f}" values["xmm7"] = "{0x13 0xf1 0x30 0xcd 0x13 0xf1 0x30 0xcd 0x13 0xf1 0x30 0xcd 0x13 0xf1 0x30 0xcd}" - for regname, value in values.iteritems(): + for regname, value in values.items(): self.expect("register read {}".format(regname), substrs=["{} = {}".format(regname, value)]) @@ -201,7 +201,7 @@ class LinuxCoreTestCase(TestBase): values["fioff"] = "0x080480cc" - for regname, value in values.iteritems(): + for regname, value in values.items(): self.expect("register read {}".format(regname), substrs=["{} = {}".format(regname, value)]) @expectedFailureAll(bugnumber="llvm.org/pr37371", hostoslist=["windows"]) @@ -260,7 +260,7 @@ class LinuxCoreTestCase(TestBase): # Test an address in the middle of a region returns it's enclosing # region. middle_address = (region.GetRegionBase() + - region.GetRegionEnd()) / 2 + region.GetRegionEnd()) // 2 region_at_middle = lldb.SBMemoryRegionInfo() error = process.GetMemoryRegionInfo( middle_address, region_at_middle) -- cgit v1.2.3