* Fix testsuite by printing MD5 hashes to stdout.

This commit is contained in:
Sam Hocevar
2007-01-17 07:21:40 +00:00
committed by sam
parent 9dee8b079e
commit e10cc503bc
2 changed files with 7 additions and 4 deletions

View File

@@ -105,8 +105,9 @@ Multiple \fB\-I\fR flags can be specified, in which case files matching any one
of the regular expressions will be fuzzed. See also the \fB\-c\fR flag.
.TP
\fB\-m\fR, \fB\-\-md5\fR
Instead of displaying the program's standard output, just print the MD5 digest
of that output. The standard error channel is left untouched.
Instead of displaying the program's \fIstandard output\fR, just print its MD5
digest to \fBzzuf\fR's standard output. The standard error channel is left
untouched.
.TP
\fB\-M\fR, \fB\-\-max-memory\fR=\fImegabytes\fR
Specify the maximum amount of memory, in megabytes, that children are allowed

View File

@@ -381,12 +381,13 @@ static void loop_stdin(void)
if(md5)
{
_zz_md5_fini(md5sum, ctx);
fprintf(stderr, "zzuf[s=%i,r=%g]: %.02x%.02x%.02x%.02x%.02x"
fprintf(stdout, "zzuf[s=%i,r=%g]: %.02x%.02x%.02x%.02x%.02x"
"%.02x%.02x%.02x%.02x%.02x%.02x%.02x%.02x%.02x%.02x%.02x\n",
seed, minratio, md5sum[0], md5sum[1], md5sum[2], md5sum[3],
md5sum[4], md5sum[5], md5sum[6], md5sum[7],
md5sum[8], md5sum[9], md5sum[10], md5sum[11],
md5sum[12], md5sum[13], md5sum[14], md5sum[15]);
fflush(stdout);
}
_zz_unregister(0);
@@ -638,12 +639,13 @@ static void clean_children(void)
if(md5)
{
_zz_md5_fini(md5sum, child_list[i].ctx);
fprintf(stderr, "zzuf[s=%i,r=%g]: %.02x%.02x%.02x%.02x%.02x"
fprintf(stdout, "zzuf[s=%i,r=%g]: %.02x%.02x%.02x%.02x%.02x"
"%.02x%.02x%.02x%.02x%.02x%.02x%.02x%.02x%.02x%.02x%.02x\n",
child_list[i].seed, child_list[i].ratio, md5sum[0],
md5sum[1], md5sum[2], md5sum[3], md5sum[4], md5sum[5],
md5sum[6], md5sum[7], md5sum[8], md5sum[9], md5sum[10],
md5sum[11], md5sum[12], md5sum[13], md5sum[14], md5sum[15]);
fflush(stdout);
}
child_list[i].status = STATUS_FREE;
child_count--;