From 7e67d1f00da21ed8dc60ca36444a67cb12d18a18 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Tue, 3 Feb 2009 18:26:42 -0500 Subject: [svn-r16413] Description: Bring r16402:16412 from trunk back to revise_chunks branch Tested on: FreeBSD/32 6.3 (duty) (h5committest not required for this branch) --- COPYING | 2 +- test/set_extent.c | 127 +++++++++++++------------ windows/src/H5pubconf.h | 4 + windows/test/set_extent/set_extent.vcproj | 17 ++-- windows/tools/h5ls/testh5ls.bat | 6 ++ windows/tools/h5repack/h5repack.bat | 6 ++ windows_vnet/test/set_extent/set_extent.vcproj | 4 +- 7 files changed, 93 insertions(+), 73 deletions(-) diff --git a/COPYING b/COPYING index b2f7cf1..43c4534 100644 --- a/COPYING +++ b/COPYING @@ -4,7 +4,7 @@ HDF5 (Hierarchical Data Format 5) Software Library and Utilities ----------------------------------------------------------------------------- HDF5 (Hierarchical Data Format 5) Software Library and Utilities -Copyright 2006-2008 by The HDF Group. +Copyright 2006-2009 by The HDF Group. NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities Copyright 1998-2006 by the Board of Trustees of the University of Illinois. diff --git a/test/set_extent.c b/test/set_extent.c index b16bbd0..948095a 100644 --- a/test/set_extent.c +++ b/test/set_extent.c @@ -53,24 +53,27 @@ #define DIME2 7 #define ISTORE_IK 64 -static int do_ranks( void ); -static int do_layouts( void ); +static int do_ranks( hid_t fapl ); +static int do_layouts( hid_t fapl ); static int test_rank1( hbool_t do_compress, hbool_t do_fill_value, hbool_t set_istore_k, - H5D_fill_time_t fill_time); + H5D_fill_time_t fill_time, + hid_t fapl); static int test_rank2( hbool_t do_compress, hbool_t do_fill_value, hbool_t set_istore_k, - H5D_fill_time_t fill_time); + H5D_fill_time_t fill_time, + hid_t fapl); static int test_rank3( hbool_t do_compress, hbool_t do_fill_value, hbool_t set_istore_k, - H5D_fill_time_t fill_time); + H5D_fill_time_t fill_time, + hid_t fapl); -static int test_external( void ); -static int test_layouts( H5D_layout_t layout ); +static int test_external( hid_t fapl ); +static int test_layouts( H5D_layout_t layout, hid_t fapl ); /*------------------------------------------------------------------------- * main @@ -79,24 +82,17 @@ static int test_layouts( H5D_layout_t layout ); int main( void ) { - if ( do_ranks() < 0 ) - { - goto error; - } - - if ( test_external() < 0 ) - { - goto error; - } - - if ( do_layouts() < 0 ) - { - goto error; - } - - - puts("All set_extent tests passed."); + hid_t fapl; /* file access property list */ + int nerrors = 0; + + h5_reset(); + fapl = h5_fileaccess(); + + nerrors += do_ranks( fapl ) < 0 ? 1 : 0; + nerrors += test_external( fapl ) < 0 ? 1 : 0; + nerrors += do_layouts( fapl ) < 0 ? 1 : 0; + HDremove(FILE_NAME1); HDremove(FILE_NAME2); HDremove(FILE_NAME3); @@ -105,11 +101,17 @@ int main( void ) HDremove(EXT_FILE_NAME1); HDremove(EXT_FILE_NAME2); + if(nerrors) + { + printf("***** %d H5Dset_extent TEST%s FAILED! *****\n", + nerrors, 1 == nerrors ? "" : "S"); + exit(1); + } + + puts("All H5Dset_extent tests passed."); + return 0; - -error: - H5_FAILED(); - return 1; + } @@ -118,7 +120,7 @@ error: * test with several ranks *------------------------------------------------------------------------- */ -static int do_ranks( void ) +static int do_ranks( hid_t fapl ) { hbool_t do_compress = 0; @@ -130,27 +132,27 @@ static int do_ranks( void ) do_fillvalue = 1; - if (test_rank1( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ALLOC ) < 0) + if (test_rank1( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ALLOC, fapl ) < 0) { goto error; } - if (test_rank1( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_IFSET ) < 0) + if (test_rank1( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_IFSET, fapl ) < 0) { goto error; } - if (test_rank2( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ALLOC ) < 0) + if (test_rank2( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ALLOC, fapl ) < 0) { goto error; } - if (test_rank2( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_IFSET ) < 0) + if (test_rank2( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_IFSET, fapl ) < 0) { goto error; } - if (test_rank3( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ALLOC ) < 0) + if (test_rank3( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ALLOC, fapl ) < 0) { goto error; } - if (test_rank3( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_IFSET ) < 0) + if (test_rank3( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_IFSET, fapl ) < 0) { goto error; } @@ -164,15 +166,15 @@ static int do_ranks( void ) do_fillvalue = 0; - if (test_rank1( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ERROR ) < 0) + if (test_rank1( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ERROR, fapl ) < 0) { goto error; } - if (test_rank2( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ERROR ) < 0) + if (test_rank2( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ERROR, fapl ) < 0) { goto error; } - if (test_rank3( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ERROR ) < 0) + if (test_rank3( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ERROR, fapl ) < 0) { goto error; } @@ -188,27 +190,27 @@ static int do_ranks( void ) do_compress = 1; do_fillvalue = 1; - if (test_rank1( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ALLOC ) < 0) + if (test_rank1( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ALLOC, fapl ) < 0) { goto error; } - if (test_rank1( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_IFSET ) < 0) + if (test_rank1( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_IFSET, fapl ) < 0) { goto error; } - if (test_rank2( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ALLOC ) < 0) + if (test_rank2( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ALLOC, fapl ) < 0) { goto error; } - if (test_rank2( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_IFSET ) < 0) + if (test_rank2( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_IFSET, fapl ) < 0) { goto error; } - if (test_rank3( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ALLOC ) < 0) + if (test_rank3( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ALLOC, fapl ) < 0) { goto error; } - if (test_rank3( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_IFSET ) < 0) + if (test_rank3( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_IFSET, fapl ) < 0) { goto error; } @@ -225,15 +227,15 @@ static int do_ranks( void ) do_fillvalue = 0; - if (test_rank1( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ERROR ) < 0) + if (test_rank1( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ERROR, fapl ) < 0) { goto error; } - if (test_rank2( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ERROR ) < 0) + if (test_rank2( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ERROR, fapl ) < 0) { goto error; } - if (test_rank3( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ERROR ) < 0) + if (test_rank3( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ERROR, fapl ) < 0) { goto error; } @@ -248,7 +250,7 @@ static int do_ranks( void ) do_fillvalue = 1; set_istore_k = 1; - if (test_rank2( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ALLOC ) < 0) + if (test_rank2( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ALLOC, fapl ) < 0) { goto error; } @@ -269,17 +271,17 @@ error: * test with different storage layouts *------------------------------------------------------------------------- */ -static int do_layouts( void ) +static int do_layouts( hid_t fapl ) { TESTING("storage layout use"); - if (test_layouts( H5D_COMPACT ) < 0) + if (test_layouts( H5D_COMPACT, fapl ) < 0) { goto error; } - if (test_layouts( H5D_CONTIGUOUS ) < 0) + if (test_layouts( H5D_CONTIGUOUS, fapl ) < 0) { goto error; } @@ -300,7 +302,8 @@ error: static int test_rank1( hbool_t do_compress, hbool_t do_fill_value, hbool_t set_istore_k, - H5D_fill_time_t fill_time) + H5D_fill_time_t fill_time, + hid_t fapl) { hid_t fid=-1; @@ -354,7 +357,7 @@ static int test_rank1( hbool_t do_compress, } /* create a new file */ - if ((fid = H5Fcreate(FILE_NAME1, H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0) + if ((fid = H5Fcreate(FILE_NAME1, H5F_ACC_TRUNC, fcpl, fapl)) < 0) { goto error; } @@ -833,7 +836,8 @@ error: static int test_rank2( hbool_t do_compress, hbool_t do_fill_value, hbool_t set_istore_k, - H5D_fill_time_t fill_time) + H5D_fill_time_t fill_time, + hid_t fapl) { hid_t fid=-1; @@ -889,7 +893,7 @@ static int test_rank2( hbool_t do_compress, } /* create a new file */ - if ((fid = H5Fcreate(FILE_NAME2, H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0) + if ((fid = H5Fcreate(FILE_NAME2, H5F_ACC_TRUNC, fcpl, fapl)) < 0) { goto error; } @@ -1424,7 +1428,8 @@ error: static int test_rank3( hbool_t do_compress, hbool_t do_fill_value, hbool_t set_istore_k, - H5D_fill_time_t fill_time) + H5D_fill_time_t fill_time, + hid_t fapl) { hid_t fid=-1; @@ -1483,7 +1488,7 @@ static int test_rank3( hbool_t do_compress, } /* create a new file */ - if ((fid = H5Fcreate(FILE_NAME3, H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0) + if ((fid = H5Fcreate(FILE_NAME3, H5F_ACC_TRUNC, fcpl, fapl)) < 0) { goto error; } @@ -2004,7 +2009,7 @@ error: * test usage with external storage *------------------------------------------------------------------------- */ -static int test_external( void ) +static int test_external( hid_t fapl ) { hid_t fid=-1; @@ -2043,7 +2048,7 @@ static int test_external( void ) TESTING("external file use"); /* create a new file */ - if ((fid = H5Fcreate(FILE_NAME4, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) + if ((fid = H5Fcreate(FILE_NAME4, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) { goto error; } @@ -2379,7 +2384,7 @@ error: * test usage with layouts compact and contiguous *------------------------------------------------------------------------- */ -static int test_layouts( H5D_layout_t layout ) +static int test_layouts( H5D_layout_t layout, hid_t fapl ) { hid_t fid=-1; @@ -2404,7 +2409,7 @@ static int test_layouts( H5D_layout_t layout ) /* create a new file */ - if ((fid = H5Fcreate(FILE_NAME5, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) + if ((fid = H5Fcreate(FILE_NAME5, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) { goto error; } diff --git a/windows/src/H5pubconf.h b/windows/src/H5pubconf.h index 5c6e550..6639fb5 100755 --- a/windows/src/H5pubconf.h +++ b/windows/src/H5pubconf.h @@ -78,6 +78,10 @@ /* Define to 1 if you have the `BSDgettimeofday' function. */ /* #undef H5_HAVE_BSDGETTIMEOFDAY */ +/* Define if the compiler understands C99 designated initialization of structs + and unions */ +/* #undef H5_HAVE_C99_DESIGNATED_INITIALIZER */ + /* Define if the compiler understand the __func__ keyword */ /* #undef H5_HAVE_C99_FUNC */ diff --git a/windows/test/set_extent/set_extent.vcproj b/windows/test/set_extent/set_extent.vcproj index a527461..e5a636a 100644 --- a/windows/test/set_extent/set_extent.vcproj +++ b/windows/test/set_extent/set_extent.vcproj @@ -4,7 +4,6 @@ Version="8.00" Name="set_extent" ProjectGUID="{E81413CC-046C-42B0-B862-0BB81AED2854}" - RootNamespace="set_extent" >