mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-01 16:28:09 +08:00
merge from develop and apply HDFFV-8611
This commit is contained in:
parent
206c4a43e8
commit
635e8c5377
6
MANIFEST
6
MANIFEST
@ -1629,7 +1629,8 @@
|
||||
./tools/testfiles/tbinregR.exp
|
||||
./tools/testfiles/tbinregR.ddl
|
||||
./tools/testfiles/tbitfields.h5
|
||||
./tools/testfiles/tbitnopaque.ddl
|
||||
./tools/testfiles/tbitnopaque_be.ddl
|
||||
./tools/testfiles/tbitnopaque_le.ddl
|
||||
./tools/testfiles/tbitnopaque.h5
|
||||
./tools/testfiles/tboot1.ddl
|
||||
./tools/testfiles/tboot2.ddl
|
||||
@ -2079,7 +2080,8 @@
|
||||
./tools/testfiles/tarray6.h5.xml
|
||||
./tools/testfiles/tarray7.h5.xml
|
||||
./tools/testfiles/tattr.h5.xml
|
||||
./tools/testfiles/tbitfields.h5.xml
|
||||
./tools/testfiles/tbitfields_be.h5.xml
|
||||
./tools/testfiles/tbitfields_le.h5.xml
|
||||
./tools/testfiles/tcompound.h5.xml
|
||||
./tools/testfiles/tcompound2.h5.xml
|
||||
./tools/testfiles/tcompound_complex.h5.xml
|
||||
|
@ -35,6 +35,8 @@ To test the installation with the examples;
|
||||
Create a directory to run the examples.
|
||||
Copy HDF5Examples folder to this directory.
|
||||
Copy HDF5_Examples.cmake to this directory.
|
||||
Copy HDF5_Examples_options.cmake to this directory.
|
||||
Copy CTestScript.cmake to this directory.
|
||||
The default source folder is defined as "HDF5Examples". It can be changed
|
||||
with the CTEST_SOURCE_NAME script option.
|
||||
The default installation folder is defined as "@CMAKE_INSTALL_PREFIX@".
|
||||
@ -44,7 +46,7 @@ To test the installation with the examples;
|
||||
be the same as the value used with the -C command line option.
|
||||
The default build configuration is defined to build and use static libraries.
|
||||
Shared libraries can be used with the STATICONLYLIBRARIES script option set to "NO".
|
||||
Other options can be changed by editing the HDF5_Examples.cmake file.
|
||||
Other options can be changed by editing the HDF5_Examples_options.cmake file.
|
||||
|
||||
If the defaults are okay, execute from this directory:
|
||||
ctest -S HDF5_Examples.cmake -C Release -V -O test.log
|
||||
|
@ -2893,7 +2893,8 @@ public class H5 implements java.io.Serializable {
|
||||
* @param file_id
|
||||
* IN: Identifier of the target file.
|
||||
*
|
||||
* @param mdc_logging_status, the status
|
||||
* @param mdc_logging_status
|
||||
* the status
|
||||
* mdc_logging_status[0] = is_enabled, whether logging is enabled
|
||||
* mdc_logging_status[1] = is_currently_logging, whether events are currently being logged
|
||||
*
|
||||
@ -5811,7 +5812,8 @@ public class H5 implements java.io.Serializable {
|
||||
*
|
||||
* @param fapl_id
|
||||
* IN: File access property list identifier
|
||||
* @param mdc_log_options, the options
|
||||
* @param mdc_log_options
|
||||
* the options
|
||||
* mdc_logging_options[0] = is_enabled, whether logging is enabled
|
||||
* mdc_logging_options[1] = start_on_access, whether the logging begins as soon as the file is opened or created
|
||||
*
|
||||
|
@ -350,7 +350,7 @@ h5str_sprintf
|
||||
this_str = (char*)HDmalloc(4 * (nll + 1));
|
||||
|
||||
if (1 == nll) {
|
||||
sprintf(this_str, "0x%02x", ucptr[0]);
|
||||
sprintf(this_str, "%#02x", ucptr[0]);
|
||||
}
|
||||
else {
|
||||
for (i = 0; i < (int)nll; i++)
|
||||
@ -481,7 +481,7 @@ h5str_sprintf
|
||||
this_str = (char*)HDmalloc(4 * (nll + 1));
|
||||
|
||||
if (1 == nll) {
|
||||
sprintf(this_str, "0x%02x", ucptr[0]);
|
||||
sprintf(this_str, "%#02x", ucptr[0]);
|
||||
}
|
||||
else {
|
||||
for (i = 0; i < (int)nll; i++)
|
||||
@ -1051,8 +1051,20 @@ h5str_get_little_endian_type
|
||||
p_type=H5Tcopy(H5T_IEEE_F64LE);
|
||||
break;
|
||||
|
||||
case H5T_TIME:
|
||||
case H5T_BITFIELD:
|
||||
{
|
||||
if ( size == 1)
|
||||
p_type=H5Tcopy(H5T_STD_B8LE);
|
||||
else if ( size == 2)
|
||||
p_type=H5Tcopy(H5T_STD_B16LE);
|
||||
else if ( size == 4)
|
||||
p_type=H5Tcopy(H5T_STD_B32LE);
|
||||
else if ( size == 8)
|
||||
p_type=H5Tcopy(H5T_STD_B64LE);
|
||||
}
|
||||
break;
|
||||
|
||||
case H5T_TIME:
|
||||
case H5T_OPAQUE:
|
||||
case H5T_STRING:
|
||||
case H5T_COMPOUND:
|
||||
@ -1122,8 +1134,20 @@ h5str_get_big_endian_type
|
||||
p_type=H5Tcopy(H5T_IEEE_F64BE);
|
||||
break;
|
||||
|
||||
case H5T_TIME:
|
||||
case H5T_BITFIELD:
|
||||
{
|
||||
if ( size == 1)
|
||||
p_type=H5Tcopy(H5T_STD_B8BE);
|
||||
else if ( size == 2)
|
||||
p_type=H5Tcopy(H5T_STD_B16BE);
|
||||
else if ( size == 4)
|
||||
p_type=H5Tcopy(H5T_STD_B32BE);
|
||||
else if ( size == 8)
|
||||
p_type=H5Tcopy(H5T_STD_B64BE);
|
||||
}
|
||||
break;
|
||||
|
||||
case H5T_TIME:
|
||||
case H5T_OPAQUE:
|
||||
case H5T_STRING:
|
||||
case H5T_COMPOUND:
|
||||
|
@ -198,7 +198,7 @@ H5PL__init_package(void)
|
||||
* to tell the library to load plugin libraries without search.
|
||||
*/
|
||||
if(NULL != (preload_path = HDgetenv("HDF5_PLUGIN_PRELOAD")))
|
||||
/* Special symbal "::" means no plugin during data reading. */
|
||||
/* Special symbol "::" means no plugin during data reading. */
|
||||
if(!HDstrcmp(preload_path, H5PL_NO_PLUGIN))
|
||||
H5PL_plugin_g = 0;
|
||||
|
||||
|
@ -91,7 +91,7 @@ static void table_attrs_free( table_attrs_t *table )
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: table_attr_mark_exist
|
||||
*
|
||||
* Purpose: mark given attribute name to table as sign of exsit
|
||||
* Purpose: mark given attribute name to table as sign of exist
|
||||
*
|
||||
* Parameter:
|
||||
* - exist [IN]
|
||||
@ -322,8 +322,8 @@ hsize_t diff_attr(hid_t loc1_id,
|
||||
hid_t space2_id=-1; /* space ID */
|
||||
hid_t ftype1_id=-1; /* file data type ID */
|
||||
hid_t ftype2_id=-1; /* file data type ID */
|
||||
int vstrtype1=0; /* ftype1 is a variable string */
|
||||
int vstrtype2=0; /* ftype2 is a variable string */
|
||||
int vstrtype1=0; /* ftype1 is a variable string */
|
||||
int vstrtype2=0; /* ftype2 is a variable string */
|
||||
hid_t mtype1_id=-1; /* memory data type ID */
|
||||
hid_t mtype2_id=-1; /* memory data type ID */
|
||||
size_t msize1; /* memory size of memory type */
|
||||
@ -346,7 +346,7 @@ hsize_t diff_attr(hid_t loc1_id,
|
||||
hsize_t nfound_total = 0;
|
||||
int j;
|
||||
|
||||
table_attrs_t * match_list_attrs = NULL;
|
||||
table_attrs_t *match_list_attrs = NULL;
|
||||
if(build_match_list_attrs(loc1_id, loc2_id, &match_list_attrs, options) < 0)
|
||||
goto error;
|
||||
|
||||
@ -395,9 +395,9 @@ hsize_t diff_attr(hid_t loc1_id,
|
||||
continue;
|
||||
}
|
||||
|
||||
if((mtype1_id = h5tools_get_native_type(ftype1_id)) < 0)
|
||||
if((mtype1_id = H5Tget_native_type(ftype1_id, H5T_DIR_DEFAULT)) < 0)
|
||||
goto error;
|
||||
if((mtype2_id = h5tools_get_native_type(ftype2_id)) < 0)
|
||||
if((mtype2_id = H5Tget_native_type(ftype2_id, H5T_DIR_DEFAULT)) < 0)
|
||||
goto error;
|
||||
if((msize1 = H5Tget_size(mtype1_id)) == 0)
|
||||
goto error;
|
||||
|
@ -33,19 +33,14 @@ print_dimensions (int rank, hsize_t *dims)
|
||||
{
|
||||
int i;
|
||||
|
||||
if ( rank <= 0 )
|
||||
{
|
||||
if( rank <= 0 )
|
||||
parallel_print("H5S_SCALAR" );
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
if (!dims)
|
||||
parallel_print("dimension is NULL");
|
||||
else
|
||||
{
|
||||
else {
|
||||
parallel_print("[");
|
||||
for ( i = 0; i < rank-1; i++)
|
||||
{
|
||||
for ( i = 0; i < rank-1; i++) {
|
||||
parallel_print(HSIZE_T_FORMAT, dims[i]);
|
||||
parallel_print("x");
|
||||
}
|
||||
@ -74,91 +69,108 @@ print_dimensions (int rank, hsize_t *dims)
|
||||
*/
|
||||
void print_type(hid_t type)
|
||||
{
|
||||
switch (H5Tget_class(type))
|
||||
{
|
||||
switch (H5Tget_class(type)) {
|
||||
case H5T_INTEGER:
|
||||
if (H5Tequal(type, H5T_STD_I8BE)) {
|
||||
if(H5Tequal(type, H5T_STD_I8BE))
|
||||
parallel_print("H5T_STD_I8BE");
|
||||
} else if (H5Tequal(type, H5T_STD_I8LE)) {
|
||||
else if(H5Tequal(type, H5T_STD_I8LE))
|
||||
parallel_print("H5T_STD_I8LE");
|
||||
} else if (H5Tequal(type, H5T_STD_I16BE)) {
|
||||
else if(H5Tequal(type, H5T_STD_I16BE))
|
||||
parallel_print("H5T_STD_I16BE");
|
||||
} else if (H5Tequal(type, H5T_STD_I16LE)) {
|
||||
else if(H5Tequal(type, H5T_STD_I16LE))
|
||||
parallel_print("H5T_STD_I16LE");
|
||||
} else if (H5Tequal(type, H5T_STD_I32BE)) {
|
||||
else if(H5Tequal(type, H5T_STD_I32BE))
|
||||
parallel_print("H5T_STD_I32BE");
|
||||
} else if (H5Tequal(type, H5T_STD_I32LE)) {
|
||||
else if(H5Tequal(type, H5T_STD_I32LE))
|
||||
parallel_print("H5T_STD_I32LE");
|
||||
} else if (H5Tequal(type, H5T_STD_I64BE)) {
|
||||
else if(H5Tequal(type, H5T_STD_I64BE))
|
||||
parallel_print("H5T_STD_I64BE");
|
||||
} else if (H5Tequal(type, H5T_STD_I64LE)) {
|
||||
else if(H5Tequal(type, H5T_STD_I64LE))
|
||||
parallel_print("H5T_STD_I64LE");
|
||||
} else if (H5Tequal(type, H5T_STD_U8BE)) {
|
||||
else if(H5Tequal(type, H5T_STD_U8BE))
|
||||
parallel_print("H5T_STD_U8BE");
|
||||
} else if (H5Tequal(type, H5T_STD_U8LE)) {
|
||||
else if(H5Tequal(type, H5T_STD_U8LE))
|
||||
parallel_print("H5T_STD_U8LE");
|
||||
} else if (H5Tequal(type, H5T_STD_U16BE)) {
|
||||
else if(H5Tequal(type, H5T_STD_U16BE))
|
||||
parallel_print("H5T_STD_U16BE");
|
||||
} else if (H5Tequal(type, H5T_STD_U16LE)) {
|
||||
else if(H5Tequal(type, H5T_STD_U16LE))
|
||||
parallel_print("H5T_STD_U16LE");
|
||||
} else if (H5Tequal(type, H5T_STD_U32BE)) {
|
||||
else if(H5Tequal(type, H5T_STD_U32BE))
|
||||
parallel_print("H5T_STD_U32BE");
|
||||
} else if (H5Tequal(type, H5T_STD_U32LE)) {
|
||||
else if(H5Tequal(type, H5T_STD_U32LE))
|
||||
parallel_print("H5T_STD_U32LE");
|
||||
} else if (H5Tequal(type, H5T_STD_U64BE)) {
|
||||
else if(H5Tequal(type, H5T_STD_U64BE))
|
||||
parallel_print("H5T_STD_U64BE");
|
||||
} else if (H5Tequal(type, H5T_STD_U64LE)) {
|
||||
else if(H5Tequal(type, H5T_STD_U64LE))
|
||||
parallel_print("H5T_STD_U64LE");
|
||||
} else if (H5Tequal(type, H5T_NATIVE_SCHAR)) {
|
||||
else if(H5Tequal(type, H5T_NATIVE_SCHAR))
|
||||
parallel_print("H5T_NATIVE_SCHAR");
|
||||
} else if (H5Tequal(type, H5T_NATIVE_UCHAR)) {
|
||||
else if(H5Tequal(type, H5T_NATIVE_UCHAR))
|
||||
parallel_print("H5T_NATIVE_UCHAR");
|
||||
} else if (H5Tequal(type, H5T_NATIVE_SHORT)) {
|
||||
else if(H5Tequal(type, H5T_NATIVE_SHORT))
|
||||
parallel_print("H5T_NATIVE_SHORT");
|
||||
} else if (H5Tequal(type, H5T_NATIVE_USHORT)) {
|
||||
else if(H5Tequal(type, H5T_NATIVE_USHORT))
|
||||
parallel_print("H5T_NATIVE_USHORT");
|
||||
} else if (H5Tequal(type, H5T_NATIVE_INT)) {
|
||||
else if(H5Tequal(type, H5T_NATIVE_INT))
|
||||
parallel_print("H5T_NATIVE_INT");
|
||||
} else if (H5Tequal(type, H5T_NATIVE_UINT)) {
|
||||
else if(H5Tequal(type, H5T_NATIVE_UINT))
|
||||
parallel_print("H5T_NATIVE_UINT");
|
||||
} else if (H5Tequal(type, H5T_NATIVE_LONG)) {
|
||||
else if(H5Tequal(type, H5T_NATIVE_LONG))
|
||||
parallel_print("H5T_NATIVE_LONG");
|
||||
} else if (H5Tequal(type, H5T_NATIVE_ULONG)) {
|
||||
else if(H5Tequal(type, H5T_NATIVE_ULONG))
|
||||
parallel_print("H5T_NATIVE_ULONG");
|
||||
} else if (H5Tequal(type, H5T_NATIVE_LLONG)) {
|
||||
else if(H5Tequal(type, H5T_NATIVE_LLONG))
|
||||
parallel_print("H5T_NATIVE_LLONG");
|
||||
} else if (H5Tequal(type, H5T_NATIVE_ULLONG)) {
|
||||
else if(H5Tequal(type, H5T_NATIVE_ULLONG))
|
||||
parallel_print("H5T_NATIVE_ULLONG");
|
||||
} else {
|
||||
else
|
||||
parallel_print("undefined integer");
|
||||
}
|
||||
break;
|
||||
|
||||
case H5T_FLOAT:
|
||||
if (H5Tequal(type, H5T_IEEE_F32BE)) {
|
||||
if(H5Tequal(type, H5T_IEEE_F32BE))
|
||||
parallel_print("H5T_IEEE_F32BE");
|
||||
} else if (H5Tequal(type, H5T_IEEE_F32LE)) {
|
||||
else if(H5Tequal(type, H5T_IEEE_F32LE))
|
||||
parallel_print("H5T_IEEE_F32LE");
|
||||
} else if (H5Tequal(type, H5T_IEEE_F64BE)) {
|
||||
else if(H5Tequal(type, H5T_IEEE_F64BE))
|
||||
parallel_print("H5T_IEEE_F64BE");
|
||||
} else if (H5Tequal(type, H5T_IEEE_F64LE)) {
|
||||
else if(H5Tequal(type, H5T_IEEE_F64LE))
|
||||
parallel_print("H5T_IEEE_F64LE");
|
||||
} else if (H5Tequal(type, H5T_NATIVE_FLOAT)) {
|
||||
else if(H5Tequal(type, H5T_NATIVE_FLOAT))
|
||||
parallel_print("H5T_NATIVE_FLOAT");
|
||||
} else if (H5Tequal(type, H5T_NATIVE_DOUBLE)) {
|
||||
else if(H5Tequal(type, H5T_NATIVE_DOUBLE))
|
||||
parallel_print("H5T_NATIVE_DOUBLE");
|
||||
#if H5_SIZEOF_LONG_DOUBLE !=0
|
||||
} else if (H5Tequal(type, H5T_NATIVE_LDOUBLE)) {
|
||||
else if(H5Tequal(type, H5T_NATIVE_LDOUBLE))
|
||||
parallel_print("H5T_NATIVE_LDOUBLE");
|
||||
#endif
|
||||
} else {
|
||||
else
|
||||
parallel_print("undefined float");
|
||||
}
|
||||
break;
|
||||
|
||||
case H5T_BITFIELD:
|
||||
if(H5Tequal(type, H5T_STD_B8BE))
|
||||
parallel_print("H5T_STD_B8BE");
|
||||
else if(H5Tequal(type, H5T_STD_B8LE))
|
||||
parallel_print("H5T_STD_B8LE");
|
||||
else if(H5Tequal(type, H5T_STD_B16BE))
|
||||
parallel_print("H5T_STD_B16BE");
|
||||
else if(H5Tequal(type, H5T_STD_B16LE))
|
||||
parallel_print("H5T_STD_B16LE");
|
||||
else if(H5Tequal(type, H5T_STD_B32BE))
|
||||
parallel_print("H5T_STD_B32BE");
|
||||
else if(H5Tequal(type, H5T_STD_B32LE))
|
||||
parallel_print("H5T_STD_B32LE");
|
||||
else if(H5Tequal(type, H5T_STD_B64BE))
|
||||
parallel_print("H5T_STD_B64BE");
|
||||
else if(H5Tequal(type, H5T_STD_B64LE))
|
||||
parallel_print("H5T_STD_B64LE");
|
||||
else
|
||||
parallel_print("undefined bitfield");
|
||||
break;
|
||||
|
||||
case H5T_TIME:
|
||||
case H5T_STRING:
|
||||
case H5T_BITFIELD:
|
||||
case H5T_OPAQUE:
|
||||
case H5T_COMPOUND:
|
||||
case H5T_REFERENCE:
|
||||
@ -189,16 +201,16 @@ diff_basename(const char *name)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
if (name == NULL)
|
||||
if(name == NULL)
|
||||
return NULL;
|
||||
|
||||
/* Find the end of the base name */
|
||||
i = HDstrlen(name);
|
||||
while (i > 0 && '/' == name[i - 1])
|
||||
while(i > 0 && '/' == name[i - 1])
|
||||
--i;
|
||||
|
||||
/* Skip backward over base name */
|
||||
while (i > 0 && '/' != name[i - 1])
|
||||
while(i > 0 && '/' != name[i - 1])
|
||||
--i;
|
||||
|
||||
return(name+i);
|
||||
@ -256,7 +268,7 @@ get_type(h5trav_type_t type)
|
||||
H5_ATTR_PURE const char*
|
||||
get_sign(H5T_sign_t sign)
|
||||
{
|
||||
switch (sign)
|
||||
switch(sign)
|
||||
{
|
||||
case H5T_SGN_NONE:
|
||||
return "H5T_SGN_NONE";
|
||||
@ -291,7 +303,7 @@ get_sign(H5T_sign_t sign)
|
||||
H5_ATTR_PURE const char*
|
||||
get_class(H5T_class_t tclass)
|
||||
{
|
||||
switch (tclass) {
|
||||
switch(tclass) {
|
||||
case H5T_TIME:
|
||||
return("H5T_TIME");
|
||||
|
||||
@ -351,24 +363,21 @@ void print_found(hsize_t nfound)
|
||||
|
||||
/*-----------------------------------------------------------------
|
||||
* Function: match_up_memsize
|
||||
*
|
||||
*
|
||||
* Purpose: match smaller memory size up to bigger memory size
|
||||
*------------------------------------------------------------------
|
||||
*/
|
||||
herr_t match_up_memsize (hid_t f_tid1_id, hid_t f_tid2_id,
|
||||
hid_t *m_tid1, hid_t *m_tid2,
|
||||
hid_t *m_tid1, hid_t *m_tid2,
|
||||
size_t *m_size1, size_t *m_size2)
|
||||
{
|
||||
herr_t ret = SUCCEED;
|
||||
|
||||
if( (*m_size1) != (*m_size2) )
|
||||
{
|
||||
if( (*m_size1) < (*m_size2) )
|
||||
{
|
||||
if((*m_size1) != (*m_size2)) {
|
||||
if((*m_size1) < (*m_size2)) {
|
||||
H5Tclose( *m_tid1 );
|
||||
|
||||
if(( (*m_tid1) = h5tools_get_native_type(f_tid2_id)) < 0)
|
||||
{
|
||||
if(((*m_tid1) = H5Tget_native_type(f_tid2_id, H5T_DIR_DEFAULT)) < 0) {
|
||||
ret = FAIL;
|
||||
goto out;
|
||||
}
|
||||
@ -378,8 +387,7 @@ herr_t match_up_memsize (hid_t f_tid1_id, hid_t f_tid2_id,
|
||||
else {
|
||||
H5Tclose(*m_tid2);
|
||||
|
||||
if(( (*m_tid2) = h5tools_get_native_type(f_tid1_id)) < 0)
|
||||
{
|
||||
if(((*m_tid2) = H5Tget_native_type(f_tid1_id, H5T_DIR_DEFAULT)) < 0) {
|
||||
ret = FAIL;
|
||||
goto out;
|
||||
}
|
||||
@ -387,7 +395,7 @@ herr_t match_up_memsize (hid_t f_tid1_id, hid_t f_tid2_id,
|
||||
*m_size2 = H5Tget_size(*m_tid2);
|
||||
} /* end else */
|
||||
} /* end if */
|
||||
HDassert( (*m_size1) == (*m_size2) );
|
||||
HDassert((*m_size1) == (*m_size2));
|
||||
|
||||
out:
|
||||
return ret;
|
||||
|
@ -281,16 +281,16 @@ h5tools_set_attr_output_file(const char *fname, int is_bin)
|
||||
if (fname != NULL) {
|
||||
/* binary output */
|
||||
if (is_bin) {
|
||||
if ((f = HDfopen(fname, "wb")) != NULL) {
|
||||
rawattrstream = f;
|
||||
retvalue = SUCCEED;
|
||||
}
|
||||
if ((f = HDfopen(fname, "wb")) != NULL) {
|
||||
rawattrstream = f;
|
||||
retvalue = SUCCEED;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ((f = HDfopen(fname, "w")) != NULL) {
|
||||
rawattrstream = f;
|
||||
retvalue = SUCCEED;
|
||||
}
|
||||
if ((f = HDfopen(fname, "w")) != NULL) {
|
||||
rawattrstream = f;
|
||||
retvalue = SUCCEED;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -323,26 +323,26 @@ h5tools_set_input_file(const char *fname, int is_bin)
|
||||
if (HDfclose(rawinstream))
|
||||
HDperror("closing rawinstream");
|
||||
else
|
||||
rawinstream = NULL;
|
||||
rawinstream = NULL;
|
||||
}
|
||||
/* First check if filename is string "NULL" */
|
||||
if (fname != NULL) {
|
||||
/* binary output */
|
||||
if (is_bin) {
|
||||
if ((f = HDfopen(fname, "rb")) != NULL) {
|
||||
rawinstream = f;
|
||||
retvalue = SUCCEED;
|
||||
}
|
||||
if ((f = HDfopen(fname, "rb")) != NULL) {
|
||||
rawinstream = f;
|
||||
retvalue = SUCCEED;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ((f = HDfopen(fname, "r")) != NULL) {
|
||||
rawinstream = f;
|
||||
retvalue = SUCCEED;
|
||||
}
|
||||
if ((f = HDfopen(fname, "r")) != NULL) {
|
||||
rawinstream = f;
|
||||
retvalue = SUCCEED;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
rawinstream = NULL;
|
||||
rawinstream = NULL;
|
||||
retvalue = SUCCEED;
|
||||
}
|
||||
|
||||
@ -377,16 +377,16 @@ h5tools_set_output_file(const char *fname, int is_bin)
|
||||
if (fname != NULL) {
|
||||
/* binary output */
|
||||
if (is_bin) {
|
||||
if ((f = HDfopen(fname, "wb")) != NULL) {
|
||||
rawoutstream = f;
|
||||
retvalue = SUCCEED;
|
||||
}
|
||||
if ((f = HDfopen(fname, "wb")) != NULL) {
|
||||
rawoutstream = f;
|
||||
retvalue = SUCCEED;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ((f = HDfopen(fname, "w")) != NULL) {
|
||||
rawoutstream = f;
|
||||
retvalue = SUCCEED;
|
||||
}
|
||||
if ((f = HDfopen(fname, "w")) != NULL) {
|
||||
rawoutstream = f;
|
||||
retvalue = SUCCEED;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -425,21 +425,21 @@ h5tools_set_error_file(const char *fname, int is_bin)
|
||||
/* First check if filename is string "NULL" */
|
||||
if (fname != NULL) {
|
||||
/* binary output */
|
||||
if (is_bin) {
|
||||
if ((f = HDfopen(fname, "wb")) != NULL) {
|
||||
rawerrorstream = f;
|
||||
retvalue = SUCCEED;
|
||||
}
|
||||
if (is_bin) {
|
||||
if ((f = HDfopen(fname, "wb")) != NULL) {
|
||||
rawerrorstream = f;
|
||||
retvalue = SUCCEED;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ((f = HDfopen(fname, "w")) != NULL) {
|
||||
rawerrorstream = f;
|
||||
retvalue = SUCCEED;
|
||||
}
|
||||
}
|
||||
if ((f = HDfopen(fname, "w")) != NULL) {
|
||||
rawerrorstream = f;
|
||||
retvalue = SUCCEED;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
rawerrorstream = NULL;
|
||||
rawerrorstream = NULL;
|
||||
retvalue = SUCCEED;
|
||||
}
|
||||
|
||||
@ -1326,6 +1326,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
|
||||
case H5T_INTEGER:
|
||||
case H5T_FLOAT:
|
||||
case H5T_ENUM:
|
||||
case H5T_BITFIELD:
|
||||
block_index = block_nelmts * size;
|
||||
while(block_index > 0) {
|
||||
size_t bytes_in = 0; /* # of bytes to write */
|
||||
@ -1492,7 +1493,6 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
|
||||
break;
|
||||
|
||||
case H5T_TIME:
|
||||
case H5T_BITFIELD:
|
||||
case H5T_OPAQUE:
|
||||
for (block_index = 0; block_index < block_nelmts; block_index++) {
|
||||
mem = ((unsigned char*)_mem) + block_index * size;
|
||||
|
@ -590,7 +590,6 @@ H5TOOLS_DLL int h5tools_set_output_file(const char *fname, int is_bin);
|
||||
H5TOOLS_DLL int h5tools_set_error_file(const char *fname, int is_bin);
|
||||
H5TOOLS_DLL hid_t h5tools_fopen(const char *fname, unsigned flags, hid_t fapl,
|
||||
const char *driver, char *drivername, size_t drivername_len);
|
||||
H5TOOLS_DLL hid_t h5tools_get_native_type(hid_t type);
|
||||
H5TOOLS_DLL hid_t h5tools_get_little_endian_type(hid_t type);
|
||||
H5TOOLS_DLL hid_t h5tools_get_big_endian_type(hid_t type);
|
||||
H5TOOLS_DLL htri_t h5tools_detect_vlen(hid_t tid);
|
||||
|
@ -1795,7 +1795,7 @@ h5tools_dump_dset(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
|
||||
else if (bin_form == 3)
|
||||
p_type = h5tools_get_big_endian_type(f_type);
|
||||
else
|
||||
p_type = h5tools_get_native_type(f_type);
|
||||
p_type = H5Tget_native_type(f_type, H5T_DIR_DEFAULT);
|
||||
|
||||
if (p_type < 0)
|
||||
goto done;
|
||||
@ -2957,7 +2957,7 @@ h5tools_print_fill_value(h5tools_str_t *buffer/*in,out*/, const h5tool_format_t
|
||||
hid_t n_type;
|
||||
void *buf = NULL;
|
||||
|
||||
n_type = h5tools_get_native_type(type_id);
|
||||
n_type = H5Tget_native_type(type_id, H5T_DIR_DEFAULT);
|
||||
|
||||
size = H5Tget_size(n_type);
|
||||
buf = HDmalloc(size);
|
||||
@ -3785,7 +3785,7 @@ void
|
||||
h5tools_print_packed_bits(h5tools_str_t *buffer, hid_t type)
|
||||
{
|
||||
unsigned packed_bits_size = 0;
|
||||
hid_t n_type = h5tools_get_native_type(type);
|
||||
hid_t n_type = H5Tget_native_type(type, H5T_DIR_DEFAULT);
|
||||
|
||||
if(H5Tget_class(n_type) == H5T_INTEGER) {
|
||||
if(H5Tequal(n_type, H5T_NATIVE_SCHAR) == TRUE)
|
||||
@ -4043,7 +4043,7 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info,
|
||||
unsigned int vl_data = 0; /* contains VL datatypes */
|
||||
|
||||
type = H5Aget_type(obj_id);
|
||||
p_type = h5tools_get_native_type(type);
|
||||
p_type = H5Tget_native_type(type, H5T_DIR_DEFAULT);
|
||||
|
||||
ndims = H5Sget_simple_extent_dims(space, size, NULL);
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1620,7 +1620,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain
|
||||
if(hexdump_g)
|
||||
p_type = H5Tcopy(type);
|
||||
else
|
||||
p_type = h5tools_get_native_type(type);
|
||||
p_type = H5Tget_native_type(type, H5T_DIR_DEFAULT);
|
||||
|
||||
if(p_type >= 0) {
|
||||
/* VL data special information */
|
||||
|
@ -25,7 +25,7 @@ static const char* MapIdToName(hid_t refobj_id,trav_table_t *travt);
|
||||
static int copy_refs_attr(hid_t loc_in, hid_t loc_out, pack_opt_t *options,
|
||||
trav_table_t *travt, hid_t fidout);
|
||||
static herr_t update_ref_value(hid_t obj_id, H5R_type_t ref_type, void *ref_in,
|
||||
hid_t fid_out, void *ref_out, trav_table_t *travt);
|
||||
hid_t fid_out, void *ref_out, trav_table_t *travt);
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: do_copy_refobjs
|
||||
@ -126,8 +126,8 @@ int do_copy_refobjs(hid_t fidin,
|
||||
for(k = 0; k < rank; k++)
|
||||
nelmts *= dims[k];
|
||||
|
||||
if((mtype_id = h5tools_get_native_type(ftype_id)) < 0)
|
||||
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5tools_get_native_type failed");
|
||||
if((mtype_id = H5Tget_native_type(ftype_id, H5T_DIR_DEFAULT)) < 0)
|
||||
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_native_type failed");
|
||||
|
||||
if((msize = H5Tget_size(mtype_id)) == 0)
|
||||
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_size failed");
|
||||
@ -425,13 +425,13 @@ done:
|
||||
* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
|
||||
*
|
||||
* Modifier: xcao@hdfgroup.org, 9/12/2011
|
||||
* Update values of references(object and region) for the following types:
|
||||
* Update values of references(object and region) for the following types:
|
||||
* 1) References,
|
||||
* 2) ARRAY of reference,
|
||||
* 3) VLEN of references.
|
||||
* 4) COMPOUND of references.
|
||||
* This function does not handle references in other complicated structures,
|
||||
* such as references in nested compound datatypes.
|
||||
* such as references in nested compound datatypes.
|
||||
*
|
||||
* Date: October, 28, 2003
|
||||
*
|
||||
@ -472,7 +472,7 @@ static int copy_refs_attr(hid_t loc_in,
|
||||
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info failed");
|
||||
|
||||
for(u = 0; u < (unsigned)oinfo.num_attrs; u++) {
|
||||
is_ref = is_ref_vlen = is_ref_array = is_ref_comp = 0;
|
||||
is_ref = is_ref_vlen = is_ref_array = is_ref_comp = 0;
|
||||
|
||||
/* open attribute */
|
||||
if((attr_id = H5Aopen_by_idx(loc_in, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)u, H5P_DEFAULT, H5P_DEFAULT)) < 0)
|
||||
@ -484,8 +484,8 @@ static int copy_refs_attr(hid_t loc_in,
|
||||
|
||||
type_class = H5Tget_class(ftype_id);
|
||||
|
||||
if((mtype_id = h5tools_get_native_type(ftype_id)) < 0)
|
||||
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5tools_get_native_type failed");
|
||||
if((mtype_id = H5Tget_native_type(ftype_id, H5T_DIR_DEFAULT)) < 0)
|
||||
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_native_type failed");
|
||||
|
||||
if((msize = H5Tget_size(mtype_id)) == 0)
|
||||
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_size failed");
|
||||
@ -528,9 +528,9 @@ static int copy_refs_attr(hid_t loc_in,
|
||||
}
|
||||
H5Tclose(mtid);
|
||||
}
|
||||
|
||||
/* if compound don't contain reference type member, free the above
|
||||
* mallocs. Otherwise there can be memory leaks by the 'continue'
|
||||
|
||||
/* if compound don't contain reference type member, free the above
|
||||
* mallocs. Otherwise there can be memory leaks by the 'continue'
|
||||
* statement below. */
|
||||
if (!ref_comp_field_n) {
|
||||
if (ref_comp_index) {
|
||||
@ -539,7 +539,7 @@ static int copy_refs_attr(hid_t loc_in,
|
||||
}
|
||||
|
||||
if (ref_comp_size) {
|
||||
HDfree(ref_comp_size);
|
||||
HDfree(ref_comp_size);
|
||||
ref_comp_size = NULL;
|
||||
}
|
||||
}
|
||||
@ -588,7 +588,7 @@ static int copy_refs_attr(hid_t loc_in,
|
||||
array_rank = (unsigned)H5Tget_array_ndims(mtype_id);
|
||||
H5Tget_array_dims2(mtype_id, array_dims);
|
||||
for(j = 0; j <array_rank; j++)
|
||||
array_size *= array_dims[j];
|
||||
array_size *= array_dims[j];
|
||||
nelmts *= array_size;
|
||||
}
|
||||
|
||||
@ -648,7 +648,7 @@ static int copy_refs_attr(hid_t loc_in,
|
||||
}
|
||||
} /* H5T_STD_REF_DSETREG */
|
||||
else if (is_ref_vlen) {
|
||||
/* handle VLEN of references */
|
||||
/* handle VLEN of references */
|
||||
|
||||
buf = (hvl_t *)HDmalloc((unsigned)(nelmts * sizeof(hvl_t)));
|
||||
refbuf = buf; /* reuse the read buffer for write */
|
||||
@ -688,7 +688,7 @@ static int copy_refs_attr(hid_t loc_in,
|
||||
}
|
||||
} /* else if (is_ref_vlen) */
|
||||
else if (is_ref_comp) {
|
||||
/* handle ref fields in a compound */
|
||||
/* handle ref fields in a compound */
|
||||
|
||||
buf = HDmalloc((unsigned)(nelmts * msize));
|
||||
refbuf = buf; /* reuse the read buffer for write */
|
||||
@ -728,7 +728,7 @@ static int copy_refs_attr(hid_t loc_in,
|
||||
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Awrite failed");
|
||||
|
||||
if (is_ref_vlen && buf)
|
||||
H5Dvlen_reclaim (mtype_id, space_id, H5P_DEFAULT, buf);
|
||||
H5Dvlen_reclaim (mtype_id, space_id, H5P_DEFAULT, buf);
|
||||
} /* if (nelmts) */
|
||||
|
||||
if (refbuf == buf)
|
||||
@ -780,10 +780,10 @@ done:
|
||||
HDfree(buf);
|
||||
|
||||
if (ref_comp_index)
|
||||
HDfree(ref_comp_index);
|
||||
HDfree(ref_comp_index);
|
||||
|
||||
if (ref_comp_size)
|
||||
HDfree(ref_comp_size);
|
||||
HDfree(ref_comp_size);
|
||||
|
||||
H5E_BEGIN_TRY {
|
||||
H5Tclose(ftype_id);
|
||||
@ -797,9 +797,9 @@ done:
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: MapIdToName
|
||||
* Function: MapIdToName
|
||||
*
|
||||
* Purpose: map a ID from a reference to a dataset name
|
||||
* Purpose: map a ID from a reference to a dataset name
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -832,16 +832,16 @@ out:
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: Update_Ref_value
|
||||
* Function: Update_Ref_value
|
||||
*
|
||||
* Purpose: Update a reference value
|
||||
* Purpose: Update a reference value
|
||||
*
|
||||
* Programmer: xcao@hdfgroup.org 9/12/2011
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t update_ref_value(hid_t obj_id, H5R_type_t ref_type, void *ref_in,
|
||||
hid_t fid_out, void *ref_out, trav_table_t *travt)
|
||||
hid_t fid_out, void *ref_out, trav_table_t *travt)
|
||||
{
|
||||
int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */
|
||||
const char* ref_obj_name;
|
||||
|
@ -33,12 +33,12 @@
|
||||
#define DATASET_COMPRESSED "compressed"
|
||||
#define DATASET_NAMED_VL "named_vl"
|
||||
#define DATASET_NESTED_VL "nested_vl"
|
||||
#define DATASET_ATTR "dset_attr"
|
||||
#define ATTR "attr"
|
||||
#define DATASET_ATTR "dset_attr"
|
||||
#define ATTR "attr"
|
||||
#define GROUP_EMPTY "grp_empty"
|
||||
#define GROUP_DATASETS "grp_dsets"
|
||||
#define GROUP_NESTED "grp_nested"
|
||||
#define GROUP_ATTR "grp_attr"
|
||||
#define GROUP_ATTR "grp_attr"
|
||||
|
||||
/* Obj reference */
|
||||
#define OBJ_REF_DS "Dset1"
|
||||
@ -327,8 +327,8 @@ static void gent_nested_vl(hid_t loc_id)
|
||||
* Function: gent_att_compound_vlstr
|
||||
*
|
||||
* Purpose: Generate a dataset and a group.
|
||||
* Both has an attribute with a compound datatype consisting
|
||||
* of a variable length string
|
||||
* Both has an attribute with a compound datatype consisting
|
||||
* of a variable length string
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -347,7 +347,7 @@ static void gent_att_compound_vlstr(hid_t loc_id)
|
||||
hid_t vl_str_tid = -1; /* Variable length datatype ID */
|
||||
hid_t cmpd_tid = -1; /* Compound datatype ID */
|
||||
hid_t null_sid = -1; /* Null dataspace ID */
|
||||
s1 buf; /* Buffer */
|
||||
s1 buf; /* Buffer */
|
||||
|
||||
buf.i = 9;
|
||||
buf.v = "ThisIsAString";
|
||||
|
@ -381,6 +381,8 @@ CMP_OUTPUT()
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
echo " Expected result (*.ddl) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expect $actual; then
|
||||
echo " PASSED"
|
||||
else
|
||||
|
@ -242,6 +242,8 @@ TOOLTEST() {
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
echo " Expected result (*.ddl) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expect $actual; then
|
||||
echo " PASSED"
|
||||
elif test $h5haveexitcode = 'yes' -a -z "$pmode"; then
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -502,6 +502,8 @@ TOOLTEST() {
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
echo " Expected result (*.ddl) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expect $actual; then
|
||||
echo " PASSED"
|
||||
elif test $h5haveexitcode = 'yes' -a -z "$pmode"; then
|
||||
|
@ -62,7 +62,8 @@
|
||||
${HDF5_TOOLS_DIR}/testfiles/tbin4.ddl
|
||||
${HDF5_TOOLS_DIR}/testfiles/tbinregR.ddl
|
||||
${HDF5_TOOLS_DIR}/testfiles/tbigdims.ddl
|
||||
${HDF5_TOOLS_DIR}/testfiles/tbitnopaque.ddl
|
||||
${HDF5_TOOLS_DIR}/testfiles/tbitnopaque_be.ddl
|
||||
${HDF5_TOOLS_DIR}/testfiles/tbitnopaque_le.ddl
|
||||
${HDF5_TOOLS_DIR}/testfiles/tboot1.ddl
|
||||
${HDF5_TOOLS_DIR}/testfiles/tboot2.ddl
|
||||
${HDF5_TOOLS_DIR}/testfiles/tboot2A.ddl
|
||||
@ -810,8 +811,10 @@
|
||||
tbinregR.out.err
|
||||
tbigdims.out
|
||||
tbigdims.out.err
|
||||
tbitnopaque.out
|
||||
tbitnopaque.out.err
|
||||
tbitnopaque_be.out
|
||||
tbitnopaque_be.out.err
|
||||
tbitnopaque_le.out
|
||||
tbitnopaque_le.out.err
|
||||
tboot1.out
|
||||
tboot1.out.err
|
||||
tboot2.out
|
||||
@ -1172,7 +1175,11 @@
|
||||
ADD_H5_TEST (tcomp-4 0 --enable-error-stack tcompound_complex.h5)
|
||||
ADD_H5_TEST (tcompound_complex2 0 --enable-error-stack tcompound_complex2.h5)
|
||||
# tests for bitfields and opaque data types
|
||||
ADD_H5_TEST (tbitnopaque 0 --enable-error-stack tbitnopaque.h5)
|
||||
if (H5_WORDS_BIGENDIAN)
|
||||
ADD_H5_TEST (tbitnopaque_be 0 --enable-error-stack tbitnopaque.h5)
|
||||
else ()
|
||||
ADD_H5_TEST (tbitnopaque_le 0 --enable-error-stack tbitnopaque.h5)
|
||||
endif ()
|
||||
|
||||
#test for the nested compound type
|
||||
ADD_H5_TEST (tnestcomp-1 0 --enable-error-stack tnestedcomp.h5)
|
||||
|
@ -81,7 +81,8 @@
|
||||
${HDF5_TOOLS_DIR}/testfiles/tarray6.h5.xml
|
||||
${HDF5_TOOLS_DIR}/testfiles/tarray7.h5.xml
|
||||
${HDF5_TOOLS_DIR}/testfiles/tattr.h5.xml
|
||||
${HDF5_TOOLS_DIR}/testfiles/tbitfields.h5.xml
|
||||
${HDF5_TOOLS_DIR}/testfiles/tbitfields_be.h5.xml
|
||||
${HDF5_TOOLS_DIR}/testfiles/tbitfields_le.h5.xml
|
||||
${HDF5_TOOLS_DIR}/testfiles/tcompound_complex.h5.xml
|
||||
${HDF5_TOOLS_DIR}/testfiles/tcompound.h5.xml
|
||||
${HDF5_TOOLS_DIR}/testfiles/tcompound2.h5.xml
|
||||
@ -221,8 +222,10 @@
|
||||
tarray7.h5.out.err
|
||||
tattr.h5.out
|
||||
tattr.h5.out.err
|
||||
tbitfields.h5.out
|
||||
tbitfields.h5.out.err
|
||||
tbitfields_be.h5.out
|
||||
tbitfields_be.h5.out.err
|
||||
tbitfields_le.h5.out
|
||||
tbitfields_le.h5.out.err
|
||||
tcompound.h5.out
|
||||
tcompound.h5.out.err
|
||||
tcompound2.h5.out
|
||||
@ -344,7 +347,11 @@
|
||||
########## test XML
|
||||
ADD_XML_H5_TEST (tall.h5 0 tall.h5)
|
||||
ADD_XML_H5_TEST (tattr.h5 0 tattr.h5)
|
||||
ADD_XML_H5_TEST (tbitfields.h5 0 tbitfields.h5)
|
||||
if (H5_WORDS_BIGENDIAN)
|
||||
ADD_XML_H5_TEST (tbitfields_be.h5 0 tbitfields.h5)
|
||||
else ()
|
||||
ADD_XML_H5_TEST (tbitfields_le.h5 0 tbitfields.h5)
|
||||
endif ()
|
||||
ADD_XML_H5_TEST (tcompound.h5 0 tcompound.h5)
|
||||
ADD_XML_H5_TEST (tcompound2.h5 0 tcompound2.h5)
|
||||
ADD_XML_H5_TEST (tdatareg.h5 0 tdatareg.h5)
|
||||
|
@ -196,6 +196,8 @@ TOOLTEST() {
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
echo " Expected result (*.ddl) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expect $actual > /dev/null 2>&1 ; then
|
||||
echo " PASSED"
|
||||
else
|
||||
|
@ -9717,18 +9717,19 @@ static void gent_bitnopaquefields(void)
|
||||
/* Compound datatype */
|
||||
typedef struct s_t
|
||||
{
|
||||
unsigned char a;
|
||||
unsigned int b;
|
||||
unsigned long c;
|
||||
unsigned long long d;
|
||||
uint8_t a;
|
||||
uint16_t b;
|
||||
uint32_t c;
|
||||
uint64_t d;
|
||||
} s_t;
|
||||
|
||||
hid_t file, grp=-1, type=-1, space=-1, dset=-1;
|
||||
size_t i;
|
||||
hsize_t nelmts = F80_DIM32;
|
||||
unsigned char buf[F80_DIM32]; /* bitfield, opaque */
|
||||
unsigned int buf2[F80_DIM32]; /* bitfield, opaque */
|
||||
unsigned long buf3[F80_DIM32]; /* bitfield, opaque */
|
||||
unsigned long long buf4[F80_DIM32]; /* bitfield, opaque */
|
||||
uint8_t buf[F80_DIM32]; /* bitfield, opaque */
|
||||
uint16_t buf2[F80_DIM32]; /* bitfield, opaque */
|
||||
uint32_t buf3[F80_DIM32]; /* bitfield, opaque */
|
||||
uint64_t buf4[F80_DIM32]; /* bitfield, opaque */
|
||||
s_t buf5[F80_DIM32]; /* compound */
|
||||
|
||||
file = H5Fcreate(FILE80, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
|
||||
@ -9739,7 +9740,7 @@ static void gent_bitnopaquefields(void)
|
||||
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
|
||||
if ((dset = H5Dcreate2(grp, "bitfield_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
|
||||
for (i = 0; i < nelmts; i++) {
|
||||
buf[i] = (unsigned char)0xff ^ (unsigned char)i;
|
||||
buf[i] = (uint8_t)0xff ^ (uint8_t)i;
|
||||
}
|
||||
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
|
||||
H5Dclose(dset);
|
||||
@ -9754,7 +9755,7 @@ static void gent_bitnopaquefields(void)
|
||||
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
|
||||
if ((dset = H5Dcreate2(grp, "bitfield_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
|
||||
for (i = 0; i < nelmts; i++) {
|
||||
buf2[i] = (unsigned int)0xffff ^ (unsigned int)(i * 16);
|
||||
buf2[i] = (uint16_t)0xffff ^ (uint16_t)(i * 16);
|
||||
}
|
||||
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2);
|
||||
H5Dclose(dset);
|
||||
@ -9769,7 +9770,7 @@ static void gent_bitnopaquefields(void)
|
||||
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
|
||||
if ((dset = H5Dcreate2(grp, "bitfield_3", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
|
||||
for (i = 0; i < nelmts; i++) {
|
||||
buf3[i] = (unsigned long)0xffffffff ^ (unsigned long)(i * 32);
|
||||
buf3[i] = (uint32_t)0xffffffff ^ (uint32_t)(i * 32);
|
||||
}
|
||||
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf3);
|
||||
H5Dclose(dset);
|
||||
@ -9784,7 +9785,7 @@ static void gent_bitnopaquefields(void)
|
||||
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
|
||||
if ((dset = H5Dcreate2(grp, "bitfield_4", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
|
||||
for (i = 0; i < nelmts; i++) {
|
||||
buf4[i] = (unsigned long long)0xffffffffffffffff ^ (unsigned long long)(i * 64);
|
||||
buf4[i] = (uint64_t)0xffffffffffffffff ^ (uint64_t)(i * 64);
|
||||
}
|
||||
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf4);
|
||||
H5Dclose(dset);
|
||||
@ -9804,7 +9805,7 @@ static void gent_bitnopaquefields(void)
|
||||
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
|
||||
if ((dset = H5Dcreate2(grp, "opaque_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
|
||||
for(i = 0; i < nelmts; i++)
|
||||
buf[i] = (unsigned char)0xff ^ (unsigned char)i;
|
||||
buf[i] = (uint8_t)0xff ^ (uint8_t)i;
|
||||
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
|
||||
H5Dclose(dset);
|
||||
}
|
||||
@ -9820,7 +9821,7 @@ static void gent_bitnopaquefields(void)
|
||||
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
|
||||
if ((dset = H5Dcreate2(grp, "opaque_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
|
||||
for(i = 0; i < nelmts; i++)
|
||||
buf2[i] = (unsigned int)0xffff ^ (unsigned int)(i * 16);
|
||||
buf2[i] = (uint16_t)0xffff ^ (uint16_t)(i * 16);
|
||||
|
||||
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2);
|
||||
H5Dclose(dset);
|
||||
@ -9843,10 +9844,10 @@ static void gent_bitnopaquefields(void)
|
||||
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
|
||||
if ((dset = H5Dcreate2(grp, "compound_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
|
||||
for(i = 0; i < nelmts; i++) {
|
||||
buf5[i].a = (unsigned char)0xff ^ (unsigned char)i;
|
||||
buf5[i].b = (unsigned int)0xffff ^ (unsigned int)(i * 16);
|
||||
buf5[i].c = (unsigned long)0xffffffff ^ (unsigned long)(i * 32);
|
||||
buf5[i].d = (unsigned long long)0xffffffffffffffff ^ (unsigned long long)(i * 64);
|
||||
buf5[i].a = (uint8_t)0xff ^ (uint8_t)i;
|
||||
buf5[i].b = (uint16_t)0xffff ^ (uint16_t)(i * 16);
|
||||
buf5[i].c = (uint32_t)0xffffffff ^ (uint32_t)(i * 32);
|
||||
buf5[i].d = (uint64_t)0xffffffffffffffff ^ (uint64_t)(i * 64);
|
||||
}
|
||||
|
||||
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf5);
|
||||
|
@ -42,6 +42,8 @@ AWK='awk'
|
||||
# Skip plugin module to test missing filter
|
||||
ENVCMD="env HDF5_PLUGIN_PRELOAD=::"
|
||||
|
||||
WORDS_BIGENDIAN="@WORDS_BIGENDIAN@"
|
||||
|
||||
nerrors=0
|
||||
verbose=yes
|
||||
|
||||
@ -97,6 +99,7 @@ $SRC_H5DUMP_TESTFILES/tattrintsize.h5
|
||||
$SRC_H5DUMP_TESTFILES/tattrreg.h5
|
||||
$SRC_H5DUMP_TESTFILES/tbigdims.h5
|
||||
$SRC_H5DUMP_TESTFILES/tbinary.h5
|
||||
$SRC_H5DUMP_TESTFILES/tbitnopaque.h5
|
||||
$SRC_H5DUMP_TESTFILES/tchar.h5
|
||||
$SRC_H5DUMP_TESTFILES/tcmpdattrintsize.h5
|
||||
$SRC_H5DUMP_TESTFILES/tcmpdintsize.h5
|
||||
@ -217,6 +220,8 @@ $SRC_H5DUMP_TESTFILES/tbin3.ddl
|
||||
$SRC_H5DUMP_TESTFILES/tbin4.ddl
|
||||
$SRC_H5DUMP_TESTFILES/tbinregR.ddl
|
||||
$SRC_H5DUMP_TESTFILES/tbigdims.ddl
|
||||
$SRC_H5DUMP_TESTFILES/tbitnopaque_be.ddl
|
||||
$SRC_H5DUMP_TESTFILES/tbitnopaque_le.ddl
|
||||
$SRC_H5DUMP_TESTFILES/tboot1.ddl
|
||||
$SRC_H5DUMP_TESTFILES/tboot2.ddl
|
||||
$SRC_H5DUMP_TESTFILES/tboot2A.ddl
|
||||
@ -487,6 +492,8 @@ TOOLTEST() {
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
echo " Expected result (*.ddl) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $xCMP $expect $actual > /dev/null 2>&1 ; then
|
||||
echo " PASSED"
|
||||
else
|
||||
@ -529,11 +536,15 @@ TOOLTEST2() {
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
echo " Expected result (*.ddl) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expect $actual; then
|
||||
if [ ! -f $expectdata ]; then
|
||||
# Create the expect data file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actualdata $expectdata
|
||||
echo " Expected data (*.exp) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expectdata $actualdata; then
|
||||
echo " PASSED"
|
||||
else
|
||||
@ -584,16 +595,22 @@ TOOLTEST2A() {
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
echo " Expected result (*.ddl) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expect $actual; then
|
||||
if [ ! -f $expectdata ]; then
|
||||
# Create the expect data file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actualdata $expectdata
|
||||
echo " Expected data (*.exp) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $DIFF $expectdata $actualdata; then
|
||||
if [ ! -f $expectmeta ]; then
|
||||
# Create the expect meta file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actualmeta $expectmeta
|
||||
echo " Expected metafile (*.ddl) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expectmeta $actualmeta; then
|
||||
echo " PASSED"
|
||||
else
|
||||
@ -645,6 +662,8 @@ TOOLTEST2B() {
|
||||
# Create the expect data file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actualdata $expectdata
|
||||
echo " Expected data (*.exp) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expectdata $actualdata; then
|
||||
echo " PASSED"
|
||||
else
|
||||
@ -700,6 +719,8 @@ TOOLTEST3() {
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
echo " Expected result (*.ddl) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expect $actual; then
|
||||
echo " PASSED"
|
||||
else
|
||||
@ -757,15 +778,17 @@ TOOLTEST4() {
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
echo " Expected result (*.ddl) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expect $actual; then
|
||||
if $CMP $expect_err $actual_ext; then
|
||||
echo " PASSED"
|
||||
else
|
||||
echo "*FAILED*"
|
||||
echo " Expected result (*.err) differs from actual result (*.oerr)"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
|
||||
fi
|
||||
else
|
||||
echo "*FAILED*"
|
||||
echo " Expected result (*.err) differs from actual result (*.oerr)"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
|
||||
fi
|
||||
else
|
||||
echo "*FAILED*"
|
||||
echo " Expected result (*.ddl) differs from actual result (*.out)"
|
||||
@ -821,15 +844,17 @@ TOOLTEST5() {
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
echo " Expected result (*.ddl) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expect $actual; then
|
||||
if $CMP $expect_err $actual_ext; then
|
||||
echo " PASSED"
|
||||
else
|
||||
echo "*FAILED*"
|
||||
echo " Expected result (*.err) differs from actual result (*.oerr)"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
|
||||
fi
|
||||
else
|
||||
echo "*FAILED*"
|
||||
echo " Expected result (*.err) differs from actual result (*.oerr)"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
|
||||
fi
|
||||
else
|
||||
echo "*FAILED*"
|
||||
echo " Expected result (*.ddl) differs from actual result (*.out)"
|
||||
@ -863,6 +888,8 @@ TOOLTEST_HELP() {
|
||||
# Create the expect data file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect-CREATED
|
||||
echo " Expected output (*.txt) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expect $actual; then
|
||||
echo " PASSED"
|
||||
else
|
||||
@ -1036,9 +1063,13 @@ TOOLTEST tcomp-2.ddl --enable-error-stack -N /type1 --any_path /type2 --any_path
|
||||
TOOLTEST4 tcomp-3.ddl --enable-error-stack -t /#6632 -g /group2 tcompound.h5
|
||||
# test complicated compound datatype
|
||||
TOOLTEST tcomp-4.ddl --enable-error-stack tcompound_complex.h5
|
||||
TOOLTEST tcompound_complex.ddl --enable-error-stack tcompound_complex2.h5
|
||||
TOOLTEST tcompound_complex2.ddl --enable-error-stack tcompound_complex2.h5
|
||||
# tests for bitfields and opaque data types
|
||||
TOOLTEST tbitnopaque.ddl --enable-error-stack tbitnopaque.h5
|
||||
if test $WORDS_BIGENDIAN != "yes"; then
|
||||
TOOLTEST tbitnopaque_le.ddl --enable-error-stack tbitnopaque.h5
|
||||
else
|
||||
TOOLTEST tbitnopaque_be.ddl --enable-error-stack tbitnopaque.h5
|
||||
fi
|
||||
|
||||
#test for the nested compound type
|
||||
TOOLTEST tnestcomp-1.ddl --enable-error-stack tnestedcomp.h5
|
||||
|
@ -241,6 +241,8 @@ TOOLTEST() {
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
echo " Expected result (*.ddl) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expect $actual; then
|
||||
echo " PASSED"
|
||||
else
|
||||
@ -282,11 +284,15 @@ TOOLTEST2() {
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
echo " Expected result (*.ddl) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expect $actual; then
|
||||
if [ ! -f $expectdata ]; then
|
||||
# Create the expect data file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actualdata $expectdata
|
||||
echo " Expected data (*.exp) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expectdata $actualdata; then
|
||||
echo " PASSED"
|
||||
else
|
||||
@ -348,6 +354,8 @@ TOOLTEST3() {
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
echo " Expected result (*.ddl) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expect $actual; then
|
||||
echo " PASSED"
|
||||
else
|
||||
@ -404,15 +412,17 @@ TOOLTEST4() {
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
echo " Expected result (*.ddl) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expect $actual; then
|
||||
if $CMP $expect_err $actual_ext; then
|
||||
echo " PASSED"
|
||||
else
|
||||
echo "*FAILED*"
|
||||
echo " Expected result (*.err) differs from actual result (*.oerr)"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
|
||||
fi
|
||||
else
|
||||
echo "*FAILED*"
|
||||
echo " Expected result (*.err) differs from actual result (*.oerr)"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
|
||||
fi
|
||||
else
|
||||
echo "*FAILED*"
|
||||
echo " Expected result (*.ddl) differs from actual result (*.out)"
|
||||
|
@ -220,6 +220,8 @@ TOOLTEST() {
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
echo " Expected result (*.ddl) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expect $actual; then
|
||||
echo " PASSED"
|
||||
else
|
||||
@ -261,11 +263,15 @@ TOOLTEST2() {
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
echo " Expected result (*.ddl) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expect $actual; then
|
||||
if [ ! -f $expectdata ]; then
|
||||
# Create the expect data file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actualdata $expectdata
|
||||
echo " Expected data (*.exp) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expectdata $actualdata; then
|
||||
echo " PASSED"
|
||||
else
|
||||
@ -327,6 +333,8 @@ TOOLTEST3() {
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
echo " Expected result (*.ddl) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expect $actual; then
|
||||
echo " PASSED"
|
||||
else
|
||||
|
@ -30,6 +30,8 @@ DIRNAME='dirname'
|
||||
LS='ls'
|
||||
AWK='awk'
|
||||
|
||||
WORDS_BIGENDIAN="@WORDS_BIGENDIAN@"
|
||||
|
||||
nerrors=0
|
||||
verbose=yes
|
||||
|
||||
@ -124,7 +126,8 @@ $SRC_H5DUMP_TESTFILES/tarray3.h5.xml
|
||||
$SRC_H5DUMP_TESTFILES/tarray6.h5.xml
|
||||
$SRC_H5DUMP_TESTFILES/tarray7.h5.xml
|
||||
$SRC_H5DUMP_TESTFILES/tattr.h5.xml
|
||||
$SRC_H5DUMP_TESTFILES/tbitfields.h5.xml
|
||||
$SRC_H5DUMP_TESTFILES/tbitfields_be.h5.xml
|
||||
$SRC_H5DUMP_TESTFILES/tbitfields_le.h5.xml
|
||||
$SRC_H5DUMP_TESTFILES/tcompound_complex.h5.xml
|
||||
$SRC_H5DUMP_TESTFILES/tcompound.h5.xml
|
||||
$SRC_H5DUMP_TESTFILES/tcompound2.h5.xml
|
||||
@ -202,10 +205,10 @@ COPY_TESTFILES_TO_TESTDIR()
|
||||
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
|
||||
INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
|
||||
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
|
||||
$CP -f $tstfile $TESTDIR
|
||||
$CP -f $tstfile $TESTDIR
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: FAILED to copy $tstfile ."
|
||||
|
||||
|
||||
# Comment out this to CREATE expected file
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
@ -263,7 +266,9 @@ TOOLTEST() {
|
||||
if [ ! -f $expect ]; then
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
cp $actual $expect
|
||||
echo " Expected result (*.xml) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expect $actual; then
|
||||
echo " PASSED"
|
||||
else
|
||||
@ -279,7 +284,7 @@ TOOLTEST() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Print a "SKIP" message
|
||||
# Print a "SKIP" message
|
||||
SKIP() {
|
||||
TESTING $DUMPER $@
|
||||
echo " -SKIP-"
|
||||
@ -297,7 +302,11 @@ COPY_TESTFILES_TO_TESTDIR
|
||||
# test XML
|
||||
TOOLTEST tall.h5.xml --xml tall.h5
|
||||
TOOLTEST tattr.h5.xml --xml tattr.h5
|
||||
TOOLTEST tbitfields.h5.xml --xml tbitfields.h5
|
||||
if test $WORDS_BIGENDIAN != "yes"; then
|
||||
TOOLTEST tbitfields_le.h5.xml --xml tbitfields.h5
|
||||
else
|
||||
TOOLTEST tbitfields_be.h5.xml --xml tbitfields.h5
|
||||
fi
|
||||
TOOLTEST tcompound.h5.xml --xml tcompound.h5
|
||||
TOOLTEST tcompound2.h5.xml --xml tcompound2.h5
|
||||
TOOLTEST tdatareg.h5.xml --xml tdatareg.h5
|
||||
@ -345,7 +354,7 @@ TOOLTEST tsaf.h5.xml --xml tsaf.h5
|
||||
TOOLTEST tempty.h5.xml --xml tempty.h5
|
||||
TOOLTEST tnamed_dtype_attr.h5.xml --xml tnamed_dtype_attr.h5
|
||||
##Test dataset and attribute of null space. Commented out:
|
||||
## wait until the XML schema is updated for null space.
|
||||
## wait until the XML schema is updated for null space.
|
||||
##TOOLTEST tnullspace.h5.xml --xml tnulspace.h5
|
||||
|
||||
# other options for xml
|
||||
@ -356,7 +365,7 @@ TOOLTEST tempty-nons.h5.xml --xml -X ":" tempty.h5
|
||||
TOOLTEST tempty-nons-2.h5.xml --xml --xml-ns=":" tempty.h5
|
||||
|
||||
## Some of these combinations are syntactically correct but
|
||||
## the URLs are dummies
|
||||
## the URLs are dummies
|
||||
TOOLTEST tempty-ns.h5.xml --xml -X "thing:" tempty.h5
|
||||
TOOLTEST tempty-ns-2.h5.xml --xml --xml-ns="thing:" tempty.h5
|
||||
TOOLTEST tempty-nons-uri.h5.xml --xml --xml-ns=":" --xml-dtd="http://somewhere.net" tempty.h5
|
||||
|
@ -107,10 +107,10 @@ COPY_TESTFILES_TO_TESTDIR()
|
||||
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
|
||||
INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
|
||||
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
|
||||
$CP -f $tstfile $TESTDIR
|
||||
$CP -f $tstfile $TESTDIR
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: FAILED to copy $tstfile ."
|
||||
|
||||
|
||||
# Comment out this to CREATE expected file
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
@ -154,19 +154,19 @@ SKIP() {
|
||||
echo " -SKIP-"
|
||||
}
|
||||
|
||||
#
|
||||
#
|
||||
# COMPARE_FILES a.h5 b.h5
|
||||
# Compare two files, skipping the first line. This is used to
|
||||
# Compare two files, skipping the first line. This is used to
|
||||
# compare the output of the dumper, skipping the file name which
|
||||
# is different.
|
||||
# The result is stored in 'compval'.
|
||||
#
|
||||
cmpval=0;
|
||||
COMPARE_FILES() {
|
||||
$AWK 'NR > 1' $1 > $1.cmp
|
||||
$AWK 'NR > 1' $2 > $2.cmp
|
||||
$CMP $1.cmp $2.cmp
|
||||
cmpval=$?
|
||||
$AWK 'NR > 1' $1 > $1.cmp
|
||||
$AWK 'NR > 1' $2 > $2.cmp
|
||||
$CMP $1.cmp $2.cmp
|
||||
cmpval=$?
|
||||
rm -f $1.cmp $2.cmp
|
||||
}
|
||||
|
||||
@ -174,10 +174,10 @@ COMPARE_FILES() {
|
||||
# Clean up named files.
|
||||
CLEANUP() {
|
||||
if test -z "$HDF5_NOCLEANUP"; then
|
||||
for i in $*
|
||||
do
|
||||
rm -f $i
|
||||
done
|
||||
for i in $*
|
||||
do
|
||||
rm -f $i
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
@ -190,7 +190,7 @@ CLEANUP() {
|
||||
# the "cat" command.
|
||||
#
|
||||
SETUP() {
|
||||
cat < $1 > $2
|
||||
cat < $1 > $2
|
||||
}
|
||||
|
||||
#
|
||||
@ -233,7 +233,7 @@ CHECKFILE() {
|
||||
}
|
||||
|
||||
#
|
||||
# CHECK_UB file.h5 user_block_file origfile.h5
|
||||
# CHECK_UB file.h5 user_block_file origfile.h5
|
||||
#
|
||||
# Check the user block in 'file.h5' is the same as
|
||||
# 'user_block' (allowing for padding).
|
||||
@ -243,73 +243,73 @@ CHECKFILE() {
|
||||
# and the test file compared to:
|
||||
# cat compare_ub user_block_file.
|
||||
#
|
||||
# This test uses './getub' to extract the user block from
|
||||
# This test uses './getub' to extract the user block from
|
||||
# 'file.h5', which is compared to the file described above.
|
||||
#
|
||||
# The result is set in variable 'result1'.
|
||||
#
|
||||
result1=0;
|
||||
CHECK_UB_1() {
|
||||
hfile="$1"
|
||||
ufile="$2"
|
||||
hfile="$1"
|
||||
ufile="$2"
|
||||
|
||||
# check for third argument (the original file)
|
||||
origfile="";
|
||||
if [ -n "$3" ];
|
||||
then
|
||||
origfile="$3"
|
||||
fi
|
||||
# check for third argument (the original file)
|
||||
origfile="";
|
||||
if [ -n "$3" ];
|
||||
then
|
||||
origfile="$3"
|
||||
fi
|
||||
|
||||
# find the length of the user block to check
|
||||
s1=`cat $ufile | wc -c | sed -e 's/ //g'`
|
||||
if [ "$s1" = "0" ];
|
||||
then
|
||||
echo "File "$ufile" is empty"
|
||||
result1=1;
|
||||
fi
|
||||
# find the length of the user block to check
|
||||
s1=`cat $ufile | wc -c | sed -e 's/ //g'`
|
||||
if [ "$s1" = "0" ];
|
||||
then
|
||||
echo "File "$ufile" is empty"
|
||||
result1=1;
|
||||
fi
|
||||
|
||||
# Get the size of the original user block, if any.
|
||||
if [ -n "$origfile" ];
|
||||
then
|
||||
# 'tellub' calls H5Fget_user_block to get the size
|
||||
# of the user block
|
||||
s2=`$JAM_BIN/tellub $origfile`
|
||||
if [ "$s2" = "0" ];
|
||||
then
|
||||
size=$s1;
|
||||
cmpfile=$ufile
|
||||
else
|
||||
cmpfile="tt2"
|
||||
size=`expr $s2 + $s1`
|
||||
$JAM_BIN/getub -c $s2 $origfile > $cmpfile
|
||||
cat $ufile >> $cmpfile
|
||||
fi
|
||||
else
|
||||
# assume no user block
|
||||
s2="0"
|
||||
size=$s1;
|
||||
cmpfile=$ufile
|
||||
fi
|
||||
# Get the size of the original user block, if any.
|
||||
if [ -n "$origfile" ];
|
||||
then
|
||||
# 'tellub' calls H5Fget_user_block to get the size
|
||||
# of the user block
|
||||
s2=`$JAM_BIN/tellub $origfile`
|
||||
if [ "$s2" = "0" ];
|
||||
then
|
||||
size=$s1;
|
||||
cmpfile=$ufile
|
||||
else
|
||||
cmpfile="tt2"
|
||||
size=`expr $s2 + $s1`
|
||||
$JAM_BIN/getub -c $s2 $origfile > $cmpfile
|
||||
cat $ufile >> $cmpfile
|
||||
fi
|
||||
else
|
||||
# assume no user block
|
||||
s2="0"
|
||||
size=$s1;
|
||||
cmpfile=$ufile
|
||||
fi
|
||||
|
||||
# Extract 'size' bytes from the front of 'hfile'
|
||||
# Compare to 'cmpfile', result is set in result1
|
||||
tfile="tt1"
|
||||
$JAM_BIN/getub -c $size $hfile > $tfile
|
||||
res=`cmp $cmpfile $tfile`
|
||||
if [ "$?" != "0" ];
|
||||
then
|
||||
echo $res
|
||||
result1=1;
|
||||
else
|
||||
result1=0;
|
||||
fi
|
||||
# Extract 'size' bytes from the front of 'hfile'
|
||||
# Compare to 'cmpfile', result is set in result1
|
||||
tfile="tt1"
|
||||
$JAM_BIN/getub -c $size $hfile > $tfile
|
||||
res=`cmp $cmpfile $tfile`
|
||||
if [ "$?" != "0" ];
|
||||
then
|
||||
echo $res
|
||||
result1=1;
|
||||
else
|
||||
result1=0;
|
||||
fi
|
||||
|
||||
# clean up
|
||||
rm -f $tfile
|
||||
if [ "$s2" != "0" ] ;
|
||||
then
|
||||
rm -f $cmpfile
|
||||
fi
|
||||
# clean up
|
||||
rm -f $tfile
|
||||
if [ "$s2" != "0" ] ;
|
||||
then
|
||||
rm -f $cmpfile
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@ -321,25 +321,25 @@ CHECK_UB_1() {
|
||||
result2=0;
|
||||
|
||||
CHECK_NOUB() {
|
||||
hfile="$1"
|
||||
hfile="$1"
|
||||
|
||||
# call 'ubsize' to get the size of the user block
|
||||
ubsize=`$JAM_BIN/tellub $hfile`
|
||||
# call 'ubsize' to get the size of the user block
|
||||
ubsize=`$JAM_BIN/tellub $hfile`
|
||||
|
||||
if [ "$?" != "0" ];
|
||||
then
|
||||
# error
|
||||
result2=1;
|
||||
else
|
||||
if [ "$ubsize" = "0" ];
|
||||
then
|
||||
# pass
|
||||
result2=0;
|
||||
else
|
||||
# fail
|
||||
result2=1;
|
||||
fi
|
||||
fi
|
||||
if [ "$?" != "0" ];
|
||||
then
|
||||
# error
|
||||
result2=1;
|
||||
else
|
||||
if [ "$ubsize" = "0" ];
|
||||
then
|
||||
# pass
|
||||
result2=0;
|
||||
else
|
||||
# fail
|
||||
result2=1;
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# JAMTEST user_block file.h5 [--clobber] [ofile.h5]
|
||||
@ -351,119 +351,119 @@ CHECK_NOUB() {
|
||||
# 3. check the user block is correct in the output (Check_UB)
|
||||
# If the user block is correct, print "PASSED", else "*FAILED*"
|
||||
JAMTEST() {
|
||||
ufile="$1"
|
||||
ifile="$2"
|
||||
compare_test="" # the file to test
|
||||
compare_orig="" # the comparison to test against
|
||||
cleanup=""
|
||||
ufile="$1"
|
||||
ifile="$2"
|
||||
compare_test="" # the file to test
|
||||
compare_orig="" # the comparison to test against
|
||||
cleanup=""
|
||||
|
||||
# sort out the arguments for the test and the check
|
||||
do_clobber="no"
|
||||
if [ "$3" = "--clobber" ];
|
||||
then
|
||||
# clobber overwrites any existing user block
|
||||
do_clobber="yes"
|
||||
clobber="--clobber"
|
||||
compare_orig=""
|
||||
if [ -z "$4" ];
|
||||
then
|
||||
# output goes to infile, compare ubfile to infile
|
||||
ofile=""
|
||||
compare_test="$ifile"
|
||||
else
|
||||
# output goes to $4, compare ofile to ubfile
|
||||
ofile="$4"
|
||||
compare_test="$ofile"
|
||||
fi
|
||||
else
|
||||
clobber=""
|
||||
# add user block to existing ub, if any
|
||||
if [ -z "$3" ];
|
||||
then
|
||||
# output goes to infile, compare ubfile to infile
|
||||
ofile=""
|
||||
compare_test="$ifile"
|
||||
cp $ifile xxofile.h5
|
||||
compare_orig="xxofile.h5"
|
||||
cleanup="$cleanup $compare_orig"
|
||||
else
|
||||
# output goes to $3, compare ofile to ubfile
|
||||
ofile="$3"
|
||||
compare_test="$ofile"
|
||||
compare_orig="$ifile"
|
||||
fi
|
||||
fi
|
||||
# sort out the arguments for the test and the check
|
||||
do_clobber="no"
|
||||
if [ "$3" = "--clobber" ];
|
||||
then
|
||||
# clobber overwrites any existing user block
|
||||
do_clobber="yes"
|
||||
clobber="--clobber"
|
||||
compare_orig=""
|
||||
if [ -z "$4" ];
|
||||
then
|
||||
# output goes to infile, compare ubfile to infile
|
||||
ofile=""
|
||||
compare_test="$ifile"
|
||||
else
|
||||
# output goes to $4, compare ofile to ubfile
|
||||
ofile="$4"
|
||||
compare_test="$ofile"
|
||||
fi
|
||||
else
|
||||
clobber=""
|
||||
# add user block to existing ub, if any
|
||||
if [ -z "$3" ];
|
||||
then
|
||||
# output goes to infile, compare ubfile to infile
|
||||
ofile=""
|
||||
compare_test="$ifile"
|
||||
cp $ifile xxofile.h5
|
||||
compare_orig="xxofile.h5"
|
||||
cleanup="$cleanup $compare_orig"
|
||||
else
|
||||
# output goes to $3, compare ofile to ubfile
|
||||
ofile="$3"
|
||||
compare_test="$ofile"
|
||||
compare_orig="$ifile"
|
||||
fi
|
||||
fi
|
||||
|
||||
# call 'jam' with the appropriate arguments
|
||||
if [ -n "$ofile" ];
|
||||
then
|
||||
TESTING h5jam -u `basename $ufile` -i `basename $ifile` -o `basename $ofile` $clobber
|
||||
$JAM_BIN/$JAM -u $ufile -i $ifile -o $ofile $clobber
|
||||
else
|
||||
TESTING jam -u `basename $ufile` -i `basename $ifile` $clobber
|
||||
$JAM_BIN/$JAM -u $ufile -i $ifile $clobber
|
||||
fi
|
||||
# call 'jam' with the appropriate arguments
|
||||
if [ -n "$ofile" ];
|
||||
then
|
||||
TESTING h5jam -u `basename $ufile` -i `basename $ifile` -o `basename $ofile` $clobber
|
||||
$JAM_BIN/$JAM -u $ufile -i $ifile -o $ofile $clobber
|
||||
else
|
||||
TESTING jam -u `basename $ufile` -i `basename $ifile` $clobber
|
||||
$JAM_BIN/$JAM -u $ufile -i $ifile $clobber
|
||||
fi
|
||||
|
||||
#echo "CHECK_UB_1 $compare_test $ufile $compare_orig"
|
||||
CHECK_UB_1 $compare_test $ufile $compare_orig
|
||||
#echo "CHECK_UB_1 $compare_test $ufile $compare_orig"
|
||||
CHECK_UB_1 $compare_test $ufile $compare_orig
|
||||
|
||||
if [ "$result1" = "0" ] ;
|
||||
then
|
||||
echo " PASSED"
|
||||
else
|
||||
echo " *FAILED*"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
fi
|
||||
CLEANUP $cleanup
|
||||
if [ "$result1" = "0" ] ;
|
||||
then
|
||||
echo " PASSED"
|
||||
else
|
||||
echo " *FAILED*"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
fi
|
||||
CLEANUP $cleanup
|
||||
}
|
||||
|
||||
|
||||
# UNJAMTEST file.h5 [- | --delete] ofile
|
||||
#
|
||||
# Test the 'unjam' tool
|
||||
#
|
||||
###fix the working directory here and in jamtest
|
||||
UNJAMTEST () {
|
||||
infile="$1"
|
||||
ofile="$3"
|
||||
if [ "$2" = "-" ];
|
||||
then
|
||||
uofile="uofile"
|
||||
TESTING h5unjam -i `basename $infile` -o `basename $ofile` "> "`basename $uofile`
|
||||
$JAM_BIN/$UNJAM -i $infile -o $ofile > $uofile
|
||||
else
|
||||
if [ "$2" = "--delete" ];
|
||||
then
|
||||
uofile="none"
|
||||
TESTING h5unjam -i `basename $infile` -o `basename $ofile` --delete
|
||||
$JAM_BIN/$UNJAM -i $infile -o $ofile --delete
|
||||
infile="$1"
|
||||
ofile="$3"
|
||||
if [ "$2" = "-" ];
|
||||
then
|
||||
uofile="uofile"
|
||||
TESTING h5unjam -i `basename $infile` -o `basename $ofile` "> "`basename $uofile`
|
||||
$JAM_BIN/$UNJAM -i $infile -o $ofile > $uofile
|
||||
else
|
||||
if [ "$2" = "--delete" ];
|
||||
then
|
||||
uofile="none"
|
||||
TESTING h5unjam -i `basename $infile` -o `basename $ofile` --delete
|
||||
$JAM_BIN/$UNJAM -i $infile -o $ofile --delete
|
||||
|
||||
else
|
||||
uofile="$2"
|
||||
TESTING h5unjam -i `basename $infile` -u `basename $uofile` -o `basename $ofile`
|
||||
$JAM_BIN/$UNJAM -i $infile -u $uofile -o $ofile
|
||||
fi
|
||||
fi
|
||||
else
|
||||
uofile="$2"
|
||||
TESTING h5unjam -i `basename $infile` -u `basename $uofile` -o `basename $ofile`
|
||||
$JAM_BIN/$UNJAM -i $infile -u $uofile -o $ofile
|
||||
fi
|
||||
fi
|
||||
|
||||
result1=0
|
||||
result2=0
|
||||
cleanup=""
|
||||
if [ "$uofile" != "none" ];
|
||||
then
|
||||
# sets result1
|
||||
CHECK_UB_1 $infile $uofile
|
||||
CLEANUP $uofile
|
||||
fi
|
||||
result1=0
|
||||
result2=0
|
||||
cleanup=""
|
||||
if [ "$uofile" != "none" ];
|
||||
then
|
||||
# sets result1
|
||||
CHECK_UB_1 $infile $uofile
|
||||
CLEANUP $uofile
|
||||
fi
|
||||
|
||||
# sets result2
|
||||
CHECK_NOUB $ofile
|
||||
# sets result2
|
||||
CHECK_NOUB $ofile
|
||||
|
||||
if [ "$result1" = "0" -a "$result2" = "0" ];
|
||||
then
|
||||
echo " PASSED"
|
||||
else
|
||||
echo " *FAILED*"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
fi
|
||||
if [ "$result1" = "0" -a "$result2" = "0" ];
|
||||
then
|
||||
echo " PASSED"
|
||||
else
|
||||
echo " *FAILED*"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@ -500,28 +500,30 @@ TOOLTEST_OUTPUT() {
|
||||
STDOUT_FILTER $actual
|
||||
cp $actual_err $actual_err_sav
|
||||
STDERR_FILTER $actual_err
|
||||
# combine stderr to stdout for output compare
|
||||
# combine stderr to stdout for output compare
|
||||
cat $actual_err >> $actual
|
||||
|
||||
if [ ! -f $expect ]; then
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
rm -f $actual $actual_sav $actual_err $actual_err_sav
|
||||
echo " Expected result (*.ls) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
rm -f $actual $actual_sav $actual_err $actual_err_sav
|
||||
elif $CMP $expect $actual; then
|
||||
echo " PASSED"
|
||||
rm -f $actual $actual_sav $actual_err $actual_err_sav
|
||||
rm -f $actual $actual_sav $actual_err $actual_err_sav
|
||||
else
|
||||
echo "*FAILED*"
|
||||
echo " Expected result differs from actual result"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
echo " Expected result differs from actual result"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
|
||||
fi
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
##############################################################################
|
||||
### T H E T E S T S ###
|
||||
### T H E T E S T S ###
|
||||
##############################################################################
|
||||
##############################################################################
|
||||
# prepare for test
|
||||
@ -550,19 +552,19 @@ CHECKFILE $TESTDIR/tall.h5 ta5.h5
|
||||
CLEANUP ta5.h5
|
||||
|
||||
SETUP $TESTDIR/tall.h5 ta6.h5
|
||||
JAMTEST $TESTDIR/u10.txt ta6.h5
|
||||
JAMTEST $TESTDIR/u10.txt ta6.h5
|
||||
CHECKFILE $TESTDIR/tall.h5 ta6.h5
|
||||
CLEANUP ta6.h5
|
||||
SETUP $TESTDIR/tall.h5 ta7.h5
|
||||
JAMTEST $TESTDIR/u511.txt ta7.h5
|
||||
JAMTEST $TESTDIR/u511.txt ta7.h5
|
||||
CHECKFILE $TESTDIR/tall.h5 ta7.h5
|
||||
CLEANUP ta7.h5
|
||||
SETUP $TESTDIR/tall.h5 ta8.h5
|
||||
JAMTEST $TESTDIR/u512.txt ta8.h5
|
||||
JAMTEST $TESTDIR/u512.txt ta8.h5
|
||||
CHECKFILE $TESTDIR/tall.h5 ta8.h5
|
||||
CLEANUP ta8.h5
|
||||
SETUP $TESTDIR/tall.h5 ta9.h5
|
||||
JAMTEST $TESTDIR/u513.txt ta9.h5
|
||||
JAMTEST $TESTDIR/u513.txt ta9.h5
|
||||
CHECKFILE $TESTDIR/tall.h5 ta9.h5
|
||||
CLEANUP ta9.h5
|
||||
|
||||
@ -592,29 +594,29 @@ JAMTEST $TESTDIR/u513.txt $TESTDIR/twithub513.h5 tax9.h5
|
||||
CHECKFILE $TESTDIR/tall.h5 tax9.h5
|
||||
CLEANUP tax9.h5
|
||||
|
||||
JAMTEST $TESTDIR/u10.txt $TESTDIR/twithub.h5 --clobber taz2.h5
|
||||
JAMTEST $TESTDIR/u10.txt $TESTDIR/twithub.h5 --clobber taz2.h5
|
||||
CHECKFILE $TESTDIR/tall.h5 taz2.h5
|
||||
CLEANUP taz2.h5
|
||||
JAMTEST $TESTDIR/u511.txt $TESTDIR/twithub.h5 --clobber taz3.h5
|
||||
CHECKFILE $TESTDIR/tall.h5 taz3.h5
|
||||
CLEANUP taz3.h5
|
||||
JAMTEST $TESTDIR/u512.txt $TESTDIR/twithub.h5 --clobber taz4.h5
|
||||
JAMTEST $TESTDIR/u512.txt $TESTDIR/twithub.h5 --clobber taz4.h5
|
||||
CHECKFILE $TESTDIR/tall.h5 taz4.h5
|
||||
CLEANUP taz4.h5
|
||||
JAMTEST $TESTDIR/u513.txt $TESTDIR/twithub.h5 --clobber taz5.h5
|
||||
JAMTEST $TESTDIR/u513.txt $TESTDIR/twithub.h5 --clobber taz5.h5
|
||||
CHECKFILE $TESTDIR/tall.h5 taz5.h5
|
||||
CLEANUP taz5.h5
|
||||
|
||||
JAMTEST $TESTDIR/u10.txt $TESTDIR/twithub513.h5 --clobber taz6.h5
|
||||
JAMTEST $TESTDIR/u10.txt $TESTDIR/twithub513.h5 --clobber taz6.h5
|
||||
CHECKFILE $TESTDIR/tall.h5 taz6.h5
|
||||
CLEANUP taz6.h5
|
||||
JAMTEST $TESTDIR/u511.txt $TESTDIR/twithub513.h5 --clobber taz7.h5
|
||||
CHECKFILE $TESTDIR/tall.h5 taz7.h5
|
||||
CLEANUP taz7.h5
|
||||
JAMTEST $TESTDIR/u512.txt $TESTDIR/twithub513.h5 --clobber taz8.h5
|
||||
JAMTEST $TESTDIR/u512.txt $TESTDIR/twithub513.h5 --clobber taz8.h5
|
||||
CHECKFILE $TESTDIR/tall.h5 taz8.h5
|
||||
CLEANUP taz8.h5
|
||||
JAMTEST $TESTDIR/u513.txt $TESTDIR/twithub513.h5 --clobber taz9.h5
|
||||
JAMTEST $TESTDIR/u513.txt $TESTDIR/twithub513.h5 --clobber taz9.h5
|
||||
CHECKFILE $TESTDIR/tall.h5 taz9.h5
|
||||
CLEANUP taz9.h5
|
||||
|
||||
@ -653,7 +655,7 @@ CHECKFILE $TESTDIR/tall.h5 tay9.h5
|
||||
CLEANUP tay9.h5
|
||||
|
||||
#---------------------------------
|
||||
# Testing h5unjam
|
||||
# Testing h5unjam
|
||||
#---------------------------------
|
||||
# help page
|
||||
TOOLTEST_OUTPUT UNJAM h5unjam-help.txt 0 -h
|
||||
|
@ -47,6 +47,7 @@ libdynlibls.la: $(libdynlibls_la_OBJECTS) $(libdynlibls_la_DEPENDENCIES) $(EXTRA
|
||||
# $(RM) $(DESTDIR)$(dyndir)/*dynlib*
|
||||
endif
|
||||
|
||||
|
||||
DISTCLEANFILES=h5ls_plugin.sh
|
||||
|
||||
include $(top_srcdir)/config/conclude.am
|
||||
|
@ -184,7 +184,7 @@ TOOLTEST() {
|
||||
# any unexpected output from that stream too.
|
||||
TESTING $H5LS $@
|
||||
(
|
||||
cd $TESTDIR
|
||||
cd $TESTDIR
|
||||
$ENVCMD $RUNSERIAL $H5LS_BIN "$@"
|
||||
) >$actual 2>$actual_err
|
||||
|
||||
@ -196,31 +196,33 @@ TOOLTEST() {
|
||||
STDERR_FILTER $actual_err
|
||||
cat $actual_err >> $actual
|
||||
if [ $h5haveexitcode = 'yes' -a $exitcode -ne $retvalexpect ]; then
|
||||
echo "*FAILED*"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
if [ yes = "$verbose" ]; then
|
||||
echo "test returned with exit code $exitcode"
|
||||
echo "test output: (up to $NLINES lines)"
|
||||
head -$NLINES $actual
|
||||
echo "***end of test output***"
|
||||
echo ""
|
||||
fi
|
||||
echo "*FAILED*"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
if [ yes = "$verbose" ]; then
|
||||
echo "test returned with exit code $exitcode"
|
||||
echo "test output: (up to $NLINES lines)"
|
||||
head -$NLINES $actual
|
||||
echo "***end of test output***"
|
||||
echo ""
|
||||
fi
|
||||
elif [ ! -f $expect ]; then
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
echo " Expected result (*.ls) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expect $actual; then
|
||||
echo " PASSED"
|
||||
else
|
||||
echo "*FAILED*"
|
||||
echo " Expected result differs from actual result"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
|
||||
echo " Expected result differs from actual result"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
|
||||
fi
|
||||
|
||||
# Clean up output file
|
||||
if test -z "$HDF5_NOCLEANUP"; then
|
||||
rm -f $actual $actual_err $actual_sav $actual_err_sav
|
||||
rm -f $actual $actual_err $actual_sav $actual_err_sav
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -181,7 +181,7 @@ COPY_TESTFILES_TO_TESTDIR()
|
||||
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
|
||||
INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
|
||||
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
|
||||
$CP -f $tstfile $TESTDIR
|
||||
$CP -f $tstfile $TESTDIR
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: FAILED to copy $tstfile ."
|
||||
|
||||
@ -239,7 +239,7 @@ TOOLTEST() {
|
||||
# any unexpected output from that stream too.
|
||||
TESTING $H5LS $@
|
||||
(
|
||||
cd $TESTDIR
|
||||
cd $TESTDIR
|
||||
$RUNSERIAL $H5LS_BIN "$@"
|
||||
) >$actual 2>$actual_err
|
||||
|
||||
@ -251,37 +251,39 @@ TOOLTEST() {
|
||||
STDERR_FILTER $actual_err
|
||||
cat $actual_err >> $actual
|
||||
if [ $h5haveexitcode = 'yes' -a $exitcode -ne $retvalexpect ]; then
|
||||
echo "*FAILED*"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
if [ yes = "$verbose" ]; then
|
||||
echo "test returned with exit code $exitcode"
|
||||
echo "test output: (up to $NLINES lines)"
|
||||
head -$NLINES $actual
|
||||
echo "***end of test output***"
|
||||
echo ""
|
||||
fi
|
||||
echo "*FAILED*"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
if [ yes = "$verbose" ]; then
|
||||
echo "test returned with exit code $exitcode"
|
||||
echo "test output: (up to $NLINES lines)"
|
||||
head -$NLINES $actual
|
||||
echo "***end of test output***"
|
||||
echo ""
|
||||
fi
|
||||
elif [ ! -f $expect ]; then
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
echo " Expected result (*.ls) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expect $actual; then
|
||||
echo " PASSED"
|
||||
else
|
||||
echo "*FAILED*"
|
||||
echo " Expected result differs from actual result"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
|
||||
echo " Expected result differs from actual result"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
|
||||
fi
|
||||
|
||||
# Clean up output file
|
||||
if test -z "$HDF5_NOCLEANUP"; then
|
||||
rm -f $actual $actual_err $actual_sav $actual_err_sav
|
||||
rm -f $actual $actual_err $actual_sav $actual_err_sav
|
||||
fi
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
##############################################################################
|
||||
### T H E T E S T S ###
|
||||
### T H E T E S T S ###
|
||||
##############################################################################
|
||||
##############################################################################
|
||||
# prepare for test
|
||||
|
@ -187,7 +187,7 @@ TOOLTEST() {
|
||||
# any unexpected output from that stream too.
|
||||
TESTING $H5LS $@
|
||||
(
|
||||
cd $TESTDIR
|
||||
cd $TESTDIR
|
||||
$RUNSERIAL $H5LS_BIN "$@"
|
||||
) >$actual 2>$actual_err
|
||||
|
||||
@ -199,37 +199,39 @@ TOOLTEST() {
|
||||
STDERR_FILTER $actual_err
|
||||
cat $actual_err >> $actual
|
||||
if [ $h5haveexitcode = 'yes' -a $exitcode -ne $retvalexpect ]; then
|
||||
echo "*FAILED*"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
if [ yes = "$verbose" ]; then
|
||||
echo "test returned with exit code $exitcode"
|
||||
echo "test output: (up to $NLINES lines)"
|
||||
head -$NLINES $actual
|
||||
echo "***end of test output***"
|
||||
echo ""
|
||||
fi
|
||||
echo "*FAILED*"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
if [ yes = "$verbose" ]; then
|
||||
echo "test returned with exit code $exitcode"
|
||||
echo "test output: (up to $NLINES lines)"
|
||||
head -$NLINES $actual
|
||||
echo "***end of test output***"
|
||||
echo ""
|
||||
fi
|
||||
elif [ ! -f $expect ]; then
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
echo " Expected result (*.ls) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expect $actual; then
|
||||
echo " PASSED"
|
||||
else
|
||||
echo "*FAILED*"
|
||||
echo " Expected result differs from actual result"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
|
||||
echo " Expected result differs from actual result"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
|
||||
fi
|
||||
|
||||
# Clean up output file
|
||||
if test -z "$HDF5_NOCLEANUP"; then
|
||||
rm -f $actual $actual_err $actual_sav $actual_err_sav
|
||||
rm -f $actual $actual_err $actual_sav $actual_err_sav
|
||||
fi
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
##############################################################################
|
||||
### T H E T E S T S ###
|
||||
### T H E T E S T S ###
|
||||
##############################################################################
|
||||
##############################################################################
|
||||
# prepare for test
|
||||
|
@ -60,6 +60,7 @@ libdynlibvers.la: $(libdynlibvers_la_OBJECTS) $(libdynlibvers_la_DEPENDENCIES) $
|
||||
# $(RM) $(DESTDIR)$(dyndir)/*dynlib*
|
||||
endif
|
||||
|
||||
|
||||
# Temporary files. *.h5 are generated by h5repack. They should
|
||||
# copied to the testfiles/ directory if update is required.
|
||||
CHECK_CLEANFILES+=*.h5 *.bin testfiles/h5diff_attr1.h5 testfiles/tfamily*.h5
|
||||
|
@ -179,7 +179,7 @@ COPY_TESTFILES_TO_TESTDIR()
|
||||
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
|
||||
INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
|
||||
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
|
||||
$CP -f $tstfile $TESTDIR
|
||||
$CP -f $tstfile $TESTDIR
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: FAILED to copy $tstfile ."
|
||||
|
||||
@ -375,6 +375,8 @@ VERIFY_LAYOUT_VDS()
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
echo " Expected result (*.ddl) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expect $actual > /dev/null 2>&1 ; then
|
||||
echo " PASSED"
|
||||
else
|
||||
@ -386,7 +388,7 @@ VERIFY_LAYOUT_VDS()
|
||||
|
||||
# Clean up output file
|
||||
if test -z "$HDF5_NOCLEANUP"; then
|
||||
rm -f $actual $actual_err
|
||||
rm -f $actual $actual_err
|
||||
fi
|
||||
|
||||
# clean up tmp files
|
||||
@ -541,11 +543,11 @@ TOOLTEST1()
|
||||
)
|
||||
RET=$?
|
||||
if [ $RET != 0 ] ; then
|
||||
echo "*FAILED*"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
echo "*FAILED*"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
else
|
||||
echo " PASSED"
|
||||
DIFFTEST $infile $outfile
|
||||
echo " PASSED"
|
||||
DIFFTEST $infile $outfile
|
||||
fi
|
||||
rm -f $outfile
|
||||
}
|
||||
@ -572,11 +574,11 @@ TOOLTESTV()
|
||||
) >$actual 2>$actual_err
|
||||
RET=$?
|
||||
if [ $RET != 0 ] ; then
|
||||
echo "*FAILED*"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
echo "*FAILED*"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
else
|
||||
echo " PASSED"
|
||||
DIFFTEST $infile $outfile
|
||||
echo " PASSED"
|
||||
DIFFTEST $infile $outfile
|
||||
fi
|
||||
|
||||
# display output compare
|
||||
@ -637,6 +639,8 @@ TOOLTESTM() {
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
echo " Expected result (*.tst) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expect $actual; then
|
||||
echo " PASSED"
|
||||
else
|
||||
@ -648,7 +652,7 @@ TOOLTESTM() {
|
||||
|
||||
# Clean up output file
|
||||
if test -z "$HDF5_NOCLEANUP"; then
|
||||
rm -f $actual $actual_err $actual_sav $actual_err_sav
|
||||
rm -f $actual $actual_err $actual_sav $actual_err_sav
|
||||
fi
|
||||
|
||||
}
|
||||
@ -762,11 +766,11 @@ TOOLTEST_META()
|
||||
# verify sizes.
|
||||
MESSAGE "Verify the sizes of both output files ($size1 vs $size2)"
|
||||
if [ $size1 -lt $size2 ]; then
|
||||
# pass
|
||||
echo " PASSED"
|
||||
# pass
|
||||
echo " PASSED"
|
||||
else
|
||||
#fail
|
||||
echo "*FAILED*"
|
||||
#fail
|
||||
echo "*FAILED*"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
fi
|
||||
|
||||
@ -793,6 +797,8 @@ TOOLTEST_HELP() {
|
||||
# Create the expect data file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect-CREATED
|
||||
echo " Expected result (*.txt) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif cmp -s $expect $actual; then
|
||||
echo " PASSED"
|
||||
else
|
||||
@ -840,7 +846,7 @@ USE_FILTER_SZIP_ENCODER=`$RUNSERIAL $H5DETECTSZIP_BIN`
|
||||
fi
|
||||
|
||||
##############################################################################
|
||||
### T H E T E S T S
|
||||
### T H E T E S T S
|
||||
##############################################################################
|
||||
# prepare for test
|
||||
COPY_TESTFILES_TO_TESTDIR
|
||||
@ -1229,7 +1235,7 @@ TOOLTEST_META meta_long h5repack_layout.h5 --metadata_block_size=8192
|
||||
if test $USE_FILTER_DEFLATE != "yes" ; then
|
||||
SKIP vds_dset_chunk_20x10x5
|
||||
else
|
||||
VERIFY_LAYOUT_VDS vds_dset_chunk_20x10x5 1_vds.h5 vds_dset CHUNKED --layout vds_dset:CHUNK=20x10x5
|
||||
VERIFY_LAYOUT_VDS vds_dset_chunk20x10x5 1_vds.h5 vds_dset CHUNKED --layout vds_dset:CHUNK=20x10x5
|
||||
fi
|
||||
|
||||
if test $USE_FILTER_DEFLATE != "yes" ; then
|
||||
|
@ -14,8 +14,8 @@
|
||||
# Tests for the h5stat tool
|
||||
#
|
||||
# Modifcations:
|
||||
# Vailin Choi; July 2013
|
||||
# Add tests for -l, -m, -a options
|
||||
# Vailin Choi; July 2013
|
||||
# Add tests for -l, -m, -a options
|
||||
#
|
||||
|
||||
srcdir=@srcdir@
|
||||
@ -132,10 +132,10 @@ COPY_TESTFILES_TO_TESTDIR()
|
||||
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
|
||||
INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
|
||||
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
|
||||
$CP -f $tstfile $TESTDIR
|
||||
$CP -f $tstfile $TESTDIR
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: FAILED to copy $tstfile ."
|
||||
|
||||
|
||||
# Comment out this to CREATE expected file
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
@ -199,9 +199,11 @@ TOOLTEST() {
|
||||
cat $actual_err >> $actual
|
||||
|
||||
if [ ! -f $expect ]; then
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
echo " Expected result (*.ddl) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expect $actual; then
|
||||
echo " PASSED"
|
||||
else
|
||||
@ -220,15 +222,15 @@ TOOLTEST() {
|
||||
|
||||
# Print a "SKIP" message
|
||||
SKIP() {
|
||||
TESTING $STAT $@
|
||||
echo " -SKIP-"
|
||||
TESTING $STAT $@
|
||||
echo " -SKIP-"
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
##############################################################################
|
||||
##############################################################################
|
||||
### T H E T E S T S ###
|
||||
### T H E T E S T S ###
|
||||
##############################################################################
|
||||
##############################################################################
|
||||
# prepare for test
|
||||
@ -252,7 +254,7 @@ TOOLTEST h5stat_filters-dT.ddl -dT h5stat_filters.h5
|
||||
TOOLTEST h5stat_filters-UD.ddl -D h5stat_filters.h5
|
||||
TOOLTEST h5stat_filters-UT.ddl -T h5stat_filters.h5
|
||||
#
|
||||
# h5stat_tsohm.h5 is a copy of ../../../test/tsohm.h5 generated by tsohm.c
|
||||
# h5stat_tsohm.h5 is a copy of ../../../test/tsohm.h5 generated by tsohm.c
|
||||
# as of release 1.8.7-snap0 (on a 64-bit machine)
|
||||
TOOLTEST h5stat_tsohm.ddl h5stat_tsohm.h5
|
||||
# h5stat_newgrat.h5 is generated by h5stat_gentest.c
|
||||
@ -262,36 +264,36 @@ TOOLTEST h5stat_newgrat-UA.ddl -A h5stat_newgrat.h5
|
||||
# h5stat_idx.h5 is generated by h5stat_gentest.c
|
||||
TOOLTEST h5stat_idx.ddl h5stat_idx.h5
|
||||
#
|
||||
# Tests for -l (--links) option on h5stat_threshold.h5:
|
||||
# -l 0 (incorrect threshold value)
|
||||
# -g -l 8
|
||||
# --links=8
|
||||
# --links=20 -g
|
||||
# Tests for -l (--links) option on h5stat_threshold.h5:
|
||||
# -l 0 (incorrect threshold value)
|
||||
# -g -l 8
|
||||
# --links=8
|
||||
# --links=20 -g
|
||||
TOOLTEST h5stat_err1_links.ddl -l 0 h5stat_threshold.h5
|
||||
TOOLTEST h5stat_links1.ddl -g -l 8 h5stat_threshold.h5
|
||||
TOOLTEST h5stat_links2.ddl --links=8 h5stat_threshold.h5
|
||||
TOOLTEST h5stat_links3.ddl --links=20 -g h5stat_threshold.h5
|
||||
#
|
||||
# Tests for -l (--links) option on h5stat_newgrat.h5:
|
||||
# -g
|
||||
# -g -l 40000
|
||||
# Tests for -l (--links) option on h5stat_newgrat.h5:
|
||||
# -g
|
||||
# -g -l 40000
|
||||
TOOLTEST h5stat_links4.ddl -g h5stat_newgrat.h5
|
||||
TOOLTEST h5stat_links5.ddl -g -l 40000 h5stat_newgrat.h5
|
||||
#
|
||||
# Tests for -m (--dims) option on h5stat_threshold.h5
|
||||
# -d --dims=-1 (incorrect threshold value)
|
||||
# -gd -m 5
|
||||
# -d --di=15
|
||||
# -d --dims=-1 (incorrect threshold value)
|
||||
# -gd -m 5
|
||||
# -d --di=15
|
||||
TOOLTEST h5stat_err1_dims.ddl -d --dims=-1 h5stat_threshold.h5
|
||||
TOOLTEST h5stat_dims1.ddl -gd -m 5 h5stat_threshold.h5
|
||||
TOOLTEST h5stat_dims2.ddl -d --di=15 h5stat_threshold.h5
|
||||
#
|
||||
# Tests for -a option on h5stat_threshold.h5
|
||||
# -a -2 (incorrect threshold value)
|
||||
# --numattrs (without threshold value)
|
||||
# -AS -a 10
|
||||
# -a 1
|
||||
# -A --numattrs=25
|
||||
# -a -2 (incorrect threshold value)
|
||||
# --numattrs (without threshold value)
|
||||
# -AS -a 10
|
||||
# -a 1
|
||||
# -A --numattrs=25
|
||||
TOOLTEST h5stat_err1_numattrs.ddl -a -2 h5stat_threshold.h5
|
||||
TOOLTEST h5stat_err2_numattrs.ddl --numattrs h5stat_threshold.h5
|
||||
TOOLTEST h5stat_numattrs1.ddl -AS -a 10 h5stat_threshold.h5
|
||||
@ -299,7 +301,7 @@ TOOLTEST h5stat_numattrs2.ddl -a 1 h5stat_threshold.h5
|
||||
TOOLTEST h5stat_numattrs3.ddl -A --numattrs=25 h5stat_threshold.h5
|
||||
#
|
||||
# Tests for -a option on h5stat_newgrat.h5
|
||||
# -A -a 100
|
||||
# -A -a 100
|
||||
TOOLTEST h5stat_numattrs4.ddl -A -a 100 h5stat_newgrat.h5
|
||||
#
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
/*#include <unistd.h> *//* Required for unlink() */
|
||||
/*#include <unistd.h> *//* Required for unlink() */
|
||||
|
||||
#include "hdf5.h"
|
||||
#include "H5private.h"
|
||||
@ -86,8 +86,7 @@ int main(void)
|
||||
H5Tinsert(cmp, "Not Ok", sizeof(fok) + sizeof(string5), array_dt);
|
||||
H5Tclose(array_dt);
|
||||
|
||||
fix = h5tools_get_native_type(cmp);
|
||||
|
||||
fix = H5Tget_native_type(cmp, H5T_DIR_DEFAULT);
|
||||
cmp1 = H5Tcreate(H5T_COMPOUND, sizeof(fok));
|
||||
|
||||
cdim[0] = sizeof(fok) / sizeof(float);
|
||||
@ -106,7 +105,7 @@ int main(void)
|
||||
H5Tclose(array_dt);
|
||||
|
||||
plist = H5Pcreate(H5P_DATASET_XFER);
|
||||
if((error = H5Pset_preserve(plist, 1)) < 0)
|
||||
if((error = H5Pset_preserve(plist, 1)) < 0)
|
||||
goto out;
|
||||
|
||||
/*
|
||||
@ -208,35 +207,3 @@ out:
|
||||
return result;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: h5tools_get_native_type
|
||||
*
|
||||
* Purpose: Wrapper around H5Tget_native_type() to work around
|
||||
* Problems with bitfields.
|
||||
*
|
||||
* Return: Success: datatype ID
|
||||
*
|
||||
* Failure: FAIL
|
||||
*
|
||||
* Programmer: Quincey Koziol
|
||||
* Tuesday, October 5, 2004
|
||||
*
|
||||
* Modifications:
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
hid_t
|
||||
h5tools_get_native_type(hid_t type)
|
||||
{
|
||||
hid_t p_type;
|
||||
H5T_class_t type_class;
|
||||
|
||||
type_class = H5Tget_class(type);
|
||||
if(type_class==H5T_BITFIELD)
|
||||
p_type=H5Tcopy(type);
|
||||
else
|
||||
p_type = H5Tget_native_type(type,H5T_DIR_DEFAULT);
|
||||
|
||||
return(p_type);
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ COPY_TESTFILES_TO_TESTDIR()
|
||||
$CP -f $tstfile $TESTDIR
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: FAILED to copy $tstfile ."
|
||||
|
||||
|
||||
# Comment out this to CREATE expected file
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
@ -122,7 +122,7 @@ CLEAN_TESTFILES_AND_TESTDIR()
|
||||
|
||||
# Print a line-line message left justified in a field of 70 characters
|
||||
# beginning with the word "Testing".
|
||||
TESTING()
|
||||
TESTING()
|
||||
{
|
||||
SPACES=" "
|
||||
echo "Testing $* $SPACES" |cut -c1-70 |tr -d '\012'
|
||||
@ -134,7 +134,7 @@ TESTING()
|
||||
# Print a line-line message left justified in a field of 70 characters
|
||||
# beginning with the word "Verifying".
|
||||
#
|
||||
VERIFY_H5LS()
|
||||
VERIFY_H5LS()
|
||||
{
|
||||
SPACES=" "
|
||||
echo "Verifying h5ls file structure $* $SPACES" | cut -c1-70 | tr -d '\012'
|
||||
@ -146,7 +146,7 @@ VERIFY_H5LS()
|
||||
# Assumed arguments:
|
||||
# $* arguments for h5mkgrp.
|
||||
|
||||
TOOLTEST()
|
||||
TOOLTEST()
|
||||
{
|
||||
TESTING $H5MKGRP $@
|
||||
(
|
||||
@ -171,7 +171,7 @@ TOOLTEST()
|
||||
|
||||
# Call the h5ls tool to verify the correct output data in the destination file
|
||||
#
|
||||
H5LSTEST()
|
||||
H5LSTEST()
|
||||
{
|
||||
expect="$TESTDIR/`basename $1 .h5`.ls"
|
||||
actual="$TESTDIR/`basename $1 .h5`.out"
|
||||
@ -191,9 +191,11 @@ H5LSTEST()
|
||||
STDERR_FILTER $actual
|
||||
|
||||
if [ ! -f $expect ]; then
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
echo " Expected result (*.ls) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expect $actual; then
|
||||
echo " PASSED"
|
||||
else
|
||||
@ -215,7 +217,7 @@ H5LSTEST()
|
||||
# $1 is test file name
|
||||
# $2 is h5mkgrp options
|
||||
# $* are groups to create
|
||||
RUNTEST()
|
||||
RUNTEST()
|
||||
{
|
||||
FILEOUT=$1
|
||||
shift
|
||||
@ -244,7 +246,7 @@ RUNTEST()
|
||||
# $1 is test expected output file
|
||||
# $2 is h5mkgrp options
|
||||
# $* are groups to create
|
||||
CMPTEST()
|
||||
CMPTEST()
|
||||
{
|
||||
FILEOUT=$1
|
||||
expect="$TESTDIR/`basename $1 .h5`.txt"
|
||||
@ -260,11 +262,13 @@ CMPTEST()
|
||||
$RUNSERIAL $H5MKGRP_BIN $@
|
||||
) >$actual 2>$actual_err
|
||||
cat $actual_err >> $actual
|
||||
|
||||
|
||||
if [ ! -f $expect ]; then
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
echo " Expected result (*.txt) missing"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
elif $CMP $expect $actual; then
|
||||
echo " PASSED"
|
||||
else
|
||||
@ -302,7 +306,7 @@ RUNTEST h5mkgrp_several_v.h5 "-v" one two
|
||||
RUNTEST h5mkgrp_several_p.h5 "-p" one two
|
||||
RUNTEST h5mkgrp_several_l.h5 "-l" one two
|
||||
|
||||
# Create various nested groups
|
||||
# Create various nested groups
|
||||
RUNTEST h5mkgrp_nested_p.h5 "-p" /one/two
|
||||
RUNTEST h5mkgrp_nested_lp.h5 "-lp" /one/two
|
||||
RUNTEST h5mkgrp_nested_mult_p.h5 "-p" /one/two /three/four
|
||||
|
103
tools/testfiles/tbitfields_be.h5.xml
Normal file
103
tools/testfiles/tbitfields_be.h5.xml
Normal file
@ -0,0 +1,103 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<hdf5:HDF5-File xmlns:hdf5="http://hdfgroup.org/HDF5/XML/schema/HDF5-File.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hdfgroup.org/HDF5/XML/schema/HDF5-File http://www.hdfgroup.org/HDF5/XML/schema/HDF5-File.xsd">
|
||||
<hdf5:RootGroup OBJ-XID="xid_696" H5Path="/">
|
||||
<hdf5:Group Name="typetests" OBJ-XID="xid_1344" H5Path="/typetests" Parents="xid_696" H5ParentPaths="/" >
|
||||
<hdf5:Dataset Name="bitfield_1" OBJ-XID="xid_1720" H5Path= "/typetests/bitfield_1" Parents="xid_1344" H5ParentPaths="/typetests">
|
||||
<hdf5:StorageLayout>
|
||||
<hdf5:ContiguousLayout/>
|
||||
</hdf5:StorageLayout>
|
||||
<hdf5:FillValueInfo FillTime="FillIfSet" AllocationTime="Late">
|
||||
<hdf5:FillValue>
|
||||
<hdf5:NoFill/>
|
||||
</hdf5:FillValue>
|
||||
</hdf5:FillValueInfo>
|
||||
<hdf5:Dataspace>
|
||||
<hdf5:SimpleDataspace Ndims="1">
|
||||
<hdf5:Dimension DimSize="32" MaxDimSize="32"/>
|
||||
</hdf5:SimpleDataspace>
|
||||
</hdf5:Dataspace>
|
||||
<hdf5:DataType>
|
||||
<hdf5:AtomicType>
|
||||
<hdf5:BitfieldType ByteOrder="LE" Size="1"/>
|
||||
</hdf5:AtomicType>
|
||||
</hdf5:DataType>
|
||||
<hdf5:Data>
|
||||
<hdf5:DataFromFile>
|
||||
0xff
|
||||
0xfe
|
||||
0xfd
|
||||
0xfc
|
||||
0xfb
|
||||
0xfa
|
||||
0xf9
|
||||
0xf8
|
||||
0xf7
|
||||
0xf6
|
||||
0xf5
|
||||
0xf4
|
||||
0xf3
|
||||
0xf2
|
||||
0xf1
|
||||
0xf0
|
||||
0xef
|
||||
0xee
|
||||
0xed
|
||||
0xec
|
||||
0xeb
|
||||
0xea
|
||||
0xe9
|
||||
0xe8
|
||||
0xe7
|
||||
0xe6
|
||||
0xe5
|
||||
0xe4
|
||||
0xe3
|
||||
0xe2
|
||||
0xe1
|
||||
0xe0
|
||||
</hdf5:DataFromFile>
|
||||
</hdf5:Data>
|
||||
</hdf5:Dataset>
|
||||
<hdf5:Dataset Name="bitfield_2" OBJ-XID="xid_2352" H5Path= "/typetests/bitfield_2" Parents="xid_1344" H5ParentPaths="/typetests">
|
||||
<hdf5:StorageLayout>
|
||||
<hdf5:ContiguousLayout/>
|
||||
</hdf5:StorageLayout>
|
||||
<hdf5:FillValueInfo FillTime="FillIfSet" AllocationTime="Late">
|
||||
<hdf5:FillValue>
|
||||
<hdf5:NoFill/>
|
||||
</hdf5:FillValue>
|
||||
</hdf5:FillValueInfo>
|
||||
<hdf5:Dataspace>
|
||||
<hdf5:SimpleDataspace Ndims="1">
|
||||
<hdf5:Dimension DimSize="16" MaxDimSize="16"/>
|
||||
</hdf5:SimpleDataspace>
|
||||
</hdf5:Dataspace>
|
||||
<hdf5:DataType>
|
||||
<hdf5:AtomicType>
|
||||
<hdf5:BitfieldType ByteOrder="LE" Size="2"/>
|
||||
</hdf5:AtomicType>
|
||||
</hdf5:DataType>
|
||||
<hdf5:Data>
|
||||
<hdf5:DataFromFile>
|
||||
fe:ff
|
||||
fc:fd
|
||||
fa:fb
|
||||
f8:f9
|
||||
f6:f7
|
||||
f4:f5
|
||||
f2:f3
|
||||
f0:f1
|
||||
ee:ef
|
||||
ec:ed
|
||||
ea:eb
|
||||
e8:e9
|
||||
e6:e7
|
||||
e4:e5
|
||||
e2:e3
|
||||
e0:e1
|
||||
</hdf5:DataFromFile>
|
||||
</hdf5:Data>
|
||||
</hdf5:Dataset>
|
||||
</hdf5:Group>
|
||||
</hdf5:RootGroup>
|
||||
</hdf5:HDF5-File>
|
103
tools/testfiles/tbitfields_le.h5.xml
Normal file
103
tools/testfiles/tbitfields_le.h5.xml
Normal file
@ -0,0 +1,103 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<hdf5:HDF5-File xmlns:hdf5="http://hdfgroup.org/HDF5/XML/schema/HDF5-File.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hdfgroup.org/HDF5/XML/schema/HDF5-File http://www.hdfgroup.org/HDF5/XML/schema/HDF5-File.xsd">
|
||||
<hdf5:RootGroup OBJ-XID="xid_696" H5Path="/">
|
||||
<hdf5:Group Name="typetests" OBJ-XID="xid_1344" H5Path="/typetests" Parents="xid_696" H5ParentPaths="/" >
|
||||
<hdf5:Dataset Name="bitfield_1" OBJ-XID="xid_1720" H5Path= "/typetests/bitfield_1" Parents="xid_1344" H5ParentPaths="/typetests">
|
||||
<hdf5:StorageLayout>
|
||||
<hdf5:ContiguousLayout/>
|
||||
</hdf5:StorageLayout>
|
||||
<hdf5:FillValueInfo FillTime="FillIfSet" AllocationTime="Late">
|
||||
<hdf5:FillValue>
|
||||
<hdf5:NoFill/>
|
||||
</hdf5:FillValue>
|
||||
</hdf5:FillValueInfo>
|
||||
<hdf5:Dataspace>
|
||||
<hdf5:SimpleDataspace Ndims="1">
|
||||
<hdf5:Dimension DimSize="32" MaxDimSize="32"/>
|
||||
</hdf5:SimpleDataspace>
|
||||
</hdf5:Dataspace>
|
||||
<hdf5:DataType>
|
||||
<hdf5:AtomicType>
|
||||
<hdf5:BitfieldType ByteOrder="LE" Size="1"/>
|
||||
</hdf5:AtomicType>
|
||||
</hdf5:DataType>
|
||||
<hdf5:Data>
|
||||
<hdf5:DataFromFile>
|
||||
0xff
|
||||
0xfe
|
||||
0xfd
|
||||
0xfc
|
||||
0xfb
|
||||
0xfa
|
||||
0xf9
|
||||
0xf8
|
||||
0xf7
|
||||
0xf6
|
||||
0xf5
|
||||
0xf4
|
||||
0xf3
|
||||
0xf2
|
||||
0xf1
|
||||
0xf0
|
||||
0xef
|
||||
0xee
|
||||
0xed
|
||||
0xec
|
||||
0xeb
|
||||
0xea
|
||||
0xe9
|
||||
0xe8
|
||||
0xe7
|
||||
0xe6
|
||||
0xe5
|
||||
0xe4
|
||||
0xe3
|
||||
0xe2
|
||||
0xe1
|
||||
0xe0
|
||||
</hdf5:DataFromFile>
|
||||
</hdf5:Data>
|
||||
</hdf5:Dataset>
|
||||
<hdf5:Dataset Name="bitfield_2" OBJ-XID="xid_2352" H5Path= "/typetests/bitfield_2" Parents="xid_1344" H5ParentPaths="/typetests">
|
||||
<hdf5:StorageLayout>
|
||||
<hdf5:ContiguousLayout/>
|
||||
</hdf5:StorageLayout>
|
||||
<hdf5:FillValueInfo FillTime="FillIfSet" AllocationTime="Late">
|
||||
<hdf5:FillValue>
|
||||
<hdf5:NoFill/>
|
||||
</hdf5:FillValue>
|
||||
</hdf5:FillValueInfo>
|
||||
<hdf5:Dataspace>
|
||||
<hdf5:SimpleDataspace Ndims="1">
|
||||
<hdf5:Dimension DimSize="16" MaxDimSize="16"/>
|
||||
</hdf5:SimpleDataspace>
|
||||
</hdf5:Dataspace>
|
||||
<hdf5:DataType>
|
||||
<hdf5:AtomicType>
|
||||
<hdf5:BitfieldType ByteOrder="LE" Size="2"/>
|
||||
</hdf5:AtomicType>
|
||||
</hdf5:DataType>
|
||||
<hdf5:Data>
|
||||
<hdf5:DataFromFile>
|
||||
ff:fe
|
||||
fd:fc
|
||||
fb:fa
|
||||
f9:f8
|
||||
f7:f6
|
||||
f5:f4
|
||||
f3:f2
|
||||
f1:f0
|
||||
ef:ee
|
||||
ed:ec
|
||||
eb:ea
|
||||
e9:e8
|
||||
e7:e6
|
||||
e5:e4
|
||||
e3:e2
|
||||
e1:e0
|
||||
</hdf5:DataFromFile>
|
||||
</hdf5:Data>
|
||||
</hdf5:Dataset>
|
||||
</hdf5:Group>
|
||||
</hdf5:RootGroup>
|
||||
</hdf5:HDF5-File>
|
Binary file not shown.
293
tools/testfiles/tbitnopaque_be.ddl
Normal file
293
tools/testfiles/tbitnopaque_be.ddl
Normal file
@ -0,0 +1,293 @@
|
||||
HDF5 "tbitnopaque.h5" {
|
||||
GROUP "/" {
|
||||
GROUP "bittypetests" {
|
||||
DATASET "bitfield_1" {
|
||||
DATATYPE H5T_STD_B8LE
|
||||
DATASPACE SIMPLE { ( 32 ) / ( 32 ) }
|
||||
DATA {
|
||||
(0): 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0xf7, 0xf6,
|
||||
(10): 0xf5, 0xf4, 0xf3, 0xf2, 0xf1, 0xf0, 0xef, 0xee, 0xed, 0xec,
|
||||
(20): 0xeb, 0xea, 0xe9, 0xe8, 0xe7, 0xe6, 0xe5, 0xe4, 0xe3, 0xe2,
|
||||
(30): 0xe1, 0xe0
|
||||
}
|
||||
}
|
||||
DATASET "bitfield_2" {
|
||||
DATATYPE H5T_STD_B16LE
|
||||
DATASPACE SIMPLE { ( 32 ) / ( 32 ) }
|
||||
DATA {
|
||||
(0): ff:ff, ff:ef, ff:df, ff:cf, ff:bf, ff:af, ff:9f, ff:8f, ff:7f,
|
||||
(9): ff:6f, ff:5f, ff:4f, ff:3f, ff:2f, ff:1f, ff:0f, fe:ff, fe:ef,
|
||||
(18): fe:df, fe:cf, fe:bf, fe:af, fe:9f, fe:8f, fe:7f, fe:6f, fe:5f,
|
||||
(27): fe:4f, fe:3f, fe:2f, fe:1f, fe:0f
|
||||
}
|
||||
}
|
||||
DATASET "bitfield_3" {
|
||||
DATATYPE H5T_STD_B32LE
|
||||
DATASPACE SIMPLE { ( 32 ) / ( 32 ) }
|
||||
DATA {
|
||||
(0): ff:ff:ff:ff, ff:ff:ff:df, ff:ff:ff:bf, ff:ff:ff:9f,
|
||||
(4): ff:ff:ff:7f, ff:ff:ff:5f, ff:ff:ff:3f, ff:ff:ff:1f,
|
||||
(8): ff:ff:fe:ff, ff:ff:fe:df, ff:ff:fe:bf, ff:ff:fe:9f,
|
||||
(12): ff:ff:fe:7f, ff:ff:fe:5f, ff:ff:fe:3f, ff:ff:fe:1f,
|
||||
(16): ff:ff:fd:ff, ff:ff:fd:df, ff:ff:fd:bf, ff:ff:fd:9f,
|
||||
(20): ff:ff:fd:7f, ff:ff:fd:5f, ff:ff:fd:3f, ff:ff:fd:1f,
|
||||
(24): ff:ff:fc:ff, ff:ff:fc:df, ff:ff:fc:bf, ff:ff:fc:9f,
|
||||
(28): ff:ff:fc:7f, ff:ff:fc:5f, ff:ff:fc:3f, ff:ff:fc:1f
|
||||
}
|
||||
}
|
||||
DATASET "bitfield_4" {
|
||||
DATATYPE H5T_STD_B64LE
|
||||
DATASPACE SIMPLE { ( 32 ) / ( 32 ) }
|
||||
DATA {
|
||||
(0): ff:ff:ff:ff:ff:ff:ff:ff, ff:ff:ff:ff:ff:ff:ff:bf,
|
||||
(2): ff:ff:ff:ff:ff:ff:ff:7f, ff:ff:ff:ff:ff:ff:ff:3f,
|
||||
(4): ff:ff:ff:ff:ff:ff:fe:ff, ff:ff:ff:ff:ff:ff:fe:bf,
|
||||
(6): ff:ff:ff:ff:ff:ff:fe:7f, ff:ff:ff:ff:ff:ff:fe:3f,
|
||||
(8): ff:ff:ff:ff:ff:ff:fd:ff, ff:ff:ff:ff:ff:ff:fd:bf,
|
||||
(10): ff:ff:ff:ff:ff:ff:fd:7f, ff:ff:ff:ff:ff:ff:fd:3f,
|
||||
(12): ff:ff:ff:ff:ff:ff:fc:ff, ff:ff:ff:ff:ff:ff:fc:bf,
|
||||
(14): ff:ff:ff:ff:ff:ff:fc:7f, ff:ff:ff:ff:ff:ff:fc:3f,
|
||||
(16): ff:ff:ff:ff:ff:ff:fb:ff, ff:ff:ff:ff:ff:ff:fb:bf,
|
||||
(18): ff:ff:ff:ff:ff:ff:fb:7f, ff:ff:ff:ff:ff:ff:fb:3f,
|
||||
(20): ff:ff:ff:ff:ff:ff:fa:ff, ff:ff:ff:ff:ff:ff:fa:bf,
|
||||
(22): ff:ff:ff:ff:ff:ff:fa:7f, ff:ff:ff:ff:ff:ff:fa:3f,
|
||||
(24): ff:ff:ff:ff:ff:ff:f9:ff, ff:ff:ff:ff:ff:ff:f9:bf,
|
||||
(26): ff:ff:ff:ff:ff:ff:f9:7f, ff:ff:ff:ff:ff:ff:f9:3f,
|
||||
(28): ff:ff:ff:ff:ff:ff:f8:ff, ff:ff:ff:ff:ff:ff:f8:bf,
|
||||
(30): ff:ff:ff:ff:ff:ff:f8:7f, ff:ff:ff:ff:ff:ff:f8:3f
|
||||
}
|
||||
}
|
||||
}
|
||||
GROUP "cmpdtypetests" {
|
||||
DATASET "compound_1" {
|
||||
DATATYPE H5T_COMPOUND {
|
||||
H5T_STD_B8LE "a";
|
||||
H5T_STD_B16LE "b";
|
||||
H5T_STD_B32LE "c";
|
||||
H5T_STD_B64LE "d";
|
||||
}
|
||||
DATASPACE SIMPLE { ( 32 ) / ( 32 ) }
|
||||
DATA {
|
||||
(0): {
|
||||
0xff,
|
||||
ff:ff,
|
||||
ff:ff:ff:ff,
|
||||
ff:ff:ff:ff:ff:ff:ff:ff
|
||||
},
|
||||
(1): {
|
||||
0xfe,
|
||||
ff:ef,
|
||||
ff:ff:ff:df,
|
||||
ff:ff:ff:ff:ff:ff:ff:bf
|
||||
},
|
||||
(2): {
|
||||
0xfd,
|
||||
ff:df,
|
||||
ff:ff:ff:bf,
|
||||
ff:ff:ff:ff:ff:ff:ff:7f
|
||||
},
|
||||
(3): {
|
||||
0xfc,
|
||||
ff:cf,
|
||||
ff:ff:ff:9f,
|
||||
ff:ff:ff:ff:ff:ff:ff:3f
|
||||
},
|
||||
(4): {
|
||||
0xfb,
|
||||
ff:bf,
|
||||
ff:ff:ff:7f,
|
||||
ff:ff:ff:ff:ff:ff:fe:ff
|
||||
},
|
||||
(5): {
|
||||
0xfa,
|
||||
ff:af,
|
||||
ff:ff:ff:5f,
|
||||
ff:ff:ff:ff:ff:ff:fe:bf
|
||||
},
|
||||
(6): {
|
||||
0xf9,
|
||||
ff:9f,
|
||||
ff:ff:ff:3f,
|
||||
ff:ff:ff:ff:ff:ff:fe:7f
|
||||
},
|
||||
(7): {
|
||||
0xf8,
|
||||
ff:8f,
|
||||
ff:ff:ff:1f,
|
||||
ff:ff:ff:ff:ff:ff:fe:3f
|
||||
},
|
||||
(8): {
|
||||
0xf7,
|
||||
ff:7f,
|
||||
ff:ff:fe:ff,
|
||||
ff:ff:ff:ff:ff:ff:fd:ff
|
||||
},
|
||||
(9): {
|
||||
0xf6,
|
||||
ff:6f,
|
||||
ff:ff:fe:df,
|
||||
ff:ff:ff:ff:ff:ff:fd:bf
|
||||
},
|
||||
(10): {
|
||||
0xf5,
|
||||
ff:5f,
|
||||
ff:ff:fe:bf,
|
||||
ff:ff:ff:ff:ff:ff:fd:7f
|
||||
},
|
||||
(11): {
|
||||
0xf4,
|
||||
ff:4f,
|
||||
ff:ff:fe:9f,
|
||||
ff:ff:ff:ff:ff:ff:fd:3f
|
||||
},
|
||||
(12): {
|
||||
0xf3,
|
||||
ff:3f,
|
||||
ff:ff:fe:7f,
|
||||
ff:ff:ff:ff:ff:ff:fc:ff
|
||||
},
|
||||
(13): {
|
||||
0xf2,
|
||||
ff:2f,
|
||||
ff:ff:fe:5f,
|
||||
ff:ff:ff:ff:ff:ff:fc:bf
|
||||
},
|
||||
(14): {
|
||||
0xf1,
|
||||
ff:1f,
|
||||
ff:ff:fe:3f,
|
||||
ff:ff:ff:ff:ff:ff:fc:7f
|
||||
},
|
||||
(15): {
|
||||
0xf0,
|
||||
ff:0f,
|
||||
ff:ff:fe:1f,
|
||||
ff:ff:ff:ff:ff:ff:fc:3f
|
||||
},
|
||||
(16): {
|
||||
0xef,
|
||||
fe:ff,
|
||||
ff:ff:fd:ff,
|
||||
ff:ff:ff:ff:ff:ff:fb:ff
|
||||
},
|
||||
(17): {
|
||||
0xee,
|
||||
fe:ef,
|
||||
ff:ff:fd:df,
|
||||
ff:ff:ff:ff:ff:ff:fb:bf
|
||||
},
|
||||
(18): {
|
||||
0xed,
|
||||
fe:df,
|
||||
ff:ff:fd:bf,
|
||||
ff:ff:ff:ff:ff:ff:fb:7f
|
||||
},
|
||||
(19): {
|
||||
0xec,
|
||||
fe:cf,
|
||||
ff:ff:fd:9f,
|
||||
ff:ff:ff:ff:ff:ff:fb:3f
|
||||
},
|
||||
(20): {
|
||||
0xeb,
|
||||
fe:bf,
|
||||
ff:ff:fd:7f,
|
||||
ff:ff:ff:ff:ff:ff:fa:ff
|
||||
},
|
||||
(21): {
|
||||
0xea,
|
||||
fe:af,
|
||||
ff:ff:fd:5f,
|
||||
ff:ff:ff:ff:ff:ff:fa:bf
|
||||
},
|
||||
(22): {
|
||||
0xe9,
|
||||
fe:9f,
|
||||
ff:ff:fd:3f,
|
||||
ff:ff:ff:ff:ff:ff:fa:7f
|
||||
},
|
||||
(23): {
|
||||
0xe8,
|
||||
fe:8f,
|
||||
ff:ff:fd:1f,
|
||||
ff:ff:ff:ff:ff:ff:fa:3f
|
||||
},
|
||||
(24): {
|
||||
0xe7,
|
||||
fe:7f,
|
||||
ff:ff:fc:ff,
|
||||
ff:ff:ff:ff:ff:ff:f9:ff
|
||||
},
|
||||
(25): {
|
||||
0xe6,
|
||||
fe:6f,
|
||||
ff:ff:fc:df,
|
||||
ff:ff:ff:ff:ff:ff:f9:bf
|
||||
},
|
||||
(26): {
|
||||
0xe5,
|
||||
fe:5f,
|
||||
ff:ff:fc:bf,
|
||||
ff:ff:ff:ff:ff:ff:f9:7f
|
||||
},
|
||||
(27): {
|
||||
0xe4,
|
||||
fe:4f,
|
||||
ff:ff:fc:9f,
|
||||
ff:ff:ff:ff:ff:ff:f9:3f
|
||||
},
|
||||
(28): {
|
||||
0xe3,
|
||||
fe:3f,
|
||||
ff:ff:fc:7f,
|
||||
ff:ff:ff:ff:ff:ff:f8:ff
|
||||
},
|
||||
(29): {
|
||||
0xe2,
|
||||
fe:2f,
|
||||
ff:ff:fc:5f,
|
||||
ff:ff:ff:ff:ff:ff:f8:bf
|
||||
},
|
||||
(30): {
|
||||
0xe1,
|
||||
fe:1f,
|
||||
ff:ff:fc:3f,
|
||||
ff:ff:ff:ff:ff:ff:f8:7f
|
||||
},
|
||||
(31): {
|
||||
0xe0,
|
||||
fe:0f,
|
||||
ff:ff:fc:1f,
|
||||
ff:ff:ff:ff:ff:ff:f8:3f
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
GROUP "opaquetypetests" {
|
||||
DATASET "opaque_1" {
|
||||
DATATYPE H5T_OPAQUE {
|
||||
OPAQUE_TAG "1-byte opaque type";
|
||||
}
|
||||
DATASPACE SIMPLE { ( 32 ) / ( 32 ) }
|
||||
DATA {
|
||||
(0): 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0xf7, 0xf6,
|
||||
(10): 0xf5, 0xf4, 0xf3, 0xf2, 0xf1, 0xf0, 0xef, 0xee, 0xed, 0xec,
|
||||
(20): 0xeb, 0xea, 0xe9, 0xe8, 0xe7, 0xe6, 0xe5, 0xe4, 0xe3, 0xe2,
|
||||
(30): 0xe1, 0xe0
|
||||
}
|
||||
}
|
||||
DATASET "opaque_2" {
|
||||
DATATYPE H5T_OPAQUE {
|
||||
OPAQUE_TAG "2-byte opaque type";
|
||||
}
|
||||
DATASPACE SIMPLE { ( 32 ) / ( 32 ) }
|
||||
DATA {
|
||||
(0): ff:ff, ef:ff, df:ff, cf:ff, bf:ff, af:ff, 9f:ff, 8f:ff, 7f:ff,
|
||||
(9): 6f:ff, 5f:ff, 4f:ff, 3f:ff, 2f:ff, 1f:ff, 0f:ff, ff:fe, ef:fe,
|
||||
(18): df:fe, cf:fe, bf:fe, af:fe, 9f:fe, 8f:fe, 7f:fe, 6f:fe, 5f:fe,
|
||||
(27): 4f:fe, 3f:fe, 2f:fe, 1f:fe, 0f:fe
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -15,24 +15,24 @@ GROUP "/" {
|
||||
DATATYPE H5T_STD_B16LE
|
||||
DATASPACE SIMPLE { ( 32 ) / ( 32 ) }
|
||||
DATA {
|
||||
(0): ff:ff, 00:00, ef:ff, 00:00, df:ff, 00:00, cf:ff, 00:00, bf:ff,
|
||||
(9): 00:00, af:ff, 00:00, 9f:ff, 00:00, 8f:ff, 00:00, 7f:ff, 00:00,
|
||||
(18): 6f:ff, 00:00, 5f:ff, 00:00, 4f:ff, 00:00, 3f:ff, 00:00, 2f:ff,
|
||||
(27): 00:00, 1f:ff, 00:00, 0f:ff, 00:00
|
||||
(0): ff:ff, ef:ff, df:ff, cf:ff, bf:ff, af:ff, 9f:ff, 8f:ff, 7f:ff,
|
||||
(9): 6f:ff, 5f:ff, 4f:ff, 3f:ff, 2f:ff, 1f:ff, 0f:ff, ff:fe, ef:fe,
|
||||
(18): df:fe, cf:fe, bf:fe, af:fe, 9f:fe, 8f:fe, 7f:fe, 6f:fe, 5f:fe,
|
||||
(27): 4f:fe, 3f:fe, 2f:fe, 1f:fe, 0f:fe
|
||||
}
|
||||
}
|
||||
DATASET "bitfield_3" {
|
||||
DATATYPE H5T_STD_B32LE
|
||||
DATASPACE SIMPLE { ( 32 ) / ( 32 ) }
|
||||
DATA {
|
||||
(0): ff:ff:ff:ff, 00:00:00:00, df:ff:ff:ff, 00:00:00:00,
|
||||
(4): bf:ff:ff:ff, 00:00:00:00, 9f:ff:ff:ff, 00:00:00:00,
|
||||
(8): 7f:ff:ff:ff, 00:00:00:00, 5f:ff:ff:ff, 00:00:00:00,
|
||||
(12): 3f:ff:ff:ff, 00:00:00:00, 1f:ff:ff:ff, 00:00:00:00,
|
||||
(16): ff:fe:ff:ff, 00:00:00:00, df:fe:ff:ff, 00:00:00:00,
|
||||
(20): bf:fe:ff:ff, 00:00:00:00, 9f:fe:ff:ff, 00:00:00:00,
|
||||
(24): 7f:fe:ff:ff, 00:00:00:00, 5f:fe:ff:ff, 00:00:00:00,
|
||||
(28): 3f:fe:ff:ff, 00:00:00:00, 1f:fe:ff:ff, 00:00:00:00
|
||||
(0): ff:ff:ff:ff, df:ff:ff:ff, bf:ff:ff:ff, 9f:ff:ff:ff,
|
||||
(4): 7f:ff:ff:ff, 5f:ff:ff:ff, 3f:ff:ff:ff, 1f:ff:ff:ff,
|
||||
(8): ff:fe:ff:ff, df:fe:ff:ff, bf:fe:ff:ff, 9f:fe:ff:ff,
|
||||
(12): 7f:fe:ff:ff, 5f:fe:ff:ff, 3f:fe:ff:ff, 1f:fe:ff:ff,
|
||||
(16): ff:fd:ff:ff, df:fd:ff:ff, bf:fd:ff:ff, 9f:fd:ff:ff,
|
||||
(20): 7f:fd:ff:ff, 5f:fd:ff:ff, 3f:fd:ff:ff, 1f:fd:ff:ff,
|
||||
(24): ff:fc:ff:ff, df:fc:ff:ff, bf:fc:ff:ff, 9f:fc:ff:ff,
|
||||
(28): 7f:fc:ff:ff, 5f:fc:ff:ff, 3f:fc:ff:ff, 1f:fc:ff:ff
|
||||
}
|
||||
}
|
||||
DATASET "bitfield_4" {
|
||||
@ -282,10 +282,10 @@ GROUP "/" {
|
||||
}
|
||||
DATASPACE SIMPLE { ( 32 ) / ( 32 ) }
|
||||
DATA {
|
||||
(0): ff:ff, 00:00, ef:ff, 00:00, df:ff, 00:00, cf:ff, 00:00, bf:ff,
|
||||
(9): 00:00, af:ff, 00:00, 9f:ff, 00:00, 8f:ff, 00:00, 7f:ff, 00:00,
|
||||
(18): 6f:ff, 00:00, 5f:ff, 00:00, 4f:ff, 00:00, 3f:ff, 00:00, 2f:ff,
|
||||
(27): 00:00, 1f:ff, 00:00, 0f:ff, 00:00
|
||||
(0): ff:ff, ef:ff, df:ff, cf:ff, bf:ff, af:ff, 9f:ff, 8f:ff, 7f:ff,
|
||||
(9): 6f:ff, 5f:ff, 4f:ff, 3f:ff, 2f:ff, 1f:ff, 0f:ff, ff:fe, ef:fe,
|
||||
(18): df:fe, cf:fe, bf:fe, af:fe, 9f:fe, 8f:fe, 7f:fe, 6f:fe, 5f:fe,
|
||||
(27): 4f:fe, 3f:fe, 2f:fe, 1f:fe, 0f:fe
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user