summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-02-03 23:26:42 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-02-03 23:26:42 (GMT)
commit7e67d1f00da21ed8dc60ca36444a67cb12d18a18 (patch)
tree89d5050f6c03a07e45f934efaadabb12b7253faf
parent5436f45bd11f2867b3c9e93b976df427a0ffb10e (diff)
downloadhdf5-7e67d1f00da21ed8dc60ca36444a67cb12d18a18.zip
hdf5-7e67d1f00da21ed8dc60ca36444a67cb12d18a18.tar.gz
hdf5-7e67d1f00da21ed8dc60ca36444a67cb12d18a18.tar.bz2
[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)
-rw-r--r--COPYING2
-rw-r--r--test/set_extent.c127
-rwxr-xr-xwindows/src/H5pubconf.h4
-rw-r--r--windows/test/set_extent/set_extent.vcproj17
-rw-r--r--windows/tools/h5ls/testh5ls.bat6
-rw-r--r--windows/tools/h5repack/h5repack.bat6
-rw-r--r--windows_vnet/test/set_extent/set_extent.vcproj4
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"
>
<Platforms>
<Platform
@@ -74,9 +73,9 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="odbc32.lib odbccp32.lib $(HDF5_EXT_ZLIB) $(HDF5_EXT_SZIP)"
+ AdditionalDependencies="odbc32.lib odbccp32.lib WS2_32.lib $(HDF5_EXT_ZLIB) $(HDF5_EXT_SZIP)"
OutputFile="$(OutDir)\$(ProjectName).exe"
- LinkIncremental="0"
+ LinkIncremental="1"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
@@ -167,9 +166,9 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="odbc32.lib odbccp32.lib $(HDF5_EXT_ZLIB) $(HDF5_EXT_SZIP)"
+ AdditionalDependencies="odbc32.lib odbccp32.lib WS2_32.lib $(HDF5_EXT_ZLIB) $(HDF5_EXT_SZIP)"
OutputFile="$(OutDir)\$(ProjectName).exe"
- LinkIncremental="0"
+ LinkIncremental="1"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
@@ -260,9 +259,9 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="odbc32.lib odbccp32.lib $(HDF5_EXT_ZLIB) $(HDF5_EXT_SZIP)"
+ AdditionalDependencies="odbc32.lib odbccp32.lib WS2_32.lib $(HDF5_EXT_ZLIB) $(HDF5_EXT_SZIP)"
OutputFile="$(OutDir)\$(ProjectName).exe"
- LinkIncremental="0"
+ LinkIncremental="1"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames=""
ProgramDatabaseFile=".\../../../test/set_extent/Release/set_extent.pdb"
@@ -353,9 +352,9 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="odbc32.lib odbccp32.lib $(HDF5_EXT_ZLIB) $(HDF5_EXT_SZIP)"
+ AdditionalDependencies="odbc32.lib odbccp32.lib WS2_32.lib $(HDF5_EXT_ZLIB) $(HDF5_EXT_SZIP)"
OutputFile="$(OutDir)\$(ProjectName).exe"
- LinkIncremental="0"
+ LinkIncremental="1"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames=""
ProgramDatabaseFile=".\../../../test/set_extent/Release/set_extent.pdb"
diff --git a/windows/tools/h5ls/testh5ls.bat b/windows/tools/h5ls/testh5ls.bat
index a95975b..469e8df 100644
--- a/windows/tools/h5ls/testh5ls.bat
+++ b/windows/tools/h5ls/testh5ls.bat
@@ -218,6 +218,12 @@ rem ############################################################################
rem test for non-existing file
call :tooltest nosuchfile.ls 0 nosuchfile.h5
+ rem test for variable length data types in verbose mode
+ call :tooltest tvldtypes2.ls 0 -v tvldtypes1.h5
+
+ rem test for dataset region references data types in verbose mode
+ call :tooltest tdatareg.ls 0 -v tdatareg.h5
+
if %nerrors% equ 0 (
echo.All h5ls tests passed.
)
diff --git a/windows/tools/h5repack/h5repack.bat b/windows/tools/h5repack/h5repack.bat
index eb4da34..a2cc9a3 100644
--- a/windows/tools/h5repack/h5repack.bat
+++ b/windows/tools/h5repack/h5repack.bat
@@ -61,6 +61,8 @@ set file10=h5repack_fletcher.h5
set file11=h5repack_filters.h5
set file12=h5repack_nbit.h5
set file13=h5repack_soffset.h5
+rem A file with an older version of the layout message (copy of test/tlayouto.h5)
+set file14=h5repack_layouto.h5
set nerrors=0
@@ -593,6 +595,10 @@ rem
rem add alignment
set arg=%file1% -t 1 -a 1
call :tooltest %arg%
+
+ rem Check repacking file with old version of layout message (should get upgraded
+ rem to new version and be readable, etc.)
+ call :tooltest %file14%
if %nerrors% equ 0 (
diff --git a/windows_vnet/test/set_extent/set_extent.vcproj b/windows_vnet/test/set_extent/set_extent.vcproj
index 553ad3d..d7388cd 100644
--- a/windows_vnet/test/set_extent/set_extent.vcproj
+++ b/windows_vnet/test/set_extent/set_extent.vcproj
@@ -38,7 +38,7 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="odbc32.lib odbccp32.lib $(HDF5_EXT_ZLIB) $(HDF5_EXT_SZIP)"
+ AdditionalDependencies="odbc32.lib odbccp32.lib WS2_32.lib $(HDF5_EXT_ZLIB) $(HDF5_EXT_SZIP)"
OutputFile=".\../../../test/set_extent/Debug/set_extent.exe"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
@@ -101,7 +101,7 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="odbc32.lib odbccp32.lib $(HDF5_EXT_ZLIB) $(HDF5_EXT_SZIP)"
+ AdditionalDependencies="odbc32.lib odbccp32.lib WS2_32.lib $(HDF5_EXT_ZLIB) $(HDF5_EXT_SZIP)"
OutputFile=".\../../../test/set_extent/Release/set_extent.exe"
LinkIncremental="1"
SuppressStartupBanner="TRUE"