summaryrefslogtreecommitdiffstats
path: root/test/ohdr.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2020-01-07 16:17:24 (GMT)
committerQuincey Koziol <koziol@lbl.gov>2020-01-07 16:17:24 (GMT)
commit7116d82f6b685261b5b4e64fada1a0a031cd7341 (patch)
tree3f93a79725006a12f227fa88090b3729d3a45f45 /test/ohdr.c
parenta08a3eaebac031a909748db05f747cec72989f5c (diff)
parentfcdcc4beb18cfb6098ec2f0e0d45db38ee59178f (diff)
downloadhdf5-7116d82f6b685261b5b4e64fada1a0a031cd7341.zip
hdf5-7116d82f6b685261b5b4e64fada1a0a031cd7341.tar.gz
hdf5-7116d82f6b685261b5b4e64fada1a0a031cd7341.tar.bz2
Merge pull request #2229 in HDFFV/hdf5 from vol_changes_to_1_12 to hdf5_1_12
* commit 'fcdcc4beb18cfb6098ec2f0e0d45db38ee59178f': Remove mismerged code Cherry pick of 0225e6d5969 Cleanups from PR reviews Remove unnecessary H5CX call Refactor H5Dvlen_get_buf_size to use optional dataset operation, with generic fallback for VOL connectors that don't implement operation Refactor all the 'H5VL_*_optional' callbacks to move the type of operation out of the va_list, so it's at least possible for another connector to know what the operation is and decide whether to implement it or not. Update h5debug to retrieve file pointer through VOL framework
Diffstat (limited to 'test/ohdr.c')
-rw-r--r--test/ohdr.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/ohdr.c b/test/ohdr.c
index 9d2d414..53d2f59 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -50,7 +50,8 @@ const char *FILENAME[] = {
* To get this data file, define H5O_ENABLE_BOGUS in src/H5Oprivate, rebuild
* the library and simply compile gen_bogus.c with that HDF5 library and run it.
*/
-#define FILE_BOGUS "tbogus.h5"
+#define FILE_BOGUS "tbogus.h5"
+#define TESTFILE_LEN 256
/* */
#define FILE_OHDR_SWMR "ohdr_swmr.h5"
@@ -473,13 +474,13 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
hid_t fid_bogus = -1; /* bogus file ID */
hid_t gid_bogus = -1; /* bogus group ID */
hid_t loc_bogus = -1; /* location: bogus file or group ID */
- char testfile[256];
+ char testfile[TESTFILE_LEN];
/* create a different name for a local copy of the data file to be
opened with rd/wr file permissions in case build and test are
done in the source directory. */
- HDstrncpy(testfile, FILE_BOGUS, HDstrlen(FILE_BOGUS));
- testfile[HDstrlen(FILE_BOGUS)]='\0';
+ HDstrncpy(testfile, FILE_BOGUS, TESTFILE_LEN);
+ testfile[TESTFILE_LEN - 1]='\0';
HDstrncat(testfile, ".copy", 5);
/* Make a copy of the data file from svn. */
@@ -759,7 +760,7 @@ count_attributes(hid_t dset_id)
{
H5O_info_t info;
- if(H5Oget_info2(dset_id, &info, H5O_INFO_ALL) < 0)
+ if(H5Oget_info2(dset_id, &info, H5O_INFO_NUM_ATTRS) < 0)
return -1;
else
return (int)info.num_attrs; /* should never exceed int bounds */