Add valgrind support to randpkt-test.sh.
authorDarius Davis <darius@vmware.com>
Wed, 23 May 2018 08:53:59 +0000 (18:53 +1000)
committerAnders Broman <a.broman58@gmail.com>
Wed, 30 May 2018 08:22:48 +0000 (08:22 +0000)
commit06571ad3303ffaceadb634713e3245b0fa995b4b
treeba8fc2054cffe50e9e79fc63815f1af28b152cd6
parent8da47774405e1df46fabdc23640820b888a767ac
Add valgrind support to randpkt-test.sh.

There's already valgrind support in fuzz-test.sh; This change simply clones the
relevant fragments of script into randpkt-test.sh, making very minor tweaks as
needed.  Valgrind support in randpkt-test.sh is enabled through the "-g"
command-line option, just like with fuzz-test.sh.

In my testing here, it seems MAX_LEAK could be reduced somewhat, but I don't
think that that belongs as part of this change; I've simply kept the MAX_LEAK
value from fuzz-test.sh.

While we're here, the last line of valgrind-wireshark.sh launches a subprocess,
and that shell then simply returns its exit code, so there is no need for the
shell to stick around.  So, let's use "exec" here to replace the shell with the
new process.

Testing Done: On Linux amd64, ran several iterations of randpkt-test.sh and
   fuzz-test.sh, both with and without the "-g" option.

Change-Id: I87cc63559dc2e66c42c905f46657ce40cabf0104
Reviewed-on: https://code.wireshark.org/review/27741
Reviewed-by: Anders Broman <a.broman58@gmail.com>
tools/randpkt-test.sh
tools/valgrind-wireshark.sh