Extend testsuite to build and test static binaries. Adds new dimension to test
authorDaniel McNulty <mcnulty@cs.wisc.edu>
Thu, 1 Apr 2010 18:20:24 +0000 (13:20 -0500)
committerDaniel McNulty <mcnulty@cs.wisc.edu>
Thu, 1 Apr 2010 18:20:24 +0000 (13:20 -0500)
commitdbda7483a300658aeaee33f67332e8fd608cba51
treecb06330762c462f543ae8fad108180f09f4c6d9a
parentcb5151b45c9d701cda12ae5fa24a4d4af625c110
Extend testsuite to build and test static binaries.  Adds new dimension to test
space -- dynamic vs. static link. runTests and test_driver now accept the
options(-dynamiclink,-staticlink) to run against dynamically or statically
linked binaries. The default is to have both options on, but statically linked
binaries will only be tested in rewriter mode. This included some changes to
the test infrastructure code as well as the specification.

Also, fixes some bugs in the rewriter of static binaries: restoring symbol
information after performing the rewrite to all Symtab caching to work correctly
and automatically loading the dependencies for the static RT library (just
libc for now).

All rewriter tests pass for static binaries except test5_6. test5_6 (Exception
test) instruments the catch block of an exception block. The mutatee makes a
call to a function that always throws an exception; parsing currently
classifies this case as a non-returning function. In the calling function, the
non-returning call causes the parser to stop parsing the function and never
find the catch block. Because of this, the mutator fails to find and instrument
the call block. This isn't a problem for the dynamic case because the call is
routed through the PLT and is therefore, not a non-returning call. At the time
of the commit, I didn't know how to fix this.
46 files changed:
dyninstAPI/src/linux-x86.C
symtabAPI/src/LinkMap.h
symtabAPI/src/emitElfStatic.C
symtabAPI/src/emitElfStatic.h
testsuite/i386-unknown-linux2.4/make.solo_mutatee.gen
testsuite/i386-unknown-linux2.4/test_info_new.gen.C
testsuite/i386-unknown-linux2.4/tuples
testsuite/i386-unknown-nt4.0/test_info_new.gen.C
testsuite/i386-unknown-nt4.0/tuples
testsuite/ia64-unknown-linux2.4/make.solo_mutatee.gen
testsuite/ia64-unknown-linux2.4/test_info_new.gen.C
testsuite/ia64-unknown-linux2.4/tuples
testsuite/make.module.tmpl
testsuite/ppc32_linux/make.solo_mutatee.gen
testsuite/ppc32_linux/test_info_new.gen.C
testsuite/ppc32_linux/tuples
testsuite/ppc64_linux/make.solo_mutatee.gen
testsuite/ppc64_linux/test_info_new.gen.C
testsuite/ppc64_linux/tuples
testsuite/rs6000-ibm-aix5.1/make.solo_mutatee.gen
testsuite/rs6000-ibm-aix5.1/test_info_new.gen.C
testsuite/rs6000-ibm-aix5.1/tuples
testsuite/sparc-sun-solaris2.8/make.solo_mutatee.gen
testsuite/sparc-sun-solaris2.8/test_info_new.gen.C
testsuite/sparc-sun-solaris2.8/tuples
testsuite/sparc-sun-solaris2.9/make.solo_mutatee.gen
testsuite/sparc-sun-solaris2.9/test_info_new.gen.C
testsuite/sparc-sun-solaris2.9/tuples
testsuite/src/StdOutputDriver.C
testsuite/src/dyninst/test1_14.C
testsuite/src/dyninst/test1_21.C
testsuite/src/dyninst/test1_22.C
testsuite/src/help.h
testsuite/src/specification/makemake.py
testsuite/src/specification/spec-grouped.pl
testsuite/src/specification/test.pl
testsuite/src/specification/tuples.py
testsuite/src/symtab/symtab_comp.C
testsuite/src/test_driver.C
testsuite/src/test_info_new.C
testsuite/src/test_info_new.h
testsuite/src/test_lib.C
testsuite/src/test_lib.h
testsuite/x86_64-unknown-linux2.4/make.solo_mutatee.gen
testsuite/x86_64-unknown-linux2.4/test_info_new.gen.C
testsuite/x86_64-unknown-linux2.4/tuples