mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-12-15 07:40:23 +08:00
HDFFV-9055 add test files
This commit is contained in:
parent
4d53a7100c
commit
68ec8c4f6c
3
MANIFEST
3
MANIFEST
@ -2238,6 +2238,8 @@
|
||||
./tools/test/h5diff/testfiles/h5diff_709.txt
|
||||
./tools/test/h5diff/testfiles/h5diff_710.txt
|
||||
./tools/test/h5diff/testfiles/h5diff_80.txt
|
||||
./tools/test/h5diff/testfiles/h5diff_800.txt
|
||||
./tools/test/h5diff/testfiles/h5diff_801.txt
|
||||
./tools/test/h5diff/testfiles/h5diff_90.txt
|
||||
./tools/test/h5diff/testfiles/h5diff_100.txt
|
||||
./tools/test/h5diff/testfiles/h5diff_101.txt
|
||||
@ -2348,6 +2350,7 @@
|
||||
./tools/test/h5diff/testfiles/h5diff_basic2.h5
|
||||
./tools/test/h5diff/testfiles/h5diff_dset1.h5
|
||||
./tools/test/h5diff/testfiles/h5diff_dset2.h5
|
||||
./tools/test/h5diff/testfiles/h5diff_dset3.h5
|
||||
./tools/test/h5diff/testfiles/h5diff_dtypes.h5
|
||||
./tools/test/h5diff/testfiles/h5diff_empty.h5
|
||||
./tools/test/h5diff/testfiles/h5diff_hyper1.h5
|
||||
|
@ -28,6 +28,7 @@
|
||||
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr2.h5
|
||||
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset1.h5
|
||||
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset2.h5
|
||||
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset3.h5
|
||||
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_hyper1.h5
|
||||
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_hyper2.h5
|
||||
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_empty.h5
|
||||
@ -275,6 +276,8 @@
|
||||
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_709.txt
|
||||
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_710.txt
|
||||
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_80.txt
|
||||
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_800.txt
|
||||
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_801.txt
|
||||
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_90.txt
|
||||
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_tmp1.txt
|
||||
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_tmp2.txt
|
||||
@ -464,6 +467,7 @@
|
||||
set (FILE6 h5diff_attr2.h5)
|
||||
set (FILE7 h5diff_dset1.h5)
|
||||
set (FILE8 h5diff_dset2.h5)
|
||||
set (FILE8A h5diff_dset3.h5)
|
||||
set (FILE9 h5diff_hyper1.h5)
|
||||
set (FILE10 h5diff_hyper2.h5)
|
||||
set (FILE11 h5diff_empty.h5)
|
||||
@ -872,6 +876,10 @@
|
||||
h5diff_710.out.err
|
||||
h5diff_80.out
|
||||
h5diff_80.out.err
|
||||
h5diff_800.out
|
||||
h5diff_800.out.err
|
||||
h5diff_801.out
|
||||
h5diff_801.out.err
|
||||
h5diff_90.out
|
||||
h5diff_90.out.err
|
||||
h5diff_v1.out
|
||||
@ -1477,6 +1485,14 @@ ADD_H5_TEST (h5diff_644 1 -v --use-system-epsilon -d 5 ${FILE1} ${FILE2} /g1/dse
|
||||
ADD_H5_TEST (h5diff_645 1 -v -p 0.05 --use-system-epsilon ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
|
||||
ADD_H5_TEST (h5diff_646 1 -v --use-system-epsilon -p 0.05 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
|
||||
|
||||
# ##############################################################################
|
||||
# # Test array variances
|
||||
# ##############################################################################
|
||||
#
|
||||
# Test with -d , -p and --use-system-epsilon.
|
||||
ADD_H5_TEST (h5diff_800 1 -v ${FILE7} ${FILE8} /g1/array /g1/array)
|
||||
ADD_H5_TEST (h5diff_801 1 -v ${FILE7} ${FILE8A} /g1/array /g1/array)
|
||||
|
||||
# ##############################################################################
|
||||
# VDS tests
|
||||
# ##############################################################################
|
||||
|
@ -48,6 +48,7 @@ size_t H5TOOLS_MALLOCSIZE = (128 * 1024 * 1024);
|
||||
#define FILE6 "h5diff_attr2.h5"
|
||||
#define FILE7 "h5diff_dset1.h5"
|
||||
#define FILE8 "h5diff_dset2.h5"
|
||||
#define FILE8A "h5diff_dset3.h5"
|
||||
#define FILE9 "h5diff_hyper1.h5"
|
||||
#define FILE10 "h5diff_hyper2.h5"
|
||||
#define FILE11 "h5diff_empty.h5"
|
||||
@ -197,6 +198,7 @@ int main(void)
|
||||
/* generate 2 files, the second call creates a similar file with differences */
|
||||
test_datasets(FILE7,0);
|
||||
test_datasets(FILE8,1);
|
||||
test_datasets(FILE8A,2);
|
||||
|
||||
/* generate 2 files, the second call creates a similar file with differences */
|
||||
test_hyperslab(FILE9,0);
|
||||
@ -1328,7 +1330,7 @@ int test_datasets(const char *file,
|
||||
herr_t status;
|
||||
int buf[2]={1,2};
|
||||
|
||||
if(make_diffs)
|
||||
if(make_diffs > 0)
|
||||
memset(buf, 0, sizeof buf);
|
||||
|
||||
/* Create a file */
|
||||
@ -1399,9 +1401,8 @@ int test_special_datasets(const char *file,
|
||||
|
||||
/* Create a dataset with zero dimension size in one file but the other one
|
||||
* has a dataset with a non-zero dimension size */
|
||||
if(make_diffs) {
|
||||
if(make_diffs)
|
||||
dims[1] = SPACE1_DIM2 + 4;
|
||||
}
|
||||
|
||||
sid = H5Screate_simple(SPACE1_RANK, dims, NULL);
|
||||
did = H5Dcreate2(fid, "dset2", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
|
||||
@ -5466,6 +5467,34 @@ static void test_objs_strings(const char *fname1, const char *fname2)
|
||||
H5Sclose(space);
|
||||
H5Dclose(dataset);
|
||||
|
||||
/* string 5 : early term long string */
|
||||
string4A[0][10] = 0;
|
||||
string4A[0][11] = 0;
|
||||
string4B[0][10] = 0;
|
||||
|
||||
string4A[1][10] = 0;
|
||||
string4A[1][11] = 'Z';
|
||||
string4B[1][10] = 0;
|
||||
string4B[1][11] = 'x';
|
||||
|
||||
string4A[2][10] = 0;
|
||||
string4B[2][10] = 0;
|
||||
string4B[2][11] = 'a';
|
||||
string4B[2][12] = 'B';
|
||||
string4B[2][13] = 'c';
|
||||
space = H5Screate_simple(1, dims4, NULL);
|
||||
f_type = mkstr(168, H5T_STR_NULLTERM);
|
||||
m_type = mkstr(21, H5T_STR_NULLTERM);
|
||||
dataset = H5Dcreate2(fid1, "/string5", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
|
||||
H5Dwrite(dataset, m_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, string4A);
|
||||
H5Dclose(dataset);
|
||||
dataset = H5Dcreate2(fid2, "/string5", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
|
||||
H5Dwrite(dataset, m_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, string4B);
|
||||
H5Tclose(m_type);
|
||||
H5Tclose(f_type);
|
||||
H5Sclose(space);
|
||||
H5Dclose(dataset);
|
||||
|
||||
out:
|
||||
/*-----------------------------------------------------------------------
|
||||
* Close IDs
|
||||
@ -6613,6 +6642,9 @@ void write_dset_in(hid_t loc_id,
|
||||
int buf73[4][3][2]; /* integer */
|
||||
float buf83[4][3][2]; /* float */
|
||||
|
||||
if(make_diffs == 2) {
|
||||
dimarray[0] = 4;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* H5S_SCALAR
|
||||
@ -6621,11 +6653,8 @@ void write_dset_in(hid_t loc_id,
|
||||
|
||||
|
||||
|
||||
if ( make_diffs )
|
||||
{
|
||||
|
||||
if(make_diffs)
|
||||
scalar_data = 1;
|
||||
}
|
||||
|
||||
/* create a space */
|
||||
sid = H5Screate(H5S_SCALAR);
|
||||
|
12
tools/test/h5diff/testfiles/h5diff_800.txt
Normal file
12
tools/test/h5diff/testfiles/h5diff_800.txt
Normal file
@ -0,0 +1,12 @@
|
||||
dataset: </g1/array> and </g1/array>
|
||||
size: [2] [2]
|
||||
position array array difference
|
||||
------------------------------------------------------------
|
||||
[ 0 ] 1 0 1
|
||||
[ 0 ] 2 0 2
|
||||
[ 0 ] 3 0 3
|
||||
[ 1 ] 4 0 4
|
||||
[ 1 ] 5 0 5
|
||||
[ 1 ] 6 0 6
|
||||
6 differences found
|
||||
EXIT CODE: 1
|
13
tools/test/h5diff/testfiles/h5diff_801.txt
Normal file
13
tools/test/h5diff/testfiles/h5diff_801.txt
Normal file
@ -0,0 +1,13 @@
|
||||
dataset: </g1/array> and </g1/array>
|
||||
Warning: different storage datatype
|
||||
size: [2] [2]
|
||||
position array array difference
|
||||
------------------------------------------------------------
|
||||
[ 0 ] 1 0 1
|
||||
[ 0 ] 2 0 2
|
||||
[ 0 ] 3 0 3
|
||||
[ 1 ] 4 0 4
|
||||
[ 1 ] 5 0 5
|
||||
[ 1 ] 6 0 6
|
||||
6 differences found
|
||||
EXIT CODE: 1
|
BIN
tools/test/h5diff/testfiles/h5diff_dset3.h5
Normal file
BIN
tools/test/h5diff/testfiles/h5diff_dset3.h5
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user