Patchwork tests: run with PYTHONHASHSEED=random

login
register
mail settings
Submitter Mads Kiilerich
Date Jan. 15, 2013, 2:19 a.m.
Message ID <7c1e472ebfccd39015b2.1358216387@localhost6.localdomain6>
Download mbox | patch
Permalink /patch/628/
State Accepted
Commit e389a25e7e604b7cf2f7168b1837b7749bdd123c
Headers show

Comments

Mads Kiilerich - Jan. 15, 2013, 2:19 a.m.
# HG changeset patch
# User Mads Kiilerich <mads@kiilerich.com>
# Date 1358216371 -3600
# Node ID 7c1e472ebfccd39015b26987e8811714396a87b0
# Parent  404feac78b8a4ee77d13ac7b5271e1606b580797
tests: run with PYTHONHASHSEED=random

Python set and dict iteration order is in principle undefined but usually
'quite stable'. Setting PYTHONHASHSEED=random will make the iteration order
more random in Python 2.6.8 and 2.7.3 and where it has been backported. This
can thus help spot dependencies on undefined behaviour and prevent future
problems.
Bryan O'Sullivan - Jan. 15, 2013, 8:49 p.m.
On Mon, Jan 14, 2013 at 6:19 PM, Mads Kiilerich <mads@kiilerich.com> wrote:
> tests: run with PYTHONHASHSEED=random

Looks good, let 'er rip.
Mads Kiilerich - Jan. 15, 2013, 10:42 p.m.
On 01/15/2013 09:49 PM, Bryan O'Sullivan wrote:
> On Mon, Jan 14, 2013 at 6:19 PM, Mads Kiilerich <mads@kiilerich.com> wrote:
>> tests: run with PYTHONHASHSEED=random
> Looks good, let 'er rip.

In crew

/Mads

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -1251,6 +1251,7 @@  def main():
     os.environ['no_proxy'] = ''
     os.environ['NO_PROXY'] = ''
     os.environ['TERM'] = 'xterm'
+    os.environ['PYTHONHASHSEED'] = 'random'
 
     # unset env related to hooks
     for k in os.environ.keys():