bart | d4e751b | 2008-03-24 11:01:45 +0000 | [diff] [blame] | 1 | How to test DRD |
| 2 | ~~~~~~~~~~~~~~~ |
| 3 | |
bart | ae912a0 | 2009-02-21 16:13:50 +0000 | [diff] [blame] | 4 | 1. Start with compiling DRD. |
bart | d45d995 | 2009-05-31 18:53:54 +0000 | [diff] [blame] | 5 | |
bart | ae912a0 | 2009-02-21 16:13:50 +0000 | [diff] [blame] | 6 | 2. Check as follows that all global symbols in DRD have been wrapped by the |
| 7 | DRD_() macro (output must be empty): |
bart | d45d995 | 2009-05-31 18:53:54 +0000 | [diff] [blame] | 8 | ( cd drd && nm -A drd*.o|grep ' T '|grep -v ' T vgDrd_' ) |
| 9 | |
bart | ae912a0 | 2009-02-21 16:13:50 +0000 | [diff] [blame] | 10 | 3. Check as follows that all global symbols in the preloaded shared library |
bart | d45d995 | 2009-05-31 18:53:54 +0000 | [diff] [blame] | 11 | 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 | |
| 15 | 4. 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 | |
| 22 | 5. Verify that all files referenced in EXTRA_DIST in drd/tests/Makefile.am |
| 23 | exist: |
| 24 | ( |
| 25 | cd drd/tests; |
bart | b34f5af | 2009-11-25 07:29:34 +0000 | [diff] [blame] | 26 | 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.//') |
bart | d45d995 | 2009-05-31 18:53:54 +0000 | [diff] [blame] | 30 | do |
| 31 | [ -e "$e" ] || echo "$e" |
| 32 | done |
| 33 | ) |
| 34 | |
| 35 | 6. Run the regression tests as follows: |
bart | ef1b972 | 2008-07-04 15:34:23 +0000 | [diff] [blame] | 36 | perl tests/vg_regtest drd |
bart | d45d995 | 2009-05-31 18:53:54 +0000 | [diff] [blame] | 37 | |
bart | c42f2b9 | 2009-06-06 08:51:13 +0000 | [diff] [blame] | 38 | 7. Run the regression tests that were developed for Thread Sanitizer: |
bart | 7794ef7 | 2009-07-23 16:24:45 +0000 | [diff] [blame] | 39 | ./vg-in-place --tool=drd --check-stack-var=yes drd/tests/tsan_unittest 2>&1|less |
bart | d45d995 | 2009-05-31 18:53:54 +0000 | [diff] [blame] | 40 | |
| 41 | 8. Test the slowdown for matinv for various matrix sizes via the script |
bart | 7794ef7 | 2009-07-23 16:24:45 +0000 | [diff] [blame] | 42 | drd/scripts/run-matinv (must be about 25 for i == 1 and about |
| 43 | 50 for i == 10 with n == 200). |
bart | d45d995 | 2009-05-31 18:53:54 +0000 | [diff] [blame] | 44 | |
| 45 | 9. Test whether DRD works with standard KDE applications and whether it does |
bart | 65912d6 | 2009-07-25 13:57:43 +0000 | [diff] [blame] | 46 | not print any false positives. Test this both with KDE3 and KDE4 on Linux: |
bart | e2b9823 | 2009-07-22 18:13:21 +0000 | [diff] [blame] | 47 | ./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 |
bart | d45d995 | 2009-05-31 18:53:54 +0000 | [diff] [blame] | 52 | |
bart | 65912d6 | 2009-07-25 13:57:43 +0000 | [diff] [blame] | 53 | 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 | |
bart | d45d995 | 2009-05-31 18:53:54 +0000 | [diff] [blame] | 57 | 10. Test whether DRD works with standard GNOME applications. Expect |
bart | dbac625 | 2008-07-03 16:23:48 +0000 | [diff] [blame] | 58 | race reports triggered by ORBit_RootObject_duplicate() and after |
| 59 | having closed the GNOME terminal window: |
bart | e2b9823 | 2009-07-22 18:13:21 +0000 | [diff] [blame] | 60 | ./vg-in-place --tool=drd --read-var-info=yes --trace-children=yes gnome-terminal |
bart | d45d995 | 2009-05-31 18:53:54 +0000 | [diff] [blame] | 61 | |
bart | c42f2b9 | 2009-06-06 08:51:13 +0000 | [diff] [blame] | 62 | 11. 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 |
bart | 7b7f3d4 | 2009-06-20 10:56:45 +0000 | [diff] [blame] | 76 | ./configure |
bart | c42f2b9 | 2009-06-06 08:51:13 +0000 | [diff] [blame] | 77 | export OMP_NUM_THREADS=4 |
bart | e2b9823 | 2009-07-22 18:13:21 +0000 | [diff] [blame] | 78 | make -j2 -s MEMCHECK="$HOME/software/valgrind/vg-in-place --tool=drd --check-stack-var=yes --read-var-info=yes --quiet" check |
bart | 870a4f7 | 2009-07-01 18:43:11 +0000 | [diff] [blame] | 79 | 5. Expected result: 776 tests / 23 expected failures / 147m24s user time |
| 80 | on a E8400 CPU @ 3 GHz. |
bart | c42f2b9 | 2009-06-06 08:51:13 +0000 | [diff] [blame] | 81 | |
bart | 7b7f3d4 | 2009-06-20 10:56:45 +0000 | [diff] [blame] | 82 | 12. Test DRD with Firefox. First build and install Firefox 3: |
bart | 7f912c0 | 2008-07-07 08:45:55 +0000 | [diff] [blame] | 83 | drd/scripts/download-and-build-firefox |
bart | d66ac2d | 2008-07-09 09:23:28 +0000 | [diff] [blame] | 84 | Now run the following command: |
bart | 7b7f3d4 | 2009-06-20 10:56:45 +0000 | [diff] [blame] | 85 | 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 |