blob: 4581a06efabefa26d661eb3855b63b6675a9c9bf [file] [log] [blame]
bartd4e751b2008-03-24 11:01:45 +00001How to test DRD
2~~~~~~~~~~~~~~~
3
bartae912a02009-02-21 16:13:50 +000041. Start with compiling DRD.
bartd45d9952009-05-31 18:53:54 +00005
bartae912a02009-02-21 16:13:50 +000062. Check as follows that all global symbols in DRD have been wrapped by the
7 DRD_() macro (output must be empty):
bartd45d9952009-05-31 18:53:54 +00008 ( cd drd && nm -A drd*.o|grep ' T '|grep -v ' T vgDrd_' )
9
bartae912a02009-02-21 16:13:50 +0000103. Check as follows that all global symbols in the preloaded shared library
bartd45d9952009-05-31 18:53:54 +000011 are redirected functions (output must contain one symbol that starts with
12 a double underscore, something like __i686.get_pc_thunk.bx):
13 ( cd drd && nm -A vgpreload*.o|grep ' T '|grep -v ' T _vg' )
14
154. Verify that all files needed for the regression tests are included in
16 drd/tests/Makefile.am:
17 (
18 cd drd/tests;
19 for f in *.vgtest *.exp*; do grep -q "$f" Makefile.am || echo $f; done
20 )
21
225. Verify that all files referenced in EXTRA_DIST in drd/tests/Makefile.am
23 exist:
24 (
25 cd drd/tests;
bartb34f5af2009-11-25 07:29:34 +000026 for e in $(awk '/\\$/{n=$0; sub("\\\\$", "", n); if (line != "")\
27 { line = line " " n } else { line=n }} \
28 /[^\\]$/{if (line != ""){print line;line=""};print}' < Makefile.am \
29 | sed -n 's/^EXTRA_DIST *=//p' | sed 's/..noinst_SCRIPTS.//')
bartd45d9952009-05-31 18:53:54 +000030 do
31 [ -e "$e" ] || echo "$e"
32 done
33 )
34
356. Run the regression tests as follows:
bartef1b9722008-07-04 15:34:23 +000036 perl tests/vg_regtest drd
bartd45d9952009-05-31 18:53:54 +000037
bartc42f2b92009-06-06 08:51:13 +0000387. Run the regression tests that were developed for Thread Sanitizer:
bart7794ef72009-07-23 16:24:45 +000039 ./vg-in-place --tool=drd --check-stack-var=yes drd/tests/tsan_unittest 2>&1|less
bartd45d9952009-05-31 18:53:54 +000040
418. Test the slowdown for matinv for various matrix sizes via the script
bart7794ef72009-07-23 16:24:45 +000042 drd/scripts/run-matinv (must be about 25 for i == 1 and about
43 50 for i == 10 with n == 200).
bartd45d9952009-05-31 18:53:54 +000044
459. Test whether DRD works with standard KDE applications and whether it does
bart65912d62009-07-25 13:57:43 +000046 not print any false positives. Test this both with KDE3 and KDE4 on Linux:
barte2b98232009-07-22 18:13:21 +000047 ./vg-in-place --tool=drd --read-var-info=yes kate
48 ./vg-in-place --tool=drd --read-var-info=yes --check-stack-var=yes kate
49 ./vg-in-place --tool=drd --read-var-info=yes --trace-children=yes knode
50 ./vg-in-place --tool=drd --read-var-info=yes --check-stack-var=yes --trace-children=yes knode
51 ./vg-in-place --tool=drd --read-var-info=yes --check-stack-var=yes /usr/bin/designer
bartd45d9952009-05-31 18:53:54 +000052
bart65912d62009-07-25 13:57:43 +000053 and on Darwin:
54 ./vg-in-place --tool=drd --trace-fork-join=yes --show-confl-seg=no --gen-suppressions=all /Applications/Utilities/Terminal.app/Contents/MacOS/Terminal
55 ./vg-in-place --tool=drd --trace-fork-join=yes --show-confl-seg=no --gen-suppressions=all /Applications/Safari.app/Contents/MacOS/Safari
56
bartd45d9952009-05-31 18:53:54 +00005710. Test whether DRD works with standard GNOME applications. Expect
bartdbac6252008-07-03 16:23:48 +000058 race reports triggered by ORBit_RootObject_duplicate() and after
59 having closed the GNOME terminal window:
barte2b98232009-07-22 18:13:21 +000060 ./vg-in-place --tool=drd --read-var-info=yes --trace-children=yes gnome-terminal
bartd45d9952009-05-31 18:53:54 +000061
bartc42f2b92009-06-06 08:51:13 +00006211. Rerun the GraphicsMagick test suite:
63 1. Recompile gcc via drd/scripts/download-and-build-gcc.
64 2. Replace the distro-provided libgomp.so* by the newly compiled versions:
65 cp $HOME/gcc-.../lib/libgomp.so.1.0.0.0 /usr/lib
66 cp $HOME/gcc-.../lib64/libgomp.so.1.0.0.0 /usr/lib64
67 rpm --verify libgomp43-32bit
68 rpm --verify libgomp43
69 3. Build and install Valgrind in /usr:
70 ./autogen.sh && ./configure --prefix=/usr CC=$HOME/gcc-4.4.0/bin/gcc \
71 && make -s && make -s install
72 4. Download the GraphicsMagick source code:
73 cvs -d :pserver:anonymous@cvs.graphicsmagick.org:/GraphicsMagick login
74 cvs -d :pserver:anonymous@cvs.graphicsmagick.org:/GraphicsMagick co GraphicsMagick
75 cd GraphicsMagick
bart7b7f3d42009-06-20 10:56:45 +000076 ./configure
bartc42f2b92009-06-06 08:51:13 +000077 export OMP_NUM_THREADS=4
barte2b98232009-07-22 18:13:21 +000078 make -j2 -s MEMCHECK="$HOME/software/valgrind/vg-in-place --tool=drd --check-stack-var=yes --read-var-info=yes --quiet" check
bart870a4f72009-07-01 18:43:11 +000079 5. Expected result: 776 tests / 23 expected failures / 147m24s user time
80 on a E8400 CPU @ 3 GHz.
bartc42f2b92009-06-06 08:51:13 +000081
bart7b7f3d42009-06-20 10:56:45 +00008212. Test DRD with Firefox. First build and install Firefox 3:
bart7f912c02008-07-07 08:45:55 +000083 drd/scripts/download-and-build-firefox
bartd66ac2d2008-07-09 09:23:28 +000084 Now run the following command:
bart7b7f3d42009-06-20 10:56:45 +000085 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
bart6530c2a2011-10-13 18:16:29 +000086
8713. Verify that the XML output matches the DRD XML output XSD.
88
89 drd/tests/verify-xml-output