Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into pause_errors_15
Browse files Browse the repository at this point in the history
  • Loading branch information
qkoziol committed Oct 18, 2024
2 parents ff83e4e + 4a10a06 commit 6bd5dec
Show file tree
Hide file tree
Showing 32 changed files with 433 additions and 350 deletions.
4 changes: 4 additions & 0 deletions bin/h5cc.in
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,10 @@ for arg in $@ ; do
qarg='"'"$arg"'"'
qargs="$qargs $qarg"
;;
*\ *)
qarg=$arg
qargs="$qargs $qarg"
;;
*)
if test -s "$arg"; then
ext=`expr "$arg" : '.*\(\..*\)'`
Expand Down
4 changes: 4 additions & 0 deletions c++/src/h5c++.in
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,10 @@ for arg in $@ ; do
qarg='"'"$arg"'"'
qargs="$qargs $qarg"
;;
*\ *)
qarg=$arg
qargs="$qargs $qarg"
;;
*)
if [ -s "$arg" ] ; then
ext=`expr "$arg" : '.*\(\..*\)'`
Expand Down
2 changes: 1 addition & 1 deletion c++/test/tattr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1983,7 +1983,7 @@ test_attr(const void *params)

// Loop over using new group format
unsigned new_format;
for (new_format = FALSE; new_format <= TRUE; new_format++) {
for (new_format = false; new_format <= true; new_format++) {
FileAccPropList curr_fapl;

// Set the file access proplist for the type of format
Expand Down
6 changes: 3 additions & 3 deletions c++/test/tfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ test_file_info()
SUBTEST("File general information");

hsize_t out_threshold = 0; // Free space section threshold to get
hbool_t out_persist = FALSE; // Persist free-space read
hbool_t out_persist = false; // Persist free-space read
// File space handling strategy
H5F_fspace_strategy_t out_strategy = H5F_FSPACE_STRATEGY_FSM_AGGR;

Expand All @@ -869,7 +869,7 @@ test_file_info()
// Verify file space information.
verify_val(static_cast<long>(out_strategy), static_cast<long>(H5F_FSPACE_STRATEGY_FSM_AGGR),
"H5File::getFileInfo", __LINE__, __FILE__);
verify_val(out_persist, FALSE, "H5File::getFileInfo", __LINE__, __FILE__);
verify_val(out_persist, false, "H5File::getFileInfo", __LINE__, __FILE__);
verify_val(static_cast<long>(out_threshold), 1, "H5File::getFileInfo", __LINE__, __FILE__);

/* Retrieve file space page size */
Expand All @@ -884,7 +884,7 @@ test_file_info()
fcpl.setIstorek(F2_ISTORE);

hsize_t threshold = 5; // Free space section threshold to set
hbool_t persist = TRUE; // Persist free-space to set
hbool_t persist = true; // Persist free-space to set
H5F_fspace_strategy_t strategy = H5F_FSPACE_STRATEGY_PAGE;

fcpl.setFileSpaceStrategy(strategy, persist, threshold);
Expand Down
14 changes: 7 additions & 7 deletions c++/test/tlinks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ test_basic_links(hid_t fapl_id, hbool_t new_format)
H5File file(filename, H5F_ACC_RDWR, FileCreatPropList::DEFAULT, fapl);

// Verify link existence
if (file.nameExists("dset1", LinkAccPropList::DEFAULT) != TRUE)
if (file.nameExists("dset1", LinkAccPropList::DEFAULT) != true)
throw InvalidActionException("H5File::nameExists", "dset1 doesn't exist");
if (file.nameExists("grp1/soft", LinkAccPropList::DEFAULT) != TRUE)
if (file.nameExists("grp1/soft", LinkAccPropList::DEFAULT) != true)
throw InvalidActionException("H5File::nameExists", "grp1/soft doesn't exist");
// Deprecated
if (file.exists("dset1", LinkAccPropList::DEFAULT) != TRUE)
if (file.exists("dset1", LinkAccPropList::DEFAULT) != true)
throw InvalidActionException("H5File::exists", "dset1 doesn't exist");
if (file.exists("grp1/soft", LinkAccPropList::DEFAULT) != TRUE)
if (file.exists("grp1/soft", LinkAccPropList::DEFAULT) != true)
throw InvalidActionException("H5File::exists", "grp1/soft doesn't exist");

// Verify link values
Expand Down Expand Up @@ -290,7 +290,7 @@ test_move(hid_t fapl_id, hbool_t new_format)

// Move a soft link across files, should succeed
grp_2.moveLink("soft", file_b, "soft_new_name");
if (file_b.exists("soft_new_name") != TRUE)
if (file_b.exists("soft_new_name") != true)
throw InvalidActionException("H5File::exists", "grp1/soft doesn't exist");

// Move a group across groups in the same file while renaming it
Expand Down Expand Up @@ -429,7 +429,7 @@ test_copy(hid_t fapl_id, hbool_t new_format)

// Copy a soft link across files, should succeed
grp_2.copyLink("soft", file_b, "soft_new_name");
if (file_b.exists("soft_new_name") != TRUE)
if (file_b.exists("soft_new_name") != true)
throw InvalidActionException("H5File::exists", "soft_new_name doesn't exist");

// Move a group across groups in the same file while renaming it
Expand Down Expand Up @@ -730,7 +730,7 @@ test_links(const void *params)
throw Exception("test_links", "H5Pset_libver_bounds failed");

/* Loop over using new group format */
for (new_format = FALSE; new_format <= TRUE; new_format++) {
for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl_id;

/* Check for FAPL to use */
Expand Down
32 changes: 16 additions & 16 deletions c++/test/tobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,54 +169,54 @@ test_existance()

// Check if GROUP1 exists in the file
bool exists = file.nameExists(GROUP1);
verify_val(exists, TRUE, "Group::nameExists GROUP1_1", __LINE__, __FILE__);
verify_val(exists, true, "Group::nameExists GROUP1_1", __LINE__, __FILE__);
// Deprecated
exists = file.exists(GROUP1);
verify_val(exists, TRUE, "Group::exists GROUP1_1", __LINE__, __FILE__);
verify_val(exists, true, "Group::exists GROUP1_1", __LINE__, __FILE__);

// Open GROUP1
Group grp1 = file.openGroup(GROUP1);

// Check if GROUP1_1 and GROUP1_2 exist in GROUP1
exists = grp1.nameExists(GROUP1_1);
verify_val(exists, TRUE, "Group::nameExists GROUP1_1", __LINE__, __FILE__);
verify_val(exists, true, "Group::nameExists GROUP1_1", __LINE__, __FILE__);
exists = grp1.nameExists(GROUP1_2);
verify_val(exists, TRUE, "Group::nameExists GROUP1_2", __LINE__, __FILE__);
verify_val(exists, true, "Group::nameExists GROUP1_2", __LINE__, __FILE__);
// Deprecated
exists = grp1.exists(GROUP1_1);
verify_val(exists, TRUE, "Group::exists GROUP1_1", __LINE__, __FILE__);
verify_val(exists, true, "Group::exists GROUP1_1", __LINE__, __FILE__);
exists = grp1.exists(GROUP1_2);
verify_val(exists, TRUE, "Group::exists GROUP1_2", __LINE__, __FILE__);
verify_val(exists, true, "Group::exists GROUP1_2", __LINE__, __FILE__);

// Check if DSET_IN_GRP1 exists in GROUP1
exists = grp1.nameExists(DSET_IN_GRP1);
verify_val(exists, TRUE, "Group::nameExists DSET_IN_GRP1", __LINE__, __FILE__);
verify_val(exists, true, "Group::nameExists DSET_IN_GRP1", __LINE__, __FILE__);
// Deprecated
exists = grp1.exists(DSET_IN_GRP1);
verify_val(exists, TRUE, "Group::exists DSET_IN_GRP1", __LINE__, __FILE__);
verify_val(exists, true, "Group::exists DSET_IN_GRP1", __LINE__, __FILE__);

// Open GROUP1_2
Group grp1_2 = grp1.openGroup(GROUP1_2);

// Check if DSET_IN_GRP1_2 exists in GROUP1_2
exists = grp1_2.nameExists(DSET_IN_GRP1_2);
verify_val(exists, TRUE, "Group::nameExists DSET_IN_GRP1_2", __LINE__, __FILE__);
verify_val(exists, true, "Group::nameExists DSET_IN_GRP1_2", __LINE__, __FILE__);
// Deprecated
exists = grp1_2.exists(DSET_IN_GRP1_2);
verify_val(exists, TRUE, "Group::exists DSET_IN_GRP1_2", __LINE__, __FILE__);
verify_val(exists, true, "Group::exists DSET_IN_GRP1_2", __LINE__, __FILE__);

// Check if a dataset exists given dataset as location with full path name
DataSet dset1 = file.openDataSet(DSET_IN_FILE);
exists = dset1.nameExists("/Top Group/Dataset_in_Group_1");
verify_val(exists, TRUE, "Group::nameExists given dataset with full path name", __LINE__, __FILE__);
verify_val(exists, true, "Group::nameExists given dataset with full path name", __LINE__, __FILE__);

exists = grp1_2.nameExists(DSET_IN_GRP1);
verify_val(exists, FALSE, "Group::nameExists DSET_IN_GRP1", __LINE__, __FILE__);
verify_val(exists, false, "Group::nameExists DSET_IN_GRP1", __LINE__, __FILE__);
// Deprecated
exists = dset1.exists("/Top Group/Dataset_in_Group_1");
verify_val(exists, TRUE, "Group::exists given dataset with full path name", __LINE__, __FILE__);
verify_val(exists, true, "Group::exists given dataset with full path name", __LINE__, __FILE__);
exists = grp1_2.exists(DSET_IN_GRP1);
verify_val(exists, FALSE, "Group::exists DSET_IN_GRP1", __LINE__, __FILE__);
verify_val(exists, false, "Group::exists DSET_IN_GRP1", __LINE__, __FILE__);

// Everything will be closed as they go out of scope

Expand Down Expand Up @@ -647,7 +647,7 @@ test_intermediate_groups()
} // Failure is ignored

// Create GROUP14NAME with the flag to create missing groups set
// to FALSE, should fail because group GROUP13NAME is missing
// to false, should fail because group GROUP13NAME is missing

// Reset flag to not create missing groups
lcpl.setCreateIntermediateGroup(false);
Expand All @@ -662,7 +662,7 @@ test_intermediate_groups()
catch (FileIException &expected2) {
} // Failure is ignored

// Set the flag to create missing groups set to TRUE
// Set the flag to create missing groups set to true
lcpl.setCreateIntermediateGroup(true);
crt_int_grps = lcpl.getCreateIntermediateGroup();
verify_val(crt_int_grps, true, "LinkCreatPropList::getCreateIntermediateGroup", __LINE__, __FILE__);
Expand Down
10 changes: 0 additions & 10 deletions doxygen/dox/ExamplesAPI.dox
Original file line number Diff line number Diff line change
Expand Up @@ -800,16 +800,6 @@ FORTRAN
<td><a href="https://\SRCURL/HDF5Examples/C/H5FLT/tfiles/h5ex_d_lzf.ddl">h5ex_d_lzf.ddl</a></td>
</tr>
<tr>
<td>Read / Write Dataset using MAFISC Compression</td>
<td>
<a href="https://\SRCURL/HDF5Examples/C/H5FLT/h5ex_d_mafisc.c">C</a>
FORTRAN Java JavaObj MATLAB PyHigh PyLow
</td>
<td><a href="https://\SRCURL/HDF5Examples/C/H5FLT/tfiles/h5ex_d_mafisc.h5">h5ex_d_mafisc.h5</a></td>
<td><a href="https://\SRCURL/HDF5Examples/C/H5FLT/tfiles/h5ex_d_mafisc.tst">h5ex_d_mafisc.tst</a></td>
<td><a href="https://\SRCURL/HDF5Examples/C/H5FLT/tfiles/h5ex_d_mafisc.ddl">h5ex_d_mafisc.ddl</a></td>
</tr>
<tr>
<td>Read / Write Dataset using ZFP Compression</td>
<td>
<a href="https://\SRCURL/HDF5Examples/C/H5FLT/h5ex_d_zfp.c">C</a>
Expand Down
4 changes: 4 additions & 0 deletions fortran/src/h5fc.in
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ for arg in $@ ; do
qarg='"'"$arg"'"'
qargs="$qargs $qarg"
;;
*\ *)
qarg=$arg
qargs="$qargs $qarg"
;;
*)
if [ -s "$arg" ] ; then
ext=`expr "$arg" : '.*\(\..*\)'`
Expand Down
72 changes: 36 additions & 36 deletions hl/test/test_lite.c
Original file line number Diff line number Diff line change
Expand Up @@ -2134,54 +2134,54 @@ test_valid_path(void)
* CHECK ABSOLUTE PATHS
**************************************/

if ((path_valid = H5LTpath_valid(file_id, "/", TRUE)) != TRUE) {
if ((path_valid = H5LTpath_valid(file_id, "/", true)) != true) {
goto out;
}

if ((path_valid = H5LTpath_valid(file_id, "/", FALSE)) != TRUE) {
if ((path_valid = H5LTpath_valid(file_id, "/", false)) != true) {
goto out;
}

if ((path_valid = H5LTpath_valid(file_id, "/G1", TRUE)) != TRUE) {
if ((path_valid = H5LTpath_valid(file_id, "/G1", true)) != true) {
goto out;
}

if ((path_valid = H5LTpath_valid(file_id, "/G1/DS1", TRUE)) != TRUE)
if ((path_valid = H5LTpath_valid(file_id, "/G1/DS1", true)) != true)
goto out;

if ((path_valid = H5LTpath_valid(file_id, "/G1/DS3", TRUE)) != TRUE)
if ((path_valid = H5LTpath_valid(file_id, "/G1/DS3", true)) != true)
goto out;

if ((path_valid = H5LTpath_valid(file_id, "/G1/G2", TRUE)) != TRUE)
if ((path_valid = H5LTpath_valid(file_id, "/G1/G2", true)) != true)
goto out;

if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/G5", TRUE)) != TRUE)
if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/G5", true)) != true)
goto out;

if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/Gcyc/DS1", FALSE)) != TRUE)
if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/Gcyc/DS1", false)) != true)
goto out;

if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/Gcyc/DS1", TRUE)) != TRUE)
if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/Gcyc/DS1", true)) != true)
goto out;

if ((path_valid = H5LTpath_valid(file_id, "/G2", TRUE)) != TRUE)
if ((path_valid = H5LTpath_valid(file_id, "/G2", true)) != true)
goto out;

/* check soft link points to a valid object*/
if ((path_valid = H5LTpath_valid(file_id, "/G2/DS4", TRUE)) != TRUE)
if ((path_valid = H5LTpath_valid(file_id, "/G2/DS4", true)) != true)
goto out;

/* check if path exist, but not the object */
if ((path_valid = H5LTpath_valid(file_id, "/G2/G7", FALSE)) != TRUE)
if ((path_valid = H5LTpath_valid(file_id, "/G2/G7", false)) != true)
goto out;
/* check if path exist and if the object exists. It should fail
* since it is a dangling soft link
*/
if ((path_valid = H5LTpath_valid(file_id, "/G2/G7", TRUE)) == TRUE)
if ((path_valid = H5LTpath_valid(file_id, "/G2/G7", true)) == true)
goto out;

/* check soft links */
if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/G5/DS4", TRUE)) != TRUE)
if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/G5/DS4", true)) != true)
goto out;

/**************************************
Expand All @@ -2191,11 +2191,11 @@ test_valid_path(void)
if ((group = H5Gopen2(file_id, "/", H5P_DEFAULT)) < 0)
goto out;

if ((path_valid = H5LTpath_valid(group, "/", TRUE)) != TRUE) {
if ((path_valid = H5LTpath_valid(group, "/", true)) != true) {
goto out;
}

if ((path_valid = H5LTpath_valid(group, "/", FALSE)) != TRUE) {
if ((path_valid = H5LTpath_valid(group, "/", false)) != true) {
goto out;
}

Expand All @@ -2207,39 +2207,39 @@ test_valid_path(void)

/* The identifier (file id) is the object itself, i.e. "." */

if ((path_valid = H5LTpath_valid(file_id, ".", FALSE)) != TRUE)
if ((path_valid = H5LTpath_valid(file_id, ".", false)) != true)
goto out;

if ((path_valid = H5LTpath_valid(file_id, ".", TRUE)) != TRUE)
if ((path_valid = H5LTpath_valid(file_id, ".", true)) != true)
goto out;

/* The identifier (group id) is the object itself, i.e. "." */

if ((path_valid = H5LTpath_valid(group, ".", TRUE)) != TRUE)
if ((path_valid = H5LTpath_valid(group, ".", true)) != true)
goto out;

if ((path_valid = H5LTpath_valid(group, "DS3", FALSE)) != TRUE)
if ((path_valid = H5LTpath_valid(group, "DS3", false)) != true)
goto out;

if ((path_valid = H5LTpath_valid(group, "DS3", TRUE)) != TRUE)
if ((path_valid = H5LTpath_valid(group, "DS3", true)) != true)
goto out;

if ((path_valid = H5LTpath_valid(group, "G2/G5", TRUE)) != TRUE)
if ((path_valid = H5LTpath_valid(group, "G2/G5", true)) != true)
goto out;

/* Check the "./" case */
if ((path_valid = H5LTpath_valid(group, "./DS3", TRUE)) != TRUE)
if ((path_valid = H5LTpath_valid(group, "./DS3", true)) != true)
goto out;

if ((path_valid = H5LTpath_valid(group, "./G2/G5", TRUE)) != TRUE)
if ((path_valid = H5LTpath_valid(group, "./G2/G5", true)) != true)
goto out;

/* Should fail, does not exist */
if ((path_valid = H5LTpath_valid(group, "./G2/G20", FALSE)) == TRUE)
if ((path_valid = H5LTpath_valid(group, "./G2/G20", false)) == true)
goto out;

/* Should fail, does not exist */
if ((path_valid = H5LTpath_valid(group, "./G2/G20", TRUE)) == TRUE)
if ((path_valid = H5LTpath_valid(group, "./G2/G20", true)) == true)
goto out;

if (H5Gclose(group) < 0)
Expand All @@ -2250,36 +2250,36 @@ test_valid_path(void)
*****************************/

/* The dangled external link path is valid */
if ((path_valid = H5LTpath_valid(file_id, "/DangledExternalLink", FALSE)) != TRUE)
if ((path_valid = H5LTpath_valid(file_id, "/DangledExternalLink", false)) != true)
goto out;

/* The file however does not exists, so the link dangles -> should return false */
if ((path_valid = H5LTpath_valid(file_id, "/DangledExternalLink", TRUE)) == TRUE)
if ((path_valid = H5LTpath_valid(file_id, "/DangledExternalLink", true)) == true)
goto out;

if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/G6/ExternalLink", FALSE)) != TRUE)
if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/G6/ExternalLink", false)) != true)
goto out;

if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/G6/ExternalLink", TRUE)) != TRUE)
if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/G6/ExternalLink", true)) != true)
goto out;

if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/Gcyc/G2/G6/ExternalLink/DS1", TRUE)) != TRUE)
if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/Gcyc/G2/G6/ExternalLink/DS1", true)) != true)
goto out;

if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/Gcyc/G2/G6/ExternalLink/G20", FALSE)) != TRUE)
if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/Gcyc/G2/G6/ExternalLink/G20", false)) != true)
goto out;

if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/G6/ExternalLink/DS1", TRUE)) != TRUE)
if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/G6/ExternalLink/DS1", true)) != true)
goto out;

if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/G6/ExternalLink/G20", FALSE)) != TRUE)
if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/G6/ExternalLink/G20", false)) != true)
goto out;

/* Should fail, does not exist */
if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/G6/ExternalLink/G20", TRUE)) == TRUE)
if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/G6/ExternalLink/G20", true)) == true)
goto out;

if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/Gcyc/G2/G6/ExternalLink/G20", TRUE)) == TRUE)
if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/Gcyc/G2/G6/ExternalLink/G20", true)) == true)
goto out;

if (H5Fclose(file_id) < 0)
Expand Down
Loading

0 comments on commit 6bd5dec

Please sign in to comment.