Home | History | Annotate | Download | only in drd
      1 How to test DRD
      2 ~~~~~~~~~~~~~~~
      3 
      4 1. Start with compiling DRD.
      5 
      6 2. Check as follows that all global symbols in DRD have been wrapped by the
      7    DRD_() macro (output must be empty):
      8      ( cd drd && nm -A drd*.o|grep ' T '|grep -v ' T vgDrd_' )
      9 
     10 3. Check as follows that all global symbols in the preloaded shared library
     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;
     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.//')
     30        do
     31          [ -e "$e" ] || echo "$e"
     32        done
     33      )
     34      
     35 6. Run the regression tests as follows:
     36      perl tests/vg_regtest drd
     37 
     38 7. Run the regression tests that were developed for Thread Sanitizer:
     39      ./vg-in-place --tool=drd --check-stack-var=yes drd/tests/tsan_unittest 2>&1|less
     40 
     41 8. Test the slowdown for matinv for various matrix sizes via the script
     42    drd/scripts/run-matinv (must be about 25 for i == 1 and about
     43    50 for i == 10 with n == 200).
     44 
     45 9. Test whether DRD works with standard KDE applications and whether it does
     46    not print any false positives. Test this both with KDE3 and KDE4 on Linux:
     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
     52 
     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 
     57 10. Test whether DRD works with standard GNOME applications. Expect
     58    race reports triggered by ORBit_RootObject_duplicate() and after
     59    having closed the GNOME terminal window:
     60      ./vg-in-place --tool=drd --read-var-info=yes --trace-children=yes gnome-terminal
     61 
     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 (a] cvs.graphicsmagick.org:/GraphicsMagick login
     74        cvs -d :pserver:anonymous (a] cvs.graphicsmagick.org:/GraphicsMagick co GraphicsMagick
     75        cd GraphicsMagick
     76        ./configure
     77        export OMP_NUM_THREADS=4
     78        make -j2 -s MEMCHECK="$HOME/software/valgrind/vg-in-place --tool=drd --check-stack-var=yes --read-var-info=yes --quiet" check
     79     5. Expected result: 776 tests / 23 expected failures / 147m24s user time
     80        on a E8400 CPU @ 3 GHz.
     81 
     82 12. Test DRD with Firefox. First build and install Firefox 3:
     83      drd/scripts/download-and-build-firefox
     84    Now run the following command:
     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
     86 
     87 13. Verify that the XML output matches the DRD XML output XSD.
     88 
     89    drd/tests/verify-xml-output
     90