diff --git a/doc/zzuf.1 b/doc/zzuf.1 index 4903427..da3e955 100644 --- a/doc/zzuf.1 +++ b/doc/zzuf.1 @@ -8,7 +8,7 @@ zzuf \- multiple purpose fuzzer .br [\fB\-P\fR \fIprotect\fR] [\fB\-R\fR \fIrefuse\fR] .br - [\fB\-I\fR \fIinclude\fR] [\fB\-E\fR \fIexclude\fR] \fIPROGRAM\fR [\fIARGS\fR]... + [\fB\-I\fR \fIinclude\fR] [\fB\-E\fR \fIexclude\fR] [\fIPROGRAM\fR [\fIARGS\fR]...] .br \fBzzuf \-h\fR | \fB\-\-help\fR .br @@ -31,6 +31,11 @@ marker before them on the command line (otherwise \fBzzuf\fR will try to interpret them as arguments for itself), eg: .PP \fB zzuf \-B 1000 cat \-\- \-v /dev/zero\fR +.PP +When no program is specified, \fBzzuf\fR simply fuzzes the standard input, as +if the \fBcat\fR utility had been called: +.PP +\fB zzuf < /dev/zero\fR .SH OPTIONS .TP \fB\-B\fR, \fB\-\-max\-bytes\fR=\fIn\fR @@ -269,7 +274,7 @@ Linux-specific: \fBgetline\fR(), \fBgetdelim\fR(), \fB__getdelim\fR() .TP BSD-specific: -\fBfgetln\fR(), \fB__srefill()\fR() +\fBfgetln\fR(), \fB__srefill\fR() .TP Signal handling: \fBsignal\fR(), \fBsigaction\fR() diff --git a/src/zzuf.c b/src/zzuf.c index 5adca30..e3d2759 100644 --- a/src/zzuf.c +++ b/src/zzuf.c @@ -609,7 +609,7 @@ static void usage(void) printf("Usage: zzuf [-cdinqS] [-r ratio] [-s seed | -s start:stop]\n"); printf(" [-F forks] [-C crashes] [-B bytes] [-T seconds]\n"); printf(" [-P protect] [-R refuse]\n"); - printf(" [-I include] [-E exclude] COMMAND [ARGS]...\n"); + printf(" [-I include] [-E exclude] [PROGRAM [ARGS]...]\n"); # ifdef HAVE_GETOPT_LONG printf(" zzuf -h | --help\n"); printf(" zzuf -v | --version\n"); diff --git a/test/testsuite.sh b/test/testsuite.sh index b21f3c2..a99878a 100755 --- a/test/testsuite.sh +++ b/test/testsuite.sh @@ -86,13 +86,14 @@ for r in 0.0 0.00001 0.001 0.1 10.0; do echo "*** file $file, ratio $r ***" OK=1 MD5="" + check "$ZZOPTS" "< $file" "zzuf" check "$ZZOPTS" "$FDCAT $file" "fdcat" check "$ZZOPTS" "$STREAMCAT $file" "streamcat" if [ "$STATIC_CAT" = "" ]; then check "$ZZOPTS" "cat $file" "cat" check "$ZZOPTS" "-i cat < $file" "|cat" fi - if [ "$STATIC_CAT" = "" ]; then + if [ "$STATIC_DD" = "" ]; then check "$ZZOPTS" "dd bs=65536 if=$file" "dd(bs=65536)" check "$ZZOPTS" "dd bs=1111 if=$file" "dd(bs=1111)" check "$ZZOPTS" "dd bs=1024 if=$file" "dd(bs=1024)"