Project

General

Profile

Bug #13453

tests using boost unit do not work with art 2.02.01

Added by Lynn Garren about 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
High
Category:
Other
Target version:
Start date:
08/04/2016
Due date:
% Done:

100%

Estimated time:
8.00 h
Spent time:
Occurs In:
Experiment:
LArSoft
Co-Assignees:
Duration:

Description

When running test execs using BOOST_UNIT, the first argument to TEST_ARGS must be --, now. This change is related to moving from art 2.00.03 to art 2.02.01. We suspect that the problem is in the special test header in larsoft. This problem is specific to larsoft tests.

The simplest way to see this problem is to build larcore and larcoreobj with art 2.02.01.

The following tests FAILED:
      3 - geometry_iterator_test (SEGFAULT)
      4 - geometry_test (OTHER_FAULT)
      5 - geometry_iterator_loop_test (OTHER_FAULT)
      6 - geometry_thirdplaneslope_test (OTHER_FAULT)
Errors while running CTest

The tests fail regardless of whether or not the -- is added to TEST_ARGS in larcore/test/Geometry. The errors in the log file look like this:

3/16 Testing: geometry_iterator_test
3/16 Test: geometry_iterator_test
Command: "/products/cetbuildtools/v5_04_03/bin/cet_exec_test" "--wd" "/scratch/garren/larsoft/v06_02_00_test/build_slf6.x86_64/larcore/test/Geometry/geometry_iterator_test.d" "--required-files" "" "--datafiles" "/home/garren/scratch/larsoft/v06_02_00_test/srcs/larcore/test/Geometry/test_geometry.fcl" "--skip-return-code" "247" "/scratch/garren/larsoft/v06_02_00_test/build_slf6.x86_64/larcore/bin/geometry_iterator_test" "test_geometry.fcl" 
Directory: /scratch/garren/larsoft/v06_02_00_test/build_slf6.x86_64/larcore/test/Geometry/geometry_iterator_test.d
"geometry_iterator_test" start time: Aug 04 22:44 CDT
Output:
----------------------------------------------------------
Boost.Test WARNING: token "test_geometry.fcl" does not correspond to the Boost.Test argument
                    and should be placed after all Boost.Test arguments and the -- separator.
                    For example: geometry_iterator_test --random -- test_geometry.fcl
Test setup error: std::system_error: Invalid argument

A locally modified copy of larcore and larcoreobj can be found in /home/garren/scratch/larsoft/v06_02_00_test/srcs


Related issues

Related to LArSoft - Necessary Maintenance #13477: Boost unit test interface changedClosed08/08/2016

Blocked by messagefacility - Bug #13464: Message facility initialisation with "SingleThread" failsClosed08/05/2016

History

#1 Updated by Gianluca Petrillo about 4 years ago

  • Category set to Other
  • Status changed from New to Assigned
  • % Done changed from 0 to 20
  • Estimated time set to 8.00 h
  • Experiment LArSoft added
  • Experiment deleted (-)

I can reproduce the error.

It is true that Boost requires the -- separator for its arguments (since when? this must have happened also in the past, since Boost hasn't been updated in this release).
But the code can react correctly, even if it prints that message. I think that's why we hadn't noticed in the past.

And, as Lynn says, that's not the problem.
The crash happens on initialisation of message facility, while reading a parameter set. And that parameter set seems correct...
Still investigating.

#2 Updated by Gianluca Petrillo about 4 years ago

  • Blocked by Bug #13464: Message facility initialisation with "SingleThread" fails added

#3 Updated by Gianluca Petrillo about 4 years ago

  • % Done changed from 20 to 50

I think I tracked the problem down to message facility library, and opened issue #13464.

We could maybe work around it by initialising message facility with MultiThread instead of SingleThread, but I prefer to wait for the resolution of the upstream issue or at least hear the recommendation upstream.
In other words, I am reluctant to recommend the upgrade to the new message facility (and art 2.2) until we know that this bug is not harmful (as my guts tell is).

#4 Updated by Gianluca Petrillo about 4 years ago

By the way, it turns out to be a coincidence that the failing unit tests all use Boost unit test.
Geometry unit tests use LArSoft unit test utilities to delegate geometry initialisation, and these utilities also initialise message facility. These tests also use Boost unit test framework, for convenience.
Lynn probably started the new release with testing larcore, and there is no test with Boost and without message facility in there.

#5 Updated by Kyle Knoepfel about 4 years ago

Replacing the SingleThread argument with MultiThread is safe. However, the issue is understood, and a fix is underway.

#6 Updated by Gianluca Petrillo about 4 years ago

#7 Updated by Gianluca Petrillo about 4 years ago

  • Status changed from Assigned to Resolved
  • Target version set to v06_03_00
  • % Done changed from 50 to 100

Resolved upstream.

#8 Updated by Gianluca Petrillo almost 4 years ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF