diff options
author | Muqun Yang <myang6@hdfgroup.org> | 2021-08-03 20:25:49 (GMT) |
---|---|---|
committer | Muqun Yang <myang6@hdfgroup.org> | 2021-08-03 20:25:49 (GMT) |
commit | 85c647de12fb0f8f6d5d37738f496ba8097a5867 (patch) | |
tree | 6ebf48abe1e2d2692cc08e62d7634e1d9aed1933 /test | |
parent | da7fec09b999949a0272e28c17ccc9eb01b025d0 (diff) | |
parent | b1e75e7816b6d0fdfa9842156dd6ae5d6d816823 (diff) | |
download | hdf5-85c647de12fb0f8f6d5d37738f496ba8097a5867.zip hdf5-85c647de12fb0f8f6d5d37738f496ba8097a5867.tar.gz hdf5-85c647de12fb0f8f6d5d37738f496ba8097a5867.tar.bz2 |
Merge branch 'feature/vfd_swmr' of https://github.com/kyang2014/hdf5 into feature/vfd_swmr
Diffstat (limited to 'test')
-rw-r--r-- | test/vfd_swmr_gperf_writer.c | 59 |
1 files changed, 26 insertions, 33 deletions
diff --git a/test/vfd_swmr_gperf_writer.c b/test/vfd_swmr_gperf_writer.c index e0f0bdb..ac56ee4 100644 --- a/test/vfd_swmr_gperf_writer.c +++ b/test/vfd_swmr_gperf_writer.c @@ -4310,7 +4310,7 @@ main(int argc, char **argv) H5F_vfd_swmr_config_t config; bool wg_ret = false; bool vg_ret = false; - struct timespec start_time, end_time; + struct timespec start_time, end_time; if (!state_init(&s, argc, argv)) { printf("state_init failed\n"); @@ -4351,38 +4351,34 @@ main(int argc, char **argv) TEST_ERROR; } - if(s.gperf) { - - if (HDclock_gettime(CLOCK_MONOTONIC, &start_time) == -1) { + if (s.gperf) { - fprintf(stderr, "HDclock_gettime failed"); + if (HDclock_gettime(CLOCK_MONOTONIC, &start_time) == -1) { - TEST_ERROR; + fprintf(stderr, "HDclock_gettime failed"); - } + TEST_ERROR; + } } - if (writer) s.file = H5Fcreate(s.filename, H5F_ACC_TRUNC, fcpl, fapl); else s.file = H5Fopen(s.filename, H5F_ACC_RDONLY, fapl); - if(s.gperf) { - - if (HDclock_gettime(CLOCK_MONOTONIC, &end_time) == -1) { - - fprintf(stderr, "HDclock_gettime failed"); + if (s.gperf) { - TEST_ERROR; + if (HDclock_gettime(CLOCK_MONOTONIC, &end_time) == -1) { - } + fprintf(stderr, "HDclock_gettime failed"); + TEST_ERROR; + } - s.fo_total_time = TIME_PASSED(start_time,end_time); - fprintf(stdout, "H5Fopen time = %lf\n", s.fo_total_time); + s.fo_total_time = TIME_PASSED(start_time, end_time); + fprintf(stdout, "H5Fopen time = %lf\n", s.fo_total_time); } - + if (s.file < 0) { printf("H5Fcreate/open failed\n"); TEST_ERROR; @@ -4455,16 +4451,14 @@ main(int argc, char **argv) TEST_ERROR; } - if(s.gperf) { - - if (HDclock_gettime(CLOCK_MONOTONIC, &start_time) == -1) { - - fprintf(stderr, "HDclock_gettime failed"); + if (s.gperf) { - TEST_ERROR; + if (HDclock_gettime(CLOCK_MONOTONIC, &start_time) == -1) { - } + fprintf(stderr, "HDclock_gettime failed"); + TEST_ERROR; + } } if (H5Fclose(s.file) < 0) { @@ -4472,18 +4466,17 @@ main(int argc, char **argv) TEST_ERROR; } - if(s.gperf) { - - if (HDclock_gettime(CLOCK_MONOTONIC, &end_time) == -1) { + if (s.gperf) { - fprintf(stderr, "HDclock_gettime failed"); + if (HDclock_gettime(CLOCK_MONOTONIC, &end_time) == -1) { - TEST_ERROR; + fprintf(stderr, "HDclock_gettime failed"); - } + TEST_ERROR; + } - s.fc_total_time = TIME_PASSED(start_time,end_time); - fprintf(stdout, "H5Fclose time = %lf\n", s.fc_total_time); + s.fc_total_time = TIME_PASSED(start_time, end_time); + fprintf(stdout, "H5Fclose time = %lf\n", s.fc_total_time); } return EXIT_SUCCESS; |