summaryrefslogtreecommitdiffstats
path: root/test/vfd_swmr.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'canonical/feature/vfd_swmr' into ↵Dana Robinson2021-05-031-9/+0
|\ | | | | | | vfd_swmr/thg_standards
| * Merge pull request #436 from raylu-hdf/raylu_zoo_testraylu-hdf2021-04-131-9/+0
| |\ | | | | | | Changed the signal handling to named pipes in the zoo test
| | * Two main changes include: re-arranging the communication between the writer ↵Songyu Lu2021-04-051-9/+0
| | | | | | | | | | | | and reader through the named pipes; using the error report consistent with other tests.
* | | Better VFD SWMR parallel skip testDana Robinson2021-04-061-4/+7
|/ /
* | Fixed 1.6 compatibility issues and ran source formatterDana Robinson2021-03-261-3/+3
|/
* Temporarily disable some tests that fail on WindowsDana Robinson2021-03-251-0/+3
|
* test_same_file_opens() works on Windows now (vfd_swmr.c)Dana Robinson2021-03-251-2/+0
|
* Updates license url and history docsDana Robinson2021-03-251-2/+1
|
* Formats the source and updates the gcc warning pragmasDana Robinson2021-03-251-1042/+1083
|
* Windows cleanupDana Robinson2021-03-101-0/+4
| | | | | * A splitter VFD test in vfd.c fails * Several vfd_swmr.c tests are #ifdef'd around
* Fix brackets on non-POSIX vfd_swmr.cDana Robinson2021-03-101-2/+2
|
* Removes an unused variable from vfd_swmr.cDana Robinson2021-03-091-1/+0
|
* Replaces BSD random functions with ISODana Robinson2021-03-091-3/+2
|
* Changes to help vfd_swmr.c build on WindowsDana Robinson2021-03-081-7/+17
|
* Switch to using H5_nanosleep() instead of HDnanosleep()Dana Robinson2021-03-031-9/+3
| | | | | * Just in the main library and test/vfd_swmr.c * VFD SWMR acceptance tests still use HDnanosleep() directly
* HD prefix and hbool_t changes in test/vfd_swmr.cDana Robinson2021-03-021-22/+22
|
* Fix unfreed memory after fork in vfd_swmr testDana Robinson2021-03-021-0/+12
| | | | | The writer configuration in the vfd_swmr test was not freed in the child process after a call to fork() causing a memory leak.
* Make tests pass on both of my branches, like they ought to: in the tests thatDavid Young2020-08-031-9/+35
| | | | | | | | | | call H5F__vfd_swmr_writer_md_test(), actually sleep for more than `max_lag` ticks so that the deferred-frees queue is actually flushed before we force new items onto the queue and count them. In H5F__vfd_swmr_writer_md_test(), check that the number of deferred shadow-space frees is *precisely* the number `nshadow_defrees`, since that seems to be what the tests that call this routine intend.
* In test_reader_md_concur(), the child has to exit(3), not FAIL_STACK_ERROR, onDavid Young2020-07-301-1/+1
| | | | error.
* Bug fixes: don't double-close a FAPL ID. Always close a file ID.David Young2020-07-301-3/+2
|
* Remove superfluous casts from `void *` to another pointer type prior toDavid Young2020-07-301-22/+20
| | | | assignment. Use a safer sizeof(array element) idiom. NFCI.
* Delete unused local variables. Delete an empty line. NFCI.David Young2020-07-101-4/+0
|
* Don't leak a fapl on error.David Young2020-07-101-7/+8
|
* Remove gratuitous local variable initialization: it's better to let theDavid Young2020-07-101-2/+2
| | | | | compiler detect use-before-initialization. Use the safer `memset(p, ..., sizeof(*p))` idiom.
* Straggler from previous: bsdqueue.h -> H5queue.hDavid Young2020-07-101-1/+1
|
* (1) Add public routines H5Fvfd_swmr_end_tick, ↵vchoi2020-06-261-581/+1221
| | | | | | H5Fvfd_swmr_disable_end_of_tick, H5Fvfd_swmr_enable_end_of_tick(). (2) Tests for the above APIs.
* Be concise and more obviously correct, and knock many line widthsDavid Young2020-06-031-16/+13
| | | | | | | | | | | | | | | | | | | | below than 80 columns: use the malloc idiom, ``` type *p; p = malloc(sizeof(*p)); ``` instead of ``` type *p; p = (type *)malloc(sizeof(type)); ``` Make a similar change to some `memset` calls. NFCI.
* Fix compilation: use H5Oget_info() instead of specifying the versionDavid Young2020-05-201-4/+4
| | | | (H5O_getinfo2).
* Move fetch_env_ulong() from vfd_swmr.c to vfd_swmr_common.c for eventualDavid Young2020-04-281-29/+1
| | | | reuse by the zoo writer.
* Straggler from last: retire vfd_swmr_writer_g.David Young2020-04-201-2/+2
|
* Retire globals vfd_swmr_writer_g and end_of_tick_g.David Young2020-04-201-11/+11
|
* Quiet some used-before-initialized warnings and, while I am here,David Young2020-04-201-3/+3
| | | | initialize one variable with a named constant instead of -1.
* Don't try to free a NULL pointer.David Young2020-04-071-1/+2
|
* Quiet a warning about the variable being used before it is initialized.David Young2020-04-071-1/+1
| | | | | Looks like the compiler actually was wrong, but this is a harmless change to make.
* If the shadow-index size is 0 in the current step, don't calloc(3)David Young2020-04-061-2/+2
| | | | anything, since calloc(0, ...) is undefined.
* Remove a duplicate `#define H5FD_TESTING` line.David Young2020-03-241-1/+0
|
* When creating a shadow index for testing, increase the page number fromDavid Young2020-03-241-1/+3
| | | | | one entry to the next by *at least* 1 so that the index is well-formed. This fixes a crash that occurred with H5_SHADOW_INDEX_SEED=1585006453.
* The forced-fail index comes only from the environment, never fromDavid Young2020-03-241-1/+1
| | | | time(3).
* Add an environment variable, H5_SHADOW_INDEX_FAIL, that I can set to anDavid Young2020-03-021-20/+58
| | | | | | | unsigned integer value that tells at which index to inject a failure for testing purposes. I used this to establish that I can start the shadow-index lookup test with a previous seed and see the same tests run again.
* Add a test for shadow-index lookups per the specification agreed with John andDavid Young2020-02-281-0/+84
| | | | Mike and described in my email "testing estimates version 2."
* So that I can use PASSED(); anywhere a statement can go, #define PASSED() withDavid Young2020-02-281-9/+9
| | | | a do-while wrapper.
* Numerous changes supporting a floating shadow index:David Young2020-02-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Add to the H5F_shared_t (!) a new member that tells the index in the shadow file where the index should be written. Allocate shadow filespace for the header and the index separately so that the index can float. Update tests to match the expected original location of the index. Introduce vfd_swmr_enlarge_shadow_index(), a routine that allocates space in the shadow file for a new index that has (up to) twice as many entries as the old index, allocates a new in-core index of the same size, and copies the old in-core index to the new. Call vfd_swmr_enlarge_shadow_index() in H5PB_vfd_swmr__update_index() when the in-core index has too few slots. In the comment at the top of H5FD__vfd_swmr_load_hdr_and_idx(), describe the protocol that it follows, now, when it reads the shadow header and index. Delete some dead code in the function and add a bit of diagnostic code. TBD quiet the diagnostic code. In H5F_vfd_swmr_init(), follow the protocol: write the index, first, then the header. Modify property-list checks and tests to reserve no fewer than two pages at the front of the shadow file for the header and index.
* Use FAIL_STACK_ERROR instead of TEST_ERROR after library calls, so that theDavid Young2020-02-031-6/+5
| | | | | | error stack will be reported. Use calloc instead of malloc+memset.
* Repair indentation and delete some superfluous comments. NFCI.David Young2020-01-301-13/+13
|
* Align the shadow images on page boundaries so that they don't overlap. ThisDavid Young2019-12-181-8/+8
| | | | | seems to be the programmer's original intention. It sure makes debugging easier to have non-overlapping shadow images.
* In the faked-up shadow-index entries, assign independent page numbers in theDavid Young2019-12-181-4/+4
| | | | | | | HDF5 file and in the shadow file. I had added assertions that the page numbers were unique, and this caused those assertions to fail. I don't know if I'll keep the assertions, but this is an inexpensive change that makes the test more realistic.
* Allocate and zero using calloc(3) instead of malloc(3)+memset(3).David Young2019-12-181-2/+1
|
* Remove the ugly casts on calloc() and malloc(). Change some malloc() toDavid Young2019-12-131-6/+6
| | | | calloc() so that all bytes are initialized to something.
* Shorten the type name `H5F_vfd_swmr_eot_queue_entry_t` to `eot_queue_entry_t`:David Young2019-12-101-16/+11
| | | | | | | people have to read and type this stuff! Use TAILQ_* macros instead of an unnecessary custom implementation of doubly-linked lists.
* Be brief: don't cast the last parameter of H5Pset_file_space_strategy(), theDavid Young2019-12-091-9/+7
| | | | constant `1`, to `hsize_t`.