[Bug 1552690] Re: i386 test failures test_address_space and test_resident_set_size

ChangBo Guo(gcb) glongwave at gmail.com
Tue Jan 10 12:39:27 UTC 2017


seems this related about arch i386 how to represent integer, need find a
way to handle integer and long on Python 3.

I have no i386 machine to test, Can you try the fix as following:

diff --git a/oslo_concurrency/tests/unit/test_processutils.py b/oslo_concurrency/tests/unit/test_processutils.py
index 9227ea1..448511f 100644
--- a/oslo_concurrency/tests/unit/test_processutils.py
+++ b/oslo_concurrency/tests/unit/test_processutils.py
@@ -794,7 +794,7 @@ class PrlimitTestCase(test_base.BaseTestCase):
                          'print(resource.getrlimit(resource.%s))' % resource))
         args = [sys.executable, '-c', code]
         stdout, stderr = processutils.execute(*args, prlimit=prlimit)
-        expected = (value, value)
+        expected = (int(value), int(value))
         self.assertEqual(str(expected), stdout.rstrip())

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to python-oslo.concurrency in Ubuntu.
https://bugs.launchpad.net/bugs/1552690

Title:
  i386 test failures test_address_space and test_resident_set_size

Status in oslo.concurrency:
  New
Status in python-oslo.concurrency package in Ubuntu:
  Triaged

Bug description:
  These tests fail on i386:

  ======================================================================
  FAIL: oslo_concurrency.tests.unit.test_processutils.PrlimitTestCase.test_address_space
  oslo_concurrency.tests.unit.test_processutils.PrlimitTestCase.test_address_space
  ----------------------------------------------------------------------
  _StringException: Empty attachments:
    stderr

  Traceback (most recent call last):
    File "oslo_concurrency/tests/unit/test_processutils.py", line 793, in test_address_space
      self.check_limit(prlimit, 'RLIMIT_AS', prlimit.address_space)
    File "oslo_concurrency/tests/unit/test_processutils.py", line 789, in check_limit
      self.assertEqual(stdout.rstrip(), str(expected))
    File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 350, in assertEqual
      self.assertThat(observed, matcher, message)
    File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 435, in assertThat
      raise mismatch_error
  testtools.matchers._impl.MismatchError: '(1073741824L, 1073741824L)' != '(1073741824, 1073741824)'

  ======================================================================
  FAIL: oslo_concurrency.tests.unit.test_processutils.PrlimitTestCase.test_resident_set_size
  oslo_concurrency.tests.unit.test_processutils.PrlimitTestCase.test_resident_set_size
  ----------------------------------------------------------------------
  _StringException: Empty attachments:
    stderr

  Traceback (most recent call last):
    File "oslo_concurrency/tests/unit/test_processutils.py", line 798, in test_resident_set_size
      self.check_limit(prlimit, 'RLIMIT_RSS', max_memory)
    File "oslo_concurrency/tests/unit/test_processutils.py", line 789, in check_limit
      self.assertEqual(stdout.rstrip(), str(expected))
    File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 350, in assertEqual
      self.assertThat(observed, matcher, message)
    File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 435, in assertThat
      raise mismatch_error
  testtools.matchers._impl.MismatchError: '(1073741824L, 1073741824L)' != '(1073741824, 1073741824)'

To manage notifications about this bug go to:
https://bugs.launchpad.net/oslo.concurrency/+bug/1552690/+subscriptions



More information about the Ubuntu-openstack-bugs mailing list