Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4978)

Unified Diff: Lib/test/regrtest.py

Issue 13703: Hash collision security issue
Patch Set: Created 1 year, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/os.py ('k') | Lib/test/script_helper.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/test/regrtest.py Sat Feb 18 14:42:57 2012 +0100
+++ b/Lib/test/regrtest.py Sun Feb 19 10:49:30 2012 +0100
@@ -428,6 +428,11 @@ def main(tests=None, testdir=None, verbo
except ValueError:
print("Couldn't find starting test (%s), using all tests" % start)
if randomize:
+ hashseed = os.getenv('PYTHONHASHSEED')
+ if not hashseed:
+ os.environ['PYTHONHASHSEED'] = str(random_seed)
+ os.execv(sys.executable, [sys.executable] + sys.argv)
+ return
random.seed(random_seed)
print("Using random seed", random_seed)
random.shuffle(tests)
« no previous file with comments | « Lib/os.py ('k') | Lib/test/script_helper.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7