exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

afl-generate.sh (1645B)


      1 #!/bin/sh
      2 #
      3 # This file is part of TALER
      4 # Copyright (C) 2015 GNUnet e.V.
      5 #
      6 #  TALER is free software; you can redistribute it and/or modify it under the
      7 #  terms of the GNU Affero General Public License as published by the Free Software
      8 #  Foundation; either version 3, or (at your option) any later version.
      9 #
     10 #  TALER is distributed in the hope that it will be useful, but WITHOUT ANY
     11 #  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
     12 #  A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.
     13 #
     14 #  You should have received a copy of the GNU Affero General Public License along with
     15 #  TALER; see the file COPYING.  If not, If not, see <http://www.gnu.org/licenses/>
     16 #
     17 #
     18 # This will generate testcases in a directory 'afl-tests', which can then
     19 # be moved into src/exchange/afl-tests/ to be run during exchange-testing.
     20 #
     21 # This script uses American Fuzzy Loop (AFL) to fuzz the exchange to
     22 # automatically create tests with good coverage.  You must install
     23 # AFL and set AFL_HOME to the directory where AFL is installed
     24 # before running.  Also, a directory "baseline/" should exist with
     25 # templates for inputs for AFL to fuzz.  These can be generated
     26 # by running wireshark on loopback while running 'make check' in
     27 # this directory.  Save each HTTP request to a new file.
     28 #
     29 # Note that you want to switch 'TESTRUN = NO' and pre-init the
     30 # database before running this, otherwise it will be awfully slow.
     31 #
     32 # Must be run from this directory.
     33 #
     34 $AFL_HOME/afl-fuzz -i baseline/ -m 250 -o afl-tests/ -f /tmp/afl-input taler-exchange-httpd -i -f /tmp/afl-input -d test-exchange-home/ -C