Commit Graph

17 Commits

Author SHA1 Message Date
kjellander@webrtc.org
afede835ee Cleanup scripts and suppressions for TSan v1
Since we don't use it anymore on Linux and don't plan
to ever support it for Windows.

BUG=
R=pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/31649004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7420 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-10 09:18:34 +00:00
wjia@webrtc.org
03cfde2d10 Roll Chromium 238260 -> 243863
R=andrew@webrtc.org, henrike@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/6939004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5385 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-01-14 17:48:34 +00:00
kjellander@webrtc.org
59d5705385 Fix memory tools error introduced in roll @ r5260
Turns out that the Chromium revision
https://src.chromium.org/viewvc/chrome?view=rev&revision=237238
introduced a new flag for the memory wrapper scripts.
Due to the way we reuse the chrome_tests.py for WebRTC purposes,
we need to add that flag too.

TEST=linux_tsan bot and locally running:
tools/valgrind-webrtc/webrtc_tests.sh --test test_support_unittests --tool tsan --target Release --build-dir out
from trunk/
BUG=none
R=phoglund@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/5589006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5262 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-12-11 14:16:53 +00:00
kjellander@webrtc.org
fc89ba580b Fix build dir flag in webrtc_test.py as passed by runtests.py
It seems we were hit by the changes in
https://codereview.chromium.org/26184003/
in how we roll with our own wrapper script for the
memory tools.
The build dir flag was changed from --build_dir to
--build-dir, which caused our script to break.

BUG=none
TEST=verified the exact command line executed by the bot succeeds
in my local checkout
TBR=phoglund@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2394005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4959 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-10-14 18:05:52 +00:00
kjellander@webrtc.org
09418c3320 Add support for --target flag to webrtc_tests.py.
In https://codereview.chromium.org/26190002 Chromium
started a cleanup of their wrapper script, by adding
the --target flag and start passing build dir similar
to how the bots are setting it (i.e. pass out and not
out/Release).
This CL adds --target support for our wrapper script,
without changing the existing behavior (I'll do a
larger update at a later stage).

BUG=none
TEST=Ran the following successfully:
tools/valgrind-webrtc/webrtc_tests.sh --build_dir out/Release --target Release --test test_support_unittests
tools/valgrind-webrtc/webrtc_tests.sh --build_dir out --target Release --test test_support_unittests
tools/valgrind-webrtc/webrtc_tests.sh --target Release --test  out/Release/test_support_unittests
TBR=phoglund@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2396004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4957 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-10-14 17:34:38 +00:00
phoglund@webrtc.org
02421fcf0b Corrected documentation on webrtc_test.sh.
R=kjellander@webrtc.org
BUG=

Review URL: https://webrtc-codereview.appspot.com/2122004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4628 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-27 14:00:10 +00:00
kjellander@webrtc.org
6d6d95e2b8 Add support for test disable files in webrtc_tests.py
Adding support for text files in
tools/valgrind-webrtc/gtest_exclude that are used by the
wrapper script for memory tool execution (webrtc_tests.py).

This allows fine-grained disabling of tests using checked in
text files instead of maintaining such in the buildbot config.

For more details on naming of these text files and what to put
in them, see:
http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium/memory-sheriff#TOC-Excluding-tests

TEST=local execution of tsan and memcheck on Linux, using an
exclude file (done during development of http://review.webrtc.org/1647005)
BUG=none
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/1648004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4212 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-06-11 06:03:32 +00:00
kjellander@webrtc.org
dc6fa02422 Fixing error in argument parsing
The change in r3354 caused the --tool argument to not be parsed if it's passed after the test executable. Then it's considered an argument to the test rather than a script flag.
This CL cleans the code a bit and makes it possible to pass all the supported argument in the different ways possible.

NOTICE: To pass arguments to the test executable, you must use the -- argument must be specified before the test arguments start, to signal that everything that comes after it are positional arguments only (which are passed on to the test during execution).

BUG=none
TEST=The following combinations have been tested:
tools/valgrind-webrtc/webrtc_tests.sh -b out/Debug -t test_support_unittests --tool asan
tools/valgrind-webrtc/webrtc_tests.sh -b out/Debug -t test_support_unittests --tool asan -- --foo --bar
tools/valgrind-webrtc/webrtc_tests.sh --tool asan -b out/Debug -t test_support_unittests
tools/valgrind-webrtc/webrtc_tests.sh --tool asan -b out/Debug -t test_support_unittests -- --foo --bar

Review URL: https://webrtc-codereview.appspot.com/1026005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3355 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-01-10 10:06:15 +00:00
kjellander@webrtc.org
8f13810cf2 Improved memory tool test wrapper script
* Clarified that the test only supports specifying a single test (multiple didn't work before, so better not claim to support it).
* No longer needs test executable arguments to use ++ instead of --
* Only appends the build_dir path to the test executable if not already
  present.
* Simplified suppression path handling.
* Fixed crash when -v was used (import logging was missing)
* Style fixes.
* Thorougly tested with all the supported flags.

I noted that the --gtest_filter flag does not work as expected (it's
only for 'additional gtest_filter arguments', which seems to mean
additional arguments to the gtest filter text files that are used by
Chrome. I left it in here anyway. If --gtest_filter is given after the
test executable it will work, since those arguments are added straight
to the test executable
the test

BUG=none
TEST=I ran the following commands and verified that the suppressions and flags were handled correct:
tools/valgrind-webrtc/webrtc_tests.sh -v --gtest_repeat=2 --keep_logs --tool_flags=--trace-children=yes -t out/Debug/test_support_unittests --foo --bar

tools/valgrind-webrtc/webrtc_tests.sh -v --gtest_repeat=2 --keep_logs --tool_flags=--trace-children=yes -b out/Debug -t test_support_unittests --foo --bar

tools/valgrind-webrtc/webrtc_tests.sh -v --gtest_repeat=2 --keep_logs --tool_flags=--trace-children=yes -b out/Debug -t out/Debug/test_support_unittests --foo --bar

tools/valgrind-webrtc/webrtc_tests.sh -v --tool=tsan --gtest_repeat=2 --keep_logs --tool_flags=--trace-children=yes -t out/Debug/test_support_unittests --foo --bar

tools/valgrind-webrtc/webrtc_tests.sh -v --tool=tsan --gtest_repeat=2 --keep_logs --tool_flags=--trace-children=yes -b out/Debug -t test_support_unittests --foo --bar

tools/valgrind-webrtc/webrtc_tests.sh -v --tool=tsan --gtest_repeat=2 --keep_logs --tool_flags=--trace-children=yes -b out/Debug -t out/Debug/test_support_unittests --foo --bar

Review URL: https://webrtc-codereview.appspot.com/1029005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3354 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-01-10 08:13:52 +00:00
kjellander@webrtc.org
0f4185f8bb Making valgrind wrapper script work with test arguments
This is needed to be able to run memcheck/tsan/asan with command line arguments in the way the bots are executing the script (using --build_dir and --test arguments).

BUG=none
TEST=local execution

Review URL: https://webrtc-codereview.appspot.com/938015

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3106 4adac7df-926f-26a2-2b94-8c16560cd09d
2012-11-15 15:19:28 +00:00
kjellander@webrtc.org
b43f85ffd3 Support for being executed from runtests.py
This is also needed to make it possible to run unit tests easily using Chromium's buildbot source code.

BUG=None
TEST=tools/valgrind-webrtc/webrtc_tests.sh --test test_support_unittests --build_dir=out/Debug

Review URL: https://webrtc-codereview.appspot.com/784007

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2738 4adac7df-926f-26a2-2b94-8c16560cd09d
2012-09-11 11:22:45 +00:00
kjellander@webrtc.org
b764d78831 Adding support for --test argument
BUG=Cannot use this from Chrome buildbot scripts.
TEST=Ran tools/valgrind-webrtc/webrtc_tests.sh --test out/Debug/test_support_unittests

Review URL: https://webrtc-codereview.appspot.com/784006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2737 4adac7df-926f-26a2-2b94-8c16560cd09d
2012-09-11 09:34:51 +00:00
kjellander@webrtc.org
b6e4cc776e Valgrind memcheck and TSAN script now uses Chrome+WebRTC suppression files.
Skeleton suppression files for future WebRTC suppressions are added and are included in addition to the ones Chrome are using and maintaining when our wrapper script executes.

Also added tweaked PRESUBMIT checks based on the Chrome code, that verifies
that suppressions are added correctly. I tested that they work by adding an invalid
suppression.

BUG=544
TEST=Tested running tools/valgrind-webrtc/webrtc_tests.sh --tool=tsan -t out/Debug/system_wrappers_unittests and it reports far less errors. Tested adding bad suppression and it was caught by the PRESUBMIT check.

Review URL: https://webrtc-codereview.appspot.com/601004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2304 4adac7df-926f-26a2-2b94-8c16560cd09d
2012-05-27 20:59:35 +00:00
turaj@webrtc.org
799980fcaa Revert 2224 - Revert 2213 - Moved the fuzz test under valgrind and added valgrind support to the video bot.
CL 2213 did not need to be reverted. 

BUG=
TEST=

Review URL: https://webrtc-codereview.appspot.com/579008

TBR=phoglund@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/569013

TBR=turaj@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/576010

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2227 4adac7df-926f-26a2-2b94-8c16560cd09d
2012-05-11 00:41:48 +00:00
turaj@webrtc.org
c2fe91256c Revert 2213 - Moved the fuzz test under valgrind and added valgrind support to the video bot.
A series of CL:s by Patrik W. is breaking the auto-test. It started with CL 2211, but the later CL:s seems dependent on another. So I decided to go in reverse order and revert all of them.

BUG=
TEST=

Review URL: https://webrtc-codereview.appspot.com/579008

TBR=phoglund@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/569013

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2224 4adac7df-926f-26a2-2b94-8c16560cd09d
2012-05-10 22:55:57 +00:00
phoglund@webrtc.org
80f7ac23b0 Moved the fuzz test under valgrind and added valgrind support to the video bot.
BUG=
TEST=

Review URL: https://webrtc-codereview.appspot.com/579008

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2213 4adac7df-926f-26a2-2b94-8c16560cd09d
2012-05-10 14:43:10 +00:00
kjellander@webrtc.org
b5b155b8a9 This CL introduces a new directory for WebRTC utility scripts for Valgrind: tools/valgrind-webrtc
To be able to re-use as much as possible from Chromium's scripts, I've created two customized scripts for running tests:
- webrtc_tests.py: a customized version of chrome_tests.py with WebRTC tests instead.
- webrtc_tests.sh: a customized version of the chrome_tests.sh wrapper script, to launch the above script.

The webrtc_tests.sh script is setting up PYTHONPATH so that tools/valgrind is available for the webrtc_tests.py script.
The webrtc_tests.py script inherits the chrome_tests.py script as much as possible, to minimize maintenance and maximize readability.
Having this mirrored setup of directories, allows us to use the same directory hierarchy for suppression files too. This CL only adds suppression files for memcheck, but we can add files for tsan later easily.

The suppression file is currently empty for Linux. For Mac I copied all the Chromium third-party suppressions. We will need a lot more added for Mac before Valgrind runs becomes usable for that platform.
The platform specific naming of the suppression files are handled automatically when webrtc_tests.sh  is used to launch the tests.

Example:
Plain memcheck (default tool): tools/valgrind-webrtc/webrtc_tests.sh -t system_wrappers
Run ThreadSanitizer: tools/valgrind-webrtc/webrtc_tests.sh  --tool=tsan -t system_wrappers

Previously mentioned AddressSanitizer requires additional scripts to be added and it not covered in this CL.

BUG=
TEST=

Review URL: http://webrtc-codereview.appspot.com/322010

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1240 4adac7df-926f-26a2-2b94-8c16560cd09d
2011-12-20 08:53:41 +00:00