Title: assertGdbRepr depends on hash randomization / endianess
Type: behavior Stage: needs patch
Components: Tests Versions: Python 3.4
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, dmalcolm, pitrou, vstinner
Priority: normal Keywords: buildbot

Created on 2013-10-31 18:53 by christian.heimes, last changed 2014-05-22 21:55 by skrah.

Messages (5)
msg201841 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-10-31 18:53
I'm seeing some unrelated test failures on PPC Linux (big endian) in my PEP-456 branch.

FAIL: test_frozensets (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of frozensets
Traceback (most recent call last):
  File "/home/shager/cpython-buildarea/custom.edelsohn-powerlinux-ppc64/build/Lib/test/", line 331, in test_frozensets
    self.assertGdbRepr(frozenset(['a', 'b']), "frozenset({'a', 'b'})")
  File "/home/shager/cpython-buildarea/custom.edelsohn-powerlinux-ppc64/build/Lib/test/", line 231, in assertGdbRepr
    % (gdb_repr, exp_repr, gdb_output)))
AssertionError: "frozenset({'b', 'a'})" != "frozenset({'a', 'b'})"
- frozenset({'b', 'a'})
?             ^    ^
+ frozenset({'a', 'b'})
?             ^    ^

FAIL: test_sets (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of sets
Traceback (most recent call last):
  File "/home/shager/cpython-buildarea/custom.edelsohn-powerlinux-ppc64/build/Lib/test/", line 316, in test_sets
    self.assertGdbRepr(set(['a', 'b']), "{'a', 'b'}")
  File "/home/shager/cpython-buildarea/custom.edelsohn-powerlinux-ppc64/build/Lib/test/", line 231, in assertGdbRepr
    % (gdb_repr, exp_repr, gdb_output)))
AssertionError: "{'b', 'a'}" != "{'a', 'b'}"
- {'b', 'a'}
+ {'a', 'b'}
msg206737 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2013-12-21 14:05
Also on System Z:

Setting priority to "normal", since it's the only test failing on
System Z and generally green buildbots are more useful.
msg206740 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-12-21 14:08
Oh, I didn't notice this issue. I created the duplicate #19753 and I did some changes to try to fix it.
msg206742 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-12-21 14:10
When trying to workaround a bug in the implementation of the PEP 456 (which was not known as a bug at this time), I implemented something using subprocessing which may be reused on SystemZ (or maybe on all platforms):

changeset:   87290:11cb1c8faf11
user:        Victor Stinner <>
date:        Wed Nov 20 12:27:48 2013 +0100
files:       Lib/test/
Issue #19183: Fix repr() tests of test_gdb, hash() is now platform dependent
msg206772 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-12-21 19:41

This is a different issue than the one reported here.

I'm not seeing any recent failures on "PPC64 PowerLinux 3.x". Christian, can we close?
Date User Action Args
2014-05-22 21:55:29skrahsetnosy: - skrah
2013-12-21 19:41:47pitrousetnosy: + pitrou
messages: + msg206772
2013-12-21 14:10:21vstinnersetmessages: + msg206742
2013-12-21 14:08:38vstinnersetnosy: + vstinner
messages: + msg206740
2013-12-21 14:05:30skrahsetpriority: low -> normal

nosy: + dmalcolm, skrah
messages: + msg206737

keywords: + buildbot
2013-10-31 18:53:22christian.heimescreate