From 66fa79b4234287d1b51ef62b394aa92fcafe7dd2 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Thu, 28 Feb 2008 09:49:48 -0500 Subject: [svn-r14690] Description: Handle comparing datasets & attributes w/variable-length strings properly. Tested on: Linux/64 2.6.9 (chicago) --- tools/h5diff/h5diffgentest.c | 142 ++++++++++++++++------- tools/lib/h5diff_array.c | 88 +++++++-------- tools/testfiles/h5diff_58.txt | 2 +- tools/testfiles/h5diff_70.txt | 236 ++++++++++++++++++++++++++++++++++++++- tools/testfiles/h5diff_80.txt | 83 +++++++++++++- tools/testfiles/h5diff_attr1.h5 | Bin 19136 -> 26000 bytes tools/testfiles/h5diff_attr2.h5 | Bin 19136 -> 26000 bytes tools/testfiles/h5diff_basic2.h5 | Bin 4240 -> 5728 bytes tools/testfiles/h5diff_dset1.h5 | Bin 19888 -> 22752 bytes tools/testfiles/h5diff_dset2.h5 | Bin 19888 -> 22752 bytes 10 files changed, 460 insertions(+), 91 deletions(-) diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c index 735dc0f..2a95ce0 100644 --- a/tools/h5diff/h5diffgentest.c +++ b/tools/h5diff/h5diffgentest.c @@ -444,7 +444,7 @@ int test_types(const char *fname) */ H5Lcreate_external("filename", "objname", fid1, "ext_link", H5P_DEFAULT, H5P_DEFAULT); H5Lregister(UD_link_class); - H5Lcreate_ud(fid1, "ud_link", MY_LINKCLASS, NULL, 0, H5P_DEFAULT, H5P_DEFAULT); + H5Lcreate_ud(fid1, "ud_link", MY_LINKCLASS, NULL, (size_t)0, H5P_DEFAULT, H5P_DEFAULT); /*------------------------------------------------------------------------- * Close @@ -814,12 +814,13 @@ void write_attr_in(hid_t loc_id, hid_t sid; hid_t tid; herr_t status; - int val, i, j, k, n; + int val, i, j, k, l, n; float f; /* create 1D attributes with dimension [2], 2 elements */ hsize_t dims[1]={2}; - char buf1[2][2]= {"ab","de"}; /* string */ + char buf1[2][STR_SIZE]= {"ab","de"}; /* string */ + char *buf1a[2]; /* VL string */ char buf2[2]= {1,2}; /* bitfield, opaque */ s_t buf3[2]= {{1,2},{3,4}}; /* compound */ hobj_ref_t buf4[2]; /* reference */ @@ -832,7 +833,8 @@ void write_attr_in(hid_t loc_id, /* create 2D attributes with dimension [3][2], 6 elements */ hsize_t dims2[2]={3,2}; - char buf12[6][2]= {"ab","cd","ef","gh","ij","kl"}; /* string */ + char buf12[3][2][STR_SIZE]= {{"ab","cd"},{"ef","gh"},{"ij","kl"}}; /* string */ + char *buf12a[3][2]; /* VL string */ char buf22[3][2]= {{1,2},{3,4},{5,6}}; /* bitfield, opaque */ s_t buf32[6]= {{1,2},{3,4},{5,6},{7,8},{9,10},{11,12}}; /* compound */ hobj_ref_t buf42[3][2]; /* reference */ @@ -844,9 +846,11 @@ void write_attr_in(hid_t loc_id, /* create 3D attributes with dimension [4][3][2], 24 elements */ hsize_t dims3[3]={4,3,2}; - char buf13[24][2]= {"ab","cd","ef","gh","ij","kl","mn","pq", - "rs","tu","vw","xz","AB","CD","EF","GH", - "IJ","KL","MN","PQ","RS","TU","VW","XZ"}; /* string */ + char buf13[4][3][2][STR_SIZE]= {{{"ab","cd"},{"ef","gh"},{"ij","kl"}}, + {{"mn","pq"},{"rs","tu"},{"vw","xz"}}, + {{"AB","CD"},{"EF","GH"},{"IJ","KL"}}, + {{"MN","PQ"},{"RS","TU"},{"VW","XZ"}}}; /* string */ + char *buf13a[4][3][2]; /* VL string */ char buf23[4][3][2]; /* bitfield, opaque */ s_t buf33[4][3][2]; /* compound */ hobj_ref_t buf43[4][3][2]; /* reference */ @@ -871,9 +875,7 @@ void write_attr_in(hid_t loc_id, { for (i=0; i<2; i++) for (j=0; j<2; j++) - { buf1[i][j]='z'; - } } /* buf1[2][2]= {"ab","de"}; @@ -888,10 +890,17 @@ void write_attr_in(hid_t loc_id, [ 1 ] e z */ tid = H5Tcopy(H5T_C_S1); - status = H5Tset_size(tid, 2); + status = H5Tset_size(tid, (size_t)STR_SIZE); write_attr(loc_id,1,dims,"string",tid,buf1); status = H5Tclose(tid); + for (i=0; i<2; i++) + buf1a[i]=buf1[i]; + tid = H5Tcopy(H5T_C_S1); + status = H5Tset_size(tid, H5T_VARIABLE); + write_attr(loc_id,1,dims,"VLstring",tid,buf1a); + status = H5Tclose(tid); + /*------------------------------------------------------------------------- * H5T_BITFIELD *------------------------------------------------------------------------- @@ -935,7 +944,7 @@ void write_attr_in(hid_t loc_id, [ 1 ] 2 0 2 */ - tid = H5Tcreate(H5T_OPAQUE, 1); + tid = H5Tcreate(H5T_OPAQUE, (size_t)1); status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ write_attr(loc_id,1,dims,"opaque",tid,buf2); status = H5Tclose(tid); @@ -1126,7 +1135,10 @@ position array of array of difference */ if (make_diffs) { - memset(buf12, 'z', sizeof buf12); + for (i=0; i<3; i++) + for (j=0; j<2; j++) + for (k=0; k<2; k++) + buf12[i][j][k]='z'; } /* @@ -1150,10 +1162,18 @@ position array of array of difference */ tid = H5Tcopy(H5T_C_S1); - status = H5Tset_size(tid, 2); + status = H5Tset_size(tid, (size_t)STR_SIZE); write_attr(loc_id,2,dims2,"string2D",tid,buf12); status = H5Tclose(tid); + for (i=0; i<3; i++) + for (j=0; j<2; j++) + buf12a[i][j]=buf12[i][j]; + tid = H5Tcopy(H5T_C_S1); + status = H5Tset_size(tid, H5T_VARIABLE); + write_attr(loc_id,2,dims2,"VLstring2D",tid,buf12a); + status = H5Tclose(tid); + /*------------------------------------------------------------------------- * H5T_BITFIELD *------------------------------------------------------------------------- @@ -1201,7 +1221,7 @@ position array of array of difference [ 2 0 ] 5 0 5 [ 2 1 ] 6 0 6 */ - tid = H5Tcreate(H5T_OPAQUE, 1); + tid = H5Tcreate(H5T_OPAQUE, (size_t)1); status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ write_attr(loc_id,2,dims2,"opaque2D",tid,buf22); status = H5Tclose(tid); @@ -1288,7 +1308,6 @@ position enum2D of enum2D of difference n=0; for (i = 0; i < 3; i++) { for (j = 0; j < 2; j++) { - int l; buf52[i][j].p = malloc((i + 1) * sizeof(int)); buf52[i][j].len = i + 1; for (l = 0; l < i + 1; l++) @@ -1411,7 +1430,11 @@ position float2D of float2D of difference if (make_diffs) { - memset(buf13,'z',sizeof buf13); + for (i=0; i<4; i++) + for (j=0; j<3; j++) + for (k=0; k<2; k++) + for (l=0; l<2; l++) + buf13[i][j][k][l]='z'; } /* @@ -1472,10 +1495,19 @@ position string3D of string3D of difference */ tid = H5Tcopy(H5T_C_S1); - status = H5Tset_size(tid, 2); + status = H5Tset_size(tid, (size_t)STR_SIZE); write_attr(loc_id,3,dims3,"string3D",tid,buf13); status = H5Tclose(tid); + for (i=0; i<4; i++) + for (j=0; j<3; j++) + for (k=0; k<2; k++) + buf13a[i][j][k]=buf13[i][j][k]; + tid = H5Tcopy(H5T_C_S1); + status = H5Tset_size(tid, H5T_VARIABLE); + write_attr(loc_id,3,dims3,"VLstring3D",tid,buf13a); + status = H5Tclose(tid); + /*------------------------------------------------------------------------- * H5T_BITFIELD *------------------------------------------------------------------------- @@ -1528,7 +1560,7 @@ position bitfield3D of bitfield3D of difference * H5T_OPAQUE *------------------------------------------------------------------------- */ - tid = H5Tcreate(H5T_OPAQUE, 1); + tid = H5Tcreate(H5T_OPAQUE, (size_t)1); status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ write_attr(loc_id,3,dims3,"opaque3D",tid,buf23); status = H5Tclose(tid); @@ -1686,7 +1718,6 @@ position enum3D of enum3D of difference for (i = 0; i < 4; i++) { for (j = 0; j < 3; j++) { for (k = 0; k < 2; k++) { - int l; buf53[i][j][k].p = malloc((i + 1) * sizeof(int)); buf53[i][j][k].len = i + 1; for (l = 0; l < i + 1; l++) @@ -1821,13 +1852,14 @@ void write_dset_in(hid_t loc_id, hid_t tid; hid_t dcpl; herr_t status; - int val, i, j, k, n; + int val, i, j, k, l, n; float f; int fillvalue=2; /* create 1D attributes with dimension [2], 2 elements */ hsize_t dims[1]={2}; char buf1[2][STR_SIZE]= {"ab","de"}; /* string */ + char *buf1a[2]; /* VL string */ char buf2[2]= {1,2}; /* bitfield, opaque */ s_t buf3[2]= {{1,2},{3,4}}; /* compound */ hobj_ref_t buf4[2]; /* reference */ @@ -1840,7 +1872,8 @@ void write_dset_in(hid_t loc_id, /* create 2D attributes with dimension [3][2], 6 elements */ hsize_t dims2[2]={3,2}; - char buf12[6][STR_SIZE]= {"ab","cd","ef","gh","ij","kl"}; /* string */ + char buf12[3][2][STR_SIZE]= {{"ab","cd"},{"ef","gh"},{"ij","kl"}}; /* string */ + char *buf12a[3][2]; /* VL string */ char buf22[3][2]= {{1,2},{3,4},{5,6}}; /* bitfield, opaque */ s_t buf32[6]= {{1,2},{3,4},{5,6},{7,8},{9,10},{11,12}}; /* compound */ hobj_ref_t buf42[3][2]; /* reference */ @@ -1851,9 +1884,11 @@ void write_dset_in(hid_t loc_id, /* create 3D attributes with dimension [4][3][2], 24 elements */ hsize_t dims3[3]={4,3,2}; - char buf13[24][STR_SIZE]= {"ab","cd","ef","gh","ij","kl","mn","pq", - "rs","tu","vw","xz","AB","CD","EF","GH", - "IJ","KL","MN","PQ","RS","TU","VW","XZ"}; /* string */ + char buf13[4][3][2][STR_SIZE]= {{{"ab","cd"},{"ef","gh"},{"ij","kl"}}, + {{"mn","pq"},{"rs","tu"},{"vw","xz"}}, + {{"AB","CD"},{"EF","GH"},{"IJ","KL"}}, + {{"MN","PQ"},{"RS","TU"},{"VW","XZ"}}}; /* string */ + char *buf13a[4][3][2]; /* VL string */ char buf23[4][3][2]; /* bitfield, opaque */ s_t buf33[4][3][2]; /* compound */ hobj_ref_t buf43[4][3][2]; /* reference */ @@ -1878,17 +1913,22 @@ void write_dset_in(hid_t loc_id, { for (i=0; i<2; i++) for (j=0; j<2; j++) - { buf1[i][j]='z'; - } } tid = H5Tcopy(H5T_C_S1); - status = H5Tset_size(tid,STR_SIZE); + status = H5Tset_size(tid,(size_t)STR_SIZE); write_dset(loc_id,1,dims,"string",tid,buf1); status = H5Tclose(tid); + for (i=0; i<2; i++) + buf1a[i]=buf1[i]; + tid = H5Tcopy(H5T_C_S1); + status = H5Tset_size(tid, H5T_VARIABLE); + write_dset(loc_id,1,dims,"VLstring",tid,buf1a); + status = H5Tclose(tid); + /*------------------------------------------------------------------------- * H5T_BITFIELD *------------------------------------------------------------------------- @@ -1917,7 +1957,7 @@ void write_dset_in(hid_t loc_id, } } - tid = H5Tcreate(H5T_OPAQUE, 1); + tid = H5Tcreate(H5T_OPAQUE, (size_t)1); status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ write_dset(loc_id,1,dims,"opaque",tid,buf2); status = H5Tclose(tid); @@ -2051,15 +2091,26 @@ void write_dset_in(hid_t loc_id, if (make_diffs) { - memset(buf12, 'z', sizeof buf12); + for (i=0; i<3; i++) + for (j=0; j<2; j++) + for (k=0; k<2; k++) + buf12[i][j][k]='z'; } tid = H5Tcopy(H5T_C_S1); - status = H5Tset_size(tid,STR_SIZE); + status = H5Tset_size(tid,(size_t)STR_SIZE); write_dset(loc_id,2,dims2,"string2D",tid,buf12); status = H5Tclose(tid); + for (i=0; i<3; i++) + for (j=0; j<2; j++) + buf12a[i][j]=buf12[i][j]; + tid = H5Tcopy(H5T_C_S1); + status = H5Tset_size(tid, H5T_VARIABLE); + write_dset(loc_id,2,dims2,"VLstring2D",tid,buf12a); + status = H5Tclose(tid); + /*------------------------------------------------------------------------- * H5T_BITFIELD *------------------------------------------------------------------------- @@ -2079,7 +2130,7 @@ void write_dset_in(hid_t loc_id, * H5T_OPAQUE *------------------------------------------------------------------------- */ - tid = H5Tcreate(H5T_OPAQUE, 1); + tid = H5Tcreate(H5T_OPAQUE, (size_t)1); status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ write_dset(loc_id,2,dims2,"opaque2D",tid,buf22); status = H5Tclose(tid); @@ -2135,8 +2186,6 @@ void write_dset_in(hid_t loc_id, n = 0; for(i = 0; i < 3; i++) for(j = 0; j < 2; j++) { - int l; - buf52[i][j].p = malloc((i + 1) * sizeof(int)); buf52[i][j].len = i + 1; for(l = 0; l < i + 1; l++) @@ -2213,14 +2262,27 @@ void write_dset_in(hid_t loc_id, if (make_diffs) { - memset(buf13,'z',sizeof buf13); + for (i=0; i<4; i++) + for (j=0; j<3; j++) + for (k=0; k<2; k++) + for (l=0; l<2; l++) + buf13[i][j][k][l]='z'; } tid = H5Tcopy(H5T_C_S1); - status = H5Tset_size(tid,STR_SIZE); + status = H5Tset_size(tid,(size_t)STR_SIZE); write_dset(loc_id,3,dims3,"string3D",tid,buf13); status = H5Tclose(tid); + for (i=0; i<4; i++) + for (j=0; j<3; j++) + for (k=0; k<2; k++) + buf13a[i][j][k]=buf13[i][j][k]; + tid = H5Tcopy(H5T_C_S1); + status = H5Tset_size(tid, H5T_VARIABLE); + write_dset(loc_id,3,dims3,"VLstring3D",tid,buf13a); + status = H5Tclose(tid); + /*------------------------------------------------------------------------- * H5T_BITFIELD *------------------------------------------------------------------------- @@ -2246,7 +2308,7 @@ void write_dset_in(hid_t loc_id, * H5T_OPAQUE *------------------------------------------------------------------------- */ - tid = H5Tcreate(H5T_OPAQUE, 1); + tid = H5Tcreate(H5T_OPAQUE, (size_t)1); status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ write_dset(loc_id,3,dims3,"opaque3D",tid,buf23); status = H5Tclose(tid); @@ -2316,8 +2378,6 @@ void write_dset_in(hid_t loc_id, for(i = 0; i < 4; i++) for(j = 0; j < 3; j++) for(k = 0; k < 2; k++) { - int l; - buf53[i][j][k].p = malloc((i + 1) * sizeof(int)); buf53[i][j][k].len = i + 1; for(l = 0; l < i + 1; l++) @@ -2410,7 +2470,7 @@ void gen_datareg(hid_t fid, int i; /* allocate the buffer for write the references */ - rbuf = calloc(2, sizeof(hdset_reg_ref_t)); + rbuf = calloc((size_t)2, sizeof(hdset_reg_ref_t)); /* allocate the buffer for write the data dataset */ buf = malloc(10 * 10 * sizeof(int)); @@ -2455,7 +2515,7 @@ void gen_datareg(hid_t fid, coord[3][0]=2; coord[3][1]=5; coord[4][0]=1; coord[4][1]=7; } - H5Sselect_elements(sid1,H5S_SELECT_SET,5,coord); + H5Sselect_elements(sid1,H5S_SELECT_SET,(size_t)5,(const hsize_t *)coord); H5Sget_select_npoints(sid1); /* store second dataset region */ @@ -2524,7 +2584,7 @@ int test_hyperslab(const char *fname, goto out; /* create a evenly divided buffer from 0 to 127 */ - buf = (char *)HDmalloc((unsigned)(nelmts * size)); + buf = (char *)HDmalloc((size_t)(nelmts * size)); s = 1024 * 1024 / 127; for(i = 0, j = 0, c = 0; i < 1024 * 1024; j++, i++) { if(j == s) { diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 008b6b9..a348ca0 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -266,8 +266,6 @@ hsize_t diff_array( void *_mem1, size_t size; /* size of datum */ unsigned char *mem1 = (unsigned char*)_mem1; unsigned char *mem2 = (unsigned char*)_mem2; - unsigned char *tmp1; - unsigned char *tmp2; hsize_t acc[32]; /* accumulator position */ hsize_t pos[32]; /* matrix position */ int ph=1; /* print header */ @@ -288,23 +286,26 @@ hsize_t diff_array( void *_mem1, if(H5Tis_variable_str(m_type)) { - tmp1 = ((unsigned char**)mem1)[0]; - tmp2 = ((unsigned char**)mem2)[0]; - nfound+=diff_datum( - tmp1, - tmp2, - m_type, - (hsize_t)0, - rank, - dims, - acc, - pos, - options, - name1, - name2, - container1_id, - container2_id, - &ph); + for ( i = 0; i < nelmts; i++) + { + nfound+=diff_datum( + ((unsigned char**)mem1)[(size_t)i], + ((unsigned char**)mem2)[(size_t)i], + m_type, + i, + rank, + dims, + acc, + pos, + options, + name1, + name2, + container1_id, + container2_id, + &ph); + if (options->n && nfound>=options->count) + return nfound; + } /* i */ } else @@ -515,42 +516,35 @@ hsize_t diff_datum(void *_mem1, case H5T_STRING: { - H5T_str_t pad; char *s; - if(H5Tis_variable_str(m_type)) - { - /* mem1 is the pointer into the struct where a `char*' is stored. So we have - * to dereference the pointer to get the `char*' to pass to HDstrlen(). */ - s = *(char**)mem1; - if(s!=NULL) - size = HDstrlen(s); - } - else - { - s = (char *)mem1; - size = H5Tget_size(m_type); - } - - pad = H5Tget_strpad(m_type); - + /* Get pointer to first string to compare */ + s = (char *)mem1; + /* check for NULL pointer for string */ if(s!=NULL) { + if(H5Tis_variable_str(m_type)) + size = HDstrlen(s); + else + size = H5Tget_size(m_type); + + pad = H5Tget_strpad(m_type); + for (u=0; u and -Referenced dataset 5904 5904 +Referenced dataset 10272 10272 ------------------------------------------------------------ Region blocks block #0 (2,2)-(7,7) (0,0)-(2,2) diff --git a/tools/testfiles/h5diff_70.txt b/tools/testfiles/h5diff_70.txt index fe3e03f..bc9efbe 100644 --- a/tools/testfiles/h5diff_70.txt +++ b/tools/testfiles/h5diff_70.txt @@ -19,6 +19,15 @@ position string of string of difference [ 1 ] d z [ 1 ] e z 4 differences found +attribute: > and > +size: [2] [2] +position VLstring of VLstring of difference +------------------------------------------------------------ +[ 0 ] a z +[ 0 ] b z +[ 1 ] d z +[ 1 ] e z +4 differences found attribute: > and > size: [2] [2] position bitfield of bitfield of difference @@ -99,6 +108,23 @@ position string2D of string2D of difference [ 2 1 ] k z [ 2 1 ] l z 12 differences found +attribute: > and > +size: [3x2] [3x2] +position VLstring2D of VLstring2D of difference +------------------------------------------------------------ +[ 0 0 ] a z +[ 0 0 ] b z +[ 0 1 ] c z +[ 0 1 ] d z +[ 1 0 ] e z +[ 1 0 ] f z +[ 1 1 ] g z +[ 1 1 ] h z +[ 2 0 ] i z +[ 2 0 ] j z +[ 2 1 ] k z +[ 2 1 ] l z +12 differences found attribute: > and > size: [3x2] [3x2] position bitfield2D of bitfield2D of difference @@ -262,6 +288,58 @@ position string3D of string3D of difference [ 3 2 1 ] X z [ 3 2 1 ] Z z 47 differences found +attribute: > and > +size: [4x3x2] [4x3x2] +position VLstring3D of VLstring3D of difference +------------------------------------------------------------ +[ 0 0 0 ] a z +[ 0 0 0 ] b z +[ 0 0 1 ] c z +[ 0 0 1 ] d z +[ 0 1 0 ] e z +[ 0 1 0 ] f z +[ 0 1 1 ] g z +[ 0 1 1 ] h z +[ 0 2 0 ] i z +[ 0 2 0 ] j z +[ 0 2 1 ] k z +[ 0 2 1 ] l z +[ 1 0 0 ] m z +[ 1 0 0 ] n z +[ 1 0 1 ] p z +[ 1 0 1 ] q z +[ 1 1 0 ] r z +[ 1 1 0 ] s z +[ 1 1 1 ] t z +[ 1 1 1 ] u z +[ 1 2 0 ] v z +[ 1 2 0 ] w z +[ 1 2 1 ] x z +[ 2 0 0 ] A z +[ 2 0 0 ] B z +[ 2 0 1 ] C z +[ 2 0 1 ] D z +[ 2 1 0 ] E z +[ 2 1 0 ] F z +[ 2 1 1 ] G z +[ 2 1 1 ] H z +[ 2 2 0 ] I z +[ 2 2 0 ] J z +[ 2 2 1 ] K z +[ 2 2 1 ] L z +[ 3 0 0 ] M z +[ 3 0 0 ] N z +[ 3 0 1 ] P z +[ 3 0 1 ] Q z +[ 3 1 0 ] R z +[ 3 1 0 ] S z +[ 3 1 1 ] T z +[ 3 1 1 ] U z +[ 3 2 0 ] V z +[ 3 2 0 ] W z +[ 3 2 1 ] X z +[ 3 2 1 ] Z z +47 differences found attribute: > and > size: [4x3x2] [4x3x2] position bitfield3D of bitfield3D of difference @@ -612,6 +690,15 @@ position string of string of difference [ 1 ] d z [ 1 ] e z 4 differences found +attribute: > and > +size: [2] [2] +position VLstring of VLstring of difference +------------------------------------------------------------ +[ 0 ] a z +[ 0 ] b z +[ 1 ] d z +[ 1 ] e z +4 differences found attribute: > and > size: [2] [2] position bitfield of bitfield of difference @@ -694,6 +781,23 @@ position string2D of string2D of difference [ 2 1 ] k z [ 2 1 ] l z 12 differences found +attribute: > and > +size: [3x2] [3x2] +position VLstring2D of VLstring2D of difference +------------------------------------------------------------ +[ 0 0 ] a z +[ 0 0 ] b z +[ 0 1 ] c z +[ 0 1 ] d z +[ 1 0 ] e z +[ 1 0 ] f z +[ 1 1 ] g z +[ 1 1 ] h z +[ 2 0 ] i z +[ 2 0 ] j z +[ 2 1 ] k z +[ 2 1 ] l z +12 differences found attribute: > and > size: [3x2] [3x2] position bitfield2D of bitfield2D of difference @@ -859,6 +963,58 @@ position string3D of string3D of difference [ 3 2 1 ] X z [ 3 2 1 ] Z z 47 differences found +attribute: > and > +size: [4x3x2] [4x3x2] +position VLstring3D of VLstring3D of difference +------------------------------------------------------------ +[ 0 0 0 ] a z +[ 0 0 0 ] b z +[ 0 0 1 ] c z +[ 0 0 1 ] d z +[ 0 1 0 ] e z +[ 0 1 0 ] f z +[ 0 1 1 ] g z +[ 0 1 1 ] h z +[ 0 2 0 ] i z +[ 0 2 0 ] j z +[ 0 2 1 ] k z +[ 0 2 1 ] l z +[ 1 0 0 ] m z +[ 1 0 0 ] n z +[ 1 0 1 ] p z +[ 1 0 1 ] q z +[ 1 1 0 ] r z +[ 1 1 0 ] s z +[ 1 1 1 ] t z +[ 1 1 1 ] u z +[ 1 2 0 ] v z +[ 1 2 0 ] w z +[ 1 2 1 ] x z +[ 2 0 0 ] A z +[ 2 0 0 ] B z +[ 2 0 1 ] C z +[ 2 0 1 ] D z +[ 2 1 0 ] E z +[ 2 1 0 ] F z +[ 2 1 1 ] G z +[ 2 1 1 ] H z +[ 2 2 0 ] I z +[ 2 2 0 ] J z +[ 2 2 1 ] K z +[ 2 2 1 ] L z +[ 3 0 0 ] M z +[ 3 0 0 ] N z +[ 3 0 1 ] P z +[ 3 0 1 ] Q z +[ 3 1 0 ] R z +[ 3 1 0 ] S z +[ 3 1 1 ] T z +[ 3 1 1 ] U z +[ 3 2 0 ] V z +[ 3 2 0 ] W z +[ 3 2 1 ] X z +[ 3 2 1 ] Z z +47 differences found attribute: > and > size: [4x3x2] [4x3x2] position bitfield3D of bitfield3D of difference @@ -1200,7 +1356,7 @@ position float3D of float3D of difference [ 3 2 0 ] 23 0 23 [ 3 2 1 ] 24 0 24 24 differences found -456 differences found +519 differences found group : and 0 differences found attribute: > and > @@ -1212,6 +1368,15 @@ position string of string of difference [ 1 ] d z [ 1 ] e z 4 differences found +attribute: > and > +size: [2] [2] +position VLstring of VLstring of difference +------------------------------------------------------------ +[ 0 ] a z +[ 0 ] b z +[ 1 ] d z +[ 1 ] e z +4 differences found attribute: > and > size: [2] [2] position bitfield of bitfield of difference @@ -1292,6 +1457,23 @@ position string2D of string2D of difference [ 2 1 ] k z [ 2 1 ] l z 12 differences found +attribute: > and > +size: [3x2] [3x2] +position VLstring2D of VLstring2D of difference +------------------------------------------------------------ +[ 0 0 ] a z +[ 0 0 ] b z +[ 0 1 ] c z +[ 0 1 ] d z +[ 1 0 ] e z +[ 1 0 ] f z +[ 1 1 ] g z +[ 1 1 ] h z +[ 2 0 ] i z +[ 2 0 ] j z +[ 2 1 ] k z +[ 2 1 ] l z +12 differences found attribute: > and > size: [3x2] [3x2] position bitfield2D of bitfield2D of difference @@ -1455,6 +1637,58 @@ position string3D of string3D of difference [ 3 2 1 ] X z [ 3 2 1 ] Z z 47 differences found +attribute: > and > +size: [4x3x2] [4x3x2] +position VLstring3D of VLstring3D of difference +------------------------------------------------------------ +[ 0 0 0 ] a z +[ 0 0 0 ] b z +[ 0 0 1 ] c z +[ 0 0 1 ] d z +[ 0 1 0 ] e z +[ 0 1 0 ] f z +[ 0 1 1 ] g z +[ 0 1 1 ] h z +[ 0 2 0 ] i z +[ 0 2 0 ] j z +[ 0 2 1 ] k z +[ 0 2 1 ] l z +[ 1 0 0 ] m z +[ 1 0 0 ] n z +[ 1 0 1 ] p z +[ 1 0 1 ] q z +[ 1 1 0 ] r z +[ 1 1 0 ] s z +[ 1 1 1 ] t z +[ 1 1 1 ] u z +[ 1 2 0 ] v z +[ 1 2 0 ] w z +[ 1 2 1 ] x z +[ 2 0 0 ] A z +[ 2 0 0 ] B z +[ 2 0 1 ] C z +[ 2 0 1 ] D z +[ 2 1 0 ] E z +[ 2 1 0 ] F z +[ 2 1 1 ] G z +[ 2 1 1 ] H z +[ 2 2 0 ] I z +[ 2 2 0 ] J z +[ 2 2 1 ] K z +[ 2 2 1 ] L z +[ 3 0 0 ] M z +[ 3 0 0 ] N z +[ 3 0 1 ] P z +[ 3 0 1 ] Q z +[ 3 1 0 ] R z +[ 3 1 0 ] S z +[ 3 1 1 ] T z +[ 3 1 1 ] U z +[ 3 2 0 ] V z +[ 3 2 0 ] W z +[ 3 2 1 ] X z +[ 3 2 1 ] Z z +47 differences found attribute: > and > size: [4x3x2] [4x3x2] position bitfield3D of bitfield3D of difference diff --git a/tools/testfiles/h5diff_80.txt b/tools/testfiles/h5diff_80.txt index 90ee5c0..9c0bd33 100644 --- a/tools/testfiles/h5diff_80.txt +++ b/tools/testfiles/h5diff_80.txt @@ -8,6 +8,9 @@ file1 file2 x x /dset x x /dsetref x x /g1 + x x /g1/VLstring + x x /g1/VLstring2D + x x /g1/VLstring3D x x /g1/array x x /g1/array2D x x /g1/array3D @@ -53,6 +56,84 @@ dataset: and 0 differences found group : and 0 differences found +dataset: and +size: [2] [2] +position VLstring VLstring difference +------------------------------------------------------------ +[ 0 ] a z +[ 0 ] b z +[ 1 ] d z +[ 1 ] e z +4 differences found +dataset: and +size: [3x2] [3x2] +position VLstring2D VLstring2D difference +------------------------------------------------------------ +[ 0 0 ] a z +[ 0 0 ] b z +[ 0 1 ] c z +[ 0 1 ] d z +[ 1 0 ] e z +[ 1 0 ] f z +[ 1 1 ] g z +[ 1 1 ] h z +[ 2 0 ] i z +[ 2 0 ] j z +[ 2 1 ] k z +[ 2 1 ] l z +12 differences found +dataset: and +size: [4x3x2] [4x3x2] +position VLstring3D VLstring3D difference +------------------------------------------------------------ +[ 0 0 0 ] a z +[ 0 0 0 ] b z +[ 0 0 1 ] c z +[ 0 0 1 ] d z +[ 0 1 0 ] e z +[ 0 1 0 ] f z +[ 0 1 1 ] g z +[ 0 1 1 ] h z +[ 0 2 0 ] i z +[ 0 2 0 ] j z +[ 0 2 1 ] k z +[ 0 2 1 ] l z +[ 1 0 0 ] m z +[ 1 0 0 ] n z +[ 1 0 1 ] p z +[ 1 0 1 ] q z +[ 1 1 0 ] r z +[ 1 1 0 ] s z +[ 1 1 1 ] t z +[ 1 1 1 ] u z +[ 1 2 0 ] v z +[ 1 2 0 ] w z +[ 1 2 1 ] x z +[ 2 0 0 ] A z +[ 2 0 0 ] B z +[ 2 0 1 ] C z +[ 2 0 1 ] D z +[ 2 1 0 ] E z +[ 2 1 0 ] F z +[ 2 1 1 ] G z +[ 2 1 1 ] H z +[ 2 2 0 ] I z +[ 2 2 0 ] J z +[ 2 2 1 ] K z +[ 2 2 1 ] L z +[ 3 0 0 ] M z +[ 3 0 0 ] N z +[ 3 0 1 ] P z +[ 3 0 1 ] Q z +[ 3 1 0 ] R z +[ 3 1 0 ] S z +[ 3 1 1 ] T z +[ 3 1 1 ] U z +[ 3 2 0 ] V z +[ 3 2 0 ] W z +[ 3 2 1 ] X z +[ 3 2 1 ] Z z +47 differences found dataset: and size: [2] [2] position array array difference @@ -776,7 +857,7 @@ position vlen3D vlen3D difference [ 3 2 1 ] 59 0 59 59 differences found dataset: and -Referenced dataset 5904 5904 +Referenced dataset 10272 10272 ------------------------------------------------------------ Region blocks block #0 (2,2)-(7,7) (0,0)-(2,2) diff --git a/tools/testfiles/h5diff_attr1.h5 b/tools/testfiles/h5diff_attr1.h5 index e261486..c44066b 100644 Binary files a/tools/testfiles/h5diff_attr1.h5 and b/tools/testfiles/h5diff_attr1.h5 differ diff --git a/tools/testfiles/h5diff_attr2.h5 b/tools/testfiles/h5diff_attr2.h5 index 0a59fc5..5de3303 100644 Binary files a/tools/testfiles/h5diff_attr2.h5 and b/tools/testfiles/h5diff_attr2.h5 differ diff --git a/tools/testfiles/h5diff_basic2.h5 b/tools/testfiles/h5diff_basic2.h5 index 209485f..ad45cc0 100644 Binary files a/tools/testfiles/h5diff_basic2.h5 and b/tools/testfiles/h5diff_basic2.h5 differ diff --git a/tools/testfiles/h5diff_dset1.h5 b/tools/testfiles/h5diff_dset1.h5 index 3f853be..ab6b96f 100644 Binary files a/tools/testfiles/h5diff_dset1.h5 and b/tools/testfiles/h5diff_dset1.h5 differ diff --git a/tools/testfiles/h5diff_dset2.h5 b/tools/testfiles/h5diff_dset2.h5 index 1f14d29..3db0c8e 100644 Binary files a/tools/testfiles/h5diff_dset2.h5 and b/tools/testfiles/h5diff_dset2.h5 differ -- cgit v0.12