aboutsummaryrefslogtreecommitdiffstats
path: root/tools/fuzz-test.sh
AgeCommit message (Collapse)AuthorFilesLines
2014-06-24Reduce maximum permitted leakage to 100KBEvan Huus1-1/+1
Down from 500KB. The old value only triggered once that I can recall, and the "average" leakage I'm seeing on most captures is only a few KB now, so this shouldn't flood us with issues (which was the original concern leaving it so high). Change-Id: Ie4c98696b3fb7a533a7dc4f83c7ac8c458b499c8 Reviewed-on: https://code.wireshark.org/review/2633 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-11Increase time permitted when fuzzing with valgrind.Evan Huus1-2/+2
The capture on bug 10098 times out but I don't see any culprits for bad loops or anything - I think the capture is just too big. I'd prefer somebody else take a look at it to verify I'm not missing anything before submitting this. Bug:10098 Change-Id: I2cc43fd6ac9afaa345e7d31184483a9732fd6bf0 Reviewed-on: https://code.wireshark.org/review/1583 Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-30Fix fuzz-test.sh '-b' option so it works again; Do some other ↵Bill Meier1-16/+5
tools/*test*.sh changes - Add -b option to randpkt-test.sh and test-captures.sh; - Create/ue a common function to do '-x' tests on files/dirs; - Rename exit_error function to ws_exit_error Change-Id: I032c9d784bec1fb6b0717aaad08a061e4d935476 Reviewed-on: https://code.wireshark.org/review/872 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-14Remove $Id$ and other Subversion leftovers from the tools.Jeff Morriss1-2/+0
There are a few things in here which could still use attention. Don't regenerate anything now. Change-Id: I283c224d3523212144707fca3d6265916cb11792 Reviewed-on: https://code.wireshark.org/review/205 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-01-24Give valgrind fuzzing a bit more time. Otherwise we have some large (~80MB)Evan Huus1-2/+3
captures in the menagerie which time out even under normal circumstances. svn path=/trunk/; revision=54941
2013-08-25Valgrind requires more resources than running normally. Bump limits to 1.5xEvan Huus1-0/+3
normal when fuzzing with valgrind, as otherwise half the menagerie runs out of memory. svn path=/trunk/; revision=51515
2013-08-16Be sure to forward BIN_DIR to the valgrind script, probably also needed on theEvan Huus1-4/+6
fuzz-but. svn path=/trunk/; revision=51391
2013-08-16Try to use smarter path resolution and detection in order to work inEvan Huus1-1/+1
environments that are not the build tree (namely the fuzz-bot, but this might make normal out-of-tree builds easier too). svn path=/trunk/; revision=51387
2013-08-11Don't let a valgrind-output-parsing error hide the fact that it was an error ofEvan Huus1-1/+4
some sort: if we don't recognize valgrind's output then something somewhere went wrong and we should be informed. svn path=/trunk/; revision=51300
2013-07-25Multiple improvements and bug-fixes for the fuzz-test script:Evan Huus1-58/+67
- fix a few pieces of bad indentation - exit cleanly in all cases where we receive a SIGINT or other signal - check for valgrind bugs and dissector errors with every set of arguments (-nr vs -nVxr etc) not just the last - consider it an error if valgrind reports more than 500KB of leaked memory For the last point, 500KB is hopefully a safe choice for now since we only leak about 2KB "by default" and I have no idea what the state of most "non-default" code is with respect to memory leaks. I would like to eventually work this down to 0 of course :) svn path=/trunk/; revision=50895
2013-07-12Add (GPLv2+) license headers to these scripts, assigning the copyright toJeff Morriss1-2/+22
the original author of the scripts (Gerald). svn path=/trunk/; revision=50542
2013-06-05Add a new environment variable to cause abort()s if we add too many itemsJeff Morriss1-6/+3
to the tree (to separate this case from the generic DISSECTOR_BUG case). Enable this environment variable when fuzz testing. Enable the 3rd (without tree but with a read filter) check (added in r49643) when testing capture files but not when fuzz testing--not sure if we want to add even more to the fuzzbot's work load now (OTOH I've been running it for a while and it hasn't buried me in bugs). svn path=/trunk/; revision=49784
2013-05-31Oh yeah, -R is now -Y in trunk.Jeff Morriss1-1/+1
svn path=/trunk/; revision=49646
2013-05-31As discussed in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8728#c4 :Jeff Morriss1-0/+7
Running tshark with a read filter ("-R") and without building the full tree ("-V") causes it to run into some more bugs (usually loops adding more than 100000 items to the tree). Add some (commented out for now) code to do this... svn path=/trunk/; revision=49643
2013-05-30Exit if we can't load the test-common.sh library.Jeff Morriss1-1/+1
svn path=/trunk/; revision=49625
2013-05-20Remove some of the extra noise added while trying to figure out whyEvan Huus1-2/+1
the build-bot's valgrind pass wasn't running with/without tree. It's still broken, but the debug output wasn't giving us any useful information. svn path=/trunk/; revision=49464
2013-04-27When fuzzing with valgrind and running without -T, run with -v so that theEvan Huus1-1/+1
argument string is non-empty. Perhaps this will fix the fuzz-bot which fails to run with the empty argument string... svn path=/trunk/; revision=49075
2013-04-17Reverse the arguments we feed to valgrind-wireshark.sh. Add debuggingGerald Combs1-2/+3
output. svn path=/trunk/; revision=48895
2013-01-26Forward-port r47305 from trunk-1.8:Gerald Combs1-2/+11
------------------------------------------------------------------------ r47305 | gerald | 2013-01-26 12:12:52 -0800 (Sat, 26 Jan 2013) | 6 lines Changed paths: M /trunk-1.8/tools/fuzz-test.sh Instead of setting resource limits on the fuzz-test.sh process itself, set limits on the TShark subprocess. This should hopefully take care of the strange fuzz failures we've seen lately. Reduce the maximum CPU time to 5 minutes while we're at it. ------------------------------------------------------------------------ svn path=/trunk/; revision=47307
2013-01-05When fuzz-testing with valgrind, run both with and without tree (like whenEvan Huus1-1/+1
fuzz-testing without valgrind). svn path=/trunk/; revision=46950
2012-12-07Move a lot of common fuzz-test and randpkt-test code to its own fileGerald Combs1-115/+4
(test-common.sh). Add build information to the error output as suggested in http://www.wireshark.org/lists/wireshark-dev/201212/msg00037.html svn path=/trunk/; revision=46446
2012-10-26Add an option (-P) for a minimum plugin count.Gerald Combs1-6/+8
svn path=/trunk/; revision=45800
2012-10-22Make the fuzz-test plugin error into a warning, since lacking pluginsEvan Huus1-2/+2
doesn't seem (to me) to warrant preventing someone from fuzz-testing. Anyone know why this was put in in the first place? svn path=/trunk/; revision=45733
2012-10-09If our error output is huge (> 5 MB) trim out the middle of the file.Gerald Combs1-0/+9
The recent loop bugs have generated output that's too large to attach to Bugzilla. svn path=/trunk/; revision=45437
2012-10-03Add the command and arguments to the error file.Gerald Combs1-0/+1
svn path=/trunk/; revision=45294
2012-10-03Fix return code checking (hopefully).Gerald Combs1-1/+1
svn path=/trunk/; revision=45289
2012-10-02Test with the presence (-nVxr) and absence (-nr) of the tree. We nowGerald Combs1-6/+12
use an array of arguments so additional combinations can be added. svn path=/trunk/; revision=45258
2012-09-05Run 'git log' if we have a .git directory. Fixes a copy+paste error.Gerald Combs1-1/+1
svn path=/trunk/; revision=44784
2012-08-19From Toralf Förster via ↵Evan Huus1-1/+1
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7652 Use a fast bash built-in rather than a slow call out to `expr` to increment the loop count. svn path=/trunk/; revision=44580
2012-08-17Move error reporting to a common function. Lot information about the Gerald Combs1-14/+20
most recent revision / commit. svn path=/trunk/; revision=44552
2012-08-12Catch more types of valgrind errors in the fuzz-tester.Evan Huus1-0/+3
These happen when, eg, a program runs out of memory under valgrind or other more fatal errors (that may sometimes be valgrind bugs instead). svn path=/trunk/; revision=44451
2012-07-27Update the usage stanza for fuzz-test to reflect the changes in r44024.Evan Huus1-1/+1
svn path=/trunk/; revision=44083
2012-07-26valgrind-wireshark.sh:Evan Huus1-11/+32
- add support for 2-pass dissection and config profiles - make whitespace a consistent 4-spaces fuzz-test.sh: - update 2-pass support to use -2 and not the old -P - add support for fuzz-testing under valgrind with the new -g option svn path=/trunk/; revision=44024
2012-04-27Fix r42293: Make the script actually fail when tshark fails: use a new ↵Jeff Morriss1-6/+8
variable to indicate when we've caught a signal rather than (re-)using MAX_PASSES. svn path=/trunk/; revision=42295
2012-04-27Get the script working again in the "unlimited passes" mode.Jeff Morriss1-4/+8
svn path=/trunk/; revision=42293
2012-04-18Terminate our inner loops as well.Gerald Combs1-0/+1
svn path=/trunk/; revision=42134
2012-04-18Tell the main loop to terminate when we catch a signal instead of tryingGerald Combs1-1/+1
to clean up in two places. svn path=/trunk/; revision=42133
2011-06-01Exit if we don't have enough plugins.Gerald Combs1-1/+7
svn path=/trunk/; revision=37513
2011-06-01Remove the temporary debugging stuff.Guy Harris1-8/+0
svn path=/trunk/; revision=37509
2011-06-01Temporary debugging stuff to see in what environment tshark is beingGuy Harris1-0/+8
run - the plugins might not be getting loaded, and the goal is to figure out why. svn path=/trunk/; revision=37504
2011-04-13Based on https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5821#c2 :Jeff Morriss1-6/+38
Move the setting of debug environment variables out of the while loop. Export MALLOC_OPTIONS=AJ to increase memory allocation debug on FreeBSD (and others). Export a number of environment variables that MacOS looks at. (I don't have easy access to either of these OS so this has not been tested.) Add a comments for each entry explaining which OS uses it and what it does. svn path=/trunk/; revision=36622
2011-04-04Fix up indentationJeff Morriss1-55/+55
svn path=/trunk/; revision=36461
2011-03-17Don't clobber the capinfos data if we have a valid capture file. ThisGerald Combs1-6/+4
should let the original file information show up in bug reports. svn path=/trunk/; revision=36209
2010-12-10Export G_SLICE=debug-blocks to do additional memory checks;Bill Meier1-0/+1
From the GLib docs "Using this option (present since GLib-2.13) engages extra code which performs sanity checks on the released memory slices. Invalid slice addresses or slice sizes will be reported and lead to a program halt." svn path=/trunk/; revision=35165
2010-10-29Added -b and -C options to usage.Chris Maynard1-1/+1
svn path=/trunk/; revision=34702
2010-10-18Add fuzz-test option (-C) to specify a configuration profile.Bill Meier1-2/+6
svn path=/trunk/; revision=34553
2010-09-02Introduce 2 new environment variables: WIRESHARK_EP_VERIFY_POINTERS andJeff Morriss1-0/+2
WIRESHARK_SE_VERIFY_POINTERS that control whether or not we verify if a given pointer is ep_ or se_ allocated, respectively. Turn the behavior off by default for speed reasons (the speed difference isn't huge, but...). Turn the behavior on when fuzz testing. Document these two new variables in the man pages. svn path=/trunk/; revision=34046
2010-07-20Dump the error output when we have a problem.Gerald Combs1-2/+0
svn path=/trunk/; revision=33594
2010-07-07Try limiting our stack size.Gerald Combs1-3/+10
svn path=/trunk/; revision=33466
2010-06-04If BIN_DIR is ".", set WIRESHARK_RUN_FROM_BUILD_DIRECTORY so that weGerald Combs1-0/+4
test plugins. svn path=/trunk/; revision=33085