diff options
author | vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com> | 2021-08-05 18:38:47 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-05 18:38:47 (GMT) |
commit | 58759a7355dc1c3debde32944c373509fe078a6f (patch) | |
tree | 76dcc9ea92df237cf081f8988b6315f6db78475e /test | |
parent | 44c8d4aba3f7bc40b25e18d3da69bc4e5c749bae (diff) | |
parent | a7f3feee8718450c3e32fcbb2f90065240b6b9b5 (diff) | |
download | hdf5-58759a7355dc1c3debde32944c373509fe078a6f.zip hdf5-58759a7355dc1c3debde32944c373509fe078a6f.tar.gz hdf5-58759a7355dc1c3debde32944c373509fe078a6f.tar.bz2 |
Merge pull request #31 from HDFGroup/feature/vfd_swmr
Feature/vfd swmr
Diffstat (limited to 'test')
-rw-r--r-- | test/h5test.c | 1 | ||||
-rw-r--r-- | test/vfd_swmr.c | 30 | ||||
-rw-r--r-- | test/vfd_swmr_dsetchks_writer.c | 8 | ||||
-rw-r--r-- | test/vfd_swmr_group_writer.c | 16 |
4 files changed, 30 insertions, 25 deletions
diff --git a/test/h5test.c b/test/h5test.c index 9ec29ed..755ae93 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -1925,7 +1925,6 @@ static const H5FD_class_t H5FD_dummy_g = { NULL, /* lock */ NULL, /* unlock */ NULL, /* del */ - NULL, /* dedup */ H5FD_FLMAP_DICHOTOMY /* fl_map */ }; diff --git a/test/vfd_swmr.c b/test/vfd_swmr.c index 09dee38..3ed73c1 100644 --- a/test/vfd_swmr.c +++ b/test/vfd_swmr.c @@ -884,7 +884,7 @@ test_writer_md(void) hid_t sid = -1; /* Dataspace ID */ hid_t did = -1; /* Dataset ID */ int * rwbuf = NULL; /* Data buffer for writing */ - H5O_info_t oinfo; /* Object metadata information */ + H5O_info2_t oinfo; /* Object metadata information */ char dname[100]; /* Name of dataset */ hsize_t dims[2] = {50, 20}; /* Dataset dimension sizes */ hsize_t max_dims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* Dataset maximum dimension sizes */ @@ -961,7 +961,7 @@ test_writer_md(void) FAIL_STACK_ERROR /* Get dataset object header address */ - if (H5Oget_info(did, &oinfo, H5O_INFO_BASIC) < 0) + if (H5Oget_info3(did, &oinfo, H5O_INFO_BASIC) < 0) FAIL_STACK_ERROR /* Close the dataset */ @@ -998,7 +998,7 @@ test_writer_md(void) FAIL_STACK_ERROR /* Get dataset object info */ - if (H5Oget_info(did, &oinfo, H5O_INFO_BASIC) < 0) + if (H5Oget_info3(did, &oinfo, H5O_INFO_BASIC) < 0) FAIL_STACK_ERROR /* Close the dataset */ @@ -1032,7 +1032,7 @@ test_writer_md(void) FAIL_STACK_ERROR /* Get dataset object info */ - if (H5Oget_info(did, &oinfo, H5O_INFO_BASIC) < 0) + if (H5Oget_info3(did, &oinfo, H5O_INFO_BASIC) < 0) FAIL_STACK_ERROR /* Close the dataset */ @@ -1166,16 +1166,16 @@ test_file_end_tick_concur(void) static unsigned test_reader_md_concur(void) { - unsigned i = 0; /* Local index variables */ - uint8_t * buf = NULL; /* Data page from the page buffer */ - hid_t dcpl = -1; /* Dataset creation property list */ - hid_t sid = -1; /* Dataspace ID */ - hid_t did = -1; /* Dataset ID */ - int * rwbuf = NULL; /* Data buffer for writing */ - H5O_info_t oinfo; /* Object metadata information */ - char dname[100]; /* Name of dataset */ - hsize_t dims[2] = {50, 20}; /* Dataset dimension sizes */ - hsize_t max_dims[2] = /* Dataset maximum dimension sizes */ + unsigned i = 0; /* Local index variables */ + uint8_t * buf = NULL; /* Data page from the page buffer */ + hid_t dcpl = -1; /* Dataset creation property list */ + hid_t sid = -1; /* Dataspace ID */ + hid_t did = -1; /* Dataset ID */ + int * rwbuf = NULL; /* Data buffer for writing */ + H5O_info2_t oinfo; /* Object metadata information */ + char dname[100]; /* Name of dataset */ + hsize_t dims[2] = {50, 20}; /* Dataset dimension sizes */ + hsize_t max_dims[2] = /* Dataset maximum dimension sizes */ {H5S_UNLIMITED, H5S_UNLIMITED}; hsize_t chunk_dims[2] = {2, 5}; /* Dataset chunked dimension sizes */ unsigned num_entries = 0; /* Number of entries in the index */ @@ -1519,7 +1519,7 @@ test_reader_md_concur(void) FAIL_STACK_ERROR /* Get dataset object header address */ - if (H5Oget_info(did, &oinfo, H5O_INFO_BASIC) < 0) + if (H5Oget_info3(did, &oinfo, H5O_INFO_BASIC) < 0) FAIL_STACK_ERROR /* Close the dataset */ diff --git a/test/vfd_swmr_dsetchks_writer.c b/test/vfd_swmr_dsetchks_writer.c index 1d9bc4c..a02a042 100644 --- a/test/vfd_swmr_dsetchks_writer.c +++ b/test/vfd_swmr_dsetchks_writer.c @@ -265,10 +265,14 @@ state_init(state_t *s, int argc, char **argv) int ch; char tfile[PATH_MAX]; char * end; + char * base; + + if (H5_basename(tfile, base) < 0) + TEST_ERROR *s = ALL_HID_INITIALIZER; esnprintf(tfile, sizeof(tfile), "%s", argv[0]); - esnprintf(s->progname, sizeof(s->progname), "%s", basename(tfile)); + esnprintf(s->progname, sizeof(s->progname), "%s", base); while ((ch = getopt(argc, argv, "siferom:n:x:y:g:p:t:l:bqSNu:c:")) != -1) { switch (ch) { @@ -370,6 +374,8 @@ state_init(state_t *s, int argc, char **argv) argc -= optind; argv += optind; + HDfree(base); + /* Require to specify at least -s or -i or -f or -e or -r option */ if (!s->single_index && !s->implicit_index && !s->fa_index && !s->ea_index && !s->bt2_index) { printf("Require to specify at least -s or -i or -f or -e or -r option\n"); diff --git a/test/vfd_swmr_group_writer.c b/test/vfd_swmr_group_writer.c index f491353..c758781 100644 --- a/test/vfd_swmr_group_writer.c +++ b/test/vfd_swmr_group_writer.c @@ -3031,8 +3031,8 @@ verify_group(state_t *s, unsigned int which) esnprintf(name, sizeof(name), "/group-%u", which); - if ((g = H5Gopen(s->file, name, H5P_DEFAULT)) < 0) { - HDprintf("H5Gopen failed\n"); + if ((g = H5Gopen2(s->file, name, H5P_DEFAULT)) < 0) { + HDprintf("H5Gopen2 failed\n"); TEST_ERROR; } @@ -4078,8 +4078,8 @@ vrfy_create_group(state_t *s, unsigned int which) esnprintf(name, sizeof(name), "/group-%u", which); - if ((g = H5Gopen(s->file, name, H5P_DEFAULT)) < 0) { - HDprintf("H5Gopen failed\n"); + if ((g = H5Gopen2(s->file, name, H5P_DEFAULT)) < 0) { + HDprintf("H5Gopen2 failed\n"); TEST_ERROR; } @@ -4195,8 +4195,8 @@ vrfy_create_group_id(state_t *s, unsigned int which, bool dense_to_compact) esnprintf(name, sizeof(name), "/group-%u", which); - if ((g = H5Gopen(s->file, name, H5P_DEFAULT)) < 0) { - HDprintf("H5Gopen failed\n"); + if ((g = H5Gopen2(s->file, name, H5P_DEFAULT)) < 0) { + HDprintf("H5Gopen2 failed\n"); TEST_ERROR; } @@ -4569,8 +4569,8 @@ vrfy_move_one_group(state_t *s, hid_t obj_id, const char *name, const char *newn TEST_ERROR; } - if ((g = H5Gopen(obj_id, newname, H5P_DEFAULT)) < 0) { - HDprintf("H5Gopen failed\n"); + if ((g = H5Gopen2(obj_id, newname, H5P_DEFAULT)) < 0) { + HDprintf("H5Gopen2 failed\n"); TEST_ERROR; } |