i386 test failures test_address_space and test_resident_set_size

Bug #1552690 reported by Corey Bryant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.concurrency
Confirmed
Low
Unassigned
python-oslo.concurrency (Ubuntu)
Triaged
Medium
Unassigned

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)'

description: updated
Revision history for this message
Chuck Short (zulcss) wrote :

This is still an issue in the master branch.

Changed in python-oslo.concurrency (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
ChangBo Guo(gcb) (glongwave) wrote :

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())

Ben Nemec (bnemec)
Changed in oslo.concurrency:
status: New → Confirmed
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.