diff options
author | David Young <dyoung@hdfgroup.org> | 2020-09-17 20:24:36 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-09-17 20:24:36 (GMT) |
commit | 07ad063b4b57ae54881ab523ccdbeabbebe34fc0 (patch) | |
tree | 1e3a377fbfc6197d1eb6a1816d94ecae0ee2e8d7 /test/vfd_swmr_zoo_writer.c | |
parent | 8e2053bb3d29ab8f90cd28d7e66641ac2472063e (diff) | |
download | hdf5-07ad063b4b57ae54881ab523ccdbeabbebe34fc0.zip hdf5-07ad063b4b57ae54881ab523ccdbeabbebe34fc0.tar.gz hdf5-07ad063b4b57ae54881ab523ccdbeabbebe34fc0.tar.bz2 |
Limit the repeat rate for duplicate zoo warnings to once every five
seconds.
Diffstat (limited to 'test/vfd_swmr_zoo_writer.c')
-rw-r--r-- | test/vfd_swmr_zoo_writer.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/vfd_swmr_zoo_writer.c b/test/vfd_swmr_zoo_writer.c index 3eb228a..860c4f9 100644 --- a/test/vfd_swmr_zoo_writer.c +++ b/test/vfd_swmr_zoo_writer.c @@ -215,7 +215,9 @@ main(int argc, char **argv) , .skip_compact = false , .skip_varlen = true , .max_pause_msecs = 0 + , .msgival = {.tv_sec = 5, .tv_nsec = 0} }; + struct timespec lastmsgtime = {.tv_sec = 0, .tv_nsec = 0}; bool wait_for_signal; int ch; char vector[8]; @@ -346,7 +348,7 @@ main(int argc, char **argv) ostate = initstate(seed, vector, _arraycount(vector)); - if (!create_zoo(fid, ".", config)) + if (!create_zoo(fid, ".", &lastmsgtime, config)) errx(EXIT_FAILURE, "create_zoo didn't pass self-check"); /* Avoid deadlock: flush the file before waiting for the reader's @@ -361,18 +363,18 @@ main(int argc, char **argv) if (step != 'b') errx(EXIT_FAILURE, "expected 'b' read '%c'", step); - if (!delete_zoo(fid, ".", config)) + if (!delete_zoo(fid, ".", &lastmsgtime, config)) errx(EXIT_FAILURE, "delete_zoo failed"); (void)setstate(ostate); } else { dbgf(2, "Reading zoo...\n"); - while (!validate_zoo(fid, ".", config)) + while (!validate_zoo(fid, ".", &lastmsgtime, config)) ; if (write(STDOUT_FILENO, &step, sizeof(step)) == -1) err(EXIT_FAILURE, "write"); - while (!validate_deleted_zoo(fid, ".", config)) + while (!validate_deleted_zoo(fid, ".", &lastmsgtime, config)) ; } restore_estack(es); |