simon-git: putty (master): Simon Tatham

Commits to Tartarus CVS repository. tartarus-commits at lists.tartarus.org
Wed Mar 30 09:20:13 BST 2016


TL;DR:
  435b29d cmdgen: option to specify the random number device to use.
  3e40566 cmdgen: rescue test suite from bit rot.
  a22e43d Add a file of extra bignum tests.

Repository:     git://git.tartarus.org/simon/putty.git
On the web:     http://tartarus.org/~simon-git/gitweb/?p=putty.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2016-03-30 09:20:13

commit 435b29da88d14be9ea66d44c6d47268c5f3c3e9e
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=435b29da88d14be9ea66d44c6d47268c5f3c3e9e;hp=ad879505399eeeeb1f279f10a2176d92c842c465
Author: Simon Tatham <anakin at pobox.com>
Date:   Wed Mar 30 08:17:03 2016 +0100

    cmdgen: option to specify the random number device to use.
    
    E.g. you might pass '--random-device=/dev/urandom'.
    
    Mostly because I got sick of waiting for /dev/random to finish
    blocking while I was trying to generate throwaway keys for testing bug
    fixes in cmdgen itself. But it might also be useful on systems that
    call their random device by a different name that we haven't
    encountered.
    
    (Since cmdgen also reads the saved PuTTY random seed file, setting
    this option to /dev/zero will not render key generation deterministic.
    It's tempting to provide _some_ way to do that, for testing purposes
    and clearly marked as dangerous of course, but I think it would take
    more faff than this.)

 cmdgen.c     |   17 +++++++++++++++--
 putty.h      |    2 +-
 unix/uxgen.c |   15 +++++++++++----
 3 files changed, 27 insertions(+), 7 deletions(-)

commit 3e40566bb053f8f438e220ede4a1da34cf386592
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=3e40566bb053f8f438e220ede4a1da34cf386592;hp=435b29da88d14be9ea66d44c6d47268c5f3c3e9e
Author: Simon Tatham <anakin at pobox.com>
Date:   Wed Mar 30 08:25:25 2016 +0100

    cmdgen: rescue test suite from bit rot.
    
    cmdgen.c has contained code for ages to build a test main() if you
    compile with -DTEST_CMDGEN. But it's painful to do so manually, since
    you've still got to link in all the same supporting objects, and also
    nobody can have actually done that for a while because the stub test
    code hasn't been kept up to date with changes in the internal APIs
    (specifically prompt_t).
    
    Now we have the ability to include our test programs in Recipe as [UT]
    or [XT] so as to leave them out of 'make install', that seems like a
    useful thing to do with cmdgen's test suite. So here's a Recipe change
    that builds it as 'cgtest', plus fixes for compiler warnings and bit
    rot. Pleasantly, the test suite still _passes_ after those are fixed.

 .gitignore |    1 +
 Recipe     |    4 +++-
 cgtest.c   |    6 ++++++
 cmdgen.c   |    7 +++----
 4 files changed, 13 insertions(+), 5 deletions(-)

commit a22e43d3d8e43446a178bc4a49b53ce0893fd96e
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=a22e43d3d8e43446a178bc4a49b53ce0893fd96e;hp=3e40566bb053f8f438e220ede4a1da34cf386592
Author: Simon Tatham <anakin at pobox.com>
Date:   Wed Mar 30 08:45:21 2016 +0100

    Add a file of extra bignum tests.
    
    I generated these as a by-product of using afl-fuzz on the testbn
    executable. I'd hoped it would find interesting bugs in the bignum
    code itself, but in fact it mostly found bugs in the parsing code in
    the test main(). However, even so, it did produce a list of tests
    which reach as much of the code as afl-fuzz was able to, and that
    seems like a useful thing to save.
    
    Also, of course, just having a place to put explicitly specified
    bignum tests is a good thing anyway, because then we can put
    regression tests on the end of it every time we fix bugs.

 testdata/bignumtests.txt |  205 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 205 insertions(+)



More information about the tartarus-commits mailing list