Skip to content

Commit

Permalink
Fix H5ls tests
Browse files Browse the repository at this point in the history
Warning fix
  • Loading branch information
jhendersonHDF committed Jun 27, 2024
1 parent d6f3a5d commit 52de238
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 33 deletions.
12 changes: 6 additions & 6 deletions tools/test/h5diff/h5diffgentest.c
Original file line number Diff line number Diff line change
Expand Up @@ -6850,13 +6850,13 @@ write_attr_strings(hid_t loc_id, const char *dset_name, hid_t fid,
*-------------------------------------------------------------------------
*/

n = 1;
f = 1;
for (i = 0; i < 24; i++)
for (j = 0; j < 2; j++) {
if (make_diffs)
buf93[i][j] = 0;
else
buf93[i][j] = n++;
buf93[i][j] = f++;
}

tid = H5Tcomplex_create(H5T_NATIVE_FLOAT);
Expand Down Expand Up @@ -7885,13 +7885,13 @@ write_attr_in(hid_t loc_id, const char *dset_name, hid_t fid,
*-------------------------------------------------------------------------
*/

n = 1;
f = 1;
for (i = 0; i < 24; i++)
for (j = 0; j < 2; j++) {
if (make_diffs)
buf93[i][j] = 0;
else
buf93[i][j] = n++;
buf93[i][j] = f++;
}

tid = H5Tcomplex_create(H5T_NATIVE_FLOAT);
Expand Down Expand Up @@ -8562,13 +8562,13 @@ write_dset_in(hid_t loc_id, const char *dset_name, hid_t fid,
*-------------------------------------------------------------------------
*/

n = 1;
f = 1;
for (i = 0; i < 24; i++)
for (j = 0; j < 2; j++) {
if (make_diffs)
buf93[i][j] = 0;
else
buf93[i][j] = n++;
buf93[i][j] = f++;
}

tid = H5Tcomplex_create(H5T_NATIVE_FLOAT);
Expand Down
8 changes: 4 additions & 4 deletions tools/test/h5dump/h5dumpgentest.c
Original file line number Diff line number Diff line change
Expand Up @@ -4506,10 +4506,10 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
* H5T_COMPLEX
*-------------------------------------------------------------------------
*/
n = 1;
f = 1;
for (i = 0; i < 24; i++)
for (j = 0; j < 2; j++)
buf93[i][j] = n++;
buf93[i][j] = f++;

tid = H5Tcomplex_create(H5T_NATIVE_FLOAT);
write_attr(loc_id, 3, dims3, "complex3D", tid, buf93);
Expand Down Expand Up @@ -4970,10 +4970,10 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
* H5T_COMPLEX
*-------------------------------------------------------------------------
*/
n = 1;
f = 1;
for (i = 0; i < 24; i++)
for (j = 0; j < 2; j++)
buf93[i][j] = n++;
buf93[i][j] = f++;

tid = H5Tcomplex_create(H5T_NATIVE_FLOAT);
write_dset(loc_id, 3, dims3, "complex3D", tid, buf93);
Expand Down
60 changes: 39 additions & 21 deletions tools/test/h5ls/expected/tattr2.ls
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,30 @@ dset Dataset {2/2}
Type: 8-bit bitfield
Attribute: bitfield3D {4, 3, 2}
Type: 8-bit bitfield
Attribute: complex {2}
Type: complex number of
IEEE 32-bit little-endian float
Attribute: complex2D {3, 2}
Type: complex number of
IEEE 32-bit little-endian float
Attribute: complex3D {4, 3, 2}
Type: complex number of
IEEE 32-bit little-endian float
Attribute: compound {2}
Type: struct {
"a" +0 8-bit integer
"b" +4 IEEE 64-bit little-endian float
} 12 bytes
"b" +8 IEEE 64-bit little-endian float
} 16 bytes
Attribute: compound2D {3, 2}
Type: struct {
"a" +0 8-bit integer
"b" +4 IEEE 64-bit little-endian float
} 12 bytes
"b" +8 IEEE 64-bit little-endian float
} 16 bytes
Attribute: compound3D {4, 3, 2}
Type: struct {
"a" +0 8-bit integer
"b" +4 IEEE 64-bit little-endian float
} 12 bytes
"b" +8 IEEE 64-bit little-endian float
} 16 bytes
Attribute: enum {2}
Type: enum 32-bit little-endian integer {
RED = 0
Expand Down Expand Up @@ -70,11 +79,11 @@ dset Dataset {2/2}
Attribute: reference3D {4, 3, 2}
Type: object reference
Attribute: string {2}
Type: 2-byte null-terminated ASCII string
Type: 3-byte null-terminated ASCII string
Attribute: string2D {3, 2}
Type: 2-byte null-terminated ASCII string
Type: 3-byte null-terminated ASCII string
Attribute: string3D {4, 3, 2}
Type: 2-byte null-terminated ASCII string
Type: 3-byte null-terminated ASCII string
Attribute: vlen {2}
Type: variable length of
32-bit little-endian integer
Expand All @@ -84,7 +93,7 @@ dset Dataset {2/2}
Attribute: vlen3D {4, 3, 2}
Type: variable length of
32-bit little-endian integer
Location: 1:976
Location: 1:800
Links: 1
Storage: 8 logical bytes, 0 allocated bytes
Type: 32-bit little-endian integer
Expand All @@ -101,21 +110,30 @@ g1 Group
Type: 8-bit bitfield
Attribute: bitfield3D {4, 3, 2}
Type: 8-bit bitfield
Attribute: complex {2}
Type: complex number of
IEEE 32-bit little-endian float
Attribute: complex2D {3, 2}
Type: complex number of
IEEE 32-bit little-endian float
Attribute: complex3D {4, 3, 2}
Type: complex number of
IEEE 32-bit little-endian float
Attribute: compound {2}
Type: struct {
"a" +0 8-bit integer
"b" +4 IEEE 64-bit little-endian float
} 12 bytes
"b" +8 IEEE 64-bit little-endian float
} 16 bytes
Attribute: compound2D {3, 2}
Type: struct {
"a" +0 8-bit integer
"b" +4 IEEE 64-bit little-endian float
} 12 bytes
"b" +8 IEEE 64-bit little-endian float
} 16 bytes
Attribute: compound3D {4, 3, 2}
Type: struct {
"a" +0 8-bit integer
"b" +4 IEEE 64-bit little-endian float
} 12 bytes
"b" +8 IEEE 64-bit little-endian float
} 16 bytes
Attribute: enum {2}
Type: enum 32-bit little-endian integer {
RED = 0
Expand Down Expand Up @@ -153,11 +171,11 @@ g1 Group
Type: 1-byte opaque type
(tag = "1-byte opaque type")
Attribute: string {2}
Type: 2-byte null-terminated ASCII string
Type: 3-byte null-terminated ASCII string
Attribute: string2D {3, 2}
Type: 2-byte null-terminated ASCII string
Type: 3-byte null-terminated ASCII string
Attribute: string3D {4, 3, 2}
Type: 2-byte null-terminated ASCII string
Type: 3-byte null-terminated ASCII string
Attribute: vlen {2}
Type: variable length of
32-bit little-endian integer
Expand All @@ -167,8 +185,8 @@ g1 Group
Attribute: vlen3D {4, 3, 2}
Type: variable length of
32-bit little-endian integer
Location: 1:2176
Location: 1:1400
Links: 1
g2 Group
Location: 1:2824
Location: 1:2104
Links: 1
4 changes: 2 additions & 2 deletions tools/test/h5repack/h5repacktst.c
Original file line number Diff line number Diff line change
Expand Up @@ -4672,13 +4672,13 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
*-------------------------------------------------------------------------
*/

n = 1;
f = 1;
for (i = 0; i < 24; i++)
for (j = 0; j < 2; j++) {
if (make_diffs)
buf93[i][j] = 0;
else
buf93[i][j] = n++;
buf93[i][j] = f++;
}

if ((tid = H5Tcomplex_create(H5T_NATIVE_FLOAT)) < 0)
Expand Down

0 comments on commit 52de238

Please sign in to comment.