diff options
author | David Young <dyoung@hdfgroup.org> | 2020-09-03 19:44:56 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-09-03 19:58:15 (GMT) |
commit | 9bb743136ed3a262eca6e6fcbe0f0d8f5b78cd09 (patch) | |
tree | 64e13cff915ffd02c4e14efa7d68c4c832e6cb28 /test/vfd_swmr_bigset_writer.c | |
parent | 68643772e30d9be7b2d123714cc7202e9d0991cf (diff) | |
download | hdf5-9bb743136ed3a262eca6e6fcbe0f0d8f5b78cd09.zip hdf5-9bb743136ed3a262eca6e6fcbe0f0d8f5b78cd09.tar.gz hdf5-9bb743136ed3a262eca6e6fcbe0f0d8f5b78cd09.tar.bz2 |
Individually track the steps verified on each dataset. Take care
not to skip a step.
Diffstat (limited to 'test/vfd_swmr_bigset_writer.c')
-rw-r--r-- | test/vfd_swmr_bigset_writer.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/test/vfd_swmr_bigset_writer.c b/test/vfd_swmr_bigset_writer.c index 0a7c79b..7105e21 100644 --- a/test/vfd_swmr_bigset_writer.c +++ b/test/vfd_swmr_bigset_writer.c @@ -1021,7 +1021,7 @@ verify_extensible_dset(state_t *s, unsigned int which, mat_t *mat, verify_dset_attribute(ds, which, step); } - *stepp = last_step; + *stepp = step; out: if (H5Sclose(filespace) < 0) @@ -1196,19 +1196,33 @@ main(int argc, char **argv) nanosleep(&s.update_interval, NULL); } } else { + unsigned *nextstep = calloc(s.ndatasets, sizeof(*nextstep)); + unsigned finished_step; + + if (nextstep == NULL) + err(EXIT_FAILURE, "could not allocate `nextstep` array"); + for (which = s.ndatasets; which > 0; which--) open_extensible_dset(&s, which - 1); - for (step = 0; hang_back + step < s.nsteps;) { + do { + finished_step = UINT_MAX; /* the greatest step finished on + * *all* datasets + */ + for (which = s.ndatasets; which-- > 0; ) { - dbgf(2, "step %d which %d\n", step, which); - verify_extensible_dset(&s, which, mat, &step); + dbgf(2, "step %d which %d\n", nextstep[which], which); + verify_extensible_dset(&s, which, mat, &nextstep[which]); + if (nextstep[which] < finished_step) + finished_step = nextstep[which]; if (s.ndatasets <= s.nsteps) nanosleep(&s.update_interval, NULL); } if (s.ndatasets > s.nsteps) nanosleep(&s.update_interval, NULL); - } + } while (hang_back + finished_step < s.nsteps); + + free(nextstep); } for (which = 0; which < s.ndatasets; which++) |