Project

General

Profile

Bug #1540

tng unit test shows errors

Added by Roland Schulz almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Category:
core library
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

The tng unit tests shows errors:
23:03:10 8: TNG library: Cannot read header size. D:\jenkins-build\workspace\Gromacs_Gerrit_5_0@2\f9e84682\gromacs\src\external\tng_io\src\lib\tng_io.c: 818
23:03:10 8: TNG library: Cannot read block header at pos -1. D:\jenkins-build\workspace\Gromacs_Gerrit_5_0@2\f9e84682\gromacs\src\external\tng_io\src\lib\tng_io.c: 11553

Without failing. Not sure whether these errors are actually a problem.
- If they are, they need to fixed and also the unit test fixed so that it fails if an error occur
- If it is an problem, they need to be silent to not confuse.

Associated revisions

Revision ece402b9 (diff)
Added by Magnus Lundborg almost 3 years ago

Fix tng_num_frame_sets_get() with no frame sets.

When there are no frame sets the function returned an error.
This corresponds to commit 6f7862c7406b in the TNG repository.

Fixes #1540

Change-Id: I3df04d84ebd8fcdc6be76a446efa3209df363d23

History

#1 Updated by Magnus Lundborg almost 3 years ago

  • Status changed from New to Accepted

The tests should indeed fail at that stage, since somethings is apparently a problem. I guess this is from running bin/tests/tng_testing, right? Could you give the whole output of the tests so that I can see where it fails. I think I know, but it's good to be sure.

The next question is why the test(s) fail(s).

#2 Updated by Magnus Lundborg almost 3 years ago

Sorry, now I've realised where the error occurs. There's nothing that actually fails, there was just a poor handling of TNG files without any trajectory data.

#3 Updated by Gerrit Code Review Bot almost 3 years ago

Gerrit received a related patchset '1' for Issue #1540.
Uploader: Magnus Lundborg ()
Change-Id: I3df04d84ebd8fcdc6be76a446efa3209df363d23
Gerrit URL: https://gerrit.gromacs.org/3729

#4 Updated by Magnus Lundborg almost 3 years ago

  • Status changed from Accepted to Fix uploaded

#5 Updated by Roland Schulz almost 3 years ago

Shouldn't the unit test have failed? I understand that it wasn't an error. But I'm wondering that if an error was (wrongly) detected, it seems odd that the unit test passed. I just want to make sure that if a real error happens in the future it isn't missed because the error isn't propagated incorrectly.

#6 Updated by Magnus Lundborg almost 3 years ago

I think that the TNG unit tests in GROMACS currently only check that there are no fatal errors, but Mark might know more about that.

#7 Updated by Mark Abraham almost 3 years ago

Magnus Lundborg wrote:

I think that the TNG unit tests in GROMACS currently only check that there are no fatal errors, but Mark might know more about that.

GROMACS doesn't use the TNG unit tests at all - though there's probably a todo about that somewhere. The integration-style tests for various trajectory handling exercise the TNG code, of course, but don't do anything more interesting than wrap trjconv or such, and report on its return code. Some unit style tests on the GROMACS functions that wrap calls to TNG might well be a good idea, but if there's not constructors for stuff that work decently, that should come first!

#8 Updated by Teemu Murtola almost 3 years ago

  • Category set to core library
  • Target version set to 5.0.1

#9 Updated by Roland Schulz almost 3 years ago

  • Status changed from Fix uploaded to Closed

Also available in: Atom PDF