Hmm, that is odd. I meant to go clean that up since hash() isn't really a great hash (its the one used for dict hashing-- so it is fast but has collisions). I did some quick looking and couldn't see *why* it would have different hashes for the same input, but since we shouldn't the builtin hash for that anyways I won't dig into it too much ;)
On Tue, Mar 3, 2015 at 3:31 PM, James Peach <[email protected]> wrote: > Hey Thomas, > > I am trying to add a test to TSQA to iterate over all the non-default > build options and just run the built-in regressions. I am finding that the > environment hash is unstable; it will produce different results with > ostensibly the same input. > > In this example, I modified _get_key() to use hashlib.md5(). Notice that > on 2 consecutive runs, the builtin hash() value is different but the md5() > value is the same. > > INFO 2015-03-03 15:22:04,447 - hash key is 4746109904010702268 > INFO 2015-03-03 15:22:04,447 - md5 key is b03b778787f65d595420d5cab1ccdba5 > INFO 2015-03-03 15:22:04,447 - Key is: 4746109904010702268, args are: > {'enable-ccache': None, 'disable-dependency-tracking': None, > 'disable-luajit': None, 'enable-test-tools': None, > 'enable-example-plugins': None} {'PATH': > '/opt/home/src/trafficserver.git/ci/new_tsqa/virtualenv/bin:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/vagrant/.local/bin:/home/vagrant/bin'} > > ... > > INFO 2015-03-03 15:22:45,147 - hash key is 6055301813997136828 > INFO 2015-03-03 15:22:45,147 - md5 key is b03b778787f65d595420d5cab1ccdba5 > INFO 2015-03-03 15:22:45,147 - Key is: 6055301813997136828, args are: > {'enable-ccache': None, 'disable-dependency-tracking': None, > 'disable-luajit': None, 'enable-test-tools': None, > 'enable-example-plugins': None} {'PATH': > '/opt/home/src/trafficserver.git/ci/new_tsqa/virtualenv/bin:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/vagrant/.local/bin:/home/vagrant/bin'} > >
