diff options
45 files changed, 234 insertions, 228 deletions
diff --git a/c++/src/Makefile.am b/c++/src/Makefile.am index 949325a..eb50209 100644 --- a/c++/src/Makefile.am +++ b/c++/src/Makefile.am @@ -32,15 +32,15 @@ bin_SCRIPTS=h5c++ # Source files for the library libhdf5_cpp_la_SOURCES=H5Exception.cpp H5IdComponent.cpp \ - H5DataSpace.cpp H5PropList.cpp H5Library.cpp \ - H5FaccProp.cpp H5FcreatProp.cpp H5LcreatProp.cpp \ - H5LaccProp.cpp H5DaccProp.cpp H5DxferProp.cpp \ + H5DataSpace.cpp H5PropList.cpp H5Library.cpp \ + H5FaccProp.cpp H5FcreatProp.cpp H5LcreatProp.cpp \ + H5LaccProp.cpp H5DaccProp.cpp H5DxferProp.cpp \ H5DcreatProp.cpp H5Location.cpp H5AbstractDs.cpp \ H5Attribute.cpp H5Object.cpp H5OcreatProp.cpp \ - H5DataType.cpp H5AtomType.cpp H5PredType.cpp \ + H5DataType.cpp H5AtomType.cpp H5PredType.cpp \ H5EnumType.cpp H5IntType.cpp H5FloatType.cpp \ H5StrType.cpp H5ArrayType.cpp H5VarLenType.cpp \ - H5CompType.cpp H5DataSet.cpp H5CommonFG.cpp H5Group.cpp \ + H5CompType.cpp H5DataSet.cpp H5CommonFG.cpp H5Group.cpp \ H5File.cpp # HDF5 C++ library depends on HDF5 Library. diff --git a/examples/Makefile.am b/examples/Makefile.am index 8c6540f..554ee44 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -32,25 +32,25 @@ INSTALL_TOP_FILES = README # it would try to compile them instead of using the h5cc script. # Use the boilerplate in config/examples.am instead. EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \ - h5_crtgrpd h5_subset h5_cmprss h5_rdwt h5_crtgrpar h5_extend \ - h5_crtatt h5_crtgrp h5_crtdat \ - h5_group h5_select h5_attribute h5_mount h5_reference h5_drivers \ - h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg h5_vds h5_vds-exc \ - h5_vds-exclim h5_vds-eiger h5_vds-simpleIO h5_vds-percival \ - h5_vds-percival-unlim h5_vds-percival-unlim-maxmin + h5_crtgrpd h5_subset h5_cmprss h5_rdwt h5_crtgrpar h5_extend \ + h5_crtatt h5_crtgrp h5_crtdat \ + h5_group h5_select h5_attribute h5_mount h5_reference h5_drivers \ + h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg h5_vds h5_vds-exc \ + h5_vds-exclim h5_vds-eiger h5_vds-simpleIO h5_vds-percival \ + h5_vds-percival-unlim h5_vds-percival-unlim-maxmin TEST_SCRIPT=testh5cc.sh TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES) # Install files # List all file that should be installed in examples directory INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \ - h5_crtgrpd.c h5_subset.c h5_cmprss.c h5_rdwt.c h5_crtgrpar.c \ - h5_extend.c h5_crtatt.c h5_crtgrp.c h5_crtdat.c \ - h5_compound.c h5_group.c h5_select.c h5_attribute.c h5_mount.c \ - h5_reference.c h5_drivers.c h5_extlink.c h5_elink_unix2win.c \ - h5_ref2reg.c h5_shared_mesg.c ph5example.c h5_vds.c h5_vds-exc.c \ - h5_vds-exclim.c h5_vds-eiger.c h5_vds-simpleIO.c h5_vds-percival.c \ - h5_vds-percival-unlim.c h5_vds-percival-unlim-maxmin.c + h5_crtgrpd.c h5_subset.c h5_cmprss.c h5_rdwt.c h5_crtgrpar.c \ + h5_extend.c h5_crtatt.c h5_crtgrp.c h5_crtdat.c \ + h5_compound.c h5_group.c h5_select.c h5_attribute.c h5_mount.c \ + h5_reference.c h5_drivers.c h5_extlink.c h5_elink_unix2win.c \ + h5_ref2reg.c h5_shared_mesg.c ph5example.c h5_vds.c h5_vds-exc.c \ + h5_vds-exclim.c h5_vds-eiger.c h5_vds-simpleIO.c h5_vds-percival.c \ + h5_vds-percival-unlim.c h5_vds-percival-unlim-maxmin.c diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90 index 13a2953..f170e5f 100644 --- a/fortran/src/H5Pff.F90 +++ b/fortran/src/H5Pff.F90 @@ -9,7 +9,7 @@ ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. *S +! 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 * diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index 84529e4..7cd073d 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -129,6 +129,7 @@ MODULE H5LIB ! INTEGER, PARAMETER :: H5T_FLAGS_LEN = 35 INTEGER, DIMENSION(1:H5T_FLAGS_LEN) :: H5T_flags + ! ! H5Z flags declaration ! diff --git a/fortran/test/tH5O_F03.F90 b/fortran/test/tH5O_F03.F90 index d1a9ddb..bc3668c 100644 --- a/fortran/test/tH5O_F03.F90 +++ b/fortran/test/tH5O_F03.F90 @@ -270,12 +270,9 @@ CONTAINS ! A(8) = tm_yday int days since January 1 0-365 ! A(9) = tm_isdst int Daylight Saving Time flag ! - INTEGER(C_INT), DIMENSION(:), POINTER :: c_atime, c_btime, c_ctime, c_mtime - INTEGER(C_INT), DIMENSION(1:8) :: atime, btime, ctime, mtime INTEGER :: len, i INTEGER :: idx INTEGER :: ierr - TYPE(C_PTR) :: cptr visit_obj_cb = 0 diff --git a/fortran/testpar/ptest.f90 b/fortran/testpar/ptest.f90 index 14ac3b2..3b07f21 100644 --- a/fortran/testpar/ptest.f90 +++ b/fortran/testpar/ptest.f90 @@ -16,7 +16,7 @@ ! PROGRAM parallel_test - USE hdf5 + USE HDF5 USE MPI USE TH5_MISC diff --git a/hl/fortran/src/H5TBff.F90 b/hl/fortran/src/H5TBff.F90 index d18d023..40adf95 100644 --- a/hl/fortran/src/H5TBff.F90 +++ b/hl/fortran/src/H5TBff.F90 @@ -939,10 +939,10 @@ CONTAINS INTEGER(size_t), DIMENSION(nfields), INTENT(inout) :: field_offsets ! field offsets INTEGER(size_t), INTENT(inout):: type_size ! type size INTEGER :: errcode ! error code - INTEGER, OPTIONAL :: maxlen_out ! maximum character len of the field names + INTEGER(size_t), OPTIONAL :: maxlen_out ! maximum character len of the field names INTEGER(size_t) :: namelen ! name length INTEGER(size_t), DIMENSION(nfields) :: namelen2 ! name lengths - INTEGER(hsize_t) :: i ! general purpose integer + INTEGER(hsize_t) :: i ! general purpose integer INTEGER(size_t) :: maxlen INTEGER(size_t) :: c_maxlen_out diff --git a/hl/fortran/test/tstimage.F90 b/hl/fortran/test/tstimage.F90 index d6bd1e2..8586e68 100644 --- a/hl/fortran/test/tstimage.F90 +++ b/hl/fortran/test/tstimage.F90 @@ -62,7 +62,7 @@ character(len=4), parameter :: dsetname2 = "img2" ! dataset name character(len=15), parameter :: il ="INTERLACE_PIXEL"! dataset name integer(hid_t) :: file_id ! file identifier integer(hsize_t), parameter :: width = 500 ! width of image -integer(hsize_t), parameter :: height = 200 ! height of image +integer(hsize_t), parameter :: height = 270 ! height of image integer, parameter :: pal_entries = 9 ! palette number of entries integer, dimension(width*height) :: buf1 ! data buffer integer, dimension(width*height) :: bufr1 ! data buffer diff --git a/hl/fortran/test/tsttable.F90 b/hl/fortran/test/tsttable.F90 index 38cfa86..840d33d 100644 --- a/hl/fortran/test/tsttable.F90 +++ b/hl/fortran/test/tsttable.F90 @@ -93,7 +93,7 @@ SUBROUTINE test_table1() INTEGER(SIZE_T), DIMENSION(1:nfields) :: field_offsetr ! field offset INTEGER(SIZE_T), DIMENSION(1:nfields) :: field_sizesr ! field sizes INTEGER(SIZE_T) :: type_sizeout = 0 ! size of the datatype - INTEGER :: maxlen = 0 ! max chararter length of a field name + INTEGER(SIZE_T) :: maxlen = 0 ! max character length of a field name INTEGER :: Cs_sizeof_double = H5_SIZEOF_DOUBLE ! C's sizeof double INTEGER :: SIZEOF_X LOGICAL :: Exclude_double diff --git a/release_docs/README_HDF5_CMake b/release_docs/README_HDF5_CMake index 484710d..da0823c 100644 --- a/release_docs/README_HDF5_CMake +++ b/release_docs/README_HDF5_CMake @@ -6,16 +6,16 @@ This tar file contains CTestScript.cmake HDF5config.cmake CMake scripts for building HDF5 HDF5options.cmake - hdf5-1.10.5-pre1 HDF5 1.10.5-pre1 source + hdf5-1.10.6 HDF5 1.10.6 source SZip.tar.gz source for building SZIP ZLib.tar.gz source for building ZLIB For more information about building HDF5 with CMake, see USING_HDF5_CMake.txt in -hdf5-1.10.5-pre1/release_docs, or +hdf5-1.10.6/release_docs, or https://portal.hdfgroup.org/display/support/Building+HDF5+with+CMake. For more information about building HDF5 with CMake on HPC machines, including -cross compiling on Cray XC40, see README_HPC in hdf5-1.10.5-pre1/release_docs. +cross compiling on Cray XC40, see README_HPC in hdf5-1.10.6/release_docs. diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 584424b..f5d99ab 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -312,6 +312,10 @@ Bug Fixes since HDF5-1.10.5 release (ADB - 2019/08/12, HDFFV-10879) + Performance + ------------- + - + Fortran -------- - @@ -504,6 +508,10 @@ The following platforms are not supported but have been tested for this release. Known Problems ============== + CMake files do not behave correctly with paths containing spaces. + Do not use spaces in paths because the required escaping for handling spaces + results in very complex and fragile build files. + ADB - 2019/05/07 At present, metadata cache images may not be generated by parallel applications. Parallel applications can read files with metadata cache diff --git a/test/Makefile.am b/test/Makefile.am index 7d005f4..276b262 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -37,8 +37,8 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_builddir)/src TEST_SCRIPT = testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh testexternal_env.sh \ testswmr.sh testvds_env.sh testvdsswmr.sh testflushrefresh.sh test_usecases.sh testabort_fail.sh SCRIPT_DEPEND = error_test$(EXEEXT) err_compat$(EXEEXT) links_env$(EXEEXT) \ - filenotclosed$(EXEEXT) del_many_dense_attrs$(EXEEXT) \ - external_env$(EXEEXT) flushrefresh$(EXEEXT) use_append_chunk$(EXEEXT) use_append_mchunks$(EXEEXT) use_disable_mdc_flushes$(EXEEXT) \ + external_env$(EXEEXT) filenotclosed$(EXEEXT) del_many_dense_attrs$(EXEEXT) \ + flushrefresh$(EXEEXT) use_append_chunk$(EXEEXT) use_append_mchunks$(EXEEXT) use_disable_mdc_flushes$(EXEEXT) \ swmr_generator$(EXEEXT) swmr_reader$(EXEEXT) swmr_writer$(EXEEXT) \ swmr_remove_reader$(EXEEXT) swmr_remove_writer$(EXEEXT) swmr_addrem_writer$(EXEEXT) \ swmr_sparse_reader$(EXEEXT) swmr_sparse_writer$(EXEEXT) swmr_start_write$(EXEEXT) \ @@ -87,7 +87,7 @@ check_PROGRAMS=$(TEST_PROG) error_test err_compat tcheck_version \ use_append_chunk use_append_mchunks use_disable_mdc_flushes \ swmr_generator swmr_start_write swmr_reader swmr_writer swmr_remove_reader \ swmr_remove_writer swmr_addrem_writer swmr_sparse_reader swmr_sparse_writer \ - swmr_check_compat_vfd vds_swmr_gen vds_env vds_swmr_reader vds_swmr_writer + swmr_check_compat_vfd vds_env vds_swmr_gen vds_swmr_reader vds_swmr_writer if HAVE_SHARED_CONDITIONAL check_PROGRAMS+= filter_plugin endif diff --git a/test/bittests.c b/test/bittests.c index e29c188..046528a 100644 --- a/test/bittests.c +++ b/test/bittests.c @@ -895,13 +895,11 @@ test_clear (void) /*------------------------------------------------------------------------- - * Function: main + * Function: main * * Purpose: * - * Return: Success: - * - * Failure: + * Return: EXIT_SUCCESS/EXIT_FAILURE * * Programmer: Robb Matzke * Tuesday, June 16, 1998 @@ -911,7 +909,7 @@ test_clear (void) int main(void) { - int nerrors = 0; + int nerrors = 0; /* * Open the library explicitly. @@ -930,12 +928,12 @@ main(void) if(nerrors) { HDprintf("***** %u FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S"); - exit(EXIT_FAILURE); + HDexit(EXIT_FAILURE); } HDprintf("All bit tests passed.\n"); H5close(); - return 0; -} + HDexit(EXIT_SUCCESS); +} /* end main() */ diff --git a/test/del_many_dense_attrs.c b/test/del_many_dense_attrs.c index d88045c..ada7a6f 100644 --- a/test/del_many_dense_attrs.c +++ b/test/del_many_dense_attrs.c @@ -41,7 +41,7 @@ const char *FILENAME[] = { */ static void catch_signal(int H5_ATTR_UNUSED signo) { - HDexit(1); + HDexit(EXIT_FAILURE); } /* catch_signal() */ diff --git a/test/dsets.c b/test/dsets.c index 4302475..66313a5 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -13171,8 +13171,7 @@ error: * * Purpose: Tests the dataset interface (H5D) * - * Return: Success: exit(EXIT_SUCCESS) - * Failure: exit(EXIT_FAILURE) + * Return: EXIT_SUCCESS/EXIT_FAILURE * * Programmer: Robb Matzke * Tuesday, December 9, 1997 @@ -13392,12 +13391,12 @@ main(void) #endif /* H5_HAVE_FILTER_SZIP */ h5_cleanup(FILENAME, fapl); - return EXIT_SUCCESS; + HDexit(EXIT_SUCCESS); error: nerrors = MAX(1, nerrors); HDprintf("***** %d DATASET TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S"); - return EXIT_FAILURE; + HDexit(EXIT_FAILURE); } /* end main() */ diff --git a/test/extend.c b/test/extend.c index f8c091b..a31ac0e 100644 --- a/test/extend.c +++ b/test/extend.c @@ -219,23 +219,15 @@ error: /*------------------------------------------------------------------------- - * Function: main + * Function: main * - * Purpose: Tests extendible datasets + * Purpose: Tests extendible datasets * - * Return: Success: exit(0) - * - * Failure: exit(non-zero) + * Return: EXIT_SUCCESS/EXIT_FAILURE * * Programmer: Robb Matzke * Friday, January 30, 1998 * - * Modifications: - * Took main data code out into write_data() routine, to allow - * different dataset creation property list settings to be tested. - * Quincey Koziol - * Tuesday, June 10, 2003 - * *------------------------------------------------------------------------- */ int @@ -290,16 +282,16 @@ main (void) if(nerrors) { HDprintf("***** %d FAILURE%s! *****\n", nerrors, (1 == nerrors) ? "" : "S"); - exit(EXIT_FAILURE); + HDexit(EXIT_FAILURE); } /* end if */ HDprintf("All extend tests passed.\n"); h5_cleanup(FILENAME, fapl); - return 0; + HDexit(EXIT_SUCCESS); error: HDprintf("*** One or more extend tests failed ***\n"); - return 1; -} + HDexit(EXIT_FAILURE); +} /* end main() */ diff --git a/test/filenotclosed.c b/test/filenotclosed.c index 2c5c8dc..2d050eb 100644 --- a/test/filenotclosed.c +++ b/test/filenotclosed.c @@ -35,7 +35,7 @@ */ static void catch_signal(int H5_ATTR_UNUSED signo) { - HDexit(1); + HDexit(EXIT_FAILURE); } /* catch_signal() */ diff --git a/test/filter_fail.c b/test/filter_fail.c index 2acce01..4be2547 100644 --- a/test/filter_fail.c +++ b/test/filter_fail.c @@ -347,17 +347,15 @@ error: * Purpose: Tests the library's behavior when a mandate filter returns * failure. * - * Return: Success: exit(EXIT_SUCCESS) - * Failure: exit(EXIT_FAILURE) + * Return: EXIT_SUCCESS/EXIT_FAILURE * * Programmer: Raymond Lu * 25 August 2010 * - * Modifications: - * *------------------------------------------------------------------------- */ -int main(void) +int +main(void) { hid_t fapl; int mdc_nelmts = 0; @@ -398,7 +396,7 @@ int main(void) if (nerrors) TEST_ERROR - return 0; + HDexit(EXIT_SUCCESS); error: if (nerrors) { @@ -406,4 +404,4 @@ error: nerrors, 1==nerrors?"":"S"); HDexit(EXIT_FAILURE); } -} +} /* end main() */ diff --git a/test/gen_cross.c b/test/gen_cross.c index f7a1938..105895d 100644 --- a/test/gen_cross.c +++ b/test/gen_cross.c @@ -1255,13 +1255,11 @@ error: /*------------------------------------------------------------------------- * Function: main * - * Purpose: Create a file for cross_read.c test. + * Purpose: Create a file for cross_read.c test * - * Return: Success: exit(EXIT_SUCCESS) - * Failure: exit(EXIT_FAILURE) + * Return: EXIT_SUCCESS/EXIT_FAILURE * * Programmer: Raymond Lu - * Some time ago * *------------------------------------------------------------------------- */ @@ -1279,9 +1277,8 @@ main (void) * default file creation properties, and default file * access properties. */ - if((file = H5Fcreate(H5FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) - < 0) - {H5_FAILED(); AT(); return 1;} + if((file = H5Fcreate(H5FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR; /* * Describe the size of the array and create the data space for fixed @@ -1291,82 +1288,84 @@ main (void) dimsf[0] = NX + 1; dimsf[1] = NY; if((filespace = H5Screate_simple(RANK, dimsf, NULL)) < 0) - {H5_FAILED(); AT(); return 1;} + TEST_ERROR; dimsf[0] = NX; - if(H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, dimsf, NULL) - < 0) - {H5_FAILED(); AT(); return 1;} + if(H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, dimsf, NULL) < 0) + TEST_ERROR; /* Create memory space. This does not include the extra row for fill * values. */ HDassert(dimsf[0] == NX); HDassert(dimsf[1] == NY); if((memspace = H5Screate_simple(RANK, dimsf, NULL)) < 0) - {H5_FAILED(); AT(); return 1;} + TEST_ERROR; /* Create a regular dataset */ if(create_normal_dset(file, filespace, memspace) < 0) - {H5_FAILED(); AT(); return 1;} + TEST_ERROR; /* Create a dataset of FLOAT with scale-offset filter */ if(create_scale_offset_dsets_float(file, filespace, memspace) < 0) - {H5_FAILED(); AT(); return 1;} + TEST_ERROR; /* Create a dataset of DOUBLE with scale-offset filter */ if(create_scale_offset_dsets_double(file, filespace, memspace) < 0) - {H5_FAILED(); AT(); return 1;} + TEST_ERROR; /* Create a dataset of CHAR with scale-offset filter */ if(create_scale_offset_dsets_char(file, filespace, memspace) < 0) - {H5_FAILED(); AT(); return 1;} + TEST_ERROR; /* Create a dataset of SHORT with scale-offset filter */ if(create_scale_offset_dsets_short(file, filespace, memspace) < 0) - {H5_FAILED(); AT(); return 1;} + TEST_ERROR; /* Create a dataset of INT with scale-offset filter */ if(create_scale_offset_dsets_int(file, filespace, memspace) < 0) - {H5_FAILED(); AT(); return 1;} + TEST_ERROR; /* Create a dataset of LONG LONG with scale-offset filter */ if(create_scale_offset_dsets_long_long(file, filespace, memspace) < 0) - {H5_FAILED(); AT(); return 1;} + TEST_ERROR; /* Create a dataset of FLOAT with fletcher filter */ if(create_fletcher_dsets_float(file, filespace, memspace) < 0) - {H5_FAILED(); AT(); return 1;} + TEST_ERROR; /* Create a dataset of FLOAT with deflate filter */ if(create_deflate_dsets_float(file, filespace, memspace) < 0) - {H5_FAILED(); AT(); return 1;} + TEST_ERROR; #ifdef H5_HAVE_FILTER_SZIP /* Create a dataset of FLOAT with szip filter */ if(create_szip_dsets_float(file, filespace, memspace) < 0) - {H5_FAILED(); AT(); return 1;} + TEST_ERROR; #else /* H5_HAVE_FILTER_SZIP */ - puts("Szip filter is not enabled. Can't create the dataset."); + HDputs("Szip filter is not enabled. Can't create the dataset."); #endif /* H5_HAVE_FILTER_SZIP */ /* Create a dataset of FLOAT with shuffle filter */ if(create_shuffle_dsets_float(file, filespace, memspace) < 0) - {H5_FAILED(); AT(); return 1;} + TEST_ERROR; /* Create a dataset of FLOAT with nbit filter */ if(create_nbit_dsets_float(file, filespace, memspace) < 0) - {H5_FAILED(); AT(); return 1;} + TEST_ERROR; /* * Close/release resources. */ if(H5Sclose(memspace) < 0) - {H5_FAILED(); AT(); return 1;} + TEST_ERROR; if(H5Sclose(filespace) < 0) - {H5_FAILED(); AT(); return 1;} + TEST_ERROR; if(H5Fclose(file) < 0) - {H5_FAILED(); AT(); return 1;} + TEST_ERROR; - return 0; -} + HDexit(EXIT_SUCCESS); + +error: + HDexit(EXIT_FAILURE); +} /* end main() */ diff --git a/test/hyperslab.c b/test/hyperslab.c index 9e17a2f..d22a689 100644 --- a/test/hyperslab.c +++ b/test/hyperslab.c @@ -1180,13 +1180,11 @@ error: /*------------------------------------------------------------------------- * Function: main * - * Purpose: Test various hyperslab operations. Give the words - * `small' and/or `medium' on the command line or only `small' - * is assumed. + * Purpose: Test various hyperslab operations. Give the words + * 'small' and/or 'medium' on the command line or only 'small' + * is assumed. * - * Return: Success: exit(EXIT_SUCCESS) - * - * Failure: exit(EXIT_FAILURE) + * Return: EXIT_SUCCESS/EXIT_FAILURE * * Programmer: Robb Matzke * Friday, October 10, 1997 @@ -1442,6 +1440,6 @@ main(int argc, char *argv[]) H5close(); #endif /* H5_HAVE_THREADSAFE */ - return 0; + HDexit(EXIT_SUCCESS); } diff --git a/test/istore.c b/test/istore.c index 8759be3..c8fe866 100644 --- a/test/istore.c +++ b/test/istore.c @@ -579,17 +579,13 @@ error: /*------------------------------------------------------------------------- * Function: main * - * Purpose: Tests indexed storage stuff. + * Purpose: Tests indexed storage * - * Return: Success: exit(EXIT_SUCCESS) - * - * Failure: exit(EXIT_FAILURE) + * Return: EXIT_SUCCESS/EXIT_FAILURE * * Programmer: Robb Matzke * Wednesday, October 15, 1997 * - * Modifications: - * *------------------------------------------------------------------------- */ int @@ -618,9 +614,6 @@ main(int argc, char *argv[]) size_of_test |= TEST_LARGE; } else { HDprintf("unrecognized argument: %s\n", argv[i]); -#if 0 - exit(EXIT_FAILURE); -#endif } } } @@ -654,7 +647,7 @@ main(int argc, char *argv[]) h5_fixname(FILENAME[0], fapl, filename, sizeof filename); if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0) { HDprintf("Cannot create file %s; test aborted\n", filename); - exit(EXIT_FAILURE); + HDexit(EXIT_FAILURE); } /* Initialize chunk dimensions */ @@ -722,13 +715,13 @@ main(int argc, char *argv[]) if (nerrors) { HDprintf("***** %d I-STORE TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S"); - exit(EXIT_FAILURE); + HDexit(EXIT_FAILURE); } HDprintf("All i-store tests passed.\n"); h5_cleanup(FILENAME, fapl); - return 0; + HDexit(EXIT_SUCCESS); } diff --git a/test/links.c b/test/links.c index 8c0eea7..0bdb3f0 100644 --- a/test/links.c +++ b/test/links.c @@ -13894,8 +13894,7 @@ error: * * Purpose: Test links * - * Return: Success: exit(EXIT_SUCCESS) - * Failure: exit(EXIT_FAILURE) + * Return: EXIT_SUCCESS/EXIT_FAILURE *------------------------------------------------------------------------- */ int @@ -14124,10 +14123,10 @@ main(void) HDrmdir(TMPDIR); HDrmdir(TMPDIR2); - return SUCCEED; + HDexit(EXIT_SUCCESS); error: HDputs("*** TESTS FAILED ***"); - return 1; + HDexit(EXIT_FAILURE); } diff --git a/test/links_env.c b/test/links_env.c index dff185c..efb8cfd 100644 --- a/test/links_env.c +++ b/test/links_env.c @@ -134,10 +134,9 @@ external_link_env(hid_t fapl, hbool_t new_format) /*------------------------------------------------------------------------- * Function: main * - * Purpose: Test external link with environment variable HDF5_EXT_PREFIX + * Purpose: Test external link with environment variable HDF5_EXT_PREFIX * - * Return: Success: exit(EXIT_SUCCESS) - * Failure: exit(EXIT_FAILURE) + * Return: EXIT_SUCCESS/EXIT_FAILURE * * Programmer: Vailin Choi; Nov 2010 * @@ -175,9 +174,10 @@ main(void) /* clean up tmp_links_env directory created by external link tests */ HDrmdir(TMPDIR); - return 0; + HDexit(EXIT_SUCCESS); error: HDputs("*** TESTS FAILED ***"); - return 1; -} + HDexit(EXIT_FAILURE); +} /* end main() */ + diff --git a/test/objcopy.c b/test/objcopy.c index b11352b..3c5981c 100644 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -14074,7 +14074,7 @@ error: /*------------------------------------------------------------------------- - * Function: main + * Function: main * * Purpose: Test H5Ocopy() * @@ -14082,7 +14082,7 @@ error: * new or old format, messages can be shared in either, * both, or neither of the source and destination files. * - * Return: Non-negative on success/Negative on failure + * Return: EXIT_SUCCESS/EXIT_FAILURE * * Programmer: Peter Cao * Friday, September 30, 2005 @@ -14360,7 +14360,7 @@ main(void) if(nerrors) { HDprintf("***** %d OBJECT COPY TEST%s FAILED! *****\n", nerrors, (1 == nerrors ? "" : "S")); - exit(EXIT_FAILURE); + HDexit(EXIT_FAILURE); } /* end if */ HDputs ("All object copying tests passed."); @@ -14390,9 +14390,9 @@ main(void) h5_cleanup(FILENAME, fapl); - return 0; + HDexit(EXIT_SUCCESS); error: - return 1; + HDexit(EXIT_FAILURE); } /* main */ diff --git a/test/swmr_addrem_writer.c b/test/swmr_addrem_writer.c index 01e2ce1..df984b1 100644 --- a/test/swmr_addrem_writer.c +++ b/test/swmr_addrem_writer.c @@ -302,7 +302,7 @@ usage(void) HDprintf("Defaults to verbose (no '-q' given), flushing every 1000 operations\n"); HDprintf("('-f 1000'), and will generate a random seed (no -r given).\n"); HDprintf("\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } int main(int argc, const char *argv[]) @@ -401,7 +401,7 @@ int main(int argc, const char *argv[]) /* Open file skeleton */ if((fid = open_skeleton(FILENAME, verbose)) < 0) { HDfprintf(stderr, "Error opening skeleton file!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ /* Send a message to indicate "H5Fopen" is complete--releasing the file lock */ @@ -414,7 +414,7 @@ int main(int argc, const char *argv[]) /* Grow and shrink datasets */ if(addrem_records(fid, verbose, (unsigned long)nops, (unsigned long)flush_count) < 0) { HDfprintf(stderr, "Error adding and removing records from datasets!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -424,7 +424,7 @@ int main(int argc, const char *argv[]) /* Clean up the symbols */ if(shutdown_symbols() < 0) { HDfprintf(stderr, "Error releasing symbols!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -434,7 +434,7 @@ int main(int argc, const char *argv[]) /* Close objects opened */ if(H5Fclose(fid) < 0) { HDfprintf(stderr, "Error closing file!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ return 0; diff --git a/test/swmr_generator.c b/test/swmr_generator.c index 4d8a976..1e00f1d 100644 --- a/test/swmr_generator.c +++ b/test/swmr_generator.c @@ -283,7 +283,7 @@ usage(void) HDprintf("compression ('-c -1'), v1 b-tree indexing (-i b1), and will generate a random\n"); HDprintf("seed (no -r given).\n"); HDprintf("\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end usage() */ int main(int argc, const char *argv[]) @@ -377,7 +377,7 @@ int main(int argc, const char *argv[]) /* Generate file skeleton */ if(gen_skeleton(FILENAME, verbose, swmr_write, comp_level, index_type, random_seed) < 0) { HDfprintf(stderr, "Error generating skeleton file!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ return 0; diff --git a/test/swmr_reader.c b/test/swmr_reader.c index c994a71..cb354a7 100644 --- a/test/swmr_reader.c +++ b/test/swmr_reader.c @@ -384,7 +384,7 @@ usage(void) HDprintf("5 common symbols to poll ('-h 5'), 10 random symbols to poll ('-l 10'),\n"); HDprintf("and will generate a random seed (no -r given).\n"); HDprintf("\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } int main(int argc, const char *argv[]) @@ -485,7 +485,7 @@ int main(int argc, const char *argv[]) HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_reader.out.%u", random_seed); if(NULL == (verbose_file = HDfopen(verbose_name, "w"))) { HDfprintf(stderr, "Can't open verbose output file!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } } /* end if */ @@ -508,7 +508,7 @@ int main(int argc, const char *argv[]) /* Generate dataset names */ if(generate_symbols() < 0) { HDfprintf(stderr, "Error generating symbol names!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ /* Create datatype for creating datasets */ @@ -518,7 +518,7 @@ int main(int argc, const char *argv[]) /* Reading records from datasets */ if(read_records(FILENAME, verbose, verbose_file, random_seed, (unsigned long)nseconds, (unsigned)poll_time, (unsigned)ncommon, (unsigned)nrandom) < 0) { HDfprintf(stderr, "Error reading records from datasets (random_seed = %u)!\n", random_seed); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -528,7 +528,7 @@ int main(int argc, const char *argv[]) /* Clean up the symbols */ if(shutdown_symbols() < 0) { HDfprintf(stderr, "Error releasing symbols!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -538,7 +538,7 @@ int main(int argc, const char *argv[]) /* Close objects created */ if(H5Tclose(symbol_tid) < 0) { HDfprintf(stderr, "Error closing symbol datatype!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ return 0; diff --git a/test/swmr_remove_reader.c b/test/swmr_remove_reader.c index b4f0d5b..9ca6045 100644 --- a/test/swmr_remove_reader.c +++ b/test/swmr_remove_reader.c @@ -370,7 +370,7 @@ usage(void) HDprintf("5 common symbols to poll ('-h 5'), 10 random symbols to poll ('-l 10'),\n"); HDprintf("and will generate a random seed (no -r given).\n"); HDprintf("\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } int main(int argc, const char *argv[]) @@ -480,7 +480,7 @@ int main(int argc, const char *argv[]) /* Generate dataset names */ if(generate_symbols() < 0) { HDfprintf(stderr, "Error generating symbol names!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ /* Create datatype for creating datasets */ @@ -490,7 +490,7 @@ int main(int argc, const char *argv[]) /* Reading records from datasets */ if(read_records(FILENAME, verbose, (unsigned long)nseconds, (unsigned)poll_time, (unsigned)ncommon, (unsigned)nrandom) < 0) { HDfprintf(stderr, "Error reading records from datasets!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -500,7 +500,7 @@ int main(int argc, const char *argv[]) /* Clean up the symbols */ if(shutdown_symbols() < 0) { HDfprintf(stderr, "Error releasing symbols!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -510,7 +510,7 @@ int main(int argc, const char *argv[]) /* Close objects created */ if(H5Tclose(symbol_tid) < 0) { HDfprintf(stderr, "Error closing symbol datatype!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ return 0; diff --git a/test/swmr_remove_writer.c b/test/swmr_remove_writer.c index c4f7b6e..e6d23de 100644 --- a/test/swmr_remove_writer.c +++ b/test/swmr_remove_writer.c @@ -236,7 +236,7 @@ usage(void) HDprintf("Defaults to verbose (no '-q' given), latest format when opening file (no '-o' given),\n"); HDprintf("flushing every 1000 shrinks ('-f 1000'), and will generate a random seed (no -r given).\n"); HDprintf("\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } int main(int argc, const char *argv[]) @@ -339,7 +339,7 @@ int main(int argc, const char *argv[]) /* Open file skeleton */ if((fid = open_skeleton(FILENAME, verbose, old)) < 0) { HDfprintf(stderr, "Error opening skeleton file!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ /* Send a message to indicate "H5Fopen" is complete--releasing the file lock */ @@ -352,7 +352,7 @@ int main(int argc, const char *argv[]) /* Remove records from datasets */ if(remove_records(fid, verbose, (unsigned long)nshrinks, (unsigned long)flush_count) < 0) { HDfprintf(stderr, "Error removing records from datasets!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -362,7 +362,7 @@ int main(int argc, const char *argv[]) /* Clean up the symbols */ if(shutdown_symbols() < 0) { HDfprintf(stderr, "Error releasing symbols!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -372,7 +372,7 @@ int main(int argc, const char *argv[]) /* Close objects opened */ if(H5Fclose(fid) < 0) { HDfprintf(stderr, "Error closing file!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ return 0; diff --git a/test/swmr_sparse_reader.c b/test/swmr_sparse_reader.c index cd0ece6..6adc6c5 100644 --- a/test/swmr_sparse_reader.c +++ b/test/swmr_sparse_reader.c @@ -338,7 +338,7 @@ usage(void) HDprintf("Note that the # of records *must* be the same as that supplied to\n"); HDprintf("swmr_sparse_writer\n"); HDprintf("\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end usage() */ int main(int argc, const char *argv[]) @@ -410,7 +410,7 @@ int main(int argc, const char *argv[]) /* Generate dataset names */ if(generate_symbols() < 0) { HDfprintf(stderr, "Error generating symbol names!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ /* Create datatype for creating datasets */ @@ -420,7 +420,7 @@ int main(int argc, const char *argv[]) /* Reading records from datasets */ if(read_records(FILENAME, verbose, (unsigned long) nrecords, (unsigned)poll_time, (unsigned)reopen_count) < 0) { HDfprintf(stderr, "Error reading records from datasets!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -430,7 +430,7 @@ int main(int argc, const char *argv[]) /* Clean up the symbols */ if(shutdown_symbols() < 0) { HDfprintf(stderr, "Error releasing symbols!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -440,7 +440,7 @@ int main(int argc, const char *argv[]) /* Close objects created */ if(H5Tclose(symbol_tid) < 0) { HDfprintf(stderr, "Error closing symbol datatype!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ return 0; diff --git a/test/swmr_sparse_writer.c b/test/swmr_sparse_writer.c index 17d8c61..5173c71 100644 --- a/test/swmr_sparse_writer.c +++ b/test/swmr_sparse_writer.c @@ -337,7 +337,7 @@ usage(void) HDprintf("Defaults to verbose (no '-q' given) and flushing every 1000 records\n"); HDprintf("('-f 1000')\n"); HDprintf("\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } int main(int argc, const char *argv[]) @@ -412,7 +412,7 @@ int main(int argc, const char *argv[]) /* Open file skeleton */ if((fid = open_skeleton(FILENAME, verbose)) < 0) { HDfprintf(stderr, "Error opening skeleton file!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ /* Send a message to indicate "H5Fopen" is complete--releasing the file lock */ @@ -425,7 +425,7 @@ int main(int argc, const char *argv[]) /* Append records to datasets */ if(add_records(fid, verbose, (unsigned long)nrecords, (unsigned long)flush_count) < 0) { HDfprintf(stderr, "Error appending records to datasets!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -435,7 +435,7 @@ int main(int argc, const char *argv[]) /* Clean up the symbols */ if(shutdown_symbols() < 0) { HDfprintf(stderr, "Error releasing symbols!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -445,7 +445,7 @@ int main(int argc, const char *argv[]) /* Close objects opened */ if(H5Fclose(fid) < 0) { HDfprintf(stderr, "Error closing file!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ return 0; diff --git a/test/swmr_start_write.c b/test/swmr_start_write.c index 0ee382d..c4222ad 100644 --- a/test/swmr_start_write.c +++ b/test/swmr_start_write.c @@ -357,7 +357,7 @@ usage(void) HDprintf("v1 b-tree indexing (-i b1), compression ('-c -1'),\n"); HDprintf("will generate a random seed (no -r given), and verbose (no '-q' given)\n"); HDprintf("\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* usage() */ /* @@ -468,7 +468,7 @@ int main(int argc, const char *argv[]) HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_writer.out.%u", random_seed); if(NULL == (verbose_file = HDfopen(verbose_name, "w"))) { HDfprintf(stderr, "Can't open verbose output file!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } } /* end if */ @@ -487,7 +487,7 @@ int main(int argc, const char *argv[]) /* Create the test file */ if((fid = create_file(FILENAME, verbose, verbose_file, random_seed)) < 0) { HDfprintf(stderr, "Error creating the file...\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* Emit informational message */ @@ -501,13 +501,13 @@ int main(int argc, const char *argv[]) /* Create the datasets in the file */ if(create_datasets(fid, comp_level, verbose, verbose_file, index_type) < 0) { HDfprintf(stderr, "Error creating datasets...\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* Enable SWMR writing mode */ if(H5Fstart_swmr_write(fid) < 0) { HDfprintf(stderr, "Error starting SWMR writing mode...\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* Send a message to indicate "H5Fopen" is complete--releasing the file lock */ @@ -520,7 +520,7 @@ int main(int argc, const char *argv[]) /* Append records to datasets */ if(add_records(fid, verbose, verbose_file, (unsigned long)nrecords, (unsigned long)flush_count) < 0) { HDfprintf(stderr, "Error appending records to datasets!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -530,7 +530,7 @@ int main(int argc, const char *argv[]) /* Clean up the symbols */ if(shutdown_symbols() < 0) { HDfprintf(stderr, "Error releasing symbols!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -540,7 +540,7 @@ int main(int argc, const char *argv[]) /* Close objects opened */ if(H5Fclose(fid) < 0) { HDfprintf(stderr, "Error closing file!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ return 0; diff --git a/test/swmr_writer.c b/test/swmr_writer.c index 6df7355..4c3e64a 100644 --- a/test/swmr_writer.c +++ b/test/swmr_writer.c @@ -291,7 +291,7 @@ usage(void) HDprintf("Defaults to verbose (no '-q' given), latest format when opening file (no '-o' given),\n"); HDprintf("flushing every 10000 records ('-f 10000'), and will generate a random seed (no -r given).\n"); HDprintf("\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } int main(int argc, const char *argv[]) @@ -379,7 +379,7 @@ int main(int argc, const char *argv[]) HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_writer.out.%u", random_seed); if(NULL == (verbose_file = HDfopen(verbose_name, "w"))) { HDfprintf(stderr, "Can't open verbose output file!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } } /* end if */ @@ -408,7 +408,7 @@ int main(int argc, const char *argv[]) /* Open file skeleton */ if((fid = open_skeleton(FILENAME, verbose, verbose_file, random_seed, old)) < 0) { HDfprintf(stderr, "Error opening skeleton file!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ /* Send a message to indicate "H5Fopen" is complete--releasing the file lock */ @@ -421,7 +421,7 @@ int main(int argc, const char *argv[]) /* Append records to datasets */ if(add_records(fid, verbose, verbose_file, (unsigned long)nrecords, (unsigned long)flush_count) < 0) { HDfprintf(stderr, "Error appending records to datasets!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -431,7 +431,7 @@ int main(int argc, const char *argv[]) /* Clean up the symbols */ if(shutdown_symbols() < 0) { HDfprintf(stderr, "Error releasing symbols!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -441,7 +441,7 @@ int main(int argc, const char *argv[]) /* Close objects opened */ if(H5Fclose(fid) < 0) { HDfprintf(stderr, "Error closing file!\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* end if */ return 0; diff --git a/test/test_usecases.sh.in b/test/test_usecases.sh.in index 8bc2078..49868ca 100644 --- a/test/test_usecases.sh.in +++ b/test/test_usecases.sh.in @@ -40,7 +40,7 @@ fi # Define symbols EXIT_SUCCESS=0 EXIT_FAILURE=1 -EXIT_VALUE=$EXIT_SUCCESS # Default all tests succeed +EXIT_VALUE=$EXIT_SUCCESS # Default all tests succeed RESULT_PASSED=" PASSED" RESULT_FAILED="*FAILED*" RESULT_SKIP="-SKIP-" @@ -97,17 +97,17 @@ TOOLTEST() { cat $actual_err >> $actual if [ $exit_code -eq 0 ];then - echo "$RESULT_PASSED" - test yes = "$verbose" && sed 's/^/ /' < $actual + echo "$RESULT_PASSED" + test yes = "$verbose" && sed 's/^/ /' < $actual else - echo "$RESULT_FAILED" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && sed 's/^/ /' < $actual + echo "$RESULT_FAILED" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && sed 's/^/ /' < $actual fi # Clean up output file if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext + rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext fi } @@ -122,7 +122,9 @@ for FILE in use_*; do case "$FILE" in *.o) continue ;; ## don't copy the .o files esac - cp $FILE usecases_test + if test -f "$FILE" ; then + cp $FILE usecases_test + fi done # With the --disable-shared option, swmr program files are built in the test @@ -131,7 +133,14 @@ done # always be copied, swmr files in .libs should be copied only if they exists. if [ -f .libs/use_append_chunk ]; then mkdir usecases_test/.libs - cp .libs/use_* usecases_test/.libs + for FILE in .libs/use_*; do + case "$FILE" in + *.o) continue ;; ## don't copy the .o files + esac + if test -f "$FILE" ; then + cp $FILE usecases_test/.libs + fi + done cp .libs/twriteorder usecases_test/.libs fi @@ -176,10 +185,10 @@ for p in $USECASES_PROGRAMS; do TOOLTEST ./$p -l w TOOLTEST ./$p -l r # use case 1.9, testing with multi-planes chunks - TOOLTEST ./$p -z 256 -y 5 # 5 planes chunks + TOOLTEST ./$p -z 256 -y 5 # 5 planes chunks # cleanup temp datafile if test -z "$HDF5_NOCLEANUP"; then - rm -f $p.h5 + rm -f $p.h5 fi done diff --git a/test/testflushrefresh.sh.in b/test/testflushrefresh.sh.in index ca46dcb..3cdf10f 100644 --- a/test/testflushrefresh.sh.in +++ b/test/testflushrefresh.sh.in @@ -20,7 +20,7 @@ # the verification of this feature needs to occur in separate processes # from the one in which the file is being manipulated in. (i.e., we have # a single writer process, and various reader processes spawning off -# and doing the verification that individual objects are being +# and doing the verification that individual objects are being # correctly flushed). # # Programmer: @@ -80,23 +80,30 @@ fi # HDF5 has several tests that create and delete signal files to communicate # between processes, and it seems that even though the names of the files are # different, occasionally the wrong file is deleted, interrupting the flow of -# the test. Running each of these tests in its own directory should eliminate +# the test. Running each of these tests in its own directory should eliminate # the problem. mkdir flushrefresh_test cp flushrefresh flushrefresh_test # With the --disable-shared option, flushrefresh is built in the test directory, -# otherwise it is in test/.libs with a wrapper script named flushrefresh in -# the test directory. test/flushrefresh should always be copied, +# otherwise it is in test/.libs with a wrapper script named flushrefresh in +# the test directory. test/flushrefresh should always be copied, # .libs/flushrefresh should be copied only if it exists. if [ -f .libs/flushrefresh ]; then mkdir flushrefresh_test/.libs - cp .libs/flushrefresh flushrefresh_test/.libs + for FILE in .libs/flushrefresh*; do + case "$FILE" in + *.o) continue ;; ## don't copy the .o files + esac + if test -f "$FILE" ; then + cp $FILE flushrefresh_test/.libs + fi + done fi cd flushrefresh_test # ================================================= -# Set up/initialize some variables to be used later +# Set up/initialize some variables to be used later # ================================================= testfile=flushrefresh.h5 startsignal=flushrefresh_VERIFICATION_START @@ -119,13 +126,13 @@ pid_main=$! # ======================================= until [ $verification_done -eq 1 ]; do - + # Wait for signal from test program that verification routine can run. before=`TimeStamp` until [ -s $startsignal ]; do after=`TimeStamp` timediff=`expr $after - $before` - if [ $timediff -gt $timeout_length ]; then + if [ $timediff -gt $timeout_length ]; then nerrors=`expr $nerrors + 1` timedout=1 break @@ -165,7 +172,7 @@ if [ $timedout -eq 0 ]; then until [ -s $startsignal ]; do after=`TimeStamp` timediff=`expr $after - $before` - if [ $timediff -gt $timeout_length ]; then + if [ $timediff -gt $timeout_length ]; then nerrors=`expr $nerrors + 1` timedout=1 break diff --git a/test/testframe.c b/test/testframe.c index 68c66ec..3c2a335 100644 --- a/test/testframe.c +++ b/test/testframe.c @@ -90,7 +90,7 @@ AddTest(const char *TheName, void (*TheCall) (void), void (*Cleanup) (void), con /* Reallocate array */ if(NULL == (newTest = (TestStruct *)HDrealloc(Test, newAlloc * sizeof(TestStruct)))) { HDprintf("Out of memory for tests, Index = %u, TestAlloc = %u, newAlloc = %u\n", Index, TestAlloc, newAlloc); - exit(EXIT_FAILURE); + HDexit(EXIT_FAILURE); } /* end if */ /* Update info */ diff --git a/test/testswmr.sh.in b/test/testswmr.sh.in index f81a7d7..a41947e 100644 --- a/test/testswmr.sh.in +++ b/test/testswmr.sh.in @@ -131,9 +131,10 @@ for FILE in swmr*; do case "$FILE" in *.o) continue ;; ## don't copy the .o files esac - cp $FILE swmr_test + if test -f "$FILE" ; then + cp $FILE swmr_test + fi done -cp swmr* swmr_test # With the --disable-shared option, swmr program files are built in the test # directory, otherwise they are in test/.libs with a corresponding wrapper @@ -145,7 +146,9 @@ if [ -f .libs/swmr ]; then case "$FILE" in *.o) continue ;; ## don't copy the .o files esac - cp $FILE swmr_test/.libs + if test -f "$FILE" ; then + cp $FILE swmr_test/.libs + fi done fi @@ -153,7 +156,7 @@ cd swmr_test # Loop over index types -for index_type in "-i ea" "-i b2" +for index_type in "-i ea" "-i b2" do # Try with and without compression for compress in "" "-c 5" diff --git a/test/testvdsswmr.sh.in b/test/testvdsswmr.sh.in index 32af072..28abcf5 100644 --- a/test/testvdsswmr.sh.in +++ b/test/testvdsswmr.sh.in @@ -117,7 +117,9 @@ for FILE in vds_swmr*; do case "$FILE" in *.o) continue ;; ## don't copy the .o files esac - cp $FILE vds_swmr_test + if test -f "$FILE" ; then + cp $FILE vds_swmr_test + fi done # With the --disable-shared option, swmr program files are built in the test @@ -126,7 +128,14 @@ done # always be copied, swmr files in .libs should be copied only if they exists. if [ -f .libs/vds_swmr_writer ]; then mkdir vds_swmr_test/.libs - cp .libs/vds_swmr* vds_swmr_test/.libs + for FILE in .libs/vds_swmr*; do + case "$FILE" in + *.o) continue ;; ## don't copy the .o files + esac + if test -f "$FILE" ; then + cp $FILE vds_swmr_test/.libs + fi + done fi cd vds_swmr_test diff --git a/test/twriteorder.c b/test/twriteorder.c index 60ee384..b104b72 100644 --- a/test/twriteorder.c +++ b/test/twriteorder.c @@ -134,7 +134,7 @@ parse_option(int argc, char * const argv[]) switch (c) { case 'h': usage(progname_g); - HDexit(0); + HDexit(EXIT_SUCCESS); break; case 'b': /* number of planes to write/read */ if ((blocksize_g = atoi(optarg)) <= 0) { @@ -407,12 +407,12 @@ main(int argc, char *argv[]) HDprintf("%d: launch reader process\n", mypid); if (read_wo_file() < 0) { HDfprintf(stderr, "read_wo_file encountered error\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } /* Reader is done. Clean up by removing the data file */ HDremove(DATAFILE); - HDexit(0); + HDexit(EXIT_SUCCESS); } } diff --git a/test/unlink.c b/test/unlink.c index f79aa29..6825dec 100644 --- a/test/unlink.c +++ b/test/unlink.c @@ -2421,17 +2421,13 @@ error: /*------------------------------------------------------------------------- * Function: main * - * Purpose: Test unlinking operations + * Purpose: Test unlinking operations * - * Return: Success: zero - * - * Failure: non-zero + * Return: EXIT_SUCCESS/EXIT_FAILURE * * Programmer: Robb Matzke * Friday, September 25, 1998 * - * Modifications: - * *------------------------------------------------------------------------- */ int @@ -2551,16 +2547,16 @@ main(void) if (nerrors) { HDprintf("***** %d FAILURE%s! *****\n", nerrors, 1==nerrors?"":"S"); - exit(EXIT_FAILURE); + HDexit(EXIT_FAILURE); } HDputs("All unlink tests passed."); h5_cleanup(FILENAME, fapl); - return 0; + HDexit(EXIT_SUCCESS); error: - return 1; -} + HDexit(EXIT_FAILURE); +} /* end main() */ diff --git a/test/use_append_chunk.c b/test/use_append_chunk.c index 4e8c672..6b34f1e 100644 --- a/test/use_append_chunk.c +++ b/test/use_append_chunk.c @@ -174,9 +174,9 @@ main(int argc, char *argv[]) HDprintf("%d: launch reader process\n", mypid); if (read_uc_file(send_wait) < 0){ HDfprintf(stderr, "read_uc_file encountered error\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } - HDexit(0); + HDexit(EXIT_SUCCESS); } } diff --git a/test/use_append_mchunks.c b/test/use_append_mchunks.c index 0414628..b7d45a4 100644 --- a/test/use_append_mchunks.c +++ b/test/use_append_mchunks.c @@ -167,9 +167,9 @@ main(int argc, char *argv[]) HDprintf("%d: launch reader process\n", mypid); if (read_uc_file(send_wait) < 0){ HDfprintf(stderr, "read_uc_file encountered error\n"); - HDexit(1); + HDexit(EXIT_FAILURE); } - HDexit(0); + HDexit(EXIT_SUCCESS); } } diff --git a/test/use_common.c b/test/use_common.c index b600dca..9effa06 100644 --- a/test/use_common.c +++ b/test/use_common.c @@ -63,7 +63,7 @@ parse_option(int argc, char * const argv[]) switch (c) { case 'h': usage(progname_g); - exit(0); + HDexit(EXIT_SUCCESS); break; case 'f': /* usecase data file name */ UC_opts.filename = optarg; diff --git a/test/use_disable_mdc_flushes.c b/test/use_disable_mdc_flushes.c index b349269..9cd202c 100644 --- a/test/use_disable_mdc_flushes.c +++ b/test/use_disable_mdc_flushes.c @@ -102,7 +102,7 @@ parse_option(int argc, char * const argv[]) switch (c) { case 'h': usage(progname_g); - exit(0); + HDexit(EXIT_SUCCESS); break; case 'f': /* usecase data file name */ filename_g = optarg; @@ -540,7 +540,7 @@ int main(void) { HDfprintf(stderr, "Non-POSIX platform. Skipping.\n"); - return EXIT_SUCCESS; + HDexit(EXIT_SUCCESS); } /* end main() */ #endif /* H5_HAVE_FORK */ diff --git a/tools/test/perform/sio_perf.c b/tools/test/perform/sio_perf.c index f61676d..90030d8 100644 --- a/tools/test/perform/sio_perf.c +++ b/tools/test/perform/sio_perf.c @@ -98,7 +98,7 @@ static const char *progname = "h5perf_serial"; * It seems that only the options that accept additional information * such as dataset size (-e) require the colon next to it. */ -static const char *s_opts = "a:A:B:b:c:Cd:D:e:F:G:ghi:Imno:p:P:r:stT:v:wx:X:"; +static const char *s_opts = "a:A:B:c:Cd:D:e:F:ghi:Imno:p:P:r:stT:v:wx:X:"; static struct long_options l_opts[] = { { "align", require_arg, 'a' }, { "alig", require_arg, 'a' }, |