From 3876742626379305cf58330f630ef7c8dccd781c Mon Sep 17 00:00:00 2001 From: Doug Hoyte Date: Tue, 12 Sep 2023 16:10:40 -0400 Subject: [PATCH] DEBUG env variable, connect rust harness --- test/fuzz.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/fuzz.pl b/test/fuzz.pl index 355087b..f5b680d 100755 --- a/test/fuzz.pl +++ b/test/fuzz.pl @@ -18,6 +18,8 @@ sub harnessTypeToCmd { return './cpp/harness'; } elsif ($harnessType eq 'js') { return 'node js/harness.js'; + } elsif ($harnessType eq 'rust') { + return '../../rust-negentropy/target/debug/examples/harness'; } die "unknown harness type: $harnessType"; @@ -99,6 +101,7 @@ my $totalDown = 0; while (1) { my $msg = <$outfile1>; + print "[1]: $msg\n" if $ENV{DEBUG}; if ($msg =~ /^(have|need),(\w+)/) { my ($action, $id) = ($1, $2); @@ -126,6 +129,7 @@ while (1) { } $msg = <$outfile2>; + print "[2]: $msg\n" if $ENV{DEBUG}; if ($msg =~ /^msg,(\w*)/) { my $data = $1;