Skip to content

Commit

Permalink
Add tests for H5R get name APIs
Browse files Browse the repository at this point in the history
Added functionality tests for the following APIs:
H5Rget_file_name
H5Rget_obj_name
H5Rget_attr_name

Also removed "+1" when returning a name length in H5R__get_attr_name().
The exter "+1" gave an incorrect value for the length of the referenced
object's attribute name.

Fixed HDFGroupGH-4447
  • Loading branch information
bmribler committed Jul 17, 2024
1 parent 033f2a8 commit 4c95412
Show file tree
Hide file tree
Showing 2 changed files with 307 additions and 129 deletions.
2 changes: 1 addition & 1 deletion src/H5Rint.c
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ H5R__get_attr_name(const H5R_ref_priv_t *ref, char *buf, size_t size)
buf[copy_len] = '\0';
}

ret_value = (ssize_t)(attr_name_len + 1);
ret_value = (ssize_t)(attr_name_len);

FUNC_LEAVE_NOAPI(ret_value)
} /* end H5R__get_attr_name() */
Expand Down
Loading

0 comments on commit 4c95412

Please sign in to comment.