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

The test H5Lunpack_elink_valTest3 fails on Linux. #160

Open
Apollo3zehn opened this issue May 29, 2019 · 0 comments
Open

The test H5Lunpack_elink_valTest3 fails on Linux. #160

Apollo3zehn opened this issue May 29, 2019 · 0 comments
Assignees

Comments

@Apollo3zehn
Copy link

Problem

When I build HDF.PInvoke under Linux using AppVeyor, a single test fails (see here: https://ci.appveyor.com/project/Apollo3zehn/hdf-pinvoke-netstandard/builds/24840707)

The failing line of code is:

Assert.IsTrue(
H5G.close(H5G.create(m_v0_class_file, bytes, m_lcpl_utf8)) >= 0);

The reason is that, before this test is executed, this one runs:

[TestMethod]
public void H5Lget_name_by_idxTest2()
{
hid_t lcpl = H5P.copy(m_lcpl);
Assert.IsTrue(lcpl >= 0);
Assert.IsTrue(H5P.set_char_encoding(lcpl, H5T.cset_t.UTF8) >= 0);
for (int i = 0; i < m_utf8strings.Length; ++i)
{
Assert.IsTrue(
H5L.create_external(m_v0_class_file_name, "/",
m_v0_class_file, m_utf8strings[i], lcpl) >= 0);
}

This test creates an external link (create_external) in the root of the test file. Later, when the failing test runs, it tries to create a group with same name of that link and fails. Here is a copy of the HDF5 file right before the test fails:
tmp973T4B.tmp.zip

Screenshot

grafik

The failing test tries to create a group with name Ελληνικά which already exists.

Solution

A solution could be to not consume all UTF-8 names in the loop here:

for (int i = 0; i < m_utf8strings.Length; ++i)

Instead, let the loop start at int i = 1. But that might not be very clean. Maybe a totally different group name is required in the H5Lunpack_elink_valTest3 test.

A am not quite sure why this error only happens on Linux. My only guess is that the tests are executed in a different order on Windows and Linux.

@gheber gheber self-assigned this May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants