mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-04 02:18:37 +00:00
ThreadSanitizer. - Modified DRD's error reporting code such that it does no longer let the Valgrind core print the Valgrind thread ID but that it now prints the DRD thread ID and name. Updated expected output files where necessary. - Modified drd/test/Makefile.am such that the tests using gcc's built-in functions for atomic memory access such that these are only compiled when the gcc version in use supports these built-in functions. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10186
65 lines
2.9 KiB
Plaintext
65 lines
2.9 KiB
Plaintext
How to test DRD
|
|
~~~~~~~~~~~~~~~
|
|
|
|
1. Start with compiling DRD.
|
|
|
|
2. Check as follows that all global symbols in DRD have been wrapped by the
|
|
DRD_() macro (output must be empty):
|
|
( cd drd && nm -A drd*.o|grep ' T '|grep -v ' T vgDrd_' )
|
|
|
|
3. Check as follows that all global symbols in the preloaded shared library
|
|
are redirected functions (output must contain one symbol that starts with
|
|
a double underscore, something like __i686.get_pc_thunk.bx):
|
|
( cd drd && nm -A vgpreload*.o|grep ' T '|grep -v ' T _vg' )
|
|
|
|
4. Verify that all files needed for the regression tests are included in
|
|
drd/tests/Makefile.am:
|
|
(
|
|
cd drd/tests;
|
|
for f in *.vgtest *.exp*; do grep -q "$f" Makefile.am || echo $f; done
|
|
)
|
|
|
|
5. Verify that all files referenced in EXTRA_DIST in drd/tests/Makefile.am
|
|
exist:
|
|
(
|
|
cd drd/tests;
|
|
for e in $(awk '/\\$/{n=$0; sub("\\\\$", "", n); if (line != "") { line = line " " n } else { line=n }} /[^\\]$/{if (line != ""){print line;line=""};print}' < Makefile.am | sed -n 's/^EXTRA_DIST *=//p' | sed 's/..noinst_SCRIPTS.//')
|
|
do
|
|
[ -e "$e" ] || echo "$e"
|
|
done
|
|
)
|
|
|
|
6. Run the regression tests as follows:
|
|
perl tests/vg_regtest drd
|
|
|
|
7. Run Konstantin's regression tests:
|
|
mkdir -p drt/unittest
|
|
svn checkout http://data-race-test.googlecode.com/svn/trunk/unittest drt/unittest
|
|
make -C drt/unittest -s all
|
|
./vg-in-place --tool=drd --check-stack-var=yes drt/unittest/racecheck_unittest 2>&1|less
|
|
|
|
8. Test the slowdown for matinv for various matrix sizes via the script
|
|
drd/scripts/run-matinv (must be about 24 for i == 1 and about
|
|
31 for i == 10 with n == 200).
|
|
|
|
9. Test whether DRD works with standard KDE applications and whether it does
|
|
not print any false positives. Test this both with KDE3 and KDE4.
|
|
./vg-in-place --tool=drd --var-info=yes kate
|
|
./vg-in-place --tool=drd --var-info=yes --check-stack-var=yes kate
|
|
./vg-in-place --tool=drd --var-info=yes --trace-children=yes knode
|
|
./vg-in-place --tool=drd --var-info=yes --check-stack-var=yes --trace-children=yes knode
|
|
./vg-in-place --tool=drd --var-info=yes --check-stack-var=yes /usr/bin/designer
|
|
|
|
10. Test whether DRD works with standard GNOME applications. Expect
|
|
race reports triggered by ORBit_RootObject_duplicate() and after
|
|
having closed the GNOME terminal window:
|
|
./vg-in-place --tool=drd --var-info=yes --trace-children=yes gnome-terminal
|
|
|
|
11. Test DRD with Firefox. First of all, make sure that Valgrind is patched
|
|
such that it supports libjemalloc.so:
|
|
drd/scripts/add-libjemalloc-support
|
|
Next, build and install Firefox 3:
|
|
drd/scripts/download-and-build-firefox
|
|
Now run the following command:
|
|
LD_LIBRARY_PATH=$HOME/software/mozilla-build/dist/lib: ./vg-in-place --tool=drd --check-stack-var=yes --trace-children=yes $HOME/software/mozilla-build/dist/bin/firefox-bin
|