Changeset 1667 for zzuf


Ignore:
Timestamp:
Jan 14, 2007, 6:47:01 PM (13 years ago)
Author:
Sam Hocevar
Message:
  • Added -v/--verbose (unused yet).
Location:
zzuf/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/doc/zzuf.1

    r1666 r1667  
    33zzuf \- multiple purpose fuzzer
    44.SH SYNOPSIS
    5 \fBzzuf\fR [\fB\-AcdiMnqSx\fR] [\fB\-r\fR \fIratio\fR] [\fB\-s\fR \fIseed\fR|\fB\-s\fR \fIstart:stop\fR]
    6 .br
    7                   [\fB\-D\fR \fIdelay\fR] [\fB\-F\fR \fIforks\fR] [\fB\-C\fR \fIcrashes\fR] [\fB\-B\fR \fIbytes\fR]
    8 .br
    9                   [\fB\-T\fR \fIseconds\fR] [\fB\-M\fR \fImegabytes\fR] [\fB\-P\fR \fIprotect\fR] [\fB\-R\fR \fIrefuse\fR]
    10 .br
    11                   [\fB\-I\fR \fIinclude\fR] [\fB\-E\fR \fIexclude\fR] [\fIPROGRAM\fR [\fB\-\-\fR] [\fIARGS\fR]...]
     5\fBzzuf\fR [\fB\-AcdiMnqSvx\fR] [\fB\-r\fR \fIratio\fR] [\fB\-s\fR \fIseed\fR|\fB\-s\fR \fIstart:stop\fR]
     6.br
     7                   [\fB\-D\fR \fIdelay\fR] [\fB\-F\fR \fIforks\fR] [\fB\-C\fR \fIcrashes\fR] [\fB\-B\fR \fIbytes\fR]
     8.br
     9                   [\fB\-T\fR \fIseconds\fR] [\fB\-M\fR \fImegabytes\fR] [\fB\-P\fR \fIprotect\fR] [\fB\-R\fR \fIrefuse\fR]
     10.br
     11                   [\fB\-I\fR \fIinclude\fR] [\fB\-E\fR \fIexclude\fR] [\fIPROGRAM\fR [\fB\-\-\fR] [\fIARGS\fR]...]
    1212.br
    1313\fBzzuf \-h\fR | \fB\-\-help\fR
     
    208208situations. See also the \fB\-B\fR flag.
    209209.TP
     210\fB\-v\fR, \fB\-\-verbose\fR
     211Print information during the run, such as the current seed, what processes
     212get run, their exit status, etc.
     213.TP
    210214\fB\-x\fR, \fB\-\-check\-exit\fR
    211215Report processes that exit with a non-zero status. By default only processes
  • zzuf/trunk/src/zzuf.c

    r1666 r1667  
    8787static int md5 = 0;
    8888static int checkexit = 0;
     89static int verbose = 0;
    8990static int maxmem = -1;
    9091static int64_t maxtime = -1;
     
    113114    for(;;)
    114115    {
    115 #   define OPTSTR "AB:cC:dD:E:F:iI:mM:nP:qr:R:s:ST:xhV"
     116#   define OPTSTR "AB:cC:dD:E:F:iI:mM:nP:qr:R:s:ST:vxhV"
    116117#   ifdef HAVE_GETOPT_LONG
    117118#       define MOREINFO "Try `%s --help' for more information.\n"
     
    140141            { "signal",      0, NULL, 'S' },
    141142            { "max-time",    1, NULL, 'T' },
     143            { "verbose",     0, NULL, 'v' },
    142144            { "check-exit",  0, NULL, 'x' },
    143145            { "help",        0, NULL, 'h' },
     
    232234        case 'x': /* --check-exit */
    233235            checkexit = 1;
     236            break;
     237        case 'v': /* --verbose */
     238            verbose = 1;
    234239            break;
    235240        case 'h': /* --help */
     
    537542            && maxbytes >= 0 && child_list[i].bytes > maxbytes)
    538543        {
    539             fprintf(stdout, "zzuf[seed=%i]: data exceeded, sending SIGTERM\n",
     544            fprintf(stdout, "zzuf[seed=%i]: data output exceeded, sending SIGTERM\n",
    540545                    child_list[i].seed);
    541546            kill(child_list[i].pid, SIGTERM);
     
    548553            && now > child_list[i].date + maxtime)
    549554        {
    550             fprintf(stdout, "zzuf[seed=%i]: time exceeded, sending SIGTERM\n",
     555            fprintf(stdout, "zzuf[seed=%i]: running time exceeded, sending SIGTERM\n",
    551556                    child_list[i].seed);
    552557            kill(child_list[i].pid, SIGTERM);
     
    764769static void usage(void)
    765770{
    766     printf("Usage: zzuf [-AcdimnqSx] [-r ratio] [-s seed | -s start:stop]\n");
    767     printf("                         [-D delay] [-F forks] [-C crashes] [-B bytes]\n");
    768     printf("                         [-T seconds] [-M bytes] [-P protect] [-R refuse]\n");
    769     printf("                         [-I include] [-E exclude] [PROGRAM [--] [ARGS]...]\n");
     771    printf("Usage: zzuf [-AcdimnqSvx] [-r ratio] [-s seed | -s start:stop]\n");
     772    printf("                          [-D delay] [-F forks] [-C crashes] [-B bytes]\n");
     773    printf("                          [-T seconds] [-M bytes] [-P protect] [-R refuse]\n");
     774    printf("                          [-I include] [-E exclude] [PROGRAM [--] [ARGS]...]\n");
    770775#   ifdef HAVE_GETOPT_LONG
    771776    printf("       zzuf -h | --help\n");
     
    800805    printf("  -S, --signal             prevent children from diverting crashing signals\n");
    801806    printf("  -T, --max-time <n>       kill children that run for more than <n> seconds\n");
     807    printf("  -v, --verbose            print information during the run\n");
    802808    printf("  -x, --check-exit         report processes that exit with a non-zero status\n");
    803809    printf("  -h, --help               display this help and exit\n");
     
    825831    printf("  -S               prevent children from diverting crashing signals\n");
    826832    printf("  -T <n>           kill children that run for more than <n> seconds\n");
     833    printf("  -v               print information during the run\n");
    827834    printf("  -x               report processes that exit with a non-zero status\n");
    828835    printf("  -h               display this help and exit\n");
Note: See TracChangeset for help on using the changeset viewer.