blob: f0c3c9d9432a1af435f617318927c744ad5abf0c [file] [log] [blame]
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
cd drd/tests;
for f in *.vgtest *.exp*; do grep -q "$f" || echo $f; done
5. Verify that all files referenced in EXTRA_DIST in drd/tests/
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}' < \
| sed -n 's/^EXTRA_DIST *=//p' | sed 's/..noinst_SCRIPTS.//')
[ -e "$e" ] || echo "$e"
6. Run the regression tests as follows:
perl tests/vg_regtest drd
DRD_VERIFY_CONFLICT_SET=1 perl tests/vg_regtest drd
7. Run the regression tests that were developed for Thread Sanitizer:
./vg-in-place --tool=drd --check-stack-var=yes drd/tests/tsan_unittest 2>&1|less
8. Test the slowdown for matinv for various matrix sizes via the script
drd/scripts/run-matinv (must be about 25 for i == 1 and about
50 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 on Linux:
./vg-in-place --tool=drd --read-var-info=yes kate
./vg-in-place --tool=drd --read-var-info=yes --check-stack-var=yes kate
./vg-in-place --tool=drd --read-var-info=yes --trace-children=yes knode
./vg-in-place --tool=drd --read-var-info=yes --check-stack-var=yes --trace-children=yes knode
./vg-in-place --tool=drd --read-var-info=yes --check-stack-var=yes /usr/bin/designer
and on Darwin:
./vg-in-place --tool=drd --trace-fork-join=yes --show-confl-seg=no --gen-suppressions=all /Applications/Utilities/
./vg-in-place --tool=drd --trace-fork-join=yes --show-confl-seg=no --gen-suppressions=all /Applications/
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 --read-var-info=yes --trace-children=yes gnome-terminal
11. Rerun the GraphicsMagick test suite:
1. Recompile gcc via drd/scripts/download-and-build-gcc.
2. Replace the distro-provided* by the newly compiled versions:
cp $HOME/gcc-.../lib/ /usr/lib
cp $HOME/gcc-.../lib64/ /usr/lib64
rpm --verify libgomp43-32bit
rpm --verify libgomp43
3. Build and install Valgrind in /usr:
./ && ./configure --prefix=/usr CC=$HOME/gcc-4.4.0/bin/gcc \
&& make -s && make -s install
4. Download the GraphicsMagick source code:
cvs -d login
cvs -d co GraphicsMagick
cd GraphicsMagick
make -j2 -s MEMCHECK="$HOME/software/valgrind/vg-in-place --tool=drd --check-stack-var=yes --read-var-info=yes --quiet" check
5. Expected result: 776 tests / 23 expected failures / 147m24s user time
on a E8400 CPU @ 3 GHz.
12. Test DRD with Firefox. First build and install Firefox 3:
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 --show-confl-seg=no $HOME/software/mozilla-build/dist/bin/firefox-bin
13. Verify that the XML output matches the DRD XML output XSD.