Bug 1040715 - dyninst-testsuite fails most g++ tests
Summary: dyninst-testsuite fails most g++ tests
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dyninst
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Josh Stone
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1063447
TreeView+ depends on / blocked
 
Reported: 2013-12-12 00:32 UTC by Josh Stone
Modified: 2014-02-10 18:38 UTC (History)
5 users (show)

Fixed In Version: dyninst-8.1.2-6.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1063447 (view as bug list)
Environment:
Last Closed: 2013-12-12 02:37:15 UTC
Type: Bug


Attachments (Terms of Use)

Description Josh Stone 2013-12-12 00:32:04 UTC
Description of problem:
Almost all of the Dyninst g++ subtests fail.

Version-Release number of selected component (if applicable):
dyninst-testsuite-8.1.2-4.fc20.x86_64

How reproducible:
100%

Steps to Reproduce:
1. cd /usr/lib64/dyninst/testsuite
2. ./runTests -all -g++

Actual results:
Many report FAILED right away.

Expected results:
Results should be similar to "./runTests -all -gcc".  The testsuite is not really robust enough to have zero failures, but compiling testcases as C or C++ shouldn't make so much difference.

Additional info:

Comment 1 Josh Stone 2013-12-12 00:53:23 UTC
The primary difference I found is that all the testsuite/*_g++_* files were compiled with optimization, while testsuite/*_gcc_* files were not.

Dyninst actually has the option to compile its testsuite at multiple optimization variants, but the default is just unoptimized.  I've been advised by upstream not to bother with the optimization though, because most of the testcases are not designed well enough to deal with it.  For instance, the compiler might optimize a single read for repeated access to an apparently-unchanging variable, but really some instrumentation intends to change it.  Some cases like this could be solved, adding "volatile" for instance, but it would be a big undertaking to get all testcases in shape for this.

Note, it's no issue for the main libraries -- they can and should be optimized like normal.  This is only a concern for the testsuite binaries.

I found this commit made between 8.1.1 and 8.1.2:

  commit 5f8c0afd6d3667a0d003cb987bfefacc5ac20787
  Author: Bill Williams <bill.edu>
  Date:   Tue May 21 11:47:46 2013 -0500

      Ensure that we compile test suite and Dyninst with the same CXXFLAGS
      to work around gcc 4.7.2 bug

That bug is the std::pair ABI break between C++98 and C++11 (which is actually gcc 4.7.0 and 4.7.1 only).  In a direct build, this commit only ends up adding the global "-std=c++0x" or "-std=c++11" flag to the testsuite, but the way it's written also picks up all the rpmbuild flags, including optimization.

It should be fine to just hard-code -std=c++11 for Fedora builds.


Note You need to log in before you can comment on or make changes to this bug.