HDFGroup / HDFGroup/HDF.PInvoke

The test H5Lunpack_elink_valTest3 fails on Linux.

Open
#160 0 comments 0 reactions 1 assignee Claimed by @gheber View on GitHub
bug test
Dominant language
C#
Stars
87
Forks
31
PR merge metrics
No merged PRs in 30d

Description

## 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: https://github.com/HDFGroup/HDF.PInvoke/blob/90b1c76e99659d47e665a3079bc9f21c48122708/UnitTests/H5LTest/H5Lunpack_elink_val.cs#L182-L183

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

https://github.com/HDFGroup/HDF.PInvoke/blob/90b1c76e99659d47e665a3079bc9f21c48122708/UnitTests/H5LTest/H5Lget_name_by_idx.cs#L82-L94

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](https://github.com/HDFGroup/HDF.PInvoke/files/3233150/tmp973T4B.tmp.zip)

## Screenshot
![grafik](https://user-images.githubusercontent.com/20972129/58569113-c3b7f000-8235-11e9-9a14-021dc6c2faa0.png)

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:

https://github.com/HDFGroup/HDF.PInvoke/blob/90b1c76e99659d47e665a3079bc9f21c48122708/UnitTests/H5LTest/H5Lget_name_by_idx.cs#L89

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.