summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-10-05 19:32:45 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-10-05 19:32:45 (GMT)
commit2744238c875aa5b064eb3436df143a80146ae93a (patch)
treefc7a34b075a9967f680a4d8009b9d9e94fd61958 /test
parentd40fc11656f852e163dd6a640e513360e1c79179 (diff)
downloadhdf5-2744238c875aa5b064eb3436df143a80146ae93a.zip
hdf5-2744238c875aa5b064eb3436df143a80146ae93a.tar.gz
hdf5-2744238c875aa5b064eb3436df143a80146ae93a.tar.bz2
Cleanup comments in tests, align comments better, update vfd test
Diffstat (limited to 'test')
-rw-r--r--test/SWMR_UseCase_UG.txt4
-rw-r--r--test/app_ref.c2
-rw-r--r--test/bittests.c2
-rw-r--r--test/btree2.c2
-rw-r--r--test/cache_image.c2
-rw-r--r--test/cmpd_dset.c2
-rw-r--r--test/cross_read.c2
-rw-r--r--test/dangle.c2
-rw-r--r--test/dsets.c2
-rw-r--r--test/dt_arith.c2
-rw-r--r--test/dtypes.c223
-rw-r--r--test/earray.c2
-rw-r--r--test/enum.c2
-rw-r--r--test/extend.c2
-rw-r--r--test/external_common.c2
-rw-r--r--test/external_common.h2
-rw-r--r--test/external_fname.h2
-rw-r--r--test/fillval.c2
-rw-r--r--test/filter_fail.c2
-rw-r--r--test/flush1.c2
-rw-r--r--test/flush2.c2
-rw-r--r--test/gen_bad_compound.c2
-rw-r--r--test/gen_bad_ohdr.c2
-rw-r--r--test/gen_cross.c2
-rw-r--r--test/gen_filters.c2
-rw-r--r--test/gen_mergemsg.c2
-rw-r--r--test/gen_new_array.c2
-rw-r--r--test/gen_new_fill.c2
-rw-r--r--test/gen_new_group.c2
-rw-r--r--test/gen_new_mtime.c2
-rw-r--r--test/gen_new_super.c13
-rw-r--r--test/gen_old_array.c2
-rw-r--r--test/gen_old_group.c2
-rw-r--r--test/gen_old_layout.c2
-rw-r--r--test/gen_old_mtime.c2
-rw-r--r--test/gen_sizes_lheap.c2
-rw-r--r--test/gen_specmetaread.c2
-rw-r--r--test/gen_udlinks.c2
-rw-r--r--test/getname.c2
-rw-r--r--test/gheap.c2
-rw-r--r--test/h5test.h2
-rw-r--r--test/hdfs.c7
-rw-r--r--test/hyperslab.c2
-rw-r--r--test/istore.c2
-rw-r--r--test/lheap.c2
-rw-r--r--test/mount.c2
-rw-r--r--test/mtime.c2
-rw-r--r--test/ohdr.c2
-rw-r--r--test/page_buffer.c1
-rw-r--r--test/pool.c2
-rw-r--r--test/ros3.c2
-rw-r--r--test/s3comms.c2
-rw-r--r--test/set_extent.c2
-rw-r--r--test/space_overflow.c2
-rw-r--r--test/stab.c4
-rw-r--r--test/tchecksum.c2
-rw-r--r--test/testframe.c2
-rw-r--r--test/tfile.c3
-rw-r--r--test/trefer.c50
-rw-r--r--test/unlink.c2
-rw-r--r--test/vds.c2
-rw-r--r--test/vds_env.c2
-rw-r--r--test/vds_swmr.h2
-rw-r--r--test/vfd.c306
64 files changed, 342 insertions, 379 deletions
diff --git a/test/SWMR_UseCase_UG.txt b/test/SWMR_UseCase_UG.txt
index 18d4927..1e3d1e6 100644
--- a/test/SWMR_UseCase_UG.txt
+++ b/test/SWMR_UseCase_UG.txt
@@ -6,8 +6,8 @@
case program and explain how to run them.
2.1. Author and Dates:
- Version 2: By Albert Cheng (acheng@hdfgroup.org), 2013/06/18.
- Version 1: By Albert Cheng (acheng@hdfgroup.org), 2013/06/01.
+ Version 2: By Albert Cheng, 2013/06/18.
+ Version 1: By Albert Cheng, 2013/06/01.
%%%%Use Case 1.7%%%%
diff --git a/test/app_ref.c b/test/app_ref.c
index 275f60b..d2b935a 100644
--- a/test/app_ref.c
+++ b/test/app_ref.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Neil Fortner <nfortne2@hdfgroup.org>
+ * Programmer: Neil Fortner
* Thursday, August 14, 2008
*
* Purpose: Tests closing the library after reference counts have been
diff --git a/test/bittests.c b/test/bittests.c
index 4415600..905f236 100644
--- a/test/bittests.c
+++ b/test/bittests.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, June 16, 1998
*
* Purpose: Tests functions in H5Tbit.c
diff --git a/test/btree2.c b/test/btree2.c
index 080f01d..4391a3b 100644
--- a/test/btree2.c
+++ b/test/btree2.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Tuesday, February 1, 2005
*/
#include "h5test.h"
diff --git a/test/cache_image.c b/test/cache_image.c
index 07b07c6..cdfe7b3 100644
--- a/test/cache_image.c
+++ b/test/cache_image.c
@@ -15,7 +15,7 @@
* 7/13/15
*
* This file contains tests specific to the cache image
- * feature implemented in H5C.c
+ * feature implemented in H5C.c
*/
#include "cache_common.h"
#include "genall5.h"
diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c
index 25fa3f0..6e5dd07 100644
--- a/test/cmpd_dset.c
+++ b/test/cmpd_dset.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Friday, January 23, 1998
*/
diff --git a/test/cross_read.c b/test/cross_read.c
index e927b6f..22c6828 100644
--- a/test/cross_read.c
+++ b/test/cross_read.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu <slu@ncsa.uiuc.edu>
+ * Programmer: Raymond Lu
* Thursday, March 23, 2006
*
* Purpose: Check if floating-point data created on big-endian and
diff --git a/test/dangle.c b/test/dangle.c
index 0b0aa54..4728923 100644
--- a/test/dangle.c
+++ b/test/dangle.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Tuesday, May 13, 2003
*
* Purpose: Test dangling IDs
diff --git a/test/dsets.c b/test/dsets.c
index 96799f8..d76be02 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, December 9, 1997
*
* Purpose: Tests the dataset interface (H5D)
diff --git a/test/dt_arith.c b/test/dt_arith.c
index 4420f84..2489539 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, December 9, 1997
*
* Purpose: Tests the data type interface (H5T)
diff --git a/test/dtypes.c b/test/dtypes.c
index da7b69f..5fd32b7 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, December 9, 1997
*
* Purpose: Tests the datatype interface (H5T)
@@ -134,16 +134,13 @@ static int opaque_funcs(void);
/*-------------------------------------------------------------------------
* Function: reset_hdf5
*
- * Purpose: Reset the hdf5 library. This causes statistics to be printed
- * and counters to be reset.
+ * Purpose: Reset the hdf5 library. This causes statistics to be printed
+ * and counters to be reset.
*
- * Return: void
+ * Return: void
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, November 16, 1998
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void
@@ -175,14 +172,10 @@ reset_hdf5(void)
* Purpose: Test type classes
*
* Return: Success: 0
- *
* Failure: number of errors
*
* Programmer: Robb Matzke
* Tuesday, December 9, 1997
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -299,14 +292,10 @@ error:
* Purpose: Are we able to copy a datatype?
*
* Return: Success: 0
- *
* Failure: number of errors
*
* Programmer: Robb Matzke
* Tuesday, December 9, 1997
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -345,7 +334,6 @@ error:
* in nested types)
*
* Return: Success: 0
- *
* Failure: number of errors
*
* Programmer: Quincey Koziol
@@ -575,14 +563,10 @@ error:
* Purpose: Tests various things about compound datatypes.
*
* Return: Success: 0
- *
* Failure: number of errors
*
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -722,19 +706,15 @@ error:
/*-------------------------------------------------------------------------
* Function: test_compound_2
*
- * Purpose: Tests a compound type conversion where the source and
- * destination are the same except for the order of the
- * elements.
- *
- * Return: Success: 0
+ * Purpose: Tests a compound type conversion where the source and
+ * destination are the same except for the order of the
+ * elements.
*
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, June 17, 1999
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -846,19 +826,15 @@ error:
/*-------------------------------------------------------------------------
* Function: test_compound_3
*
- * Purpose: Tests compound conversions where the source and destination
- * are the same except the destination is missing a couple
- * members which appear in the source.
+ * Purpose: Tests compound conversions where the source and destination
+ * are the same except the destination is missing a couple
+ * members which appear in the source.
*
- * Return: Success: 0
- *
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, June 17, 1999
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -966,19 +942,15 @@ error:
/*-------------------------------------------------------------------------
* Function: test_compound_4
*
- * Purpose: Tests compound conversions when the destination has the same
- * fields as the source but one or more of the fields are
- * smaller.
+ * Purpose: Tests compound conversions when the destination has the same
+ * fields as the source but one or more of the fields are
+ * smaller.
*
- * Return: Success: 0
- *
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, June 17, 1999
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -1093,20 +1065,16 @@ error:
/*-------------------------------------------------------------------------
* Function: test_compound_5
*
- * Purpose: Many versions of HDF5 have a bug in the optimized compound
+ * Purpose: Many versions of HDF5 have a bug in the optimized compound
* datatype conversion function, H5T_conv_struct_opt(), which
* is triggered when the top-level type contains a struct
* which must undergo a conversion.
*
- * Return: Success: 0
- *
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, June 17, 1999
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -1192,19 +1160,15 @@ test_compound_5(void)
/*-------------------------------------------------------------------------
* Function: test_compound_6
*
- * Purpose: Tests compound conversions when the destination has the same
- * fields as the source but one or more of the fields are
- * larger.
- *
- * Return: Success: 0
+ * Purpose: Tests compound conversions when the destination has the same
+ * fields as the source but one or more of the fields are
+ * larger.
*
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Wednesday, December 13, 2000
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -1302,15 +1266,14 @@ error:
/*-------------------------------------------------------------------------
* Function: test_compound_7
*
- * Purpose: Tests inserting fields into compound datatypes when the field
+ * Purpose: Tests inserting fields into compound datatypes when the field
* overlaps the end of the compound datatype. Also, tests
* increasing compound type size.
*
- * Return: Success: 0
- *
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, December 18, 2001
*
* Modifications:
@@ -1726,9 +1689,6 @@ error:
*
* Programmer: Raymond Lu
* Wednesday, June 9, 2004
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -5194,17 +5154,13 @@ test_conv_enum_2(void)
/*-------------------------------------------------------------------------
* Function: test_conv_bitfield
*
- * Purpose: Test bitfield conversions.
- *
- * Return: Success: 0
+ * Purpose: Test bitfield conversions.
*
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, May 20, 1999
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -5294,18 +5250,14 @@ error:
/*-------------------------------------------------------------------------
* Function: test_bitfield_funcs
*
- * Purpose: Test some datatype functions that are and aren't supposed
+ * Purpose: Test some datatype functions that are and aren't supposed
* work for bitfield type.
*
- * Return: Success: 0
- *
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Wednesday, April 5, 2006
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -5424,17 +5376,13 @@ error:
/*-------------------------------------------------------------------------
* Function: convert_opaque
*
- * Purpose: A fake opaque conversion functions
+ * Purpose: A fake opaque conversion functions
*
- * Return: Success: 0
- *
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, June 4, 1999
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -5451,17 +5399,13 @@ convert_opaque(hid_t H5_ATTR_UNUSED st, hid_t H5_ATTR_UNUSED dt, H5T_cdata_t *cd
/*-------------------------------------------------------------------------
* Function: test_opaque
*
- * Purpose: Driver function to test opaque datatypes
- *
- * Return: Success: 0
+ * Purpose: Driver function to test opaque datatypes
*
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* June 2, 2004
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -5493,15 +5437,13 @@ error:
/*-------------------------------------------------------------------------
* Function: opaque_check
*
- * Purpose: Test opaque datatypes
- *
- * Return: Success: 0
+ * Purpose: Test opaque datatypes
*
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, May 20, 1999
- *
*-------------------------------------------------------------------------
*/
static int
@@ -5570,12 +5512,12 @@ error:
/*-------------------------------------------------------------------------
* Function: opaque_long
*
- * Purpose: Test named (committed) opaque datatypes w/very long tags
+ * Purpose: Test named (committed) opaque datatypes w/very long tags
*
- * Return: Success: 0
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, June 14, 2005
*
*-------------------------------------------------------------------------
@@ -5624,18 +5566,14 @@ error:
/*-------------------------------------------------------------------------
* Function: opaque_funcs
*
- * Purpose: Test some type functions that are and aren't supposed to
+ * Purpose: Test some type functions that are and aren't supposed to
* work with opaque type.
*
- * Return: Success: 0
- *
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Wednesday, April 5, 2006
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -7082,18 +7020,14 @@ error:
/*-------------------------------------------------------------------------
* Function: test_named_indirect_reopen
*
- * Purpose: Tests that open named datatypes can be reopened indirectly
+ * Purpose: Tests that open named datatypes can be reopened indirectly
* through H5Dget_type without causing problems.
*
- * Return: Success: 0
- *
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Neil Fortner
+ * Programmer: Neil Fortner
* Thursday, June 4, 2009
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -7778,12 +7712,12 @@ error:
/*-------------------------------------------------------------------------
* Function: test_deprec
*
- * Purpose: Tests deprecated API routines for datatypes.
+ * Purpose: Tests deprecated API routines for datatypes.
*
- * Return: Success: 0
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, September 27, 2007
*
*-------------------------------------------------------------------------
@@ -7937,13 +7871,13 @@ error:
/*-------------------------------------------------------------------------
* Function: test_utf_ascii_conv
*
- * Purpose: Make sure the library doesn't conversion strings between
+ * Purpose: Make sure the library doesn't conversion strings between
* ASCII and UTF8.
*
- * Return: Success: 0
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* 10 November 2011
*-------------------------------------------------------------------------
*/
@@ -8589,9 +8523,6 @@ error:
*
* Programmer: Robb Matzke
* Tuesday, December 9, 1997
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
int
diff --git a/test/earray.c b/test/earray.c
index 518aca4..95ef728 100644
--- a/test/earray.c
+++ b/test/earray.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
+/* Programmer: Quincey Koziol
* Tuesday, June 17, 2008
*/
#include "h5test.h"
diff --git a/test/enum.c b/test/enum.c
index 56300e4..eafce72 100644
--- a/test/enum.c
+++ b/test/enum.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, December 22, 1998
*/
#include "h5test.h"
diff --git a/test/extend.c b/test/extend.c
index f21fce9..6658253 100644
--- a/test/extend.c
+++ b/test/extend.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Friday, January 30, 1998
*
* Purpose: Tests extendible datasets.
diff --git a/test/external_common.c b/test/external_common.c
index f4dbb4e..d0383b1 100644
--- a/test/external_common.c
+++ b/test/external_common.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu <songyulu@hdfgroup.org>
+ * Programmer: Raymond Lu
* April, 2019
*
* Purpose: Private function for external.c and external_env.c
diff --git a/test/external_common.h b/test/external_common.h
index be5094f..a53bb3b 100644
--- a/test/external_common.h
+++ b/test/external_common.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu <songyulu@hdfgroup.org>
+ * Programmer: Raymond Lu
* April, 2019
*
* Purpose: Private function for external.c and external_env.c
diff --git a/test/external_fname.h b/test/external_fname.h
index 05433e6..a4f51c1 100644
--- a/test/external_fname.h
+++ b/test/external_fname.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@lbl.gov>
+ * Programmer: Quincey Koziol
* July, 2019
*
* Purpose: Private declaration for external.c and external_env.c
diff --git a/test/fillval.c b/test/fillval.c
index 147775d..2cd6989 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <robb@arborea.spizella.com>
+ * Programmer: Robb Matzke
* Thursday, October 1, 1998
*
* Purpose: Tests dataset fill values.
diff --git a/test/filter_fail.c b/test/filter_fail.c
index 835e946..dca9a20 100644
--- a/test/filter_fail.c
+++ b/test/filter_fail.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu <songyulu@hdfgroup.org>
+ * Programmer: Raymond Lu
* 7 September 2010
*
* Purpose: Make sure dataset, file, and library can close properly when a
diff --git a/test/flush1.c b/test/flush1.c
index 592db9d..dd5c7b9 100644
--- a/test/flush1.c
+++ b/test/flush1.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Friday, October 23, 1998
*
* Purpose: This is the first half of a two-part test that makes sure
diff --git a/test/flush2.c b/test/flush2.c
index b1f5ebe..cc38cf1 100644
--- a/test/flush2.c
+++ b/test/flush2.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Friday, October 23, 1998
*
* Purpose: This is the second half of a two-part test that makes sure
diff --git a/test/gen_bad_compound.c b/test/gen_bad_compound.c
index 8002368..ec0933f 100644
--- a/test/gen_bad_compound.c
+++ b/test/gen_bad_compound.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* April 14, 2011
*
* Purpose: This program is run to generate an HDF5 data file with objects
diff --git a/test/gen_bad_ohdr.c b/test/gen_bad_ohdr.c
index 0199ad9..ca635a1 100644
--- a/test/gen_bad_ohdr.c
+++ b/test/gen_bad_ohdr.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Jan 5, 2008
*
* Purpose: This program is run to generate an HDF5 data file with a
diff --git a/test/gen_cross.c b/test/gen_cross.c
index c5d9cd6..37c6dcf 100644
--- a/test/gen_cross.c
+++ b/test/gen_cross.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu <slu@ncsa.uiuc.edu>
+ * Programmer: Raymond Lu
* Thursday, March 23, 2006
*
* This program writes floating-point data to the HDF5 file. It generates
diff --git a/test/gen_filters.c b/test/gen_filters.c
index a97c2f6..502e041 100644
--- a/test/gen_filters.c
+++ b/test/gen_filters.c
@@ -37,7 +37,7 @@ static size_t filter_bogus(unsigned int flags, size_t cd_nelmts, const unsigned
*
* Failure: -1
*
- * Programmer: Pedro Vicente <pvn@ncsa.uiuc.edu>
+ * Programmer: Pedro Vicente
* Thursday, March 25, 2004
*
*-------------------------------------------------------------------------
diff --git a/test/gen_mergemsg.c b/test/gen_mergemsg.c
index 84f4376..7284786 100644
--- a/test/gen_mergemsg.c
+++ b/test/gen_mergemsg.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Friday, June 30, 2006
*
* This program creates an object with fragmented object header messages
diff --git a/test/gen_new_array.c b/test/gen_new_array.c
index 6cd2d7d..605b421 100644
--- a/test/gen_new_array.c
+++ b/test/gen_new_array.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Thursday, November 09, 2000
*
* Purpose: Create a two datasets, one with a compound datatypes with array
diff --git a/test/gen_new_fill.c b/test/gen_new_fill.c
index d0f043b..0080f3f 100644
--- a/test/gen_new_fill.c
+++ b/test/gen_new_fill.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu <slu@ncsa.uiuc.edu>
+ * Programmer: Raymond Lu
* Feb 27, 2002
*
* Purpose: This program is run to generate a HDF5 data file with fill
diff --git a/test/gen_new_group.c b/test/gen_new_group.c
index a73828b..f3f7357 100644
--- a/test/gen_new_group.c
+++ b/test/gen_new_group.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Oct 24, 2005
*
* Purpose: This program is run to generate an HDF5 data file with both
diff --git a/test/gen_new_mtime.c b/test/gen_new_mtime.c
index 87de948..a0b5064 100644
--- a/test/gen_new_mtime.c
+++ b/test/gen_new_mtime.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Friday, January 3, 2003
*
* Purpose: Create a dataset, which should have the newer mtime information
diff --git a/test/gen_new_super.c b/test/gen_new_super.c
index 7489356..69bf5fa 100644
--- a/test/gen_new_super.c
+++ b/test/gen_new_super.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Tuesday, July 15, 2003
*
* Purpose: Create a file which will have the newer superblock format.
@@ -29,18 +29,15 @@
#define ISTORE_IK 64
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: main
*
- * Purpose: Create a file with a new version (>0) of the superblock
+ * Purpose: Create a file with a new version (>0) of the superblock
*
- * Return: Success:
- * Failure:
+ * Return: EXIT_SUCCESS
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, July 15, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
int
diff --git a/test/gen_old_array.c b/test/gen_old_array.c
index a9763fa..54e4101 100644
--- a/test/gen_old_array.c
+++ b/test/gen_old_array.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Thursday, November 09, 2000
*
* Purpose: Create a two datasets with compound datatypes, one with no array
diff --git a/test/gen_old_group.c b/test/gen_old_group.c
index 1b69894..b584493 100644
--- a/test/gen_old_group.c
+++ b/test/gen_old_group.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Oct 24, 2005
*
* Purpose: This program is run to generate an HDF5 data file with an
diff --git a/test/gen_old_layout.c b/test/gen_old_layout.c
index 5a17145..4e56ae7 100644
--- a/test/gen_old_layout.c
+++ b/test/gen_old_layout.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Thursday, May 27, 2004
*
* Purpose: Create two datasets (one for version 1 and one for version 2 of
diff --git a/test/gen_old_mtime.c b/test/gen_old_mtime.c
index f14ecdf..d4e1544 100644
--- a/test/gen_old_mtime.c
+++ b/test/gen_old_mtime.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Friday, January 3, 2003
*
* Purpose: Create a dataset, which should have the older mtime information
diff --git a/test/gen_sizes_lheap.c b/test/gen_sizes_lheap.c
index 24ad91b..7a689b4 100644
--- a/test/gen_sizes_lheap.c
+++ b/test/gen_sizes_lheap.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Neil Fortner <nfortne2@hdfgroup.org>
+ * Programmer: Neil Fortner
* Thursday, July 15, 2010
*
* Purpose: Creates a file with non-default sizes of lengths and addresses.
diff --git a/test/gen_specmetaread.c b/test/gen_specmetaread.c
index edbedbd..4156d79 100644
--- a/test/gen_specmetaread.c
+++ b/test/gen_specmetaread.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Thursday, October 8, 2009
*
* Purpose: Create a file with a dataset who's raw data immediately follows
diff --git a/test/gen_udlinks.c b/test/gen_udlinks.c
index 7bac453..323709c 100644
--- a/test/gen_udlinks.c
+++ b/test/gen_udlinks.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: James Laird <jlaird@hdfgroup.org>
+ * Programmer: James Laird
* Tuesday, June 6, 2006
*
* This program creates HDF5 files with user-defined links. These files
diff --git a/test/getname.c b/test/getname.c
index 4dbb63a..61feee6 100644
--- a/test/getname.c
+++ b/test/getname.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Pedro Vicente <pvn@ncsa.uiuc.edu>
+ * Programmer: Pedro Vicente
* April 12, 2002
*
* Purpose: Tests the "ID to name" functionality
diff --git a/test/gheap.c b/test/gheap.c
index e8b6c97..51e1dd2 100644
--- a/test/gheap.c
+++ b/test/gheap.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, March 31, 1998
*
* Purpose: Tests the global heap. The global heap is the set of all
diff --git a/test/h5test.h b/test/h5test.h
index 16d29af..df996c2 100644
--- a/test/h5test.h
+++ b/test/h5test.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Friday, November 20, 1998
*
* Purpose: Test support stuff.
diff --git a/test/hdfs.c b/test/hdfs.c
index 75069f1..ee66314 100644
--- a/test/hdfs.c
+++ b/test/hdfs.c
@@ -19,7 +19,7 @@
*
* Demonstrates basic use cases and fapl interaction.
*
- * Programmer: Jacob Smith <jake.smith@hdfgroup.org>
+ * Programmer: Jacob Smith
* 2018-04-23
*/
@@ -230,9 +230,10 @@
*/
#define JSERR_STR(expected, actual, reason) \
{ \
+ const char *_reason = reason; \
JSFAILED_AT() \
- if ((reason) != NULL) { \
- HDprintf("%s\n", (reason)); \
+ if (_reason != NULL) { \
+ HDprintf("%s\n", _reason); \
} \
else { \
HDprintf("!!! Expected:\n%s\n!!!Actual:\n%s\n", (expected), (actual)); \
diff --git a/test/hyperslab.c b/test/hyperslab.c
index 4149721..42cdafa 100644
--- a/test/hyperslab.c
+++ b/test/hyperslab.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
+/* Programmer: Robb Matzke
* Friday, October 10, 1997
*
* Purpose: Hyperslab operations are rather complex, so this file
diff --git a/test/istore.c b/test/istore.c
index 10a966a..a724359 100644
--- a/test/istore.c
+++ b/test/istore.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
+/* Programmer: Robb Matzke
* Wednesday, October 15, 1997
*
* Purpose: Tests various aspects of indexed raw data storage.
diff --git a/test/lheap.c b/test/lheap.c
index 0f352bf..17e3082 100644
--- a/test/lheap.c
+++ b/test/lheap.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, November 24, 1998
*
* Purpose: Test local heaps used by symbol tables (groups).
diff --git a/test/mount.c b/test/mount.c
index 181db66..395a19a 100644
--- a/test/mount.c
+++ b/test/mount.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Wednesday, October 7, 1998
*
* Purpose: Tests file mounting.
diff --git a/test/mtime.c b/test/mtime.c
index b925692..c28b81a 100644
--- a/test/mtime.c
+++ b/test/mtime.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Thursday, July 30, 1998
*
* Purpose: Determines if the modification time message is working
diff --git a/test/ohdr.c b/test/ohdr.c
index 8b1af88..87d394b 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
+/* Programmer: Robb Matzke
* Tuesday, November 24, 1998
*/
#include "h5test.h"
diff --git a/test/page_buffer.c b/test/page_buffer.c
index 8e18eec..ca33872 100644
--- a/test/page_buffer.c
+++ b/test/page_buffer.c
@@ -383,7 +383,6 @@ error:
*
*-------------------------------------------------------------------------
*/
-
static unsigned
test_args(hid_t orig_fapl, const char *env_h5_drvr)
{
diff --git a/test/pool.c b/test/pool.c
index e52d039..05304e5 100644
--- a/test/pool.c
+++ b/test/pool.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Tuesday, May 3, 2005
*/
#include "h5test.h"
diff --git a/test/ros3.c b/test/ros3.c
index 531f9b1..856160d 100644
--- a/test/ros3.c
+++ b/test/ros3.c
@@ -20,7 +20,7 @@
*
* Demonstrates basic use cases and fapl/dxpl interaction.
*
- * Programmer: Jacob Smith <jake.smith@hdfgroup.org>
+ * Programmer: Jacob Smith
* 2017-10-11
*/
diff --git a/test/s3comms.c b/test/s3comms.c
index 728501d..73d59a4 100644
--- a/test/s3comms.c
+++ b/test/s3comms.c
@@ -15,7 +15,7 @@
*
* Purpose: Unit tests for the S3 Communications (s3comms) module.
*
- * Programmer: Jacob Smith <jake.smith@hdfgroup.org>
+ * Programmer: Jacob Smith
* 2017-10-11
*/
diff --git a/test/set_extent.c b/test/set_extent.c
index 1409b8b..133ba48 100644
--- a/test/set_extent.c
+++ b/test/set_extent.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Pedro Vicente <pvn@ncsa.uiuc.edu>
+ * Programmer: Pedro Vicente
* April 12, 2002
*
* Purpose: Tests the H5Dset_extent call
diff --git a/test/space_overflow.c b/test/space_overflow.c
index c712ab6..4838fc7 100644
--- a/test/space_overflow.c
+++ b/test/space_overflow.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, October 26, 1998
*
* Purpose: Create a dataset with a simple data space that has the
diff --git a/test/stab.c b/test/stab.c
index 23ea2de..739a1ba 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, November 24, 1998
*/
@@ -184,7 +184,7 @@ error:
*
* Failure: number of errors
*
- * Programmer: Robb Matzke <matzke@llnl.gov> 2002-03-28
+ * Programmer: Robb Matzke 2002-03-28
*
* Modifications:
*-------------------------------------------------------------------------
diff --git a/test/tchecksum.c b/test/tchecksum.c
index 79da14e..36b5709 100644
--- a/test/tchecksum.c
+++ b/test/tchecksum.c
@@ -15,7 +15,7 @@
*
* Created: tchecksum.c
* Aug 21 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Test internal checksum routine(s)
*
diff --git a/test/testframe.c b/test/testframe.c
index dbc174a..22f694e 100644
--- a/test/testframe.c
+++ b/test/testframe.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Tuesday, January 6, 2004
*
* Purpose: Provides support functions for the testing framework.
diff --git a/test/tfile.c b/test/tfile.c
index ea8e707..e41cbbd 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -3059,7 +3059,6 @@ test_rw_noupdate(void)
** test_userblock_alignment() test, to handle common testing
**
** Programmer: Quincey Koziol
-** koziol@hdfgroup.org
** Septmber 10, 2009
**
*****************************************************************/
@@ -3121,7 +3120,6 @@ test_userblock_alignment_helper1(hid_t fcpl, hid_t fapl)
** test_userblock_alignment() test, to handle common testing
**
** Programmer: Quincey Koziol
-** koziol@hdfgroup.org
** Septmber 10, 2009
**
*****************************************************************/
@@ -3191,7 +3189,6 @@ test_userblock_alignment_helper2(hid_t fapl, hbool_t open_rw)
** object [allocation] alignment size set interact properly.
**
** Programmer: Quincey Koziol
-** koziol@hdfgroup.org
** Septmber 8, 2009
**
*****************************************************************/
diff --git a/test/trefer.c b/test/trefer.c
index 5f2ea57..8aa8bc2 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -832,11 +832,11 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
hsize_t * coords; /* Coordinate buffer */
hsize_t low[SPACE2_RANK]; /* Selection bounds */
hsize_t high[SPACE2_RANK]; /* Selection bounds */
- H5R_ref_t *wbuf, /* buffer to write to disk */
- *rbuf; /* buffer read from disk */
+ H5R_ref_t *wbuf = NULL, /* buffer to write to disk */
+ *rbuf = NULL; /* buffer read from disk */
H5R_ref_t nvrbuf[3] = {{{{0}}}, {{{101}}}, {{{255}}}}; /* buffer with non-valid refs */
- uint8_t * dwbuf, /* Buffer for writing numeric data to disk */
- *drbuf; /* Buffer for reading numeric data from disk */
+ uint8_t * dwbuf = NULL, /* Buffer for writing numeric data to disk */
+ *drbuf = NULL; /* Buffer for reading numeric data from disk */
uint8_t * tu8; /* Temporary pointer to uint8 data */
H5O_type_t obj_type; /* Type of object */
int i, j; /* Counters */
@@ -1246,13 +1246,14 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
ret = H5Rdestroy(&rbuf[j]);
CHECK(ret, FAIL, "H5Rdestroy");
}
-
- /* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(dwbuf);
- HDfree(drbuf);
}
+
+ /* Free memory buffers */
+ HDfree(wbuf);
+ HDfree(rbuf);
+ HDfree(dwbuf);
+ HDfree(drbuf);
+
} /* test_reference_region() */
/****************************************************************
@@ -1285,10 +1286,10 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
hsize_t * coords; /* Coordinate buffer */
hsize_t low[SPACE3_RANK]; /* Selection bounds */
hsize_t high[SPACE3_RANK]; /* Selection bounds */
- H5R_ref_t *wbuf, /* buffer to write to disk */
- *rbuf; /* buffer read from disk */
- uint8_t *dwbuf, /* Buffer for writing numeric data to disk */
- *drbuf; /* Buffer for reading numeric data from disk */
+ H5R_ref_t *wbuf = NULL, /* buffer to write to disk */
+ *rbuf = NULL; /* buffer read from disk */
+ uint8_t *dwbuf = NULL, /* Buffer for writing numeric data to disk */
+ *drbuf = NULL; /* Buffer for reading numeric data from disk */
uint8_t * tu8; /* Temporary pointer to uint8 data */
H5O_type_t obj_type; /* Object type */
int i; /* Counter */
@@ -1586,13 +1587,14 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
ret = H5Rdestroy(&rbuf[i]);
CHECK(ret, FAIL, "H5Rdestroy");
}
-
- /* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(dwbuf);
- HDfree(drbuf);
}
+
+ /* Free memory buffers */
+ HDfree(wbuf);
+ HDfree(rbuf);
+ HDfree(dwbuf);
+ HDfree(drbuf);
+
} /* test_reference_region_1D() */
/****************************************************************
@@ -2429,10 +2431,10 @@ test_reference_compat_conv(void)
hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */
hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */
hsize_t coord1[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
- hobj_ref_t * wbuf_obj; /* Buffer to write to disk */
- H5R_ref_t * rbuf_obj; /* Buffer read from disk */
- hdset_reg_ref_t *wbuf_reg; /* Buffer to write to disk */
- H5R_ref_t * rbuf_reg; /* Buffer read from disk */
+ hobj_ref_t * wbuf_obj = NULL; /* Buffer to write to disk */
+ H5R_ref_t * rbuf_obj = NULL; /* Buffer read from disk */
+ hdset_reg_ref_t *wbuf_reg = NULL; /* Buffer to write to disk */
+ H5R_ref_t * rbuf_reg = NULL; /* Buffer read from disk */
H5O_type_t obj_type; /* Object type */
herr_t ret; /* Generic return value */
unsigned int i; /* Counter */
diff --git a/test/unlink.c b/test/unlink.c
index 1fd9536..8129cc9 100644
--- a/test/unlink.c
+++ b/test/unlink.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Friday, September 25, 1998
*
* Purpose: Test unlinking operations.
diff --git a/test/vds.c b/test/vds.c
index b215481..4c5929e 100644
--- a/test/vds.c
+++ b/test/vds.c
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Neil Fortner <nfortne2@hdfgroup.org>
+ * Programmer: Neil Fortner
* Monday, February 16, 2015
*
* Purpose: Tests datasets with virtual layout.
diff --git a/test/vds_env.c b/test/vds_env.c
index df5eab5..6e9518b 100644
--- a/test/vds_env.c
+++ b/test/vds_env.c
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Neil Fortner <nfortne2@hdfgroup.org>
+ * Programmer: Neil Fortner
* Monday, February 16, 2015
*
* Purpose: Tests datasets with virtual layout.
diff --git a/test/vds_swmr.h b/test/vds_swmr.h
index b39d7f1..676d831 100644
--- a/test/vds_swmr.h
+++ b/test/vds_swmr.h
@@ -94,6 +94,4 @@ H5TEST_DLLVAR char VDS_FILE_NAME[NAME_LEN];
/* Dataset names */
H5TEST_DLLVAR char SOURCE_DSET_PATH[NAME_LEN];
H5TEST_DLLVAR char VDS_DSET_NAME[NAME_LEN];
-
-/* Fill values */
#endif /* VDS_SWMR_H */
diff --git a/test/vfd.c b/test/vfd.c
index 0efe4f5..373a57e 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -2271,46 +2271,51 @@ error:
static int
compare_splitter_config_info(hid_t fapl_id, H5FD_splitter_vfd_config_t *info)
{
- int ret_value = 0;
- H5FD_splitter_vfd_config_t fetched_info;
+ int ret_value = 0;
+ H5FD_splitter_vfd_config_t *fetched_info = NULL;
- fetched_info.magic = H5FD_SPLITTER_MAGIC;
- fetched_info.version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
- fetched_info.rw_fapl_id = H5I_INVALID_HID;
- fetched_info.wo_fapl_id = H5I_INVALID_HID;
+ if (NULL == (fetched_info = HDcalloc(1, sizeof(H5FD_splitter_vfd_config_t))))
+ SPLITTER_TEST_FAULT("memory allocation for fetched_info struct failed");
- if (H5Pget_fapl_splitter(fapl_id, &fetched_info) < 0) {
- SPLITTER_TEST_FAULT("can't get splitter info\n");
+ fetched_info->magic = H5FD_SPLITTER_MAGIC;
+ fetched_info->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
+ fetched_info->rw_fapl_id = H5I_INVALID_HID;
+ fetched_info->wo_fapl_id = H5I_INVALID_HID;
+
+ if (H5Pget_fapl_splitter(fapl_id, fetched_info) < 0) {
+ SPLITTER_TEST_FAULT("can't get splitter info");
}
if (info->rw_fapl_id == H5P_DEFAULT) {
- if (H5Pget_driver(fetched_info.rw_fapl_id) != H5Pget_driver(H5P_FILE_ACCESS_DEFAULT)) {
+ if (H5Pget_driver(fetched_info->rw_fapl_id) != H5Pget_driver(H5P_FILE_ACCESS_DEFAULT)) {
SPLITTER_TEST_FAULT("Read-Write driver mismatch (default)\n");
}
}
else {
- if (H5Pget_driver(fetched_info.rw_fapl_id) != H5Pget_driver(info->rw_fapl_id)) {
+ if (H5Pget_driver(fetched_info->rw_fapl_id) != H5Pget_driver(info->rw_fapl_id)) {
SPLITTER_TEST_FAULT("Read-Write driver mismatch\n");
}
}
if (info->wo_fapl_id == H5P_DEFAULT) {
- if (H5Pget_driver(fetched_info.wo_fapl_id) != H5Pget_driver(H5P_FILE_ACCESS_DEFAULT)) {
+ if (H5Pget_driver(fetched_info->wo_fapl_id) != H5Pget_driver(H5P_FILE_ACCESS_DEFAULT)) {
SPLITTER_TEST_FAULT("Write-Only driver mismatch (default)\n");
}
}
else {
- if (H5Pget_driver(fetched_info.wo_fapl_id) != H5Pget_driver(info->wo_fapl_id)) {
+ if (H5Pget_driver(fetched_info->wo_fapl_id) != H5Pget_driver(info->wo_fapl_id)) {
SPLITTER_TEST_FAULT("Write-Only driver mismatch\n");
}
}
- if ((HDstrlen(info->wo_path) != HDstrlen(fetched_info.wo_path)) ||
- HDstrncmp(info->wo_path, fetched_info.wo_path, H5FD_SPLITTER_PATH_MAX)) {
- HDfprintf(stderr, "MISMATCH: '%s' :: '%s'\n", info->wo_path, fetched_info.wo_path);
+ if ((HDstrlen(info->wo_path) != HDstrlen(fetched_info->wo_path)) ||
+ HDstrncmp(info->wo_path, fetched_info->wo_path, H5FD_SPLITTER_PATH_MAX)) {
+ HDfprintf(stderr, "MISMATCH: '%s' :: '%s'\n", info->wo_path, fetched_info->wo_path);
HEXPRINT(H5FD_SPLITTER_PATH_MAX, info->wo_path);
- HEXPRINT(H5FD_SPLITTER_PATH_MAX, fetched_info.wo_path);
+ HEXPRINT(H5FD_SPLITTER_PATH_MAX, fetched_info->wo_path);
SPLITTER_TEST_FAULT("Write-Only file path mismatch\n");
}
done:
+ HDfree(fetched_info);
+
return ret_value;
} /* end compare_splitter_config_info() */
@@ -2335,43 +2340,48 @@ static int
run_splitter_test(const struct splitter_dataset_def *data, hbool_t ignore_wo_errors,
hbool_t provide_logfile_path, hid_t sub_fapl_ids[2])
{
- hid_t file_id = H5I_INVALID_HID;
- hid_t fapl_id = H5I_INVALID_HID;
- hid_t dset_id = H5I_INVALID_HID;
- hid_t space_id = H5I_INVALID_HID;
- hid_t fapl_id_out = H5I_INVALID_HID;
- hid_t fapl_id_cpy = H5I_INVALID_HID;
- H5FD_splitter_vfd_config_t vfd_config;
- char filename_rw[H5FD_SPLITTER_PATH_MAX + 1];
- FILE * logfile = NULL;
- int ret_value = 0;
-
- vfd_config.magic = H5FD_SPLITTER_MAGIC;
- vfd_config.version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
- vfd_config.ignore_wo_errs = ignore_wo_errors;
- vfd_config.rw_fapl_id = sub_fapl_ids[0];
- vfd_config.wo_fapl_id = sub_fapl_ids[1];
-
- if (splitter_prepare_file_paths(&vfd_config, filename_rw) < 0) {
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
+ hid_t fapl_id_out = H5I_INVALID_HID;
+ hid_t fapl_id_cpy = H5I_INVALID_HID;
+ H5FD_splitter_vfd_config_t *vfd_config = NULL;
+ char * filename_rw = NULL;
+ FILE * logfile = NULL;
+ int ret_value = 0;
+
+ if (NULL == (vfd_config = HDcalloc(1, sizeof(H5FD_splitter_vfd_config_t))))
+ SPLITTER_TEST_FAULT("memory allocation for vfd_config struct failed");
+ if (NULL == (filename_rw = HDcalloc(H5FD_SPLITTER_PATH_MAX + 1, sizeof(char))))
+ SPLITTER_TEST_FAULT("memory allocation for filename_rw string failed");
+
+ vfd_config->magic = H5FD_SPLITTER_MAGIC;
+ vfd_config->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
+ vfd_config->ignore_wo_errs = ignore_wo_errors;
+ vfd_config->rw_fapl_id = sub_fapl_ids[0];
+ vfd_config->wo_fapl_id = sub_fapl_ids[1];
+
+ if (splitter_prepare_file_paths(vfd_config, filename_rw) < 0) {
SPLITTER_TEST_FAULT("can't prepare file paths\n");
}
if (provide_logfile_path == FALSE) {
- *vfd_config.log_file_path = '\0'; /* reset as empty string */
+ vfd_config->log_file_path[0] = '\0'; /* reset as empty string */
}
/* Create a new fapl to use the SPLITTER file driver */
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) == H5I_INVALID_HID) {
SPLITTER_TEST_FAULT("can't create FAPL ID\n");
}
- if (H5Pset_fapl_splitter(fapl_id, &vfd_config) < 0) {
+ if (H5Pset_fapl_splitter(fapl_id, vfd_config) < 0) {
SPLITTER_TEST_FAULT("can't set splitter FAPL\n");
}
if (H5Pget_driver(fapl_id) != H5FD_SPLITTER) {
SPLITTER_TEST_FAULT("set FAPL not SPLITTER\n");
}
- if (compare_splitter_config_info(fapl_id, &vfd_config) < 0) {
+ if (compare_splitter_config_info(fapl_id, vfd_config) < 0) {
SPLITTER_TEST_FAULT("information mismatch\n");
}
@@ -2384,7 +2394,7 @@ run_splitter_test(const struct splitter_dataset_def *data, hbool_t ignore_wo_err
if (H5I_INVALID_HID == fapl_id_cpy) {
SPLITTER_TEST_FAULT("can't copy FAPL\n");
}
- if (compare_splitter_config_info(fapl_id_cpy, &vfd_config) < 0) {
+ if (compare_splitter_config_info(fapl_id_cpy, vfd_config) < 0) {
SPLITTER_TEST_FAULT("information mismatch\n");
}
if (H5Pclose(fapl_id_cpy) < 0) {
@@ -2410,7 +2420,7 @@ run_splitter_test(const struct splitter_dataset_def *data, hbool_t ignore_wo_err
if (H5Pget_driver(fapl_id_out) != H5FD_SPLITTER) {
SPLITTER_TEST_FAULT("wrong file FAPL driver\n");
}
- if (compare_splitter_config_info(fapl_id_out, &vfd_config) < 0) {
+ if (compare_splitter_config_info(fapl_id_out, vfd_config) < 0) {
SPLITTER_TEST_FAULT("information mismatch\n");
}
if (H5Pclose(fapl_id_out) < 0) {
@@ -2449,12 +2459,12 @@ run_splitter_test(const struct splitter_dataset_def *data, hbool_t ignore_wo_err
}
/* Verify that the R/W and W/O files are identical */
- if (h5_compare_file_bytes(filename_rw, vfd_config.wo_path) < 0) {
+ if (h5_compare_file_bytes(filename_rw, vfd_config->wo_path) < 0) {
SPLITTER_TEST_FAULT("files are not byte-for-byte equivalent\n");
}
- /* Verify existence of logfile iff appropriate */
- logfile = fopen(vfd_config.log_file_path, "r");
+ /* Verify existence of logfile if appropriate */
+ logfile = fopen(vfd_config->log_file_path, "r");
if ((TRUE == provide_logfile_path && NULL == logfile) ||
(FALSE == provide_logfile_path && NULL != logfile)) {
SPLITTER_TEST_FAULT("no logfile when one was expected\n");
@@ -2464,20 +2474,23 @@ done:
if (ret_value < 0) {
H5E_BEGIN_TRY
{
- (void)H5Dclose(dset_id);
- (void)H5Sclose(space_id);
- (void)H5Pclose(fapl_id_out);
- (void)H5Pclose(fapl_id_cpy);
- (void)H5Pclose(fapl_id);
- (void)H5Fclose(file_id);
+ H5Dclose(dset_id);
+ H5Sclose(space_id);
+ H5Pclose(fapl_id_out);
+ H5Pclose(fapl_id_cpy);
+ H5Pclose(fapl_id);
+ H5Fclose(file_id);
}
H5E_END_TRY;
}
- if (logfile != NULL) {
+
+ if (logfile != NULL)
fclose(logfile);
- }
- return ret_value;
+ HDfree(vfd_config);
+ HDfree(filename_rw);
+
+ return ret_value;
} /* end run_splitter_test() */
/*-------------------------------------------------------------------------
@@ -2498,24 +2511,27 @@ done:
static int
driver_is_splitter_compatible(hid_t fapl_id)
{
- H5FD_splitter_vfd_config_t vfd_config;
- hid_t split_fapl_id = H5I_INVALID_HID;
- herr_t ret = SUCCEED;
- int ret_value = 0;
+ H5FD_splitter_vfd_config_t *vfd_config = NULL;
+ hid_t split_fapl_id = H5I_INVALID_HID;
+ herr_t ret = SUCCEED;
+ int ret_value = 0;
+
+ if (NULL == (vfd_config = HDcalloc(1, sizeof(H5FD_splitter_vfd_config_t)))) {
+ FAIL_PUTS_ERROR("memory allocation for vfd_config struct failed");
+ }
- split_fapl_id = H5Pcreate(H5P_FILE_ACCESS);
- if (H5I_INVALID_HID == split_fapl_id) {
+ if (H5I_INVALID_HID == (split_fapl_id = H5Pcreate(H5P_FILE_ACCESS))) {
FAIL_PUTS_ERROR("Can't create contained FAPL");
}
- vfd_config.magic = H5FD_SPLITTER_MAGIC;
- vfd_config.version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
- vfd_config.ignore_wo_errs = FALSE;
- vfd_config.rw_fapl_id = H5P_DEFAULT;
- vfd_config.wo_fapl_id = fapl_id;
- HDstrncpy(vfd_config.wo_path, "nonesuch", H5FD_SPLITTER_PATH_MAX);
- *vfd_config.log_file_path = '\0';
+ vfd_config->magic = H5FD_SPLITTER_MAGIC;
+ vfd_config->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
+ vfd_config->ignore_wo_errs = FALSE;
+ vfd_config->rw_fapl_id = H5P_DEFAULT;
+ vfd_config->wo_fapl_id = fapl_id;
+ HDstrncpy(vfd_config->wo_path, "nonesuch", H5FD_SPLITTER_PATH_MAX);
+ vfd_config->log_file_path[0] = '\0';
- H5E_BEGIN_TRY { ret = H5Pset_fapl_splitter(split_fapl_id, &vfd_config); }
+ H5E_BEGIN_TRY { ret = H5Pset_fapl_splitter(split_fapl_id, vfd_config); }
H5E_END_TRY;
if (SUCCEED == ret) {
ret_value = -1;
@@ -2526,11 +2542,16 @@ driver_is_splitter_compatible(hid_t fapl_id)
}
split_fapl_id = H5I_INVALID_HID;
+ HDfree(vfd_config);
+
return ret_value;
error:
- H5E_BEGIN_TRY { (void)H5Pclose(split_fapl_id); }
+ H5E_BEGIN_TRY { H5Pclose(split_fapl_id); }
H5E_END_TRY;
+
+ HDfree(vfd_config);
+
return -1;
} /* end driver_is_splitter_compatible() */
@@ -2550,19 +2571,24 @@ error:
static int
splitter_RO_test(const struct splitter_dataset_def *data, hid_t child_fapl_id)
{
- char filename_rw[H5FD_SPLITTER_PATH_MAX + 1];
- H5FD_splitter_vfd_config_t vfd_config;
- hid_t fapl_id = H5I_INVALID_HID;
- int ret_value = 0;
- hid_t file_id = H5I_INVALID_HID;
-
- vfd_config.magic = H5FD_SPLITTER_MAGIC;
- vfd_config.version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
- vfd_config.ignore_wo_errs = FALSE;
- vfd_config.rw_fapl_id = child_fapl_id;
- vfd_config.wo_fapl_id = child_fapl_id;
-
- if (splitter_prepare_file_paths(&vfd_config, filename_rw) < 0) {
+ char * filename_rw = NULL;
+ H5FD_splitter_vfd_config_t *vfd_config = NULL;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
+ int ret_value = 0;
+
+ if (NULL == (vfd_config = HDcalloc(1, sizeof(H5FD_splitter_vfd_config_t))))
+ SPLITTER_TEST_FAULT("memory allocation for vfd_config struct failed");
+ if (NULL == (filename_rw = HDcalloc(H5FD_SPLITTER_PATH_MAX + 1, sizeof(char))))
+ SPLITTER_TEST_FAULT("memory allocation for filename_rw string failed");
+
+ vfd_config->magic = H5FD_SPLITTER_MAGIC;
+ vfd_config->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
+ vfd_config->ignore_wo_errs = FALSE;
+ vfd_config->rw_fapl_id = child_fapl_id;
+ vfd_config->wo_fapl_id = child_fapl_id;
+
+ if (splitter_prepare_file_paths(vfd_config, filename_rw) < 0) {
SPLITTER_TEST_FAULT("can't prepare splitter file paths\n");
}
@@ -2571,7 +2597,7 @@ splitter_RO_test(const struct splitter_dataset_def *data, hid_t child_fapl_id)
if (H5I_INVALID_HID == fapl_id) {
SPLITTER_TEST_FAULT("can't create FAPL ID\n");
}
- if (H5Pset_fapl_splitter(fapl_id, &vfd_config) < 0) {
+ if (H5Pset_fapl_splitter(fapl_id, vfd_config) < 0) {
SPLITTER_TEST_FAULT("can't set splitter FAPL\n");
}
if (H5Pget_driver(fapl_id) != H5FD_SPLITTER) {
@@ -2592,7 +2618,7 @@ splitter_RO_test(const struct splitter_dataset_def *data, hid_t child_fapl_id)
* Should fail.
*/
- if (splitter_create_single_file_at(vfd_config.wo_path, vfd_config.wo_fapl_id, data) < 0) {
+ if (splitter_create_single_file_at(vfd_config->wo_path, vfd_config->wo_fapl_id, data) < 0) {
SPLITTER_TEST_FAULT("can't write W/O file\n");
}
H5E_BEGIN_TRY { file_id = H5Fopen(filename_rw, H5F_ACC_RDONLY, fapl_id); }
@@ -2600,13 +2626,13 @@ splitter_RO_test(const struct splitter_dataset_def *data, hid_t child_fapl_id)
if (file_id >= 0) {
SPLITTER_TEST_FAULT("R/O open with extant W/O file unexpectedly successful\n");
}
- HDremove(vfd_config.wo_path);
+ HDremove(vfd_config->wo_path);
/* Attempt R/O open when only R/W file exists
* Should fail.
*/
- if (splitter_create_single_file_at(filename_rw, vfd_config.rw_fapl_id, data) < 0) {
+ if (splitter_create_single_file_at(filename_rw, vfd_config->rw_fapl_id, data) < 0) {
SPLITTER_TEST_FAULT("can't create R/W file\n");
}
H5E_BEGIN_TRY { file_id = H5Fopen(filename_rw, H5F_ACC_RDONLY, fapl_id); }
@@ -2618,7 +2644,7 @@ splitter_RO_test(const struct splitter_dataset_def *data, hid_t child_fapl_id)
/* Attempt R/O open when both R/W and W/O files exist
*/
- if (splitter_create_single_file_at(vfd_config.wo_path, vfd_config.wo_fapl_id, data) < 0) {
+ if (splitter_create_single_file_at(vfd_config->wo_path, vfd_config->wo_fapl_id, data) < 0) {
SPLITTER_TEST_FAULT("can't create W/O file\n");
}
file_id = H5Fopen(filename_rw, H5F_ACC_RDONLY, fapl_id);
@@ -2645,11 +2671,15 @@ done:
if (ret_value < 0) {
H5E_BEGIN_TRY
{
- (void)H5Pclose(fapl_id);
- (void)H5Fclose(file_id);
+ H5Pclose(fapl_id);
+ H5Fclose(file_id);
}
H5E_END_TRY;
- } /* end if error */
+ }
+
+ HDfree(vfd_config);
+ HDfree(filename_rw);
+
return ret_value;
} /* end splitter_RO_test() */
@@ -2779,9 +2809,9 @@ done:
if (ret_value < 0) {
H5E_BEGIN_TRY
{
- (void)H5Dclose(dset_id);
- (void)H5Sclose(space_id);
- (void)H5Fclose(file_id);
+ H5Dclose(dset_id);
+ H5Sclose(space_id);
+ H5Fclose(file_id);
}
H5E_END_TRY;
} /* end if error */
@@ -2840,7 +2870,7 @@ splitter_compare_expected_data(hid_t file_id, const struct splitter_dataset_def
done:
if (ret_value < 0) {
- H5E_BEGIN_TRY { (void)H5Dclose(dset_id); }
+ H5E_BEGIN_TRY { H5Dclose(dset_id); }
H5E_END_TRY;
}
return ret_value;
@@ -2872,11 +2902,11 @@ done:
static int
splitter_tentative_open_test(hid_t child_fapl_id)
{
- const char filename_tmp[H5FD_SPLITTER_PATH_MAX + 1] = "splitter_tmp.h5";
- char filename_rw[H5FD_SPLITTER_PATH_MAX + 1];
- H5FD_splitter_vfd_config_t vfd_config;
- hid_t fapl_id = H5I_INVALID_HID;
- hid_t file_id = H5I_INVALID_HID;
+ const char * filename_tmp = "splitter_tmp.h5";
+ char * filename_rw = NULL;
+ H5FD_splitter_vfd_config_t *vfd_config = NULL;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
int buf[SPLITTER_SIZE][SPLITTER_SIZE]; /* for comparison */
hsize_t dims[2] = {SPLITTER_SIZE, SPLITTER_SIZE}; /* for comparison */
int i = 0; /* for comparison */
@@ -2884,6 +2914,11 @@ splitter_tentative_open_test(hid_t child_fapl_id)
struct splitter_dataset_def data; /* for comparison */
int ret_value = 0;
+ if (NULL == (vfd_config = HDcalloc(1, sizeof(H5FD_splitter_vfd_config_t))))
+ SPLITTER_TEST_FAULT("memory allocation for vfd_config struct failed");
+ if (NULL == (filename_rw = HDcalloc(H5FD_SPLITTER_PATH_MAX + 1, sizeof(char))))
+ SPLITTER_TEST_FAULT("memory allocation for filename_rw string failed");
+
/* pre-fill data buffer to write */
for (i = 0; i < SPLITTER_SIZE; i++) {
for (j = 0; j < SPLITTER_SIZE; j++) {
@@ -2898,13 +2933,13 @@ splitter_tentative_open_test(hid_t child_fapl_id)
data.n_dims = 2;
data.dset_name = SPLITTER_DATASET_NAME;
- vfd_config.magic = H5FD_SPLITTER_MAGIC;
- vfd_config.version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
- vfd_config.ignore_wo_errs = FALSE;
- vfd_config.rw_fapl_id = child_fapl_id;
- vfd_config.wo_fapl_id = child_fapl_id;
+ vfd_config->magic = H5FD_SPLITTER_MAGIC;
+ vfd_config->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
+ vfd_config->ignore_wo_errs = FALSE;
+ vfd_config->rw_fapl_id = child_fapl_id;
+ vfd_config->wo_fapl_id = child_fapl_id;
- if (splitter_prepare_file_paths(&vfd_config, filename_rw) < 0) {
+ if (splitter_prepare_file_paths(vfd_config, filename_rw) < 0) {
SPLITTER_TEST_FAULT("can't prepare splitter file paths\n");
}
@@ -2912,7 +2947,7 @@ splitter_tentative_open_test(hid_t child_fapl_id)
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) == H5I_INVALID_HID) {
SPLITTER_TEST_FAULT("can't create FAPL ID\n");
}
- if (H5Pset_fapl_splitter(fapl_id, &vfd_config) < 0) {
+ if (H5Pset_fapl_splitter(fapl_id, vfd_config) < 0) {
SPLITTER_TEST_FAULT("can't set splitter FAPL\n");
}
if (H5Pget_driver(fapl_id) != H5FD_SPLITTER) {
@@ -2941,7 +2976,7 @@ splitter_tentative_open_test(hid_t child_fapl_id)
if (file_exists(filename_rw, child_fapl_id)) {
SPLITTER_TEST_FAULT("R/W file unexpectedly created\n");
}
- if (file_exists(vfd_config.wo_path, child_fapl_id)) {
+ if (file_exists(vfd_config->wo_path, child_fapl_id)) {
SPLITTER_TEST_FAULT("W/O file unexpectedly created\n");
}
@@ -2951,7 +2986,7 @@ splitter_tentative_open_test(hid_t child_fapl_id)
* Should fail.
*/
- if (h5_duplicate_file_by_bytes(filename_tmp, vfd_config.wo_path) < 0) {
+ if (h5_duplicate_file_by_bytes(filename_tmp, vfd_config->wo_path) < 0) {
SPLITTER_TEST_FAULT("Can't create W/O file copy.\n");
}
H5E_BEGIN_TRY { file_id = H5Fopen(filename_rw, H5F_ACC_RDWR, fapl_id); }
@@ -2962,11 +2997,11 @@ splitter_tentative_open_test(hid_t child_fapl_id)
if (file_exists(filename_rw, child_fapl_id)) {
SPLITTER_TEST_FAULT("R/W file unexpectedly created\n");
}
- if (!file_exists(vfd_config.wo_path, child_fapl_id)) {
+ if (!file_exists(vfd_config->wo_path, child_fapl_id)) {
SPLITTER_TEST_FAULT("W/O file mysteriously disappeared\n");
}
- HDremove(vfd_config.wo_path);
- if (file_exists(vfd_config.wo_path, child_fapl_id)) {
+ HDremove(vfd_config->wo_path);
+ if (file_exists(vfd_config->wo_path, child_fapl_id)) {
SPLITTER_TEST_FAULT("failed to remove W/O file\n");
}
@@ -2987,7 +3022,7 @@ splitter_tentative_open_test(hid_t child_fapl_id)
if (!file_exists(filename_rw, child_fapl_id)) {
SPLITTER_TEST_FAULT("R/W file mysteriously disappeared\n");
}
- if (file_exists(vfd_config.wo_path, child_fapl_id)) {
+ if (file_exists(vfd_config->wo_path, child_fapl_id)) {
SPLITTER_TEST_FAULT("W/O file unexpectedly created\n");
}
@@ -2996,7 +3031,7 @@ splitter_tentative_open_test(hid_t child_fapl_id)
* Both files present.
*/
- if (h5_duplicate_file_by_bytes(filename_tmp, vfd_config.wo_path) < 0) {
+ if (h5_duplicate_file_by_bytes(filename_tmp, vfd_config->wo_path) < 0) {
SPLITTER_TEST_FAULT("Can't create W/O file copy.\n");
}
file_id = H5Fopen(filename_rw, H5F_ACC_RDWR, fapl_id);
@@ -3010,7 +3045,7 @@ splitter_tentative_open_test(hid_t child_fapl_id)
if (!file_exists(filename_rw, child_fapl_id)) {
SPLITTER_TEST_FAULT("R/W file mysteriously disappared\n");
}
- if (!file_exists(vfd_config.wo_path, child_fapl_id)) {
+ if (!file_exists(vfd_config->wo_path, child_fapl_id)) {
SPLITTER_TEST_FAULT("W/O file mysteriously disappeared\n");
}
@@ -3030,14 +3065,14 @@ splitter_tentative_open_test(hid_t child_fapl_id)
if (!file_exists(filename_rw, child_fapl_id)) {
SPLITTER_TEST_FAULT("R/W file mysteriously disappared\n");
}
- if (!file_exists(vfd_config.wo_path, child_fapl_id)) {
+ if (!file_exists(vfd_config->wo_path, child_fapl_id)) {
SPLITTER_TEST_FAULT("W/O file mysteriously disappeared\n");
}
- if (h5_compare_file_bytes(filename_rw, vfd_config.wo_path) < 0) {
+ if (h5_compare_file_bytes(filename_rw, vfd_config->wo_path) < 0) {
SPLITTER_TEST_FAULT("files are not byte-for-byte equivalent\n");
}
HDremove(filename_rw);
- HDremove(vfd_config.wo_path);
+ HDremove(vfd_config->wo_path);
/*
* H5Fcreate() with TRUNC access.
@@ -3047,7 +3082,7 @@ splitter_tentative_open_test(hid_t child_fapl_id)
if (h5_duplicate_file_by_bytes(filename_tmp, filename_rw) < 0) {
SPLITTER_TEST_FAULT("Can't create R/W file copy.\n");
}
- if (file_exists(vfd_config.wo_path, child_fapl_id)) {
+ if (file_exists(vfd_config->wo_path, child_fapl_id)) {
SPLITTER_TEST_FAULT("failed to remove W/O file\n");
}
file_id = H5Fcreate(filename_rw, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
@@ -3061,21 +3096,21 @@ splitter_tentative_open_test(hid_t child_fapl_id)
if (!file_exists(filename_rw, child_fapl_id)) {
SPLITTER_TEST_FAULT("R/W file mysteriously disappared\n");
}
- if (!file_exists(vfd_config.wo_path, child_fapl_id)) {
+ if (!file_exists(vfd_config->wo_path, child_fapl_id)) {
SPLITTER_TEST_FAULT("W/O file mysteriously disappeared\n");
}
- if (h5_compare_file_bytes(filename_rw, vfd_config.wo_path) < 0) {
+ if (h5_compare_file_bytes(filename_rw, vfd_config->wo_path) < 0) {
SPLITTER_TEST_FAULT("files are not byte-for-byte equivalent\n");
}
HDremove(filename_rw);
- HDremove(vfd_config.wo_path);
+ HDremove(vfd_config->wo_path);
/*
* H5Fcreate() with TRUNC access.
* Only W/O present.
*/
- if (h5_duplicate_file_by_bytes(filename_tmp, vfd_config.wo_path) < 0) {
+ if (h5_duplicate_file_by_bytes(filename_tmp, vfd_config->wo_path) < 0) {
SPLITTER_TEST_FAULT("Can't create W/O file copy.\n");
}
if (file_exists(filename_rw, child_fapl_id)) {
@@ -3092,14 +3127,14 @@ splitter_tentative_open_test(hid_t child_fapl_id)
if (!file_exists(filename_rw, child_fapl_id)) {
SPLITTER_TEST_FAULT("R/W file mysteriously disappared\n");
}
- if (!file_exists(vfd_config.wo_path, child_fapl_id)) {
+ if (!file_exists(vfd_config->wo_path, child_fapl_id)) {
SPLITTER_TEST_FAULT("W/O file mysteriously disappeared\n");
}
- if (h5_compare_file_bytes(filename_rw, vfd_config.wo_path) < 0) {
+ if (h5_compare_file_bytes(filename_rw, vfd_config->wo_path) < 0) {
SPLITTER_TEST_FAULT("files are not byte-for-byte equivalent\n");
}
HDremove(filename_rw);
- HDremove(vfd_config.wo_path);
+ HDremove(vfd_config->wo_path);
/* H5Fcreate with both files absent is tested elsewhere */
@@ -3115,11 +3150,15 @@ done:
if (ret_value < 0) {
H5E_BEGIN_TRY
{
- (void)H5Pclose(fapl_id);
- (void)H5Fclose(file_id);
+ H5Pclose(fapl_id);
+ H5Fclose(file_id);
}
H5E_END_TRY;
- } /* end if error */
+ }
+
+ HDfree(vfd_config);
+ HDfree(filename_rw);
+
return ret_value;
} /* end splitter_tentative_open_test() */
@@ -3153,7 +3192,7 @@ file_exists(const char *filename, hid_t fapl_id)
return ret_value;
error:
- H5E_BEGIN_TRY { (void)H5Fclose(file_id); }
+ H5E_BEGIN_TRY { H5Fclose(file_id); }
H5E_END_TRY;
return ret_value;
} /* end file_exists() */
@@ -3259,9 +3298,9 @@ test_splitter(void)
return 0;
error:
- if (child_fapl_id != H5I_INVALID_HID) {
- (void)H5Pclose(child_fapl_id);
- }
+ if (child_fapl_id != H5I_INVALID_HID)
+ H5Pclose(child_fapl_id);
+
return -1;
} /* end test_splitter() */
@@ -3272,8 +3311,7 @@ error:
*
* Purpose: Tests the basic features of Virtual File Drivers
*
- * Return: Success: 0
- * Failure: 1
+ * Return: EXIT_SUCCESS/EXIT_FAILURE
*
*-------------------------------------------------------------------------
*/
@@ -3302,10 +3340,10 @@ main(void)
if (nerrors) {
HDprintf("***** %d Virtual File Driver TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
- return 1;
- } /* end if */
+ return EXIT_FAILURE;
+ }
HDprintf("All Virtual File Driver tests passed.\n");
- return 0;
+ return EXIT_SUCCESS;
} /* end main() */