* Documented stdin behaviour.

This commit is contained in:
Sam Hocevar 2007-01-07 18:45:00 +00:00 committed by sam
parent 562f045c50
commit b2a1908029
3 changed files with 10 additions and 4 deletions

View File

@ -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()

View File

@ -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");

View File

@ -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)"