Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.95.0 bond and graph tests failing #735

Closed
drew-parsons opened this issue Aug 18, 2021 · 3 comments · Fixed by #739
Closed

v1.95.0 bond and graph tests failing #735

drew-parsons opened this issue Aug 18, 2021 · 3 comments · Fixed by #739
Assignees

Comments

@drew-parsons
Copy link
Contributor

Avogadro version:

  • Avogadrolibs: 1.95.0
  • Qt: 5.15.2

Desktop version: :

  • OS: Linux (debian unstable)
  • Version: linux 5.10.46
  • Compiler: g++ 10.2.1

Describe the bug

Installation tests fail at BondTest, GraphTest and MoleculeTest,

[  FAILED  ] BondTest.setOrder (0 ms)
[  FAILED  ] BondTest.operators (0 ms)
[  FAILED  ] GraphTest.connectedComponents (0 ms)
[  FAILED  ] MoleculeTest.addBond (0 ms)
[  FAILED  ] MoleculeTest.removeBond (0 ms)
[  FAILED  ] MoleculeTest.findBond (0 ms)

To Reproduce
Steps to reproduce the behavior:

  1. Configure and build tests from the source dir
TESTDIR=tests/run_test

mkdir $TESTDIR
cd $TESTDIR

cmake -DAvogadroLibs_BINARY_DIR=/usr/include/ -Wno-dev ..
make AvogadroTests VERBOSE=1
  1. Run tests from TESTDIR
./core/AvogadroTests
  1. See error

Expected behavior

All tests are expected to pass.

Logs

Excerpts from the test log are

[ 23%] Building CXX object core/CMakeFiles/AvogadroTests.dir/bondtest.o
cd /tmp/autopkgtest.LUnaKn/build.0Ne/real-tree/tests/run_test/core && /usr/bin/c++  -I/usr/include/avogadro/core -isystem /usr/include/eigen3  -o CMakeFiles/AvogadroTests.dir/bondtest.o -c /tmp/autopkgtest.LUnaKn/build.0Ne/real-tree/tests/core/bondtest.cpp
...
[ 52%] Building CXX object core/CMakeFiles/AvogadroTests.dir/graphtest.o
cd /tmp/autopkgtest.LUnaKn/build.0Ne/real-tree/tests/run_test/core && /usr/bin/c++  -I/usr/include/avogadro/core -isystem /usr/include/eigen3  -o CMakeFiles/AvogadroTests.dir/graphtest.o -c /tmp/autopkgtest.LUnaKn/build.0Ne/real-tree/tests/core/graphtest.cpp
...
[ 61%] Building CXX object core/CMakeFiles/AvogadroTests.dir/moleculetest.o
cd /tmp/autopkgtest.LUnaKn/build.0Ne/real-tree/tests/run_test/core && /usr/bin/c++  -I/usr/include/avogadro/core -isystem /usr/include/eigen3  -o CMakeFiles/AvogadroTests.dir/moleculetest.o -c /tmp/autopkgtest.LUnaKn/build.0Ne/real-tree/tests/core/moleculetest.cpp
...
[----------] 1 test from BasisSetTest
[ RUN      ] BasisSetTest.homo
[       OK ] BasisSetTest.homo (0 ms)
[----------] 1 test from BasisSetTest (0 ms total)

[----------] 2 tests from BondTest
[ RUN      ] BondTest.setOrder
/tmp/autopkgtest.LUnaKn/build.0Ne/real-tree/tests/core/bondtest.cpp:31: Failure
Expected equality of these values:
  bond.order()
    Which is: '\0'
  1
/tmp/autopkgtest.LUnaKn/build.0Ne/real-tree/tests/core/bondtest.cpp:35: Failure
Expected equality of these values:
  bond.order()
    Which is: '\0'
  2
[  FAILED  ] BondTest.setOrder (0 ms)
[ RUN      ] BondTest.operators
/tmp/autopkgtest.LUnaKn/build.0Ne/real-tree/tests/core/bondtest.cpp:47: Failure
Value of: bond1 == molecule.bond(0)
  Actual: false
Expected: true
/tmp/autopkgtest.LUnaKn/build.0Ne/real-tree/tests/core/bondtest.cpp:48: Failure
Value of: bond1 != molecule.bond(0)
  Actual: true
Expected: false
/tmp/autopkgtest.LUnaKn/build.0Ne/real-tree/tests/core/bondtest.cpp:51: Failure
Value of: bond1 != bond2
  Actual: false
Expected: true
[  FAILED  ] BondTest.operators (0 ms)
[----------] 2 tests from BondTest (0 ms total)

[----------] 1 test from CoordinateBlockGeneratorTest
[ RUN      ] CoordinateBlockGeneratorTest.generateCoordinateBlock
[       OK ] CoordinateBlockGeneratorTest.generateCoordinateBlock (0 ms)
[----------] 1 test from CoordinateBlockGeneratorTest (0 ms total)
...
[----------] 11 tests from GraphTest
[ RUN      ] GraphTest.size
[       OK ] GraphTest.size (0 ms)
[ RUN      ] GraphTest.setSize
[       OK ] GraphTest.setSize (0 ms)
[ RUN      ] GraphTest.isEmpty
[       OK ] GraphTest.isEmpty (0 ms)
[ RUN      ] GraphTest.clear
[       OK ] GraphTest.clear (0 ms)
[ RUN      ] GraphTest.addVertex
[       OK ] GraphTest.addVertex (0 ms)
[ RUN      ] GraphTest.removeVertex
[       OK ] GraphTest.removeVertex (0 ms)
[ RUN      ] GraphTest.vertexCount
[       OK ] GraphTest.vertexCount (0 ms)
[ RUN      ] GraphTest.addEdge
[       OK ] GraphTest.addEdge (0 ms)
[ RUN      ] GraphTest.removeEdge
[       OK ] GraphTest.removeEdge (0 ms)
[ RUN      ] GraphTest.edgeCount
[       OK ] GraphTest.edgeCount (0 ms)
[ RUN      ] GraphTest.connectedComponents
/tmp/autopkgtest.LUnaKn/build.0Ne/real-tree/tests/core/graphtest.cpp:154: Failure
Expected equality of these values:
  graph.connectedComponents().size()
    Which is: 6
  static_cast<size_t>(3)
    Which is: 3
/tmp/autopkgtest.LUnaKn/build.0Ne/real-tree/tests/core/graphtest.cpp:157: Failure
Expected equality of these values:
  graph.connectedComponents().size()
    Which is: 4
  static_cast<size_t>(2)
    Which is: 2
/tmp/autopkgtest.LUnaKn/build.0Ne/real-tree/tests/core/graphtest.cpp:160: Failure
Expected equality of these values:
  graph.connectedComponents().size()
    Which is: 4
  static_cast<size_t>(1)
    Which is: 1
[  FAILED  ] GraphTest.connectedComponents (0 ms)
[----------] 11 tests from GraphTest (0 ms total)
...
[----------] 10 tests from MoleculeTest
[ RUN      ] MoleculeTest.addAtom
[       OK ] MoleculeTest.addAtom (0 ms)
[ RUN      ] MoleculeTest.removeAtom
[       OK ] MoleculeTest.removeAtom (0 ms)
[ RUN      ] MoleculeTest.addBond
/tmp/autopkgtest.LUnaKn/build.0Ne/real-tree/tests/core/moleculetest.cpp:146: Failure
Value of: bondAB.isValid()
  Actual: false
Expected: true
/tmp/autopkgtest.LUnaKn/build.0Ne/real-tree/tests/core/moleculetest.cpp:149: Failure
Expected equality of these values:
  bondAB.index()
    Which is: 18446744073709551615
  static_cast<Index>(0)
    Which is: 0
/tmp/autopkgtest.LUnaKn/build.0Ne/real-tree/tests/core/moleculetest.cpp:151: Failure
Expected equality of these values:
  bondAB.atom2().index()
    Which is: 33
  b.index()
    Which is: 1
/tmp/autopkgtest.LUnaKn/build.0Ne/real-tree/tests/core/moleculetest.cpp:152: Failure
Expected equality of these values:
  bondAB.order()
    Which is: '\0'
  static_cast<unsigned char>(1)
    Which is: '\x1' (1)
/tmp/autopkgtest.LUnaKn/build.0Ne/real-tree/tests/core/moleculetest.cpp:156: Failure
Value of: bondBC.isValid()
  Actual: false
Expected: true
/tmp/autopkgtest.LUnaKn/build.0Ne/real-tree/tests/core/moleculetest.cpp:158: Failure
Expected equality of these values:
  bondBC.index()
    Which is: 18446744073709551615
  static_cast<Index>(1)
    Which is: 1
/tmp/autopkgtest.LUnaKn/build.0Ne/real-tree/tests/core/moleculetest.cpp:159: Failure
Expected equality of these values:
  bondBC.order()
    Which is: '\0'
  static_cast<unsigned char>(2)
    Which is: '\x2' (2)
[  FAILED  ] MoleculeTest.addBond (0 ms)
[ RUN      ] MoleculeTest.removeBond
/tmp/autopkgtest.LUnaKn/build.0Ne/real-tree/tests/core/moleculetest.cpp:197: Failure
Expected equality of these values:
  1
  molecule.bondCount()
    Which is: 2
/tmp/autopkgtest.LUnaKn/build.0Ne/real-tree/tests/core/moleculetest.cpp:198: Failure
Value of: molecule.bond(a, b).isValid()
  Actual: true
Expected: false
[  FAILED  ] MoleculeTest.removeBond (0 ms)
[ RUN      ] MoleculeTest.findBond
/tmp/autopkgtest.LUnaKn/build.0Ne/real-tree/tests/core/moleculetest.cpp:213: Failure
Expected equality of these values:
  molecule.bond(a1, a2).index()
    Which is: 0
  b.index()
    Which is: 18446744073709551615
/tmp/autopkgtest.LUnaKn/build.0Ne/real-tree/tests/core/moleculetest.cpp:214: Failure
Expected equality of these values:
  molecule.bond(a2, a1).index()
    Which is: 0
  b.index()
    Which is: 18446744073709551615
[  FAILED  ] MoleculeTest.findBond (0 ms)
[ RUN      ] MoleculeTest.setData
[       OK ] MoleculeTest.setData (0 ms)
[ RUN      ] MoleculeTest.dataMap
[       OK ] MoleculeTest.dataMap (0 ms)
[ RUN      ] MoleculeTest.perceiveBondsSimple
[       OK ] MoleculeTest.perceiveBondsSimple (0 ms)
[ RUN      ] MoleculeTest.copy
[       OK ] MoleculeTest.copy (0 ms)
[ RUN      ] MoleculeTest.assignment
[       OK ] MoleculeTest.assignment (0 ms)
[----------] 10 tests from MoleculeTest (0 ms total)
...
[----------] 5 tests from SpaceGroupTest
[ RUN      ] SpaceGroupTest.getSpaceGroup
[       OK ] SpaceGroupTest.getSpaceGroup (4 ms)
[ RUN      ] SpaceGroupTest.reduceToPrimitive
/tmp/autopkgtest.LUnaKn/build.0Ne/real-tree/debian/tests/test-avogadrolibs-cpp: line 9: 339317 Segmentation fault      ./core/AvogadroTests
autopkgtest [13:47:16]: test test-avogadrolibs-cpp: -----------------------]
autopkgtest [13:47:16]: test test-avogadrolibs-cpp:  - - - - - - - - - - results - - - - - - - - - -
test-avogadrolibs-cpp FAIL non-zero exit status 139
@ghutchis
Copy link
Member

ghutchis commented Aug 18, 2021

Huh. I'll have to see why the test failures aren't showing up in the GitHub actions.

(Or why the tests succeed on the GH actions but fail when run your way.)

@ghutchis
Copy link
Member

Okay, I can confirm on #739 - the avogadrolibs unit tests weren't run from GitHub.

@ghutchis
Copy link
Member

Thanks for this, the tests should be running on all PR now and seem to be fixed.
(I'm getting a weird free() error in the MoleculeTest on GH actions, but it's clean on every other system I've tried.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants