diff options
author | vchoi <vchoi@jelly.ad.hdfgroup.org> | 2021-04-09 20:31:17 (GMT) |
---|---|---|
committer | vchoi <vchoi@jelly.ad.hdfgroup.org> | 2021-04-09 20:33:23 (GMT) |
commit | d6227619a91ad361ff0fb2f1b3b9a9494ee66892 (patch) | |
tree | 06d10030cee8ee05f7dbaf07284e5cdaa5d3cf8a | |
parent | 74b1d42bbf466e3b1d83e03509378ebd13927f2d (diff) | |
download | hdf5-d6227619a91ad361ff0fb2f1b3b9a9494ee66892.zip hdf5-d6227619a91ad361ff0fb2f1b3b9a9494ee66892.tar.gz hdf5-d6227619a91ad361ff0fb2f1b3b9a9494ee66892.tar.bz2 |
(1) Remove header files as indicated by PR review comment.
(2) Add ifdef for windows as indicated by PR review comment.
(3) Misc. cleanup.
-rw-r--r-- | test/vfd_swmr_attrdset_writer.c | 60 |
1 files changed, 29 insertions, 31 deletions
diff --git a/test/vfd_swmr_attrdset_writer.c b/test/vfd_swmr_attrdset_writer.c index 72df4d8..cb0cf67 100644 --- a/test/vfd_swmr_attrdset_writer.c +++ b/test/vfd_swmr_attrdset_writer.c @@ -41,14 +41,11 @@ #define H5F_FRIEND /*suppress error about including H5Fpkg */ #include "hdf5.h" - -#include "H5Fpkg.h" -#include "H5HGprivate.h" -#include "H5VLprivate.h" - #include "testhdf5.h" #include "vfd_swmr_common.h" +#ifndef H5_HAVE_WIN32_API + #define READER_WAIT_TICKS 4 /* Structure to hold info for options specified */ @@ -218,7 +215,7 @@ usage(const char *progname) "-a nattrs: add `nattrs` attributes to all datasets\n" "-d dattrs: delete `dattrs` attributes to all datasets after addition\n" "-u nticks: `nticks` ticks for the reader to wait before verification\n" - " (default is 3)\n" + " (default is 4)\n" "-c csteps: `csteps` steps communication interval between reader and writer\n" " (default is 1)\n" "-S: do not use VFD SWMR\n" @@ -320,6 +317,31 @@ state_init(state_t *s, int argc, char **argv) argc -= optind; argv += optind; + /* Require to specify at least -p, -g or -k option */ + if(!s->compact && !s->contig && !s->chunked) { + printf("Require to specify at least -p, -g or -k option\n"); + usage(s->progname); + goto error; + } + + /* -c <csteps> cannot be zero */ + if(!s->csteps) { + printf("communication interval cannot be zero\n"); + TEST_ERROR; + } + + /* -c <csteps> and -a <nattrs> options */ + if(s->asteps && s->csteps > s->asteps) { + printf("communication interval is out of bounds\n"); + TEST_ERROR; + } + + /* -d and -a */ + if(s->dattrs > s->asteps) { + printf("# of attributes to be deleted exceeds # of attributes created\n"); + TEST_ERROR; + } + /* Dataspace for attributes added to datasets */ /* Dataspace for compact and contiguous datasets */ if ((s->one_by_one_sid = H5Screate_simple(1, &dims, &dims)) < 0) { @@ -1737,31 +1759,6 @@ main(int argc, char **argv) TEST_ERROR; } - /* Require to specify at least -p, -g or -k option */ - if(!s.compact && !s.contig && !s.chunked) { - printf("Require to specify at least -p, -g or -k option\n"); - usage(s.progname); - goto error; - } - - /* -c <csteps> cannot be zero */ - if(!s.csteps) { - printf("communication interval cannot be zero\n"); - TEST_ERROR; - } - - /* -c <csteps> and -a <nattrs> options */ - if(s.asteps && s.csteps > s.asteps) { - printf("communication interval is out of bounds\n"); - TEST_ERROR; - } - - /* -d and -a */ - if(s.dattrs > s.asteps) { - printf("# of attributes to be deleted exceeds # of attributes created\n"); - TEST_ERROR; - } - personality = strstr(s.progname, "vfd_swmr_attrdset_"); if (personality != NULL && @@ -2015,3 +2012,4 @@ error: return EXIT_FAILURE; } /* main */ +#endif /* H5_HAVE_WIN32_API */ |