summaryrefslogtreecommitdiffstats
BranchCommit messageAuthorAge
architecture_docsUpdate README.mdGerd Heber17 months
developFix an issue where the Subfiling VFD's context cache grows too large (#4159)jhendersonHDF4 months
develop-readmeUpdate Linux workflows (#3173)Dana Robinson13 months
feature/1_12_recursive_ts_rw_lockUpdates BRANCH.md fileDana Robinson2 years
feature/alignmentPer discussion, use HD and add comments.David Young2 years
feature/async2Update pr-check.ymlLes Kurz4 years
feature/ccioCorrecting H5FD__mpio_custom_<read,write> syntax to have two _ characters.Rick5 years
feature/coding_standardsMerge branch 'develop' into feature/coding_standardsDana Robinson2 years
feature/de-hdTry to turn off auto-formatting on this branch.David Young2 years
feature/h5detectCommitting clang-format changesgithub-actions2 years
feature/h5f_get_obj_reworkReplace internal API callsMatthew Larson4 months
feature/indexingRemoved redundant textRichard Warren5 years
feature/new_datatypesMerge branch 'develop' into feature/new_datatypesDana Robinson4 months
feature/onion_vfdSync with develop (#1863)Dana Robinson2 years
feature/parallel_h5repackSync branch with develop (#1616)Scot Breitenfeld2 years
feature/refactor-h5t-cmpMerge branch 'feature/refactor-h5t-cmp' of github.com:HDFGroup/hdf5 into feat...David Young2 years
feature/select_io_chunk_cacheCommitting clang-format changesgithub-actions7 months
feature/select_io_tconvMerge pull request #2876 from vchoi-hdfgroup/2my_feature_select_io_tconvNeil Fortner14 months
feature/vfd_swmrVFD SWMR: Warning fixes and minor cleanup (#1847)Dana Robinson2 years
feature/vfd_swmr_beta_2Update VFD SWMR UGDana Robinson2 years
feature/vol_cap_flagsConvert unsigned cap flag field to uint64_t and add flags (#2050)Dana Robinson23 months
feature/vol_tools_testsMove changes from external repo to main repo (#3718)Glenn Song9 months
feature/werror-restrictMerge branch 'develop' into feature/werror-restrictDana Robinson2 years
gh-pagesdeploy: 2908dd1d12f82b3ad559e98ae639fac2c238bcddlrknox4 months
hdf5_1_10Added RELEASE.txt from HDF5 1.10.11 release to HISTORY-1_10.txt. (#3611)Larry Knox10 months
hdf5_1_10_10Update release date. (#2655)Larry Knox16 months
hdf5_1_10_11Create 11011 tarball (#3596)Larry Knox10 months
hdf5_1_10_9Remove duplicate line from README.md.Larry Knox2 years
hdf5_1_12Adjust some CMake settings (#3828)Allen Byrne9 months
hdf5_1_12_2HDF5 1.12.2 release created April 19, 2022.Larry Knox2 years
hdf5_1_12_3Hdf5 1 12 3 release (#3833)Larry Knox8 months
hdf5_1_13_2Update READMERE.md and RELEASE.txt with release date.Larry Knox23 months
hdf5_1_13_3Hdf5 1 13 3 - RELEASE.txt updates (#2203)Larry Knox21 months
hdf5_1_14Fix typo/stray character in cmake-ctest.yml (#4128)Larry Knox4 months
hdf5_1_14_0Commit release date.Larry Knox19 months
hdf5_1_14_1Hdf5 1 14 1-2 release for autoconf 2.71 generated files (#2945)Larry Knox14 months
hdf5_1_14_2Update release - fix bug and update date (#3380)Larry Knox11 months
hdf5_1_14_3Release updates (#3792)Larry Knox9 months
hdf5_1_6Merge pull request #1730 in HDFFV/hdf5 from ~BRTNFLD/hdf5_msb:hdf5_1_6 to hdf...Scot Breitenfeld5 years
hdf5_1_8Correct script for 3.12 and update HPC process (#2435)Allen Byrne17 months
hdf5_1_8_23Update release date in RELEASE.txt (#2440)Larry Knox17 months
inactive/110_HDFFV-10808-h5pset_file_space_strategyMerge pull request #1795 in HDFFV/hdf5 from ~BYRN/hdf5_adb:hdf5_1_10 to hdf5_...Allen Byrne5 years
inactive/H5Ocompare[svn-r22275] Clear up examples vs applications instances and add minimum file.Allen Byrne12 years
inactive/NPOESS[svn-r17496] Fixed obvious error : changed talign.c to talign on TEST_PROG as...Allen Byrne15 years
inactive/aio_vfd[svn-r22505] Comment out create file that fail with the new/PGI compiler unti...Larry Knox12 years
inactive/avoid_truncate[svn-r28002] merge from trunk.Mohamad Chaarawi9 years
inactive/cu_devMerge branch 'develop' into cu_devJohn Ravi4 years
inactive/develop_subfilingAdded skeletal version of H5FDsubfiling.c and H5FDsubfiling.h.mainzer4 years
inactive/develop_subfiling_v1Changed the usleep parameters based on whether the MPI rank hosts an IO Conce...Richard Warren4 years
inactive/direct_io_2[svn-r26017] Added BRANCH.txt.Dana Robinson9 years
inactive/h5ocompare[svn-r19890] Add initial implementation for H5Ocompare and usage in h5diff. ...Neil Fortner14 years
inactive/hdf5_daosmFix uninitialized return value bugs.Neil Fortner7 years
inactive/hdf5_ffadded *ff* files dependencyScot Breitenfeld8 years
inactive/hdf5_ff_compactor[svn-r24100] minor fix while creating a memory datatype for native writesVishwanath Venkatesan11 years
inactive/hdf5_radosMerge pull request #1585 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:hdf5_rados to ...Dana Robinson5 years
inactive/jpeg_converter[svn-r15458] Purpose: Modify the library to take the proper action when files...Neil Fortner16 years
inactive/json_volMerge pull request #1633 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:feature/json_v...Dana Robinson5 years
inactive/json_vol_oldcleanup, commentingFrank Willmore7 years
inactive/mdc_sl_optMinor copy edits to comments -- no code changes.mainzer4 years
inactive/mds[svn-r23487] use the core driver at the server side for the metadata fileMohamad Chaarawi11 years
inactive/merge_metadata_journaling[svn-r24779] Description:Quincey Koziol10 years
inactive/metadata_journaling[svn-r22480] Description:Quincey Koziol12 years
inactive/modify_dtype_filter[svn-r15820] Added a design document describing the design details for the fi...Raymond Lu16 years
inactive/multi_rd_wd_coll_io[svn-r29709] another merge from trunk.Mohamad Chaarawi8 years
inactive/multi_rd_wd_coll_io_mergeMerge pull request #837 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:multi_rd_wd_coll_...Larry Knox7 years
inactive/null_vfd[svn-r22705] Updated the failure behavior of inner driver calls. Expanded the...Jacob Gruber12 years
inactive/parallel_vdsSome fixes from Neil plus changes talked about in our last code reviewRichard Warren6 years
inactive/parallel_vds_developMerge branch 'develop' into parallel_vds_developM. Scot Breitenfeld5 years
inactive/parallel_vds_testingAdd two(2) new parallel VDS tests, the VDS merge code for Neil, and a few edi...Richard Warren7 years
inactive/phdf5_metadata_opt[svn-r29080] merge from trunk.Mohamad Chaarawi8 years
inactive/post_open_fixAdded a BRANCH.md fileDana Robinson2 years
inactive/rados_volMerge pull request #1641 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:feature/rados_...Dana Robinson5 years
inactive/selection_ioMerge pull request #1531 from fortnern/selection_ioNeil Fortner2 years
inactive/selection_io_with_subfiling_vfdspelling corrections (#1382)Scot Breitenfeld3 years
inactive/trunk_merge_coverity[svn-r23698] Description:Quincey Koziol11 years
loricooperhdf-patch-1Updated help desk URLLori Cooper7 months
metadata_cache_macro_cleanupremove obsolete SZIP find module (#2901)Allen Byrne15 months
ossf-scorecardCreate scorecard.ymlDana Robinson11 months
pr_484Committing clang-format changesgithub-actions3 years
reduce-h5f-duplicationInstead of duplicating H5F_shared_block_write() and _read() wholesale inDavid Young4 years
sel_io_chunk_cacheCommitting clang-format changesgithub-actions7 months
shell_scriptRemove unneeded/duplicated filesJordan Henderson10 months
zzz-gitlab-ciRun test without submitting to CDash.Larry Knox4 years
 
TagDownloadAuthorAge
snapshotsnapshot.zip  snapshot.tar.gz  snapshot.tar.bz2  lrknox4 months
snapshot-1.14snapshot-1.14.zip  snapshot-1.14.tar.gz  snapshot-1.14.tar.bz2  byrnHDF5 months
hdf5-1_12_3hdf5-1_12_3.zip  hdf5-1_12_3.tar.gz  hdf5-1_12_3.tar.bz2  Larry Knox8 months
snapshot-1.12snapshot-1.12.zip  snapshot-1.12.tar.gz  snapshot-1.12.tar.bz2  byrnHDF9 months
hdf5-1_14_3hdf5-1_14_3.zip  hdf5-1_14_3.tar.gz  hdf5-1_14_3.tar.bz2  Larry Knox9 months
hdf5-1_14_3-rc1hdf5-1_14_3-rc1.zip  hdf5-1_14_3-rc1.tar.gz  hdf5-1_14_3-rc1.tar.bz2  Larry Knox9 months
snapshot-1.10snapshot-1.10.zip  snapshot-1.10.tar.gz  snapshot-1.10.tar.bz2  byrnHDF10 months
hdf5-1_10_11hdf5-1_10_11.zip  hdf5-1_10_11.tar.gz  hdf5-1_10_11.tar.bz2  Larry Knox10 months
hdf5-1_14_2hdf5-1_14_2.zip  hdf5-1_14_2.tar.gz  hdf5-1_14_2.tar.bz2  Larry Knox11 months
hdf5-1_14_1-2hdf5-1_14_1-2.zip  hdf5-1_14_1-2.tar.gz  hdf5-1_14_1-2.tar.bz2  Larry Knox14 months
1.14.1hdf5-1.14.1.zip  hdf5-1.14.1.tar.gz  hdf5-1.14.1.tar.bz2  Larry Knox14 months
hdf5-1_14_1hdf5-1_14_1.zip  hdf5-1_14_1.tar.gz  hdf5-1_14_1.tar.bz2  Larry Knox14 months
hdf5-1_10_10hdf5-1_10_10.zip  hdf5-1_10_10.tar.gz  hdf5-1_10_10.tar.bz2  Larry Knox16 months
hdf5-1_8_23hdf5-1_8_23.zip  hdf5-1_8_23.tar.gz  hdf5-1_8_23.tar.bz2  Larry Knox17 months
hdf5-1_14_0hdf5-1_14_0.zip  hdf5-1_14_0.tar.gz  hdf5-1_14_0.tar.bz2  Larry Knox19 months
hdf5-1_13_3hdf5-1_13_3.zip  hdf5-1_13_3.tar.gz  hdf5-1_13_3.tar.bz2  Larry Knox21 months
hdf5-1_13_2hdf5-1_13_2.zip  hdf5-1_13_2.tar.gz  hdf5-1_13_2.tar.bz2  Larry Knox23 months
hdf5-1_10_9hdf5-1_10_9.zip  hdf5-1_10_9.tar.gz  hdf5-1_10_9.tar.bz2  Larry Knox2 years
hdf5_1_10_9-basehdf5_1_10_9-base.zip  hdf5_1_10_9-base.tar.gz  hdf5_1_10_9-base.tar.bz2  Allen Byrne2 years
hdf5-1_12_2hdf5-1_12_2.zip  hdf5-1_12_2.tar.gz  hdf5-1_12_2.tar.bz2  Larry Knox2 years
hdf5-1_12_2-3-rc1hdf5-1_12_2-3-rc1.zip  hdf5-1_12_2-3-rc1.tar.gz  hdf5-1_12_2-3-rc1.tar.bz2  Larry Knox2 years
hdf5-1_13_1hdf5-1_13_1.zip  hdf5-1_13_1.tar.gz  hdf5-1_13_1.tar.bz2  Larry Knox2 years
hdf5-1_13_0hdf5-1_13_0.zip  hdf5-1_13_0.tar.gz  hdf5-1_13_0.tar.bz2  Larry Knox3 years
hdf5-1_10_8hdf5-1_10_8.zip  hdf5-1_10_8.tar.gz  hdf5-1_10_8.tar.bz2  Larry Knox3 years
hdf5-1_13_0-rc6hdf5-1_13_0-rc6.zip  hdf5-1_13_0-rc6.tar.gz  hdf5-1_13_0-rc6.tar.bz2  Larry Knox3 years
vfd_swmr_beta_1vfd_swmr_beta_1.zip  vfd_swmr_beta_1.tar.gz  vfd_swmr_beta_1.tar.bz2  Dana Robinson3 years
hdf5-1_12_1hdf5-1_12_1.zip  hdf5-1_12_1.tar.gz  hdf5-1_12_1.tar.bz2  Larry Knox3 years
vfd_swmr_alpha_2vfd_swmr_alpha_2.zip  vfd_swmr_alpha_2.tar.gz  vfd_swmr_alpha_2.tar.bz2  Dana Robinson3 years
hdf5-1_8_22hdf5-1_8_22.zip  hdf5-1_8_22.tar.gz  hdf5-1_8_22.tar.bz2  Larry Knox3 years
hdf5-1_13_0-rc5hdf5-1_13_0-rc5.zip  hdf5-1_13_0-rc5.tar.gz  hdf5-1_13_0-rc5.tar.bz2  Neil Fortner3 years
hdf5-1_13_0-rc4hdf5-1_13_0-rc4.zip  hdf5-1_13_0-rc4.tar.gz  hdf5-1_13_0-rc4.tar.bz2  Dana Robinson4 years
hdf5-1_13_0-rc3hdf5-1_13_0-rc3.zip  hdf5-1_13_0-rc3.tar.gz  hdf5-1_13_0-rc3.tar.bz2  Quincey Koziol4 years
hdf5-1_13_0-rc2hdf5-1_13_0-rc2.zip  hdf5-1_13_0-rc2.tar.gz  hdf5-1_13_0-rc2.tar.bz2  jhendersonHDF4 years
hdf5-1_13_0-rc1hdf5-1_13_0-rc1.zip  hdf5-1_13_0-rc1.tar.gz  hdf5-1_13_0-rc1.tar.bz2  Hans Johnson4 years
hdf5-1.12.1-rc1hdf5-1.12.1-rc1.zip  hdf5-1.12.1-rc1.tar.gz  hdf5-1.12.1-rc1.tar.bz2  Allen Byrne4 years
hdf5-1_10_7hdf5-1_10_7.zip  hdf5-1_10_7.tar.gz  hdf5-1_10_7.tar.bz2  Larry Knox4 years
vfd_swmr_alpha_1vfd_swmr_alpha_1.zip  vfd_swmr_alpha_1.tar.gz  vfd_swmr_alpha_1.tar.bz2  John Mainzer4 years
hdf5-1_12_0hdf5-1_12_0.zip  hdf5-1_12_0.tar.gz  hdf5-1_12_0.tar.bz2  Larry Knox4 years
hdf5-1_12_0-initialhdf5-1_12_0-initial.zip  hdf5-1_12_0-initial.tar.gz  hdf5-1_12_0-initial.tar.bz2  Larry Knox4 years
hdf5-1_10_6hdf5-1_10_6.zip  hdf5-1_10_6.tar.gz  hdf5-1_10_6.tar.bz2  Larry Knox5 years
hdf5-1_12_0-alpha1hdf5-1_12_0-alpha1.zip  hdf5-1_12_0-alpha1.tar.gz  hdf5-1_12_0-alpha1.tar.bz2  Larry Knox5 years
hdf5-1_12_0-alpha0hdf5-1_12_0-alpha0.zip  hdf5-1_12_0-alpha0.tar.gz  hdf5-1_12_0-alpha0.tar.bz2  Larry Knox5 years
hdf5_1_12-initialhdf5_1_12-initial.zip  hdf5_1_12-initial.tar.gz  hdf5_1_12-initial.tar.bz2  Larry Knox5 years
hdf5-1_10_5hdf5-1_10_5.zip  hdf5-1_10_5.tar.gz  hdf5-1_10_5.tar.bz2  Larry Knox5 years
hdf5-1_10_4hdf5-1_10_4.zip  hdf5-1_10_4.tar.gz  hdf5-1_10_4.tar.bz2  Larry Knox6 years
Base_1_10_4Base_1_10_4.zip  Base_1_10_4.tar.gz  Base_1_10_4.tar.bz2  Larry Knox6 years
hdf5-1_10_3hdf5-1_10_3.zip  hdf5-1_10_3.tar.gz  hdf5-1_10_3.tar.bz2  Larry Knox6 years
hdf5-1_8_21hdf5-1_8_21.zip  hdf5-1_8_21.tar.gz  hdf5-1_8_21.tar.bz2  Larry Knox6 years
hdf5-1_10_2hdf5-1_10_2.zip  hdf5-1_10_2.tar.gz  hdf5-1_10_2.tar.bz2  Larry Knox6 years
hdf5-1_8_20hdf5-1_8_20.zip  hdf5-1_8_20.tar.gz  hdf5-1_8_20.tar.bz2  Larry Knox7 years
hdf5-1_8_19hdf5-1_8_19.zip  hdf5-1_8_19.tar.gz  hdf5-1_8_19.tar.bz2  Larry Knox7 years
hdf5-1_10_1hdf5-1_10_1.zip  hdf5-1_10_1.tar.gz  hdf5-1_10_1.tar.bz2  Larry Knox7 years
hdf5-1_8_18hdf5-1_8_18.zip  hdf5-1_8_18.tar.gz  hdf5-1_8_18.tar.bz2  lrknox8 years
hdf5-1_10_0-patch1hdf5-1_10_0-patch1.zip  hdf5-1_10_0-patch1.tar.gz  hdf5-1_10_0-patch1.tar.bz2  Larry Knox8 years
hdf5-1_8_17hdf5-1_8_17.zip  hdf5-1_8_17.tar.gz  hdf5-1_8_17.tar.bz2  Larry Knox8 years
hdf5-1_10_0hdf5-1_10_0.zip  hdf5-1_10_0.tar.gz  hdf5-1_10_0.tar.bz2  Larry Knox8 years
hdf5-1_10_0-alpha1hdf5-1_10_0-alpha1.zip  hdf5-1_10_0-alpha1.tar.gz  hdf5-1_10_0-alpha1.tar.bz2  Elena Pourmal9 years
hdf5-1_10_0-alpha0hdf5-1_10_0-alpha0.zip  hdf5-1_10_0-alpha0.tar.gz  hdf5-1_10_0-alpha0.tar.bz2  Elena Pourmal9 years
hdf5-1_8_16hdf5-1_8_16.zip  hdf5-1_8_16.tar.gz  hdf5-1_8_16.tar.bz2  Larry Knox9 years
hdf5_ff_v1hdf5_ff_v1.zip  hdf5_ff_v1.tar.gz  hdf5_ff_v1.tar.bz2  Mohamad Chaarawi9 years
hdf5-1_9_222-swmr0hdf5-1_9_222-swmr0.zip  hdf5-1_9_222-swmr0.tar.gz  hdf5-1_9_222-swmr0.tar.bz2  Albert Cheng9 years
hdf5-1_8_15-patch1hdf5-1_8_15-patch1.zip  hdf5-1_8_15-patch1.tar.gz  hdf5-1_8_15-patch1.tar.bz2  Elena Pourmal9 years
CCP_proto1CCP_proto1.zip  CCP_proto1.tar.gz  CCP_proto1.tar.bz2  Albert Cheng9 years
hdf5-1_8_15hdf5-1_8_15.zip  hdf5-1_8_15.tar.gz  hdf5-1_8_15.tar.bz2  Elena Pourmal9 years
hdf5_1_8_15_precodefreeze_final_commithdf5_1_8_15_precodefreeze_final_commit.zip  hdf5_1_8_15_precodefreeze_final_commit.tar.gz  hdf5_1_8_15_precodefreeze_final_commit.tar.bz2  Larry Knox9 years
vms_last_support_1_8vms_last_support_1_8.zip  vms_last_support_1_8.tar.gz  vms_last_support_1_8.tar.bz2  Dana Robinson9 years
vms_last_support_trunkvms_last_support_trunk.zip  vms_last_support_trunk.tar.gz  vms_last_support_trunk.tar.bz2  Dana Robinson9 years
hdf5-1_8_14hdf5-1_8_14.zip  hdf5-1_8_14.tar.gz  hdf5-1_8_14.tar.bz2  Elena Pourmal10 years
hdf5-1_8_13hdf5-1_8_13.zip  hdf5-1_8_13.tar.gz  hdf5-1_8_13.tar.bz2  Elena Pourmal10 years
DLS_20140316DLS_20140316.zip  DLS_20140316.tar.gz  DLS_20140316.tar.bz2  Elena Pourmal10 years
before_removing_mpiposix_vfdbefore_removing_mpiposix_vfd.zip  before_removing_mpiposix_vfd.tar.gz  before_removing_mpiposix_vfd.tar.bz2  Quincey Koziol10 years
DECTRIS_20131231DECTRIS_20131231.zip  DECTRIS_20131231.tar.gz  DECTRIS_20131231.tar.bz2  Elena Pourmal10 years
DLS_20131204DLS_20131204.zip  DLS_20131204.tar.gz  DLS_20131204.tar.bz2  Elena Pourmal11 years
hdf5-1_8_12-cmake_install_fixhdf5-1_8_12-cmake_install_fix.zip  hdf5-1_8_12-cmake_install_fix.tar.gz  hdf5-1_8_12-cmake_install_fix.tar.bz2  Elena Pourmal11 years
hdf5-1_8_12hdf5-1_8_12.zip  hdf5-1_8_12.tar.gz  hdf5-1_8_12.tar.bz2  Elena Pourmal11 years
DLS_20130630DLS_20130630.zip  DLS_20130630.tar.gz  DLS_20130630.tar.bz2  Albert Cheng11 years
hdf5-1_8_11hdf5-1_8_11.zip  hdf5-1_8_11.tar.gz  hdf5-1_8_11.tar.bz2  Albert Cheng11 years
hdf5-1_8_10-patch1hdf5-1_8_10-patch1.zip  hdf5-1_8_10-patch1.tar.gz  hdf5-1_8_10-patch1.tar.bz2  Albert Cheng12 years
hdf5-1_8_10hdf5-1_8_10.zip  hdf5-1_8_10.tar.gz  hdf5-1_8_10.tar.bz2  Albert Cheng12 years
hdf5-1_8_9hdf5-1_8_9.zip  hdf5-1_8_9.tar.gz  hdf5-1_8_9.tar.bz2  Mike McGreevy12 years
hdf5-1_8_8hdf5-1_8_8.zip  hdf5-1_8_8.tar.gz  hdf5-1_8_8.tar.bz2  Mike McGreevy13 years
hdf5-1_8_7hdf5-1_8_7.zip  hdf5-1_8_7.tar.gz  hdf5-1_8_7.tar.bz2  Mike McGreevy13 years
hdf5-1_8_6hdf5-1_8_6.zip  hdf5-1_8_6.tar.gz  hdf5-1_8_6.tar.bz2  Mike McGreevy13 years
hdf5-1_8_5-patch1hdf5-1_8_5-patch1.zip  hdf5-1_8_5-patch1.tar.gz  hdf5-1_8_5-patch1.tar.bz2  Mike McGreevy14 years
hdf5-1_8_5hdf5-1_8_5.zip  hdf5-1_8_5.tar.gz  hdf5-1_8_5.tar.bz2  Mike McGreevy14 years
hdf5-1_8_4-patch1hdf5-1_8_4-patch1.zip  hdf5-1_8_4-patch1.tar.gz  hdf5-1_8_4-patch1.tar.bz2  Mike McGreevy14 years
hdf5-1_8_4-VMShdf5-1_8_4-VMS.zip  hdf5-1_8_4-VMS.tar.gz  hdf5-1_8_4-VMS.tar.bz2  Elena Pourmal15 years
hdf5-1_8_4hdf5-1_8_4.zip  hdf5-1_8_4.tar.gz  hdf5-1_8_4.tar.bz2  Elena Pourmal15 years
hdf5-1_6_10hdf5-1_6_10.zip  hdf5-1_6_10.tar.gz  hdf5-1_6_10.tar.bz2  Elena Pourmal15 years
hdf5-1_8_3-patchedhdf5-1_8_3-patched.zip  hdf5-1_8_3-patched.tar.gz  hdf5-1_8_3-patched.tar.bz2  Elena Pourmal15 years
hdf5-1_6_9hdf5-1_6_9.zip  hdf5-1_6_9.tar.gz  hdf5-1_6_9.tar.bz2  Elena Pourmal15 years
hdf5-1_8_3hdf5-1_8_3.zip  hdf5-1_8_3.tar.gz  hdf5-1_8_3.tar.bz2  Elena Pourmal15 years
hdf5-1_8_2hdf5-1_8_2.zip  hdf5-1_8_2.tar.gz  hdf5-1_8_2.tar.bz2  Elena Pourmal16 years
hdf5-1_6_8hdf5-1_6_8.zip  hdf5-1_6_8.tar.gz  hdf5-1_6_8.tar.bz2  Elena Pourmal16 years
hdf5-1_8_1hdf5-1_8_1.zip  hdf5-1_8_1.tar.gz  hdf5-1_8_1.tar.bz2  Elena Pourmal16 years
hdf5-1_0_0-alpha1hdf5-1_0_0-alpha1.zip  hdf5-1_0_0-alpha1.tar.gz  hdf5-1_0_0-alpha1.tar.bz2  Quincey Koziol16 years
hdf5-1_0_0-alpha2hdf5-1_0_0-alpha2.zip  hdf5-1_0_0-alpha2.tar.gz  hdf5-1_0_0-alpha2.tar.bz2  Quincey Koziol16 years
hdf5-1_4_5hdf5-1_4_5.zip  hdf5-1_4_5.tar.gz  hdf5-1_4_5.tar.bz2  Quincey Koziol16 years
hdf5-1_4_4hdf5-1_4_4.zip  hdf5-1_4_4.tar.gz  hdf5-1_4_4.tar.bz2  Quincey Koziol16 years
hdf5-1_8_0-beta5hdf5-1_8_0-beta5.zip  hdf5-1_8_0-beta5.tar.gz  hdf5-1_8_0-beta5.tar.bz2  Quincey Koziol16 years
hdf5-1_8_0-beta4hdf5-1_8_0-beta4.zip  hdf5-1_8_0-beta4.tar.gz  hdf5-1_8_0-beta4.tar.bz2  Quincey Koziol16 years
hdf5-1_8_0-beta3hdf5-1_8_0-beta3.zip  hdf5-1_8_0-beta3.tar.gz  hdf5-1_8_0-beta3.tar.bz2  Quincey Koziol16 years
hdf5-1_8_0-beta2hdf5-1_8_0-beta2.zip  hdf5-1_8_0-beta2.tar.gz  hdf5-1_8_0-beta2.tar.bz2  Quincey Koziol16 years
hdf5-1_8_0-beta1hdf5-1_8_0-beta1.zip  hdf5-1_8_0-beta1.tar.gz  hdf5-1_8_0-beta1.tar.bz2  Quincey Koziol16 years
hdf5-1_8_0-alpha4hdf5-1_8_0-alpha4.zip  hdf5-1_8_0-alpha4.tar.gz  hdf5-1_8_0-alpha4.tar.bz2  Quincey Koziol16 years
hdf5-1_8_0-alpha3hdf5-1_8_0-alpha3.zip  hdf5-1_8_0-alpha3.tar.gz  hdf5-1_8_0-alpha3.tar.bz2  Quincey Koziol16 years
hdf5-1_8_0-alpha2hdf5-1_8_0-alpha2.zip  hdf5-1_8_0-alpha2.tar.gz  hdf5-1_8_0-alpha2.tar.bz2  Quincey Koziol16 years
hdf5-1_8_0-alpha1hdf5-1_8_0-alpha1.zip  hdf5-1_8_0-alpha1.tar.gz  hdf5-1_8_0-alpha1.tar.bz2  Quincey Koziol16 years
hdf5-1_8_0-alpha0hdf5-1_8_0-alpha0.zip  hdf5-1_8_0-alpha0.tar.gz  hdf5-1_8_0-alpha0.tar.bz2  Quincey Koziol16 years
hdf5-1_8_0hdf5-1_8_0.zip  hdf5-1_8_0.tar.gz  hdf5-1_8_0.tar.bz2  Elena Pourmal16 years
hdf5-1_9-starthdf5-1_9-start.zip  hdf5-1_9-start.tar.gz  hdf5-1_9-start.tar.bz2  Elena Pourmal16 years
hdf5-1_6_7hdf5-1_6_7.zip  hdf5-1_6_7.tar.gz  hdf5-1_6_7.tar.bz2  Elena Pourmal16 years
hdf5-1_6_6hdf5-1_6_6.zip  hdf5-1_6_6.tar.gz  hdf5-1_6_6.tar.bz2  Elena Pourmal17 years
before_removing_fphdf5before_removing_fphdf5.zip  before_removing_fphdf5.tar.gz  before_removing_fphdf5.tar.bz2  cvs2svn18 years
hdf5-1_6_5hdf5-1_6_5.zip  hdf5-1_6_5.tar.gz  hdf5-1_6_5.tar.bz2  cvs2svn19 years
before_removing_docsbefore_removing_docs.zip  before_removing_docs.tar.gz  before_removing_docs.tar.bz2  cvs2svn19 years
hdf5-1_6_4hdf5-1_6_4.zip  hdf5-1_6_4.tar.gz  hdf5-1_6_4.tar.bz2  cvs2svn19 years
before_removing_tbbt_codebefore_removing_tbbt_code.zip  before_removing_tbbt_code.tar.gz  before_removing_tbbt_code.tar.bz2  cvs2svn20 years
before_signed_unsigned_changesbefore_signed_unsigned_changes.zip  before_signed_unsigned_changes.tar.gz  before_signed_unsigned_changes.tar.bz2  cvs2svn20 years
hdf5-1_6_3hdf5-1_6_3.zip  hdf5-1_6_3.tar.gz  hdf5-1_6_3.tar.bz2  cvs2svn20 years
hdf5-1_6_2hdf5-1_6_2.zip  hdf5-1_6_2.tar.gz  hdf5-1_6_2.tar.bz2  cvs2svn20 years
hdf5-1_6_1hdf5-1_6_1.zip  hdf5-1_6_1.tar.gz  hdf5-1_6_1.tar.bz2  cvs2svn21 years
hdf5-1_6_0hdf5-1_6_0.zip  hdf5-1_6_0.tar.gz  hdf5-1_6_0.tar.bz2  cvs2svn21 years
hdf5-1_4_3hdf5-1_4_3.zip  hdf5-1_4_3.tar.gz  hdf5-1_4_3.tar.bz2  cvs2svn22 years
hdf5-1_4_2hdf5-1_4_2.zip  hdf5-1_4_2.tar.gz  hdf5-1_4_2.tar.bz2  cvs2svn23 years
hdf5-1_4_1hdf5-1_4_1.zip  hdf5-1_4_1.tar.gz  hdf5-1_4_1.tar.bz2  cvs2svn23 years
hdf5-1_4_0hdf5-1_4_0.zip  hdf5-1_4_0.tar.gz  hdf5-1_4_0.tar.bz2  cvs2svn23 years
hdf5-1_2_2hdf5-1_2_2.zip  hdf5-1_2_2.tar.gz  hdf5-1_2_2.tar.bz2  cvs2svn24 years
hdf5-1_2_1hdf5-1_2_1.zip  hdf5-1_2_1.tar.gz  hdf5-1_2_1.tar.bz2  cvs2svn25 years
hdf5-1_2_0hdf5-1_2_0.zip  hdf5-1_2_0.tar.gz  hdf5-1_2_0.tar.bz2  cvs2svn25 years
hdf5-1_3_1hdf5-1_3_1.zip  hdf5-1_3_1.tar.gz  hdf5-1_3_1.tar.bz2  cvs2svn25 years
hdf5-1_3_0hdf5-1_3_0.zip  hdf5-1_3_0.tar.gz  hdf5-1_3_0.tar.bz2  cvs2svn25 years
hdf5-1_2_0-beta1-update2hdf5-1_2_0-beta1-update2.zip  hdf5-1_2_0-beta1-update2.tar.gz  hdf5-1_2_0-beta1-update2.tar.bz2  cvs2svn25 years
hdf5-1_2_0betahdf5-1_2_0beta.zip  hdf5-1_2_0beta.tar.gz  hdf5-1_2_0beta.tar.bz2  cvs2svn25 years
hdf5-1_0_1hdf5-1_0_1.zip  hdf5-1_0_1.tar.gz  hdf5-1_0_1.tar.bz2  cvs2svn26 years
hdf5-1_0_0hdf5-1_0_0.zip  hdf5-1_0_0.tar.gz  hdf5-1_0_0.tar.bz2  cvs2svn26 years
r1_1beta1r1_1beta1.zip  r1_1beta1.tar.gz  r1_1beta1.tar.bz2  cvs2svn26 years
proto1proto1.zip  proto1.tar.gz  proto1.tar.bz2  cvs2svn27 years
d='n2659' href='#n2659'>2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Copyright by The HDF Group.                                               *
 * Copyright by the Board of Trustees of the University of Illinois.         *
 * All rights reserved.                                                      *
 *                                                                           *
 * This file is part of HDF5.  The full HDF5 copyright notice, including     *
 * terms governing use, modification, and redistribution, is contained in    *
 * the files COPYING and Copyright.html.  COPYING can be found at the root   *
 * of the source code distribution tree; Copyright.html can be found at the  *
 * root level of an installed copy of the electronic HDF5 document set and   *
 * is linked from the top-level documents page.  It can also be found at     *
 * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
 * access to either file, you may request a copy from help@hdfgroup.org.     *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

/*
 * Programmer:  Pedro Vicente <pvn@ncsa.uiuc.edu>
 *              April 12, 2002
 *
 * Purpose:     Tests the "ID to name" functionality
 */

#define H5G_PACKAGE		/*suppress error about including H5Gpkg	  */

/* Define this macro to indicate that the testing APIs should be available */
#define H5G_TESTING

#include "h5test.h"
#include "H5Gpkg.h"		/* Groups				*/


/* Compound datatype */
typedef struct s1_t {
    unsigned int a;
    unsigned int b;
    float c;
} s1_t;

const char *FILENAME[] = {
    "getname",
    "getname1",
    "getname2",
    "getname3",
    NULL
};

#define NAME_BUF_SIZE   64
#define SMALL_NAME_BUF_SIZE   2

/* Object reference macros */
#define SPACE1_RANK	1
#define SPACE1_DIM1	8

/* Dataset region reference macros */
#define REFREG_DSETNAMEV "MATRIX"
#define REFREG_DSETNAMER "REGION_REFERENCES"

static int
check_name(hid_t id, const char *chk_name, const char *chk_user_path)
{
    char name[NAME_BUF_SIZE];           /* Buffer to hold name and its size */
    char user_path[NAME_BUF_SIZE];      /* Buffer to hold user path */
    size_t user_path_len;               /* Length of user path */
    unsigned user_path_hidden;          /* Whether the user path is hidden */

    /* Get name */
    *name = '\0';
    if(H5Iget_name(id, name, NAME_BUF_SIZE) < 0) TEST_ERROR

    /* Get user path */
    *user_path = '\0';
    if(H5G_user_path_test(id, user_path, &user_path_len, &user_path_hidden) < 0) TEST_ERROR

    /* Check on name from H5Iget_name() */
    if(HDstrcmp(name, chk_name)) goto error;

    /* Check on user path */
    if(HDstrcmp(user_path, chk_user_path)) goto error;

    /* Check that if user path is hidden, the name from H5Iget_name() and the user path should be different */
    if(user_path_hidden && !HDstrcmp(chk_name, chk_user_path)) TEST_ERROR

    /* Everything matches */
    return 0;

error:
    /* Something doesn't match or something bad happened */
    return -1;
}

static int
test_main(hid_t file_id, hid_t fapl)
{
    char filename1[1024];
    char filename2[1024];
    char filename3[1024];
    hid_t   file1_id, file2_id, file3_id;
    hid_t   group_id, group2_id, group3_id, group4_id, group5_id, group6_id, group7_id;
    hid_t   dataset_id, dataset2_id;
    hid_t   space_id;
    hid_t   type_id, type2_id;
    hsize_t dims[1] = { 5 };
    size_t  name_len; /* Name length */

    /* Initialize the file names */
    h5_fixname(FILENAME[1], fapl, filename1, sizeof filename1);
    h5_fixname(FILENAME[2], fapl, filename2, sizeof filename2);
    h5_fixname(FILENAME[3], fapl, filename3, sizeof filename3);

    /*-------------------------------------------------------------------------
    * Test H5Iget_name with one group
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with one group");

    /* Create group "g0" in the root group using absolute name */
    if((group_id = H5Gcreate2(file_id, "/g0", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group_id, "/g0", "/g0") < 0) TEST_ERROR

    /* Close */
    H5Gclose(group_id);

    PASSED();



    /*-------------------------------------------------------------------------
    * Test H5Iget_name with more than one group
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with more than one group");
    /* Create group "g1" in the root group using absolute name */
    if((group_id = H5Gcreate2(file_id, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Create group "g2" in group "g1" using absolute name */
    if((group2_id = H5Gcreate2(file_id, "/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group_id, "/g1", "/g1") < 0) TEST_ERROR

    /* Verify */
    if(check_name(group2_id, "/g1/g2", "/g1/g2") < 0) TEST_ERROR

    /* Close */
    H5Gclose(group_id);
    H5Gclose(group2_id);

    PASSED();


    /*-------------------------------------------------------------------------
    * Test H5Iget_name with H5Gopen2
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with H5Gopen2");

    /* Reopen the group */
    if((group_id = H5Gopen2(file_id, "/g1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Reopen the group */
    if((group2_id = H5Gopen2(file_id, "/g1/g2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group_id, "/g1", "/g1") < 0) TEST_ERROR

    /* Verify */
    if(check_name(group2_id, "/g1/g2", "/g1/g2") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR

    PASSED();




    /*-------------------------------------------------------------------------
    * Test H5Iget_name with H5Dcreate2
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with H5Dcreate2");

    /* Create the dataspace  */
    if((space_id = H5Screate_simple(1, dims, NULL)) < 0) TEST_ERROR

    /* Create a new dataset */
    if((dataset_id = H5Dcreate2(file_id , "d1", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR

    /* Verify */
    if(check_name(dataset_id, "/d1", "/d1") < 0) TEST_ERROR

    /* Close */
    if(H5Dclose(dataset_id) < 0) FAIL_STACK_ERROR

    /* Reopen the group */
    if((group_id = H5Gopen2(file_id, "g1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Create a new dataset inside "g1" */
    if((dataset_id = H5Dcreate2(group_id , "d1", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(dataset_id, "/g1/d1", "/g1/d1") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Dclose(dataset_id) < 0) FAIL_STACK_ERROR
    if(H5Sclose(space_id) < 0) FAIL_STACK_ERROR

    PASSED();



    /*-------------------------------------------------------------------------
    * Test H5Iget_name with H5Dopen2
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with H5Dopen2");

    /* Reopen the dataset */
    if((dataset_id = H5Dopen2(file_id, "d1", H5P_DEFAULT)) < 0) TEST_ERROR

    /* Verify */
    if(check_name(dataset_id, "/d1", "/d1") < 0) TEST_ERROR

    /* Close */
    if(H5Dclose(dataset_id) < 0) FAIL_STACK_ERROR


    /* Reopen the group */
    if((group_id = H5Gopen2(file_id, "g1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Reopen the dataset */
    if((dataset_id = H5Dopen2(group_id, "d1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(dataset_id, "/g1/d1", "/g1/d1") < 0) TEST_ERROR

    /* Close */
    if(H5Dclose(dataset_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR

    PASSED();



    /*-------------------------------------------------------------------------
     * Test H5Iget_name with a long path
     *-------------------------------------------------------------------------
     */

    TESTING("H5Iget_name with a long path");

    /* Create group "g2/bar/baz" */
    if((group_id = H5Gcreate2(file_id, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file_id, "g2/bar", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file_id, "g2/bar/baz", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Create a dataset */
    if((space_id = H5Screate_simple(1, dims, NULL)) < 0) TEST_ERROR
    if((dataset_id = H5Dcreate2(group3_id , "d1", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR

    /* Close */
    if(H5Dclose(dataset_id) < 0) FAIL_STACK_ERROR
    if(H5Sclose(space_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR

    /* Reopen the dataset */
    if((dataset_id = H5Dopen2(file_id, "/g2/bar/baz/d1", H5P_DEFAULT)) < 0) TEST_ERROR

    /* Verify */
    if(check_name(dataset_id, "/g2/bar/baz/d1", "/g2/bar/baz/d1") < 0) TEST_ERROR

    /* Close */
    if(H5Dclose(dataset_id) < 0) FAIL_STACK_ERROR

    PASSED();


    /*-------------------------------------------------------------------------
     * Test H5Iget_name with H5Tcommit2
     *-------------------------------------------------------------------------
     */

    TESTING("H5Iget_name with H5Tcommit2");

    /* Create a datatype */
    if((type_id = H5Tcreate(H5T_COMPOUND, sizeof(s1_t))) < 0) TEST_ERROR

    /* Insert fields */
    if(H5Tinsert(type_id, "a", HOFFSET(s1_t, a), H5T_NATIVE_INT) < 0) TEST_ERROR
    if(H5Tinsert(type_id, "b", HOFFSET(s1_t, b), H5T_NATIVE_INT) < 0) TEST_ERROR
    if(H5Tinsert(type_id, "c", HOFFSET(s1_t, c), H5T_NATIVE_FLOAT) < 0) TEST_ERROR

    /* Save datatype for later */
    if(H5Tcommit2(file_id, "t1", type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR

    /* Verify */
    if(check_name(type_id, "/t1", "/t1") < 0) TEST_ERROR

    /* Close datatype */
    H5Tclose(type_id);

    PASSED();

    /*-------------------------------------------------------------------------
     * Test H5Iget_name with H5Topen2
     *-------------------------------------------------------------------------
     */

    TESTING("H5Iget_name with H5Topen2");

    /* Open the named datatype */
    if((type_id = H5Topen2(file_id, "t1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(type_id, "/t1", "/t1") < 0) TEST_ERROR

    /* Close datatype */
    if(H5Tclose(type_id) < 0) FAIL_STACK_ERROR

    PASSED();



   /*-------------------------------------------------------------------------
    * Test H5Iget_name with H5Lmove and H5Gopen2
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with H5Lmove and H5Gopen2");

    /* Reopen the group */
    if((group_id = H5Gopen2(file_id, "/g1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Rename group */
    if(H5Lmove(file_id, "/g1", H5L_SAME_LOC, "/g1a", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group_id, "/g1a", "/g1a") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR

    PASSED();



   /*-------------------------------------------------------------------------
    * Test H5Iget_name with H5Lmove and H5Dopen2
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with H5Lmove and H5Dopen2");

    /* Reopen the dataset */
    if((dataset_id = H5Dopen2(file_id, "/d1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Rename dataset */
    if(H5Lmove(file_id, "/d1", H5L_SAME_LOC, "/d1a", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(dataset_id, "/d1a", "/d1a") < 0) FAIL_STACK_ERROR

    /* Close */
    if(H5Dclose(dataset_id) < 0) FAIL_STACK_ERROR

    PASSED();



   /*-------------------------------------------------------------------------
    * Test H5Iget_name with H5Lmove and H5Topen2
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with H5Lmove and H5Topen2");

    /* Open the named datatype */
    if((type_id = H5Topen2(file_id, "/t1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Rename datatype */
    if(H5Lmove(file_id, "/t1", H5L_SAME_LOC, "/t1a", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(type_id, "/t1a", "/t1a") < 0) FAIL_STACK_ERROR

    /* Close datatype */
    if(H5Tclose(type_id) < 0) FAIL_STACK_ERROR

    PASSED();


    /*-------------------------------------------------------------------------
    * Test H5Iget_name with H5Lmove and relative names
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with H5Lmove and relative names");

    /* Create group "/g3" */
    if((group_id = H5Gcreate2(file_id, "/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Create group "/g3/foo" using absolute name */
    if((group2_id = H5Gcreate2(file_id, "/g3/foo1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Open group "/g3/foo" again */
    if((group3_id = H5Gopen2(file_id, "/g3/foo1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Rename group */
    if(H5Lmove(group_id, "foo1", H5L_SAME_LOC, "foo2", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group_id, "/g3", "/g3") < 0) TEST_ERROR

    /* Verify */
    if(check_name(group2_id, "/g3/foo2", "/g3/foo2") < 0) TEST_ERROR

    /* Verify */
    if(check_name(group3_id, "/g3/foo2", "/g3/foo2") < 0) TEST_ERROR

    /* Rename group again */
    if(H5Lmove(file_id, "g3/foo2", H5L_SAME_LOC, "g3/foo1", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group_id, "/g3", "/g3") < 0) TEST_ERROR

    /* Verify */
    if(check_name(group2_id, "/g3/foo1", "/g3/foo1") < 0) TEST_ERROR

    /* Verify */
    if(check_name(group3_id, "/g3/foo1", "/g3/foo1") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR

    PASSED();



   /*-------------------------------------------------------------------------
    * Test H5Iget_name with H5Lmove and a long path
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with H5Lmove and a long path");

    /* Create group "g4/A/B" */
    if((group_id = H5Gcreate2(file_id, "g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file_id, "g4/A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file_id, "g4/A/B", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Create group "g5/C" */
    if((group4_id = H5Gcreate2(file_id, "g5", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group5_id = H5Gcreate2(file_id, "g5/C", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group3_id, "/g4/A/B", "/g4/A/B") < 0) TEST_ERROR

    /* Move group "B" to "D"*/
    if(H5Lmove(file_id, "/g4/A/B", H5L_SAME_LOC, "/g5/C/D", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group3_id, "/g5/C/D", "/g5/C/D") < 0) TEST_ERROR

    /* Move group "/g5/C/D" back to "/g4/A/B" using relative name */
    if(H5Lmove(group5_id, "D", group2_id, "B", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group3_id, "/g4/A/B", "/g4/A/B") < 0) TEST_ERROR

    /* Move group "/g4/A/B" to "/g4/F/B" using relative name */
    if(H5Lmove(group_id, "A", group_id, "F", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group3_id, "/g4/F/B", "/g4/F/B") < 0) TEST_ERROR

    /* Verify */
    if(check_name(group2_id, "/g4/F", "/g4/F") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group4_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group5_id) < 0) FAIL_STACK_ERROR

    PASSED();


   /*-------------------------------------------------------------------------
    * Test H5Iget_name with H5Lmove and a long path #2
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with H5Lmove and a long path #2");

    /* Create group "g6/A/B" and "g7" */
    if((group_id = H5Gcreate2(file_id, "g6", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file_id, "g6/A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file_id, "g6/A/B", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group4_id = H5Gcreate2(file_id, "g7", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group3_id, "/g6/A/B", "/g6/A/B") < 0) TEST_ERROR

    /* Move group "A" to "C"*/
    if(H5Lmove(file_id, "/g6/A", H5L_SAME_LOC, "/g7/C", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group2_id, "/g7/C", "/g7/C") < 0) TEST_ERROR

    /* Verify */
    if(check_name(group3_id, "/g7/C/B", "/g7/C/B") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group4_id) < 0) FAIL_STACK_ERROR

    PASSED();


   /*-------------------------------------------------------------------------
    * Test H5Iget_name with H5Ldelete
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with H5Ldelete");

    /* Create a new group. */
    if((group_id = H5Gcreate2(file_id, "/g8", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Delete */
    if(H5Ldelete(file_id, "/g8", H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group_id, "", "") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR

    PASSED();


   /*-------------------------------------------------------------------------
    * Test H5Iget_name with H5Ldelete and a long path
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with H5Ldelete and a long path");

    /* Create group "g9/a/b" */
    if((group_id = H5Gcreate2(file_id, "g9", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file_id, "g9/a", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file_id, "g9/a/b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Delete */
    if(H5Ldelete(file_id, "/g9/a", H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group2_id, "", "") < 0) TEST_ERROR

    /* Verify */
    if(check_name(group3_id, "", "") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR

    /* Recreate groups */
    if((group2_id = H5Gcreate2(group_id, "a", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(group_id, "a/b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Delete, using relative path */
    if(H5Ldelete(group_id, "a", H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group2_id, "", "") < 0) TEST_ERROR

    /* Verify */
    if(check_name(group3_id, "", "") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR

    /* Create group "g10/a/b" */
    if((group_id = H5Gcreate2(file_id, "g10", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file_id, "g10/a", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file_id, "g10/a/b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Delete */
    if(H5Ldelete(file_id, "/g10/a/b", H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group3_id, "", "") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR

    /* Recreate group */
    if((group3_id = H5Gcreate2(group_id, "a/b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Delete, using relative path */
    if(H5Ldelete(group_id, "a/b", H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group3_id, "", "") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR

    PASSED();


   /*-------------------------------------------------------------------------
    * Test H5Iget_name with H5Ldelete, same names
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with H5Ldelete, same names");

    /* Create group "g11/g" */
    if((group_id = H5Gcreate2(file_id, "g11", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file_id, "g11/g", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Create two datasets "g11/d" and "g11/g/d"*/
    if((space_id = H5Screate_simple(1, dims, NULL)) < 0) FAIL_STACK_ERROR
    if((dataset_id = H5Dcreate2(group_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((dataset2_id = H5Dcreate2(group2_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Delete */
    if(H5Ldelete(file_id, "/g11/d", H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(dataset_id, "", "") < 0) TEST_ERROR

    /* Verify */
    if(check_name(dataset2_id, "/g11/g/d", "/g11/g/d") < 0) TEST_ERROR

    /* Close */
    if(H5Dclose(dataset_id) < 0) FAIL_STACK_ERROR
    if(H5Dclose(dataset2_id) < 0) FAIL_STACK_ERROR
    if(H5Sclose(space_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR

    PASSED();


   /*-------------------------------------------------------------------------
    * Test H5Iget_name with H5Fmount; with IDs on the list
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with H5Fmount; with IDs on the list");

    /* Create a group "g12" in the first file */
    if((group_id = H5Gcreate2(file_id, "/g12", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR

    /* Create second file and dataset "d" in it */
    if((file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR

    /* Create a dataspace  */
    if((space_id = H5Screate_simple(1, dims, NULL)) < 0) TEST_ERROR

    /* Create the dataset */
    if((dataset_id = H5Dcreate2(file1_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR

    /* Close */
    if(H5Dclose(dataset_id) < 0) FAIL_STACK_ERROR

    /* Mount second file under "g12" in the first file */
    if(H5Fmount(file_id, "/g12", file1_id, H5P_DEFAULT) < 0) TEST_ERROR

    /* Access dataset D in the first file under "/G/D" name */
    if((dataset_id = H5Dopen2(file_id, "/g12/d", H5P_DEFAULT)) < 0) TEST_ERROR

    /* Verify */
    if(check_name(dataset_id, "/g12/d", "/g12/d") < 0) TEST_ERROR

    if(H5Funmount(file_id, "/g12") < 0) TEST_ERROR

    /* Close */
    if(H5Dclose(dataset_id) < 0) FAIL_STACK_ERROR
    if(H5Fclose(file1_id) < 0) FAIL_STACK_ERROR
    if(H5Sclose(space_id) < 0) FAIL_STACK_ERROR


    PASSED();


    /*-------------------------------------------------------------------------
     * Test H5Iget_name with H5Fmount; long name
     *-------------------------------------------------------------------------
     */

    TESTING("H5Iget_name with H5Fmount; long name");

    /* Create a group "g13/g1/g2" in the first file */
    if((group_id = H5Gcreate2(file_id, "/g13", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file_id, "/g13/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file_id, "/g13/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR

    /* Create second file and group "g" in it */
    file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);

    if((group_id = H5Gcreate2(file1_id, "/g14", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file1_id, "/g14/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file1_id, "/g14/g3/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR

    /* Mount second file under "/g13/g1" in the first file */
    if(H5Fmount(file_id, "/g13/g1", file1_id, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Access group in the first file */
    if((group_id = H5Gopen2(file_id, "/g13/g1/g14/g3/g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR

    if(H5Funmount(file_id, "/g13/g1") < 0) FAIL_STACK_ERROR


    /* Verify */
    if(check_name(group_id, "/g14/g3/g4", "") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR


    /* Access group in the file to mount */
    if((group3_id = H5Gopen2(file1_id, "/g14/g3/g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Mount second file under "/g13/g1" in the first file(again) */
    if(H5Fmount(file_id, "/g13/g1", file1_id, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Get a group ID for the parent of the newly mounted group */
    if((group2_id = H5Gopen2(file_id, "/g13", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Access group in the first file */
    if((group_id = H5Gopen2(file_id, "/g13/g1/g14/g3/g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR
    if(check_name(group3_id, "/g14/g3/g4", "/g14/g3/g4") < 0) TEST_ERROR

    if(H5Funmount(group2_id, "g1") < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group_id, "/g14/g3/g4", "") < 0) TEST_ERROR
    if(check_name(group3_id, "/g14/g3/g4", "/g14/g3/g4") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR

    /* Mount second file under "/g13/g1" in the first file(again) */
    if(H5Fmount(file_id, "/g13/g1", file1_id, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Get a group ID for the newly mounted group */
    if((group2_id = H5Gopen2(file_id, "/g13/g1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Access group in the first file */
    if((group_id = H5Gopen2(file_id, "/g13/g1/g14/g3/g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR
    if(check_name(group2_id, "/g13/g1", "/g13/g1") < 0) TEST_ERROR

    if(H5Funmount(group2_id, ".") < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group_id, "/g14/g3/g4", "") < 0) TEST_ERROR
    if(check_name(group2_id, "/", "") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR

    /* Mount second file under "/g13/g1" in the first file, using relative path */

    if((group3_id = H5Gopen2(file_id, "/g13", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group3_id, "/g13", "/g13") < 0) TEST_ERROR

    if(H5Fmount(group3_id, "g1", file1_id, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Get a group ID for the newly mounted group */
    if((group2_id = H5Gopen2(file_id, "/g13/g1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group2_id, "/g13/g1", "/g13/g1") < 0) TEST_ERROR

    /* Access group in the first file */
    if((group_id = H5Gopen2(file_id, "/g13/g1/g14/g3/g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR

    /* Access group in the first file, with relative path */
    if((group_id = H5Gopen2(group2_id, "g14/g3/g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR

    if(H5Funmount(group2_id, ".") < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group2_id, "/", "") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR

    /* Mount second file under "/g13/g1" in the first file, using relative path */

    if((group3_id = H5Gopen2(file_id, "/g13/g1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group3_id, "/g13/g1", "/g13/g1") < 0) TEST_ERROR

    if(H5Fmount(group3_id, ".", file1_id, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Get a group ID for the newly mounted group */
    if((group2_id = H5Gopen2(file_id, "/g13/g1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group2_id, "/g13/g1", "/g13/g1") < 0) TEST_ERROR

    /* Access group in the first file */
    if((group_id = H5Gopen2(file_id, "/g13/g1/g14/g3/g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR

    /* Access group in the first file, with relative path */
    if((group_id = H5Gopen2(group2_id, "g14/g3/g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR

    if(H5Funmount(group2_id, ".") < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group2_id, "/", "") < 0) TEST_ERROR
    if(check_name(group3_id, "/g13/g1", "/g13/g1") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR

    if(H5Fclose(file1_id) < 0) FAIL_STACK_ERROR


    PASSED();


/*-------------------------------------------------------------------------
    * Test H5Iget_name with H5Funmount
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with H5Funmount");

    /* Create a group "g15/g1/g2" in the first file */
    if((group_id = H5Gcreate2(file_id, "/g15", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file_id, "/g15/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file_id, "/g15/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group4_id = H5Gcreate2(file_id, "/g15/g1/g2/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Close */
    H5Gclose(group_id);
    H5Gclose(group2_id);
    H5Gclose(group3_id);
    H5Gclose(group4_id);

    /* Create second file and group "g" in it */
    file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);

    if((group_id = H5Gcreate2(file1_id, "/g16", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file1_id, "/g16/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file1_id, "/g16/g4/g5", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR

    /* Access group in the first file */
    if((group_id = H5Gopen2(file_id, "/g15/g1/g2/g3", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Mount second file under "/g13/g1" in the first file */
    if(H5Fmount(file_id, "/g15/g1", file1_id, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Access group in the second file */
    if((group2_id = H5Gopen2(file_id, "/g15/g1/g16/g4/g5", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group_id, "", "/g15/g1/g2/g3") < 0) TEST_ERROR

    /* Verify */
    if(check_name(group2_id, "/g15/g1/g16/g4/g5", "/g15/g1/g16/g4/g5") < 0) TEST_ERROR

    if(H5Funmount(file_id, "/g15/g1") < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group_id, "/g15/g1/g2/g3", "/g15/g1/g2/g3") < 0) TEST_ERROR

    /* Verify */
    if(check_name(group2_id, "/g16/g4/g5", "") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Fclose(file1_id) < 0) FAIL_STACK_ERROR


    PASSED();


    /*-------------------------------------------------------------------------
     * Test H5Iget_name with a defined type dataset
     *-------------------------------------------------------------------------
     */

    TESTING("H5Iget_name with a defined type dataset");

    /* Create a datatype */
    if((type_id = H5Tcreate(H5T_COMPOUND, sizeof(s1_t))) < 0) FAIL_STACK_ERROR

    /* Insert fields */
    if(H5Tinsert(type_id, "a", HOFFSET(s1_t, a), H5T_NATIVE_INT) < 0) FAIL_STACK_ERROR
    if(H5Tinsert(type_id, "b", HOFFSET(s1_t, b), H5T_NATIVE_INT) < 0) FAIL_STACK_ERROR
    if(H5Tinsert(type_id, "c", HOFFSET(s1_t, c), H5T_NATIVE_FLOAT) < 0) FAIL_STACK_ERROR

    /* Create group "g17" */
    if((group_id = H5Gcreate2(file_id, "g17", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Save datatype for later */
    if(H5Tcommit2(group_id, "t", type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Create a dataspace  */
    if((space_id = H5Screate_simple(1, dims, NULL)) < 0) FAIL_STACK_ERROR

    /* Create a new dataset */
    if((dataset_id = H5Dcreate2(group_id , "d", type_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Close */
    if(H5Dclose(dataset_id) < 0) FAIL_STACK_ERROR
    if(H5Tclose(type_id) < 0) FAIL_STACK_ERROR
    if(H5Sclose(space_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR

    /* Open the named datatype */
    if((type_id = H5Topen2(file_id, "/g17/t", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(type_id, "/g17/t", "/g17/t") < 0) TEST_ERROR

    /* Close datatype */
    if(H5Tclose(type_id) < 0) FAIL_STACK_ERROR

    /* Reopen the dataset */
    if((dataset_id = H5Dopen2(file_id, "/g17/d", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Get datatype*/
    if((type_id = H5Dget_type(dataset_id)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(type_id, "/g17/t", "/g17/t") < 0) TEST_ERROR

    /* Close */
    if(H5Dclose(dataset_id) < 0) FAIL_STACK_ERROR
    if(H5Tclose(type_id) < 0) FAIL_STACK_ERROR

    PASSED();


   /*-------------------------------------------------------------------------
    * Test H5Iget_name with objects that have two names
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with datasets that have two names");

    /* Open dataset named "d"*/
    if((dataset_id = H5Dopen2(file_id, "/g17/d", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Create link to dataset named "link" */
    if(H5Lcreate_hard(dataset_id, ".", file_id, "/g17/link", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
    if((dataset2_id = H5Dopen2(file_id, "/g17/link", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Make sure that the two IDs use two different names */
    if(check_name(dataset_id, "/g17/d", "/g17/d") < 0) TEST_ERROR
    if(check_name(dataset2_id, "/g17/link", "/g17/link") < 0) TEST_ERROR

    if(H5Dclose(dataset_id) < 0) FAIL_STACK_ERROR
    if(H5Dclose(dataset2_id) < 0) FAIL_STACK_ERROR

    PASSED();


   /*-------------------------------------------------------------------------
    * Test H5Iget_name with different files, test1
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with different files");

    /* Create a new file using default properties. */
    if((file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR

    /* Create a new file using default properties. */
    if((file3_id = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR

    /* Create the dataspace  */
    if((space_id = H5Screate_simple(1, dims, NULL)) < 0) FAIL_STACK_ERROR

    /* Create a new dataset */
    if((dataset_id = H5Dcreate2(file2_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Create a new dataset */
    if((dataset2_id = H5Dcreate2(file3_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Delete */
    if(H5Ldelete(file2_id, "/d", H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(dataset_id, "", "") < 0) TEST_ERROR

    /* Verify */
    if(check_name(dataset2_id, "/d", "/d") < 0) TEST_ERROR

    /* Close */
    if(H5Dclose(dataset_id) < 0) FAIL_STACK_ERROR
    if(H5Dclose(dataset2_id) < 0) FAIL_STACK_ERROR
    if(H5Sclose(space_id) < 0) FAIL_STACK_ERROR
    if(H5Fclose(file2_id) < 0) FAIL_STACK_ERROR
    if(H5Fclose(file3_id) < 0) FAIL_STACK_ERROR

    PASSED();


   /*-------------------------------------------------------------------------
    * Test H5Iget_name with different files, test2
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with different files #2");

    /* Create a new file using default properties. */
    if((file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR

    /* Create a new file using default properties. */
    if((file3_id = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR

    /* Create the dataspace  */
    if((space_id = H5Screate_simple(1, dims, NULL)) < 0) FAIL_STACK_ERROR

    /* Create a new dataset */
    if((dataset_id = H5Dcreate2(file2_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Create a new dataset */
    if((dataset2_id = H5Dcreate2(file3_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Delete */
    if(H5Ldelete(file3_id, "/d", H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(dataset_id, "/d", "/d") < 0) TEST_ERROR

    /* Verify */
    if(check_name(dataset2_id, "", "") < 0) TEST_ERROR

    /* Close */
    if(H5Dclose(dataset_id) < 0) FAIL_STACK_ERROR
    if(H5Dclose(dataset2_id) < 0) FAIL_STACK_ERROR
    if(H5Sclose(space_id) < 0) FAIL_STACK_ERROR
    if(H5Fclose(file2_id) < 0) FAIL_STACK_ERROR
    if(H5Fclose(file3_id) < 0) FAIL_STACK_ERROR

    PASSED();


   /*-------------------------------------------------------------------------
    * Test H5Iget_name with a small buffer for name
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with a small buffer for name");

    /* Reopen the group */
    if((group_id = H5Gopen2(file_id, "/g17", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

{
    /*small buffer to hold name and its size */
    char    name2[SMALL_NAME_BUF_SIZE];

    /* Get name */
    *name2 = '\0';
    name_len=H5Iget_name(group_id, name2, SMALL_NAME_BUF_SIZE);

    /* Check that name is longer */
    if(name_len <= SMALL_NAME_BUF_SIZE) TEST_ERROR
    if(HDstrcmp(name2, "/")) TEST_ERROR
}

    /* Verify */
    if(check_name(group_id, "/g17", "/g17") < 0) TEST_ERROR

    /* Close */
    H5Gclose(group_id);

    PASSED();


    /*-------------------------------------------------------------------------
    * Test H5Iget_name with a dynamic buffer for name
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with a dynamic buffer for name");

    /* Reopen the group */
    if((group_id = H5Gopen2(file_id, "/g17", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Get name */
    name_len = H5Iget_name(group_id, NULL, NAME_BUF_SIZE);

{
    /* dynamic buffer to hold name */
    char    *name3;

    /* Include the extra null character */
    name3 = HDmalloc(name_len + 1);
    if(!name3) TEST_ERROR

    /* Get name with dynamic buffer */
    *name3 = '\0';
    if(H5Iget_name(group_id, name3, name_len + 1) < 0) TEST_ERROR

    /* Verify */
    if(HDstrcmp(name3, "/g17")) TEST_ERROR
    *name3 = '\0';

    /* Get name with smaller buffer */
    *name3 = '\0';
    if(H5Iget_name(group_id, name3, 3) < 0) TEST_ERROR

    /* Verify */
    if(HDstrcmp(name3, "/g")) TEST_ERROR

    HDfree(name3);
}

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR

    PASSED();


/*-------------------------------------------------------------------------
    * Test H5Iget_name with invalid IDs
    *-------------------------------------------------------------------------
    */


    TESTING("H5Iget_name with invalid IDs");

    /* Create a dataspace  */
    if((space_id = H5Screate_simple(1, dims, NULL)) < 0) TEST_ERROR

    /* Define a datatype */
    if((type_id = H5Tcopy(H5T_NATIVE_INT)) < 0) TEST_ERROR

    /* Create a new dataset */
    if((dataset_id = H5Dcreate2(file_id , "d2", type_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR

{
    char name[NAME_BUF_SIZE];   /* Buffer to hold name and its size */

    /* Get name for non commited datatype, it should fail */
    H5E_BEGIN_TRY {
        if(H5Iget_name(type_id, name, NAME_BUF_SIZE) > 0) TEST_ERROR
    } H5E_END_TRY;

    /* Get name for dataspace, it should fail */
    H5E_BEGIN_TRY {
        if(H5Iget_name(space_id, name, NAME_BUF_SIZE) > 0) TEST_ERROR
    } H5E_END_TRY;
}

    /* Close */
    if(H5Dclose(dataset_id) < 0) FAIL_STACK_ERROR
    if(H5Sclose(space_id) < 0) FAIL_STACK_ERROR
    if(H5Tclose(type_id) < 0) FAIL_STACK_ERROR

    PASSED();


    /*-------------------------------------------------------------------------
     * Test H5Iget_name with added names with mounting
     *-------------------------------------------------------------------------
     */

    TESTING("H5Iget_name with added names with mounting");

    /* Create a group "g18/g2" in the first file */
    if((group_id = H5Gcreate2(file_id, "/g18", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file_id, "/g18/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Also create a dataset and a datatype */
    if((space_id = H5Screate_simple(1, dims, NULL)) < 0) FAIL_STACK_ERROR
    if((type_id = H5Tcopy(H5T_NATIVE_INT)) < 0) FAIL_STACK_ERROR
    if((dataset_id = H5Dcreate2(file_id, "g18/d2", type_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    if(H5Tcommit2(file_id, "g18/t2", type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Create second file and group "/g3/g4/g5" in it */
    if((file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file1_id, "/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group4_id = H5Gcreate2(file1_id, "/g3/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group5_id = H5Gcreate2(file1_id, "/g3/g4/g5", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Mount first file at "g3/g4" in the second file */
    if(H5Fmount(file1_id, "/g3/g4", file_id, H5P_DEFAULT) < 0) TEST_ERROR

    /* Get name for the group ID in the first file, should be "/g18/g2" still */
    if(check_name(group2_id, "/g18/g2", "/g18/g2") < 0) TEST_ERROR

    /* Get name for the dataset ID in the first file, should be "/g18/g2/d2" still */
    if(check_name(dataset_id, "/g18/d2", "/g18/d2") < 0) TEST_ERROR

    /* Get name for the datatype ID in the first file, should be "/g18/g2/t2" still */
    if(check_name(type_id, "/g18/t2", "/g18/t2") < 0) TEST_ERROR

    /* Open the mounted group, dataset, and datatype through their new names */
    if((group6_id = H5Gopen2(file1_id, "/g3/g4/g18/g2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((dataset2_id = H5Dopen2(file1_id, "/g3/g4/g18/d2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((type2_id = H5Topen2(file1_id, "/g3/g4/g18/t2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify names */
    if(check_name(group6_id, "/g3/g4/g18/g2", "/g3/g4/g18/g2") < 0) TEST_ERROR
    if(check_name(dataset2_id, "/g3/g4/g18/d2", "/g3/g4/g18/d2") < 0) TEST_ERROR
    if(check_name(type2_id, "/g3/g4/g18/t2", "/g3/g4/g18/t2") < 0) TEST_ERROR

    /* Verify that old IDs still refer to objects by their old names */
    if(check_name(group2_id, "/g18/g2", "/g18/g2") < 0) TEST_ERROR
    if(check_name(dataset_id, "/g18/d2", "/g18/d2") < 0) TEST_ERROR
    if(check_name(type_id, "/g18/t2", "/g18/t2") < 0) TEST_ERROR

    /* Unmount */
    if(H5Funmount(file1_id, "/g3/g4") < 0) FAIL_STACK_ERROR

    /* Get name for the IDs of the first file, should be unchanged */
    if(check_name(group2_id, "/g18/g2", "/g18/g2") < 0) TEST_ERROR
    if(check_name(dataset_id, "/g18/d2", "/g18/d2") < 0) TEST_ERROR
    if(check_name(type_id, "/g18/t2", "/g18/t2") < 0) TEST_ERROR

    /* Get name for the IDs of the second file, should be local names now */
    if(check_name(group6_id, "/g18/g2", "") < 0) TEST_ERROR
    if(check_name(dataset2_id, "/g18/d2", "") < 0) TEST_ERROR
    if(check_name(type2_id, "/g18/t2", "") < 0) TEST_ERROR

    if(H5Tclose(type_id) < 0) FAIL_STACK_ERROR
    if(H5Tclose(type2_id) < 0) FAIL_STACK_ERROR
    if(H5Dclose(dataset_id) < 0) FAIL_STACK_ERROR
    if(H5Dclose(dataset2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group4_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group5_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group6_id) < 0) FAIL_STACK_ERROR
    if(H5Fclose(file1_id) < 0) FAIL_STACK_ERROR

    PASSED();


   /*-------------------------------------------------------------------------
    * Test H5Iget_name with H5Fclose
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with H5Fclose");

    /* Create a file and group "/g1/g2" in it */
    if((file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR
    if((group_id = H5Gcreate2(file1_id, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file1_id, "/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group2_id, "/g1/g2", "/g1/g2") < 0) TEST_ERROR

    /* Close file */
    if(H5Fclose(file1_id) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group2_id, "/g1/g2", "/g1/g2") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR

    PASSED();


   /*-------------------------------------------------------------------------
    * Test H5Iget_name with H5Fmount and H5Ldelete
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with H5Fmount and H5Ldelete");

    /* Create a file and group "/g1/g2" in it */
    if((file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR
    if((group_id = H5Gcreate2(file1_id, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file1_id, "/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Create a new file and group "/g3/g4" in it */
    if((file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file2_id, "/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group4_id = H5Gcreate2(file2_id, "/g3/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Mount first file at "/g3/g4" in the second file */
    if(H5Fmount(file2_id, "/g3/g4", file1_id, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Open the mounted group */
    if((group5_id = H5Gopen2(file2_id, "/g3/g4/g1/g2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group5_id, "/g3/g4/g1/g2", "/g3/g4/g1/g2") < 0) TEST_ERROR

    /* Delete */
    if(H5Ldelete(file1_id, "/g3/g4/g1/g2", H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group5_id, "", "") < 0) TEST_ERROR

    /* Verify */
    if(check_name(group2_id, "", "") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group4_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group5_id) < 0) FAIL_STACK_ERROR
    if(H5Fclose(file1_id) < 0) FAIL_STACK_ERROR
    if(H5Fclose(file2_id) < 0) FAIL_STACK_ERROR

    PASSED();


   /*-------------------------------------------------------------------------
    * Test H5Iget_name with H5Fmount and H5Lmove
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with H5Fmount and H5Lmove");

    /* Create a file and group "/g1/g2" in it */
    if((file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR
    if((group_id = H5Gcreate2(file1_id, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file1_id, "/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Create a new file and group "/g3/g4" in it */
    if((file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file2_id, "/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group4_id = H5Gcreate2(file2_id, "/g3/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Mount first file at "g3/g4" in the second file */
    if(H5Fmount(file2_id, "/g3/g4", file1_id, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group4_id, "/g3/g4", "/g3/g4") < 0) TEST_ERROR

    /* Open the mounted group */
    if((group5_id = H5Gopen2(file2_id, "/g3/g4/g1/g2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group5_id, "/g3/g4/g1/g2", "/g3/g4/g1/g2") < 0) TEST_ERROR

    /* Open another mounted group, in the middle of the path */
    if((group6_id = H5Gopen2(file2_id, "/g3/g4/g1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group6_id, "/g3/g4/g1", "/g3/g4/g1") < 0) TEST_ERROR

    /* Rename group */
    if(H5Lmove(file2_id, "/g3/g4/g1/g2", H5L_SAME_LOC, "/g3/g4/g1/g5", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group5_id, "/g3/g4/g1/g5", "/g3/g4/g1/g5") < 0) TEST_ERROR
    if(check_name(group2_id, "/g1/g5", "/g1/g5") < 0) TEST_ERROR

    /* Rename group */
    if(H5Lmove(file2_id, "/g3/g4/g1", H5L_SAME_LOC, "/g3/g4/g1a", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group5_id, "/g3/g4/g1a/g5", "/g3/g4/g1a/g5") < 0) TEST_ERROR
    if(check_name(group2_id, "/g1a/g5", "/g1a/g5") < 0) TEST_ERROR

    /* Verify */
    if(check_name(group6_id, "/g3/g4/g1a", "/g3/g4/g1a") < 0) TEST_ERROR
    if(check_name(group_id, "/g1a", "/g1a") < 0) TEST_ERROR

    /* Rename middle group back, using relative path */
    if(H5Lmove(group3_id, "g4/g1a", H5L_SAME_LOC, "g4/g1", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group5_id, "/g3/g4/g1/g5", "/g3/g4/g1/g5") < 0) TEST_ERROR
    if(check_name(group2_id, "/g1/g5", "/g1/g5") < 0) TEST_ERROR
    if(check_name(group6_id, "/g3/g4/g1", "/g3/g4/g1") < 0) TEST_ERROR
    if(check_name(group_id, "/g1", "/g1") < 0) TEST_ERROR

    /* Rename end group back, using relative path */
    if(H5Lmove(group3_id, "g4/g1/g5", H5L_SAME_LOC, "g4/g1/g2", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group5_id, "/g3/g4/g1/g2", "/g3/g4/g1/g2") < 0) TEST_ERROR
    if(check_name(group2_id, "/g1/g2", "/g1/g2") < 0) TEST_ERROR
    if(check_name(group6_id, "/g3/g4/g1", "/g3/g4/g1") < 0) TEST_ERROR
    if(check_name(group_id, "/g1", "/g1") < 0) TEST_ERROR

    /* Rename mount point */
    if(H5Lmove(file2_id, "/g3/g4", H5L_SAME_LOC, "/g3/g4a", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group4_id, "/g3/g4a", "/g3/g4a") < 0) TEST_ERROR
    if(check_name(group5_id, "/g3/g4a/g1/g2", "/g3/g4a/g1/g2") < 0) TEST_ERROR
    if(check_name(group6_id, "/g3/g4a/g1", "/g3/g4a/g1") < 0) TEST_ERROR

    /* Rename mount point back, using relative path*/
    if(H5Lmove(group3_id, "g4a", H5L_SAME_LOC, "g4", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group4_id, "/g3/g4", "/g3/g4") < 0) TEST_ERROR
    if(check_name(group5_id, "/g3/g4/g1/g2", "/g3/g4/g1/g2") < 0) TEST_ERROR
    if(check_name(group6_id, "/g3/g4/g1", "/g3/g4/g1") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group4_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group5_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group6_id) < 0) FAIL_STACK_ERROR
    if(H5Fclose(file1_id) < 0) FAIL_STACK_ERROR
    if(H5Fclose(file2_id) < 0) FAIL_STACK_ERROR

    PASSED();


   /*-------------------------------------------------------------------------
    * Test H5Iget_name with H5Lcreate_hard
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with H5Lcreate_hard");

    /* Create group "g19/g1" */
    if((group_id = H5Gcreate2(file_id, "/g19", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file_id, "/g19/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Create hard link to "g19/g1/ group */
    if(H5Lcreate_hard(file_id, "/g19/g1", H5L_SAME_LOC, "/g19/g2", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group2_id, "/g19/g1", "/g19/g1") < 0) TEST_ERROR

    /* Open the group */
    if((group3_id = H5Gopen2(file_id, "/g19/g2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group3_id, "/g19/g2", "/g19/g2") < 0) TEST_ERROR

    /* Rename original group */
    if(H5Lmove(file_id, "/g19/g1", H5L_SAME_LOC, "/g19/g3", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group2_id, "/g19/g3", "/g19/g3") < 0) TEST_ERROR
    if(check_name(group3_id, "/g19/g2", "/g19/g2") < 0) TEST_ERROR

    /* Rename original group back, using relative path */
    if(H5Lmove(group_id, "g3", H5L_SAME_LOC, "g1", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group2_id, "/g19/g1", "/g19/g1") < 0) TEST_ERROR
    if(check_name(group3_id, "/g19/g2", "/g19/g2") < 0) TEST_ERROR

    /* Create another hard link to "/g19/g1" group */
    if(H5Lcreate_hard(file_id, "/g19/g1", H5L_SAME_LOC, "/g19/g3", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Open the group */
    if((group4_id = H5Gopen2(file_id, "/g19/g3", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group4_id, "/g19/g3", "/g19/g3") < 0) TEST_ERROR

    /* Delete group */
    if(H5Ldelete(file_id, "/g19/g3", H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group4_id, "/g19/g1", "") < 0) TEST_ERROR
    if(check_name(group2_id, "/g19/g1", "/g19/g1") < 0) TEST_ERROR
    if(check_name(group3_id, "/g19/g2", "/g19/g2") < 0) TEST_ERROR

    /* Close the unlinked group */
    if(H5Gclose(group4_id) < 0) FAIL_STACK_ERROR

    /* Create another hard link to "/g19/g1" group */
    if(H5Lcreate_hard(file_id, "/g19/g1", H5L_SAME_LOC, "/g19/g3", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Open the group */
    if((group4_id = H5Gopen2(file_id, "/g19/g3", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group4_id, "/g19/g3", "/g19/g3") < 0) TEST_ERROR

    /* Delete group, using relative path */
    if(H5Ldelete(group_id, "g3", H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group4_id, "/g19/g1", "") < 0) TEST_ERROR
    if(check_name(group2_id, "/g19/g1", "/g19/g1") < 0) TEST_ERROR
    if(check_name(group3_id, "/g19/g2", "/g19/g2") < 0) TEST_ERROR

    /* Close the unlinked group */
    if(H5Gclose(group4_id) < 0) FAIL_STACK_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR

    PASSED();


   /*-------------------------------------------------------------------------
    * Test H5Iget_name with H5Lcreate_soft
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with H5Lcreate_soft");

    /* Create group "g20/g1" */
    if((group_id = H5Gcreate2(file_id, "/g20", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file_id, "/g20/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Create symbolic link to "g20/g1/ group */
    if(H5Lcreate_soft("/g20/g1", file_id, "/g20/g2", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group2_id, "/g20/g1", "/g20/g1") < 0) TEST_ERROR

    /* Open the group */
    if((group3_id = H5Gopen2(file_id, "/g20/g2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group3_id, "/g20/g2", "/g20/g2") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR

    PASSED();


   /*-------------------------------------------------------------------------
    * Test H5Iget_name with H5Lcreate_soft and move target
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with H5Lcreate_soft and move target");

    /* Create group "g21/g1" */
    if((group_id = H5Gcreate2(file_id, "/g21", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file_id, "/g21/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Create symbolic link to "g21/g1/ group */
    if(H5Lcreate_soft("/g21/g1", file_id, "/g21/g2", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group2_id, "/g21/g1", "/g21/g1") < 0) TEST_ERROR

    /* Open the group */
    if((group3_id = H5Gopen2(file_id, "/g21/g2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Rename group */
    if(H5Lmove(file_id, "/g21/g1", H5L_SAME_LOC, "/g21/g3", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group2_id, "/g21/g3", "/g21/g3") < 0) TEST_ERROR
    if(check_name(group3_id, "/g21/g2", "/g21/g2") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR

    PASSED();


   /*-------------------------------------------------------------------------
    * Test H5Iget_name with H5Lcreate_soft and move source
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with H5Lcreate_soft and move source");

    /* Create group "g22/g1" */
    if((group_id = H5Gcreate2(file_id, "/g22", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file_id, "/g22/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Create symbolic link to "g22/g1/ group */
    if(H5Lcreate_soft("/g22/g1", file_id, "/g22/g2", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group2_id, "/g22/g1", "/g22/g1") < 0) TEST_ERROR

    /* Open the group */
    if((group3_id = H5Gopen2(file_id, "/g22/g2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Rename soft link */
    if(H5Lmove(file_id, "/g22/g2", H5L_SAME_LOC, "/g22/g3", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group2_id, "/g22/g1", "/g22/g1") < 0) TEST_ERROR
    if(check_name(group3_id, "/g22/g3", "/g22/g3") < 0) TEST_ERROR

    /* Rename soft link, using relative paths */
    if(H5Lmove(group_id, "g3", H5L_SAME_LOC, "g2", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group2_id, "/g22/g1", "/g22/g1") < 0) TEST_ERROR
    if(check_name(group3_id, "/g22/g2", "/g22/g2") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR

    PASSED();



   /*-------------------------------------------------------------------------
    * Test H5Iget_name with H5Lcreate_soft and unlink target
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with H5Lcreate_soft and unlink target");

    /* Create group "g23/g1" */
    if((group_id = H5Gcreate2(file_id, "/g23", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file_id, "/g23/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Create symbolic link to "g23/g1/ group */
    if(H5Lcreate_soft("/g23/g1", file_id, "/g23/g2", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group2_id, "/g23/g1", "/g23/g1") < 0) TEST_ERROR

    /* Open the group */
    if((group3_id = H5Gopen2(file_id, "/g23/g2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Delete group */
    if(H5Ldelete(file_id, "/g23/g1", H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group3_id, "/g23/g2", "/g23/g2") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR

    PASSED();


   /*-------------------------------------------------------------------------
    * Test H5Iget_name with H5Lcreate_soft and unlink source
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with H5Lcreate_soft and unlink source");

    /* Create group "g24/g1" */
    if((group_id = H5Gcreate2(file_id, "/g24", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file_id, "/g24/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Create symbolic link to "g24/g1/ group */
    if(H5Lcreate_soft("/g24/g1", file_id, "/g24/g2", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group2_id, "/g24/g1", "/g24/g1") < 0) TEST_ERROR

    /* Open the group */
    if((group3_id = H5Gopen2(file_id, "/g24/g2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Delete symbolic link */
    if(H5Ldelete(file_id, "/g24/g2", H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group3_id, "/g24/g1", "") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR

    PASSED();


   /*-------------------------------------------------------------------------
    * Test H5Iget_name with several nested mounted files
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with several nested mounted files");

    /* Create a group "g25/g1/g2" in the first file */
    if((group_id = H5Gcreate2(file_id, "/g25", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file_id, "/g25/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file_id, "/g25/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR

    /* Create second file and group "/g26/g3/g4" in it */
    if((file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR

    if((group_id = H5Gcreate2(file1_id, "/g26", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file1_id, "/g26/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file1_id, "/g26/g3/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR

    /* Create third file and group "/g27/g5/g6" in it */
    if((file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR

    if((group_id = H5Gcreate2(file2_id, "/g27", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file2_id, "/g27/g5", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file2_id, "/g27/g5/g6", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR

    /* Create fourth file and group "/g28/g5/g6" in it */
    if((file3_id = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR

    if((group_id = H5Gcreate2(file3_id, "/g28", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file3_id, "/g28/g7", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file3_id, "/g28/g7/g8", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR

    /* Access group which will be hidden in the first file */
    if((group_id = H5Gopen2(file_id, "/g25/g1/g2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group_id, "/g25/g1/g2", "/g25/g1/g2") < 0) TEST_ERROR

    /* Mount second file under "/g25/g1" in the first file */
    if(H5Fmount(file_id, "/g25/g1", file1_id, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group_id, "", "/g25/g1/g2") < 0) TEST_ERROR

    /* Access group which will be hidden in the second file */
    if((group2_id = H5Gopen2(file_id, "/g25/g1/g26/g3/g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group2_id, "/g25/g1/g26/g3/g4", "/g25/g1/g26/g3/g4") < 0) TEST_ERROR

    /* Mount third file under "/g25/g1/g26/g3" in the first file */
    if(H5Fmount(file_id, "/g25/g1/g26/g3", file2_id, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group2_id, "", "/g25/g1/g26/g3/g4") < 0) TEST_ERROR

    /* Access group in the third file */
    if((group3_id = H5Gopen2(file_id, "/g25/g1/g26/g3/g27/g5/g6", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group3_id, "/g25/g1/g26/g3/g27/g5/g6", "/g25/g1/g26/g3/g27/g5/g6") < 0) TEST_ERROR

    /* Mount fourth file under "/g25/g1/g26/g3/g27/g5" in the first file */
    if(H5Fmount(file_id, "/g25/g1/g26/g3/g27/g5", file3_id, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group3_id, "", "/g25/g1/g26/g3/g27/g5/g6") < 0) TEST_ERROR

    /* Access group in the fourth file */
    if((group4_id = H5Gopen2(file_id, "/g25/g1/g26/g3/g27/g5/g28/g7/g8", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group4_id, "/g25/g1/g26/g3/g27/g5/g28/g7/g8", "/g25/g1/g26/g3/g27/g5/g28/g7/g8") < 0) TEST_ERROR

    if(H5Funmount(file_id, "/g25/g1/g26/g3/g27/g5") < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group4_id, "/g28/g7/g8", "") < 0) TEST_ERROR
    if(check_name(group3_id, "/g25/g1/g26/g3/g27/g5/g6", "/g25/g1/g26/g3/g27/g5/g6") < 0) TEST_ERROR
    if(check_name(group2_id, "", "/g25/g1/g26/g3/g4") < 0) TEST_ERROR
    if(check_name(group_id, "", "/g25/g1/g2") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group4_id) < 0) FAIL_STACK_ERROR
    if(H5Fclose(file3_id) < 0) FAIL_STACK_ERROR

    if(H5Funmount(file_id, "/g25/g1/g26/g3") < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group3_id, "/g27/g5/g6", "") < 0) TEST_ERROR
    if(check_name(group2_id, "/g25/g1/g26/g3/g4", "/g25/g1/g26/g3/g4") < 0) TEST_ERROR
    if(check_name(group_id, "", "/g25/g1/g2") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR
    if(H5Fclose(file2_id) < 0) FAIL_STACK_ERROR

    if(H5Funmount(file_id, "/g25/g1") < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group2_id, "/g26/g3/g4", "") < 0) TEST_ERROR
    if(check_name(group_id, "/g25/g1/g2", "/g25/g1/g2") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Fclose(file1_id) < 0) FAIL_STACK_ERROR

    PASSED();


   /*-------------------------------------------------------------------------
    * Test H5Iget_name and H5Lmove with repeated path components
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name and H5Lmove with repeated path components");

    /* Create a group "g29/g1/g2/g1/g2" in a file */
    if((group_id = H5Gcreate2(file_id, "/g29", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file_id, "/g29/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file_id, "/g29/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group4_id = H5Gcreate2(file_id, "/g29/g1/g2/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group5_id = H5Gcreate2(file_id, "/g29/g1/g2/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Rename group */
    if(H5Lmove(file_id, "/g29/g1/g2/g1/g2", H5L_SAME_LOC, "/g29/g1/g2/g1/g3", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group5_id, "/g29/g1/g2/g1/g3", "/g29/g1/g2/g1/g3") < 0) TEST_ERROR

    /* Rename group in middle of path, keeping within the same group */
    if(H5Lmove(file_id, "/g29/g1/g2/g1", H5L_SAME_LOC, "/g29/g1/g2/g3", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group4_id, "/g29/g1/g2/g3", "/g29/g1/g2/g3") < 0) TEST_ERROR
    if(check_name(group5_id, "/g29/g1/g2/g3/g3", "/g29/g1/g2/g3/g3") < 0) TEST_ERROR

    /* Rename group in middle of path, moving to another group in file */
    if(H5Lmove(file_id, "/g29/g1/g2/g3", H5L_SAME_LOC, "/g29/g3", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group4_id, "/g29/g3", "/g29/g3") < 0) TEST_ERROR
    if(check_name(group5_id, "/g29/g3/g3", "/g29/g3/g3") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group4_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group5_id) < 0) FAIL_STACK_ERROR

    PASSED();


/*-------------------------------------------------------------------------
    * Test H5Iget_name with higher mounted file
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with higher mounted file");

    /* Create a group "/g30/g1/g2" in the first file */
    if((group_id = H5Gcreate2(file_id, "/g30", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file_id, "/g30/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file_id, "/g30/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Close */
    H5Gclose(group_id);
    H5Gclose(group2_id);
    H5Gclose(group3_id);

    /* Create second file and group "/g31/g3/g4" in it */
    file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);

    if((group_id = H5Gcreate2(file1_id, "/g31", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file1_id, "/g31/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file1_id, "/g31/g3/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Close */
    H5Gclose(group_id);
    H5Gclose(group2_id);
    H5Gclose(group3_id);

    /* Create third file and group "/g32/g5/g6" in it */
    file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);

    if((group_id = H5Gcreate2(file2_id, "/g32", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file2_id, "/g32/g5", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file2_id, "/g32/g5/g6", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Close */
    H5Gclose(group_id);
    H5Gclose(group2_id);
    H5Gclose(group3_id);

    /* Create fourth file and group "/g33/g5/g6" in it */
    file3_id = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);

    if((group_id = H5Gcreate2(file3_id, "/g33", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file3_id, "/g33/g7", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file3_id, "/g33/g7/g8", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Close */
    H5Gclose(group_id);
    H5Gclose(group2_id);
    H5Gclose(group3_id);

    /* Access group which will be hidden in the first file */
    if((group_id = H5Gopen2(file_id, "/g30/g1/g2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group_id, "/g30/g1/g2", "/g30/g1/g2") < 0) TEST_ERROR

    /* Mount second file under "/g30/g1" in the first file */
    if(H5Fmount(file_id, "/g30/g1", file1_id, H5P_DEFAULT) < 0) TEST_ERROR

    /* Verify */
    if(check_name(group_id, "", "/g30/g1/g2") < 0) TEST_ERROR

    /* Access group which will be hidden in the second file */
    if((group2_id = H5Gopen2(file_id, "/g30/g1/g31/g3/g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group2_id, "/g30/g1/g31/g3/g4", "/g30/g1/g31/g3/g4") < 0) TEST_ERROR

    /* Mount third file under "/g30/g1/g31/g3" in the first file */
    if(H5Fmount(file_id, "/g30/g1/g31/g3", file2_id, H5P_DEFAULT) < 0) TEST_ERROR

    /* Verify */
    if(check_name(group2_id, "", "/g30/g1/g31/g3/g4") < 0) TEST_ERROR

    /* Access group which will be hidden in the third file */
    if((group3_id = H5Gopen2(file_id, "/g30/g1/g31/g3/g32/g5/g6", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group3_id, "/g30/g1/g31/g3/g32/g5/g6", "/g30/g1/g31/g3/g32/g5/g6") < 0) TEST_ERROR

    /* Mount fourth file under "/g30" in the first file, hiding the files below it */
    if(H5Fmount(file_id, "/g30", file3_id, H5P_DEFAULT) < 0) TEST_ERROR

    /* Verify */
    if(check_name(group3_id, "", "/g30/g1/g31/g3/g32/g5/g6") < 0) TEST_ERROR

    /* Access group which will be in the fourth file */
    if((group4_id = H5Gopen2(file_id, "/g30/g33/g7/g8", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group4_id, "/g30/g33/g7/g8", "/g30/g33/g7/g8") < 0) TEST_ERROR

    /* Unmount fourth file */
    if(H5Funmount(file_id, "/g30") < 0) TEST_ERROR

    /* Verify */
    if(check_name(group4_id, "/g33/g7/g8", "") < 0) TEST_ERROR
    if(check_name(group3_id, "/g30/g1/g31/g3/g32/g5/g6", "/g30/g1/g31/g3/g32/g5/g6") < 0) TEST_ERROR
    if(check_name(group2_id, "", "/g30/g1/g31/g3/g4") < 0) TEST_ERROR
    if(check_name(group_id, "", "/g30/g1/g2") < 0) TEST_ERROR

    /* Unmount third file */
    if(H5Funmount(file_id, "/g30/g1/g31/g3") < 0) TEST_ERROR

    /* Verify */
    if(check_name(group4_id, "/g33/g7/g8", "") < 0) TEST_ERROR
    if(check_name(group3_id, "/g32/g5/g6", "") < 0) TEST_ERROR
    if(check_name(group2_id, "/g30/g1/g31/g3/g4", "/g30/g1/g31/g3/g4") < 0) TEST_ERROR
    if(check_name(group_id, "", "/g30/g1/g2") < 0) TEST_ERROR

    /* Unmount second file */
    if(H5Funmount(file_id, "/g30/g1") < 0) TEST_ERROR

    /* Verify */
    if(check_name(group4_id, "/g33/g7/g8", "") < 0) TEST_ERROR
    if(check_name(group3_id, "/g32/g5/g6", "") < 0) TEST_ERROR
    if(check_name(group2_id, "/g31/g3/g4", "") < 0) TEST_ERROR
    if(check_name(group_id, "/g30/g1/g2", "/g30/g1/g2") < 0) TEST_ERROR

    /* Close groups */
    H5Gclose(group_id);
    H5Gclose(group2_id);
    H5Gclose(group3_id);
    H5Gclose(group4_id);

    /* Close files */
    H5Fclose(file1_id);
    H5Fclose(file2_id);
    H5Fclose(file3_id);

    PASSED();


/*-------------------------------------------------------------------------
    * Test H5Iget_name with multiple hard links and mounted files
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with multiple hard links and mounted files");

    /* Create second file and group "/g35/g3/g4" in it */
    if((file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR

    if((group_id = H5Gcreate2(file1_id, "/g35", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file1_id, "/g35/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file1_id, "/g35/g3/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR

    /* Create group "/g34/g1/g2" in first file */
    if((group_id = H5Gcreate2(file_id, "/g34", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file_id, "/g34/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file_id, "/g34/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Create hard link to "/g34/g1/g2 group */
    if(H5Lcreate_hard(file_id, "/g34/g1/g2", H5L_SAME_LOC, "/g34/g2a", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group3_id, "/g34/g1/g2", "/g34/g1/g2") < 0) TEST_ERROR

    /* Open the link to the group */
    if((group4_id = H5Gopen2(file_id, "/g34/g2a", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group4_id, "/g34/g2a", "/g34/g2a") < 0) TEST_ERROR

    /* Mount second file under "/g34/g1" in the first file */
    if(H5Fmount(file_id, "/g34/g1", file1_id, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group3_id, "", "/g34/g1/g2") < 0) TEST_ERROR
    if(check_name(group4_id, "/g34/g2a", "/g34/g2a") < 0) TEST_ERROR

    /* Unmount second file */
    if(H5Funmount(file_id, "/g34/g1") < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group3_id, "/g34/g1/g2", "/g34/g1/g2") < 0) TEST_ERROR
    if(check_name(group4_id, "/g34/g2a", "/g34/g2a") < 0) TEST_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group4_id) < 0) FAIL_STACK_ERROR
    if(H5Fclose(file1_id) < 0) FAIL_STACK_ERROR

    PASSED();


   /*-------------------------------------------------------------------------
    * Test H5Iget_name with mounted files and unlinking
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with mounted files and unlinking");

    /* Create group "/g36/g1/g2" in first file */
    if((group_id = H5Gcreate2(file_id, "/g36", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file_id, "/g36/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file_id, "/g36/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR

    /* Create second file and group "/g37/g4" in it */
    if((file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR

    if((group_id = H5Gcreate2(file1_id, "/g37", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file1_id, "/g37/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file1_id, "/g37/g4/g5a", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group4_id = H5Gcreate2(file1_id, "/g37/g4/g5b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Mount second file under "/g36/g1" in the first file */
    if(H5Fmount(file_id, "/g36/g1", file1_id, H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Open group in mounted file */
    if((group5_id = H5Gopen2(file_id, "/g36/g1/g37/", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group5_id, "/g36/g1/g37", "/g36/g1/g37") < 0) TEST_ERROR

    /* Open group to delete in mounted file */
    if((group6_id = H5Gopen2(file_id, "/g36/g1/g37/g4/g5a", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group6_id, "/g36/g1/g37/g4/g5a", "/g36/g1/g37/g4/g5a") < 0) TEST_ERROR

    /* Delete end group in mounted file, using relative paths */
    if(H5Ldelete(group5_id, "g4/g5a", H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group6_id, "", "") < 0) TEST_ERROR
    if(check_name(group3_id, "", "") < 0) TEST_ERROR

    /* Close deleted group */
    if(H5Gclose(group6_id) < 0) FAIL_STACK_ERROR

    /* Open groups to delete in mounted file */
    if((group6_id = H5Gopen2(file_id, "/g36/g1/g37/g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group7_id = H5Gopen2(file_id, "/g36/g1/g37/g4/g5b", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group6_id, "/g36/g1/g37/g4", "/g36/g1/g37/g4") < 0) TEST_ERROR
    if(check_name(group7_id, "/g36/g1/g37/g4/g5b", "/g36/g1/g37/g4/g5b") < 0) TEST_ERROR

    /* Delete middle group in mounted file, using relative paths */
    if(H5Ldelete(group5_id, "g4", H5P_DEFAULT) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group6_id, "", "") < 0) TEST_ERROR
    if(check_name(group2_id, "", "") < 0) TEST_ERROR
    if(check_name(group7_id, "", "") < 0) TEST_ERROR
    if(check_name(group4_id, "", "") < 0) TEST_ERROR

    /* Close deleted groups */
    if(H5Gclose(group6_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group7_id) < 0) FAIL_STACK_ERROR

    /* Close group in mounted file */
    if(H5Gclose(group5_id) < 0) FAIL_STACK_ERROR

    if(H5Funmount(file_id, "/g36/g1") < 0) FAIL_STACK_ERROR

    /* Close */
    if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR
    if(H5Gclose(group4_id) < 0) FAIL_STACK_ERROR
    if(H5Fclose(file1_id) < 0) FAIL_STACK_ERROR

    PASSED();


/*-------------------------------------------------------------------------
    * Test H5Iget_name with mounting already mounted files
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with mounting already mounted files");

    /* Create file and group "/g38/g1/g2" in it */
    if((file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR

    if((group_id = H5Gcreate2(file1_id, "/g38", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file1_id, "/g38/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file1_id, "/g38/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Close */
    H5Gclose(group_id);
    H5Gclose(group2_id);
    H5Gclose(group3_id);

    /* Create second file and group "/g39/g1/g2" in it */
    if((file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR

    if((group_id = H5Gcreate2(file2_id, "/g39", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file2_id, "/g39/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file2_id, "/g39/g3/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Close */
    H5Gclose(group_id);
    H5Gclose(group2_id);
    H5Gclose(group3_id);

    /* Create third file and group "/g40/g5/g6" in it */
    if((file3_id = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR

    if((group_id = H5Gcreate2(file3_id, "/g40", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file3_id, "/g40/g5", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file3_id, "/g40/g5/g6", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Close */
    H5Gclose(group_id);
    H5Gclose(group2_id);
    H5Gclose(group3_id);

    /* Mount second file under "/g38/g1" in the first file */
    if(H5Fmount(file1_id, "/g38/g1", file2_id, H5P_DEFAULT) < 0) TEST_ERROR

    if((group_id = H5Gopen2(file1_id, "/g38/g1/g39/g3/g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group_id, "/g38/g1/g39/g3/g4", "/g38/g1/g39/g3/g4") < 0) TEST_ERROR

    /* Mount first file under "/g40/g5" in the third file */
    if(H5Fmount(file3_id, "/g40/g5", file1_id, H5P_DEFAULT) < 0) TEST_ERROR

    if((group2_id = H5Gopen2(file3_id, "/g40/g5/g38/g1/g39/g3/g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group2_id, "/g40/g5/g38/g1/g39/g3/g4", "/g40/g5/g38/g1/g39/g3/g4") < 0) TEST_ERROR
    if(check_name(group_id, "/g38/g1/g39/g3/g4", "/g38/g1/g39/g3/g4") < 0) TEST_ERROR

    /* Unmount first file */
    if(H5Funmount(file3_id, "/g40/g5") < 0) TEST_ERROR

    /* Verify */
    if(check_name(group2_id, "/g38/g1/g39/g3/g4", "") < 0) TEST_ERROR
    if(check_name(group_id, "/g38/g1/g39/g3/g4", "/g38/g1/g39/g3/g4") < 0) TEST_ERROR

    /* Unmount second file */
    if(H5Funmount(file1_id, "/g38/g1") < 0) TEST_ERROR

    /* Verify */
    if(check_name(group_id, "/g39/g3/g4", "") < 0) TEST_ERROR

    /* Close */
    H5Gclose(group_id);
    H5Gclose(group2_id);
    H5Fclose(file1_id);
    H5Fclose(file2_id);
    H5Fclose(file3_id);

    PASSED();

/*-------------------------------------------------------------------------
    * Test H5Iget_name with opening object in unmounted file
    *-------------------------------------------------------------------------
    */

    TESTING("H5Iget_name with opening object in unmounted file");

    /* Create file and group "/g39/g1/g2" in it */
    file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);

    if((group_id = H5Gcreate2(file1_id, "/g41", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file1_id, "/g41/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file1_id, "/g41/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Close */
    H5Gclose(group_id);
    H5Gclose(group2_id);
    H5Gclose(group3_id);

    /* Create second file and group "/g42/g1/g2" in it */
    file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);

    if((group_id = H5Gcreate2(file2_id, "/g42", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group2_id = H5Gcreate2(file2_id, "/g42/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
    if((group3_id = H5Gcreate2(file2_id, "/g42/g3/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Close */
    H5Gclose(group_id);
    H5Gclose(group2_id);
    H5Gclose(group3_id);

    /* Mount second file under "/g41/g1" in the first file */
    if(H5Fmount(file1_id, "/g41/g1", file2_id, H5P_DEFAULT) < 0) TEST_ERROR

    if((group_id = H5Gopen2(file1_id, "/g41/g1/g42/g3", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group_id, "/g41/g1/g42/g3", "/g41/g1/g42/g3") < 0) TEST_ERROR

    /* Unmount file */
    if(H5Funmount(file1_id, "/g41/g1") < 0) TEST_ERROR

    if((group2_id = H5Gopen2(group_id, "g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Verify */
    if(check_name(group2_id, "/g42/g3/g4", "") < 0) TEST_ERROR

    /* Close */
    H5Gclose(group_id);
    H5Gclose(group2_id);
    H5Fclose(file1_id);
    H5Fclose(file2_id);

    PASSED();

    return(0);

error:
    return(1);
}

static int
test_obj_ref(hid_t fapl)
{
    char filename1[1024];
    char filename2[1024];
    hid_t	fid1, fid2;		/* HDF5 File IDs		*/
    hid_t	dataset, dataset2;	/* Dataset ID			*/
    hid_t	group, group2;          /* Group ID                     */
    hid_t	sid1;                   /* Dataspace ID			*/
    hid_t	tid1;                   /* Datatype ID			*/
    hsize_t	dims1[] = {SPACE1_DIM1};
    hobj_ref_t  wbuf[SPACE1_DIM1];      /* Buffer to write to disk */
    int         tu32[SPACE1_DIM1];      /* Int data */
    int         i;                      /* counting variables */
    char buf[100];

    /* Initialize the file names */
    h5_fixname(FILENAME[1], fapl, filename1, sizeof filename1);
    h5_fixname(FILENAME[2], fapl, filename2, sizeof filename2);

    /* Create files */
    if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
        FAIL_STACK_ERROR
    if((fid2 = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
        FAIL_STACK_ERROR

    /* Create dataspace for datasets */
    if((sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL)) < 0)
        FAIL_STACK_ERROR

    /* Create a group */
    if((group = H5Gcreate2(fid1, "Group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Create a single dataset inside the second file, which will be mounted
     * and used to mask objects in the first file */
    if((dataset = H5Dcreate2(fid2, "Dataset1", H5T_STD_U32LE, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
        FAIL_STACK_ERROR
    if(H5Dclose(dataset) < 0)
        FAIL_STACK_ERROR

    /* Create a dataset(inside Group1) */
    if((dataset = H5Dcreate2(group, "Dataset1", H5T_STD_U32LE, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
        FAIL_STACK_ERROR

    /* Initialize data buffer */
    for(i = 0; i < SPACE1_DIM1; i++)
        tu32[i] = i * 3;

    /* Write selection to disk */
    if(H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, tu32) < 0)
        FAIL_STACK_ERROR

    /* Close Dataset */
    if(H5Dclose(dataset) < 0)
        FAIL_STACK_ERROR

    /* Create another dataset(inside Group1) */
    if((dataset = H5Dcreate2(group, "Dataset2", H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
        FAIL_STACK_ERROR

    /* Close Dataset */
    if(H5Dclose(dataset) < 0)
        FAIL_STACK_ERROR

    /* Create a datatype to refer to */
    if((tid1 = H5Tcreate(H5T_COMPOUND, sizeof(s1_t))) < 0)
        FAIL_STACK_ERROR

    /* Insert fields */
    if(H5Tinsert(tid1, "a", HOFFSET(s1_t, a), H5T_NATIVE_INT) < 0)
        FAIL_STACK_ERROR
    if(H5Tinsert(tid1, "b", HOFFSET(s1_t, b), H5T_NATIVE_INT) < 0)
        FAIL_STACK_ERROR
    if(H5Tinsert(tid1, "c", HOFFSET(s1_t, c), H5T_NATIVE_FLOAT) < 0)
        FAIL_STACK_ERROR

    /* Save datatype for later */
    if(H5Tcommit2(group, "Datatype1", tid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0)
        FAIL_STACK_ERROR

    /* Close datatype */
    if(H5Tclose(tid1) < 0)
        FAIL_STACK_ERROR

    /* Create a new group in group1 */
    if((group2 = H5Gcreate2(group, "Group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR

    /* Create a hard link to group1 in group2 */
    if(H5Lcreate_hard(fid1, "/Group1", H5L_SAME_LOC, "/Group1/Group2/Link", H5P_DEFAULT, H5P_DEFAULT) < 0)
        FAIL_STACK_ERROR

    /* Create dataset in that group */
    if((dataset = H5Dcreate2(group2, "Dataset4", H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
        FAIL_STACK_ERROR

    /* Close Dataset */
    if(H5Dclose(dataset) < 0)
        FAIL_STACK_ERROR

    /* Close group */
    if(H5Gclose(group) < 0)
        FAIL_STACK_ERROR
    if(H5Gclose(group2) < 0)
        FAIL_STACK_ERROR

    /* Open up that hard link and make a new dataset there */
    if((group = H5Gopen2(fid1, "/Group1/Group2/Link", H5P_DEFAULT)) < 0)
        FAIL_STACK_ERROR
    if((dataset = H5Dcreate2(group, "Dataset5", H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
        FAIL_STACK_ERROR

    if(H5Dclose(dataset) < 0)
        FAIL_STACK_ERROR
    if(H5Gclose(group) < 0)
        FAIL_STACK_ERROR


    /* Create a dataset to store references */
    if((dataset = H5Dcreate2(fid1, "Dataset3", H5T_STD_REF_OBJ, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
        FAIL_STACK_ERROR

    /* Create reference to dataset */
    if(H5Rcreate(&wbuf[0], fid1, "/Dataset3", H5R_OBJECT, -1) < 0)
        FAIL_STACK_ERROR

    /* Create reference to dataset */
    if(H5Rcreate(&wbuf[1], fid1, "/Group1/Dataset2", H5R_OBJECT, -1) < 0)
        FAIL_STACK_ERROR

    /* Create reference to group */
    if(H5Rcreate(&wbuf[2], fid1, "/Group1", H5R_OBJECT, -1) < 0)
        FAIL_STACK_ERROR

    /* Create reference to named datatype */
    if(H5Rcreate(&wbuf[3], fid1, "/Group1/Datatype1", H5R_OBJECT, -1) < 0)
        FAIL_STACK_ERROR

    if(H5Rcreate(&wbuf[4], fid1, "/Group1/Group2/Dataset4", H5R_OBJECT, -1) < 0)
        FAIL_STACK_ERROR
    if(H5Rcreate(&wbuf[5], fid1, "/Group1/Group2", H5R_OBJECT, -1) < 0)
        FAIL_STACK_ERROR
    if(H5Rcreate(&wbuf[6], fid1, "/Group1/Group2/Link/Dataset5", H5R_OBJECT, -1) < 0)
        FAIL_STACK_ERROR

    /* Create reference to root group */
    if(H5Rcreate(&wbuf[7], fid1, "/", H5R_OBJECT, -1) < 0)
        FAIL_STACK_ERROR

    /* Write selection to disk */
    if(H5Dwrite(dataset, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf) < 0)
        FAIL_STACK_ERROR

    TESTING("getting path to normal dataset in root group");
    if((dataset2 = H5Rdereference(dataset, H5R_OBJECT, &wbuf[0])) < 0) FAIL_STACK_ERROR
    *buf = '\0';
    i = H5Iget_name(dataset2, (char*)buf, sizeof(buf));
    if(H5Dclose(dataset2) < 0) FAIL_STACK_ERROR
    if(!((HDstrcmp(buf, "/Dataset3") == 0) &&(i == 9))) TEST_ERROR
    *buf = '\0';
    i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[0], (char*)buf, sizeof(buf));
    if(!((HDstrcmp(buf, "/Dataset3") == 0) &&(i == 9))) TEST_ERROR
    PASSED()

    HDmemset(buf, 0, sizeof(buf));
    TESTING("getting path to dataset in /Group1");
    if((dataset2 = H5Rdereference(dataset, H5R_OBJECT, &wbuf[1])) < 0) FAIL_STACK_ERROR
    *buf = '\0';
    i = H5Iget_name(dataset2, (char*)buf, sizeof(buf));
    if(H5Dclose(dataset2) < 0) FAIL_STACK_ERROR
    if(!((HDstrcmp(buf, "/Group1/Dataset2") == 0) &&(i == 16))) TEST_ERROR
    *buf = '\0';
    i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[1], (char*)buf, sizeof(buf));
    if(!((HDstrcmp(buf, "/Group1/Dataset2") == 0) &&(i == 16))) TEST_ERROR
    PASSED()

    HDmemset(buf, 0, sizeof(buf));
    TESTING("getting path to /Group1");
    if((group = H5Rdereference(dataset, H5R_OBJECT, &wbuf[2])) < 0) FAIL_STACK_ERROR
    *buf = '\0';
    i = H5Iget_name(group, (char*)buf, sizeof(buf));
    if(H5Gclose(group) < 0) FAIL_STACK_ERROR
    if(!((HDstrcmp(buf, "/Group1") == 0) &&(i == 7))) TEST_ERROR
    *buf = '\0';
    i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[2], (char*)buf, sizeof(buf));
    if(!((HDstrcmp(buf, "/Group1") == 0) &&(i == 7))) TEST_ERROR
    PASSED()

    HDmemset(buf, 0, sizeof(buf));
    TESTING("getting path to datatype in /Group1");
    if((tid1 = H5Rdereference(dataset, H5R_OBJECT, &wbuf[3])) < 0) FAIL_STACK_ERROR
    *buf = '\0';
    i = H5Iget_name(tid1, (char*)buf, sizeof(buf));
    if(H5Tclose(tid1) < 0) FAIL_STACK_ERROR
    if(!((HDstrcmp(buf, "/Group1/Datatype1") == 0) &&(i == 17))) TEST_ERROR
    *buf = '\0';
    i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[3], (char*)buf, sizeof(buf));
    if(!((HDstrcmp(buf, "/Group1/Datatype1") == 0) &&(i == 17))) TEST_ERROR
    PASSED()

    HDmemset(buf, 0, sizeof(buf));
    TESTING("getting path to dataset in nested group");
    if((dataset2 = H5Rdereference(dataset, H5R_OBJECT, &wbuf[4])) < 0) FAIL_STACK_ERROR
    *buf = '\0';
    i = H5Iget_name(dataset2, (char*)buf, sizeof(buf));
    if(H5Dclose(dataset2) < 0) FAIL_STACK_ERROR
    if(!((HDstrcmp(buf, "/Group1/Group2/Dataset4") == 0) &&(i == 23))) TEST_ERROR
    *buf = '\0';
    i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[4], (char*)buf, sizeof(buf));
    if(!((HDstrcmp(buf, "/Group1/Group2/Dataset4") == 0) &&(i == 23))) TEST_ERROR
    PASSED()

    HDmemset(buf, 0, sizeof(buf));
    TESTING("getting path to nested group");
    if((group = H5Rdereference(dataset, H5R_OBJECT, &wbuf[5])) < 0) FAIL_STACK_ERROR
    *buf = '\0';
    i = H5Iget_name(group, (char*)buf, sizeof(buf));
    if(H5Gclose(group) < 0) FAIL_STACK_ERROR
    if(!((HDstrcmp(buf, "/Group1/Group2") == 0) &&(i == 14))) TEST_ERROR
    *buf = '\0';
    i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[5], (char*)buf, sizeof(buf));
    if(!((HDstrcmp(buf, "/Group1/Group2") == 0) &&(i == 14))) TEST_ERROR
    PASSED()

    HDmemset(buf, 0, sizeof(buf));
    TESTING("getting path to dataset created via hard link");
    if((dataset2 = H5Rdereference(dataset, H5R_OBJECT, &wbuf[6])) < 0) FAIL_STACK_ERROR
    *buf = '\0';
    i = H5Iget_name(dataset2, (char*)buf, sizeof(buf));
    if(H5Dclose(dataset2) < 0) FAIL_STACK_ERROR
    if(!((HDstrcmp(buf, "/Group1/Dataset5") == 0) &&(i == 16))) TEST_ERROR
    *buf = '\0';
    i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[6], (char*)buf, sizeof(buf));
    if(!((HDstrcmp(buf, "/Group1/Dataset5") == 0) &&(i == 16))) TEST_ERROR
    PASSED()

    HDmemset(buf, 0, sizeof(buf));
    TESTING("getting path to root group");
    if((group = H5Rdereference(dataset, H5R_OBJECT, &wbuf[7])) < 0) FAIL_STACK_ERROR
    *buf = '\0';
    i = H5Iget_name(group, (char*)buf, sizeof(buf));
    if(H5Gclose(group) < 0) FAIL_STACK_ERROR
    if(!((HDstrcmp(buf, "/") == 0) &&(i == 1))) TEST_ERROR
    *buf = '\0';
    i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[7], (char*)buf, sizeof(buf));
    if(!((HDstrcmp(buf, "/") == 0) &&(i == 1))) TEST_ERROR
    PASSED()

    /* Now we mount fid2 at /Group2 and look for dataset4.  It shouldn't be found */
    if(H5Fmount(fid1, "/Group1/Group2", fid2, H5P_DEFAULT) < 0)
        FAIL_STACK_ERROR

    TESTING("getting path to dataset hidden by a mounted file");
    if((dataset2 = H5Rdereference(dataset, H5R_OBJECT, &wbuf[4])) < 0) FAIL_STACK_ERROR
    *buf = '\0';
    i = H5Iget_name(dataset2, (char*)buf, sizeof(buf));
    if(H5Dclose(dataset2) < 0) FAIL_STACK_ERROR
    if(i != 0) TEST_ERROR
    *buf = '\0';
    i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[4], (char*)buf, sizeof(buf));
    if(i != 0) TEST_ERROR
    PASSED()

    /* Now we try unlinking dataset2 from the file and searching for it.  It shouldn't be found */
    if((dataset2 = H5Rdereference(dataset, H5R_OBJECT, &wbuf[1])) < 0)
        FAIL_STACK_ERROR
    if(H5Ldelete(fid1, "/Group1/Dataset2", H5P_DEFAULT) < 0)
        FAIL_STACK_ERROR

    TESTING("getting path to dataset that has been unlinked");
    *buf = '\0';
    i = H5Iget_name(dataset2, (char*)buf, sizeof(buf));
    if(H5Dclose(dataset2) < 0) FAIL_STACK_ERROR
    if(i != 0) TEST_ERROR
    *buf = '\0';
    i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[1], (char*)buf, sizeof(buf));
    if(i != 0) TEST_ERROR
    PASSED()

    /* Close disk dataspace */
    if(H5Sclose(sid1) < 0)
        FAIL_STACK_ERROR

    /* Close Dataset */
    if(H5Dclose(dataset) < 0)
        FAIL_STACK_ERROR

    /* Close file */
    if(H5Fclose(fid1) < 0)
        FAIL_STACK_ERROR
    if(H5Fclose(fid2) < 0)
        FAIL_STACK_ERROR

    return 0;

error:
    return 1;
}

static int
test_reg_ref(hid_t fapl)
{
    char filename1[1024];
    hid_t	file_id;        /* file identifier */
    hid_t	dsetv_id;       /*dataset identifiers*/
    hid_t	dsetr_id;
    hid_t	space_id, spacer_id;
    hsize_t	dims[2] = {2,9};
    hsize_t	dimsr[1] = {2};
    int		rank = 2;
    int		rankr = 1;
    hdset_reg_ref_t ref[2];
    hdset_reg_ref_t ref_out[2];
    int		data[2][9] = {{1,1,2,3,3,4,5,5,6},{1,2,2,3,4,4,5,6,6}};
    hsize_t 	start[2];
    hsize_t 	count[2];
    hsize_t 	coord[2][3] = {{0, 0, 1}, {6, 0, 8}};
    unsigned 	num_points = 3;
    size_t 	name_size1, name_size2;
    char 	buf1[NAME_BUF_SIZE], buf2[NAME_BUF_SIZE];

    /* Initialize the file name */
    h5_fixname(FILENAME[1], fapl, filename1, sizeof filename1);

    /* Create file with default file create property but vfd access property. */
    if((file_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
	TEST_ERROR

    /* Create dataspace for datasets */
    if((space_id = H5Screate_simple(rank, dims, NULL)) < 0)
	TEST_ERROR
    if((spacer_id = H5Screate_simple(rankr, dimsr, NULL)) < 0)
	TEST_ERROR

    /* Create integer dataset */
    if((dsetv_id = H5Dcreate2(file_id, REFREG_DSETNAMEV, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
	TEST_ERROR

     /* Write data to the dataset */
    if(H5Dwrite(dsetv_id, H5T_NATIVE_INT, H5S_ALL , H5S_ALL, H5P_DEFAULT, data) < 0)
	TEST_ERROR
    if(H5Dclose(dsetv_id) < 0)
	TEST_ERROR

    /* Dataset with references */
    if((dsetr_id = H5Dcreate2(file_id, REFREG_DSETNAMER, H5T_STD_REF_DSETREG, spacer_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
	TEST_ERROR

    /*
     * Create a reference to the hyperslab.
     */
    start[0] = 0;
    start[1] = 3;
    count[0] = 2;
    count[1] = 3;
    if(H5Sselect_hyperslab(space_id, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
	TEST_ERROR
    if(H5Rcreate(&ref[0], file_id, REFREG_DSETNAMEV, H5R_DATASET_REGION, space_id) < 0)
	TEST_ERROR

    /* Create a reference to elements selection */
    if(H5Sselect_none(space_id) < 0)
	TEST_ERROR
    if(H5Sselect_elements(space_id, H5S_SELECT_SET, num_points, (const hsize_t *)coord) < 0)
	TEST_ERROR
    if(H5Rcreate(&ref[1], file_id, REFREG_DSETNAMEV, H5R_DATASET_REGION, space_id) < 0)
	TEST_ERROR

    /* Write dataset with the references */
    if(H5Dwrite(dsetr_id, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, ref) < 0)
	TEST_ERROR

    /* Close all objects */
    if(H5Sclose(space_id) < 0)
	TEST_ERROR
    if(H5Sclose(spacer_id) < 0)
	TEST_ERROR
    if(H5Dclose(dsetr_id) < 0)
	TEST_ERROR
    if(H5Fclose(file_id) < 0)
	TEST_ERROR


    /* Reopen the file to read selections back */
    if((file_id = H5Fopen(filename1, H5F_ACC_RDWR, fapl)) < 0)
	TEST_ERROR

    /* Reopen the dataset with object references and read references to the buffer */
    if((dsetr_id = H5Dopen2(file_id, REFREG_DSETNAMER, H5P_DEFAULT)) < 0)
	TEST_ERROR

    if(H5Dread(dsetr_id, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, ref_out) < 0)
	TEST_ERROR

    /* Get name of the dataset the first region reference points to using H5Rget_name */
    TESTING("H5Rget_name to get name from region reference(hyperslab)");
    *buf1 = '\0';
    name_size1 = H5Rget_name(dsetr_id, H5R_DATASET_REGION, &ref_out[0], (char*)buf1, NAME_BUF_SIZE);
    if(!((HDstrcmp(buf1, "/MATRIX") == 0) &&(name_size1 == 7))) TEST_ERROR
    PASSED()

    TESTING("H5Iget_name to get name from region reference(hyperslab)");

    /* Dereference the first reference */
    dsetv_id = H5Rdereference(dsetr_id, H5R_DATASET_REGION, &ref_out[0]);

    /* Get name of the dataset the first region reference points using H5Iget_name */
    *buf2 = '\0';
    name_size2 = H5Iget_name(dsetv_id, (char*)buf2, NAME_BUF_SIZE);
    if(!((HDstrcmp(buf2, "/MATRIX") == 0) &&(name_size2 == 7))) TEST_ERROR

    if(H5Dclose(dsetv_id) < 0) TEST_ERROR

    PASSED()

    /* Get name of the dataset the second region reference points to using H5Rget_name */
    TESTING("H5Rget_name to get name from region reference(pnt selec)");
    *buf1 = '\0';
    name_size1 = H5Rget_name(dsetr_id, H5R_DATASET_REGION, &ref_out[1], (char*)buf1, NAME_BUF_SIZE);
    if(!((HDstrcmp(buf1, "/MATRIX") == 0) &&(name_size1 == 7))) TEST_ERROR
    PASSED()

    TESTING("H5Iget_name to get name from region reference(pnt selec)");

    /* Dereference the second reference */
    if((dsetv_id = H5Rdereference(dsetr_id, H5R_DATASET_REGION, &ref_out[1])) < 0) TEST_ERROR

    /* Get name of the dataset the first region reference points using H5Iget_name */
    *buf2 = '\0';
    name_size2 = H5Iget_name(dsetv_id, (char*)buf2, NAME_BUF_SIZE);
    if(!((HDstrcmp(buf2, "/MATRIX") == 0) &&(name_size2 == 7))) TEST_ERROR

    if(H5Dclose(dsetv_id) < 0) TEST_ERROR

    PASSED()

    if(H5Dclose(dsetr_id) < 0)
	TEST_ERROR
    if(H5Fclose(file_id) < 0)
	TEST_ERROR

    return 0;

error:
    return 1;
}

int
main(void)
{
    hid_t   file_id =(-1);
    int nerrors = 0;
    hid_t fapl;
    char filename0[1024];

    /* Reset the library and get the file access property list */
    h5_reset();
    fapl = h5_fileaccess();
    h5_fixname(FILENAME[0], fapl, filename0, sizeof filename0);

    /* Create a new file_id using default create property but vfd access
     * property.
     */
    if((file_id = H5Fcreate(filename0,H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR

    /* Call "main" test routine */
    nerrors += test_main(file_id, fapl);
    nerrors += test_obj_ref(fapl);
    nerrors += test_reg_ref(fapl);

    /* Close file */
    H5Fclose(file_id);

    if(nerrors)
        goto error;
    puts("All getname tests passed.");

    h5_cleanup(FILENAME, fapl);

    return 0;

error:
    H5E_BEGIN_TRY {
        H5Fclose(file_id);
    } H5E_END_TRY;

    puts("***** GET NAME TESTS FAILED *****");

    return 1;
}