diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2021-06-17 21:19:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-17 21:19:24 (GMT) |
commit | a00ad2b657b7918d4b11edee893f6701cf50e351 (patch) | |
tree | 345a6fa6c006bb564ffe53074acbd90f7611441b /test/page_buffer.c | |
parent | a7f729581b1955479255f59337481d30ff17295f (diff) | |
download | hdf5-a00ad2b657b7918d4b11edee893f6701cf50e351.zip hdf5-a00ad2b657b7918d4b11edee893f6701cf50e351.tar.gz hdf5-a00ad2b657b7918d4b11edee893f6701cf50e351.tar.bz2 |
VFD SWMR: Normalization with develop (#765)
* Brings CMake updates from develop
* Brings reduction in pedantic casts from develop
* Purges UFAIL from the library (#637)
* Committing clang-format changes
* Purges UFAIL from the library
* H5HL_insert change requested in PR
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Removes gratuitous (double)x.yF casts (#632)
* Committing clang-format changes
* Removes gratuitous (double)x.yF casts
* Committing clang-format changes
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Committing clang-format changes
* Cleans up a const warning left over from previous constification (#633)
* Committing clang-format changes
* Adds consts to a few global variables
* Cleans up a const warning left over from previous constification
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Formatted source
* Bring over some VOL registration changes
* VOL cleanup
* H5VL_request_status_t substitutions
* H5F.c cleanup
* Minor API tweaks from develop
* Moves H5G package init/teardown to H5Gint.c
* H5G cleanup
* H5M cleanup
* H5SM cleanup
* H5T cleanup
* H5R cleanup
* H5Lpublic.h cleanup
* H5L cleanup
* H5O cleanup
* H5A, H5CS, and H5AC cleanup
* Moved H5A init/teardown code to H5Aint.c
* Moves H5D I/O functions to H5D.c
* H5D cleanup
* Misc minor cleanup
* H5P close cleanup
* H5Tpublic.h cleanup
* Fixes err_compat test
* H5PLpublic.h cleanup
* Updates H5Ppublic.h
* H5Fpublic.h updates
* H5A.c cleanup
* Brings over H5Aexists and related changes
* Brings CMake shell testing changes from develop
* Close callback changes
* H5R and H5Tcommit normalization
* err_compat test works now
* H5O tweaks
* Updates VOL registration code
* Brings over H5VL_create_object
* H5Tconv.c reformatting
* H5T.c tweaks
* Brings datatype and reference updates from develop
* Brings VOL plugin loading changes from develop
* Brings event sets from develop
* Brings async functions over
* Tools changes
* Brings over many tools changes from develop
* Brings VOL flags from develop
* Fixes h5dump double/float tests
* Updates h5repack tests
* Brings h5diff test changes from develop
* Last h5dump changes
* Brings test changes from develop
* Committing clang-format changes
* Tidied h5_testing()
* Brings chunk iteration code + misc from develop
* Updates vds test
* Enables external link parallel test
* Brings updated property lists from develop
* H5G changes from develop
* H5MF cleanup
* Brings vfd_swmr test back into CMake
* Updates threadsafe test
* Updates plist test
* Brings recent changes from develop
* Require a C++11 compiler to build the C++ wrappers (#693)
* Committing clang-format changes
* Requires a C++11 compiler to build the C++ wrappers
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Fix H5FD_mpio_Debug="rw" can report MPI_count instead of bytes (#699)
* Removes pre-C99 build and header cruft (#700)
* Assumes ANSI C headers exist
* Assumes stdbool.h, stdint.h, and inttypes.h are present
* Assumes the C++ compiler can handle stdint.h
* Removes all work-arounds for missing functionality, especially stdbool.h
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Updates release documents
* Brings parallel changes from develop
* Adds a VFD/parallel check program for the VFD SWMR shell test
* Updates MANIFEST
* Disable building VFD SWMR acceptance tests on CMake
* Removes err.h from genall5.c
* Partial cleanup of H5Cpkg.h
* Fixes printf specifiers in H5Cdbg.c
* Java and fortran cmake changes (#694)
* OESS-98 convert plugin option to FetchContent, add tests
* Fixes for pkcfg files because of plugin option
* OESS-98 fix tools test for plugins
* Keep doxygen comments under 100 chars long - format hint
* Whitespace
* HDFFV-11144 - Reclassify CMake messages
* HDFFV-11099/11100 added help text
* Reworked switch statement to compare string instead
* Fix typo
* Update CDash mode
* Correct name of threadsafe
* Correct option name
* Undo accidental commit
* Note LLVM 10 to 11 format default changes
* Update format plugin
* Undo clang-format version 11 changes
* One more correction
* Update supported platforms
* Revert whitespace changes
* Correct whitespace
* Changes from PR#3
* HDFFV-11213 added option to control gcc10 warnings diagnostics
* HDFFV-11212 Use the new references correctly in JNI utility and tests
* format source
* Fix typo
* Add new test file
* HDFFV-11212 - update test and remove unused arg
* Minor non-space formatting changes
* Use H5I_INVALID_ID instead of "-1"
* source formatting
* add missing testfile, update jni function
* Undo commit of debug code
* remove mislocated file
* Fix h5repack test for handling of fapls and id close
* Update h5diff test files usage text
* HDFFV-11212 add new ref tests for JNI export dataset
* src format update
* Remove blank line typo
* src format typo
* long double requires %Lg
* Another long double foramt specifer S.B. %Lg
* issue with t128bit test
* Windows issue with h5dump and type.
* Fix review issues
* refactor function nesting and fix error checks
* format fixes
* Remove untested functions and javadoc quiet comments
* Restore TRY block.
* Change string append errors to memory exception
* revert to H5_JNI_FATAL_ERROR - support functions need work
* Add assertion error for h5util functions
* remove duplicate function
* format fix
* Revert HD function error handling
* Update copyright comments
* GH #386 java folder copyright corrections
* Whitespace
* GH #359 implement and fix tools 1.6 API usage
* remove excessive comments
* Flip inits to correct ifdef section
* rework ifdef to be simpler
* format issue
* Reformat ifdef inits
* remove static attribute
* format compliance
* Update names
* Revert because logic relies on float not being int
* Changes noticed from creating merge of #412
* Double underscore change
* Correct compiler version variable used
* Remove header guard underscores
* Whitespace cleanup
* Split format source and commit changes on repo push
* remove pre-split setting
* Change windows TS to use older VS.
* correct window os name
* HDFFV-11212 JNI export util and Javadoc
* Suggested review changes
* Another change found
* Committing clang-format changes
* HDFFV-11113 long double in tools
* HDFFV-11113 add note
* Disable long double tests for now
* HDFFV-11228 remove arbitrary CMake warning groups.
* Make each flag a string
* Some Javadoc warning fixes
* Updated javadoc fixes
* # WARNING: head commit changed in the meantime
HDFFV-11229 Fix long double usage in tools and java
Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.
* Committing clang-format changes
* HDFFV-11229 Add release note
* HDFFV-11229 windows testfile needed
* fix typo
* Remove non supported message text
* HDFFV-11229 - change ldouble test to check both native and general
* HDFFV-11229 add second file compare
* HDFFV-11229 fix reference file
* HDFFV-11229 autotools check two refs
* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output
* Committing clang-format changes
* Update release note
* Update attribute type of ref file
* Change source of ninja for macs
* try port instead of brew
* Recommended is to use brew.
* Undo non long double changes
* remove unneeded file
* Fix perl and doxygen CMake code
* Add "option" command for clang options
* Rework CMake add_custom to use the BYPRODUCTS argument
* Add stamp files to BYPRODUCTS
* Only one copy of file exists
* Fix custom cmmand depends targets
* Fix fortran custom command DEPENDS
* Add LD_LIBRARY_PATH to tests
* Add custom target for DEPENDS
* Add h5detect conditionaly to generated target DEPENDS
* Correct DEPENDS targets
* Parallel builds need the mpi compiler for pkgconfig scripts.
* install only if MPI build
* Fortran target depends
* Remove incorrect source attribute
* doxygen adjustments
* doxygen build updates
* Correct version
* Correct function version - function has been merged to 1.12
* Correct version string for map functions
* Cleanup warnings for tools debug builds
* TRILAB-227 - fix indexing for h5diff selections
* Correct location of pos to index function call
* TRILAB-227 Enable test
* Quote subset args
* Use MATCHES because of AppleClang
* if blocks needed for build modes
* Update list of DT platforms
* VS2019 correctly displays float values
* revert VS2019 change
* Issue #669 remove version from pkgcfg filename
* remove version from h5cc script
* Java reference functions updated
enabled fortran in cmake gcc action yaml file
java reference test changed to correctly test refs
jni reference functions that create ids changed to use jni id logging
* Correct BYPRODUCTS argument
* Correct more genereated files BYPRODUCTS
* BYPRODUCTS must have unique locations
* Fix typo
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Removes alternative function enter/leave macro scheme (#678)
* Committing clang-format changes
* Converted BEGIN_FUNC, etc. macros to FUNC_ENTER
* Rips out the BEGIN_FUNC, etc. macros
* Removes 'end if', etc. comments from H5HL package
* Committing clang-format changes
* Fixes an H5EA iterate issue
* Fixes an issue in the H5FA iterator code
* Further cleanup in bin/trace after macro removal
* Iterator changes in H5EA and H5FA
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Split H5L.c internal code to H5Lint.c (#691)
* Committing clang-format changes
* Splits internal parts of H5L.c to H5Lint.c
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Clean up type size checks in configure.ac (#702)
* Committing clang-format changes
* C++ warning and build fixes (#707)
* Committing clang-format changes
* C++ build and warning updates
* Fixes all warnings on C++ (with gcc 9.3)
* Updates CMake and Autotools C++ builds
* Undo warning clobber
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Removes some DEC Alpha cruft from H5detect and H5private.h (#708)
* Cleans up hsize_t and haddr_t size guessing (#709)
* Cleans up definitions of haddr_t and hsize_t + cruft removal
* Formatted source
* Updates PGI C/C++ configurations (#715)
* Updates PGI C/C++ configurations
Tweaks some settings and configures pgc++ to use C++11
* Updated copyright information
* Adds an Intel C++ configuration file (#716)
* Adds an Intel C++ configuration file
* Committing clang-format changes
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Updates bin/trace script to correctly wrap H5TRACE macros near clang-format column limit (#719)
* Removes clang-format comments from H5O.c call
* Fixes bin/trace to correctly wrap lines near the clang-format limit
* Removed unused variable from bin/trace
* Fixes issue with ccmake that prevents building Fortran (#723)
ccmake runs iteratively, and the check_fortran_source_runs
macros were clobbering a single output file that did not
get updated on further configure iterations
* Updates CMake size_t and ssize_t checks for MacOS
* Moved a little boilerplate over from develop
* Fixes some warnings
* Committing clang-format changes
* Moves gcc warning macros from H5public.h to H5private.h (#724)
* Moves gcc warning suppression macros out of H5public.h
* Update RELEASE.txt
* Formatted source
* Adds __STDC_FORMAT_MACROS before including inttypes.h w/ C++ (#726)
* Adds __STDC_FORMAT_MACROS before including inttypes.h w/ C++
Allows C++ library to be built on older versions of gcc.
* Committing clang-format changes
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Moves H5PacketTable default ctor inside source file (#731)
* Brings (most) H5Xdevelop.h headers from develop
* Trivial H5F and H5O changes during normalization
* Renames buf_ptr back to page_buf to better align with develop
* Removed H5HGtrap.c
* Brings changes from develop
* Normalization (mainly cache) with develop
* Fix Direct VFD Testing in CMake (#742)
* Fixes C++ warnings when passing hsize_t values to printf in test code (#745)
* Organize and align compiler flags (#741)
* OESS-98 convert plugin option to FetchContent, add tests
* Fixes for pkcfg files because of plugin option
* OESS-98 fix tools test for plugins
* Keep doxygen comments under 100 chars long - format hint
* Whitespace
* HDFFV-11144 - Reclassify CMake messages
* HDFFV-11099/11100 added help text
* Reworked switch statement to compare string instead
* Fix typo
* Update CDash mode
* Correct name of threadsafe
* Correct option name
* Undo accidental commit
* Note LLVM 10 to 11 format default changes
* Update format plugin
* Undo clang-format version 11 changes
* One more correction
* Update supported platforms
* Revert whitespace changes
* Correct whitespace
* Changes from PR#3
* HDFFV-11213 added option to control gcc10 warnings diagnostics
* HDFFV-11212 Use the new references correctly in JNI utility and tests
* format source
* Fix typo
* Add new test file
* HDFFV-11212 - update test and remove unused arg
* Minor non-space formatting changes
* Use H5I_INVALID_ID instead of "-1"
* source formatting
* add missing testfile, update jni function
* Undo commit of debug code
* remove mislocated file
* Fix h5repack test for handling of fapls and id close
* Update h5diff test files usage text
* HDFFV-11212 add new ref tests for JNI export dataset
* src format update
* Remove blank line typo
* src format typo
* long double requires %Lg
* Another long double foramt specifer S.B. %Lg
* issue with t128bit test
* Windows issue with h5dump and type.
* Fix review issues
* refactor function nesting and fix error checks
* format fixes
* Remove untested functions and javadoc quiet comments
* Restore TRY block.
* Change string append errors to memory exception
* revert to H5_JNI_FATAL_ERROR - support functions need work
* Add assertion error for h5util functions
* remove duplicate function
* format fix
* Revert HD function error handling
* Update copyright comments
* GH #386 java folder copyright corrections
* Whitespace
* GH #359 implement and fix tools 1.6 API usage
* remove excessive comments
* Flip inits to correct ifdef section
* rework ifdef to be simpler
* format issue
* Reformat ifdef inits
* remove static attribute
* format compliance
* Update names
* Revert because logic relies on float not being int
* Changes noticed from creating merge of #412
* Double underscore change
* Correct compiler version variable used
* Remove header guard underscores
* Whitespace cleanup
* Split format source and commit changes on repo push
* remove pre-split setting
* Change windows TS to use older VS.
* correct window os name
* HDFFV-11212 JNI export util and Javadoc
* Suggested review changes
* Another change found
* Committing clang-format changes
* HDFFV-11113 long double in tools
* HDFFV-11113 add note
* Disable long double tests for now
* HDFFV-11228 remove arbitrary CMake warning groups.
* Make each flag a string
* Some Javadoc warning fixes
* Updated javadoc fixes
* # WARNING: head commit changed in the meantime
HDFFV-11229 Fix long double usage in tools and java
Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.
* Committing clang-format changes
* HDFFV-11229 Add release note
* HDFFV-11229 windows testfile needed
* fix typo
* Remove non supported message text
* HDFFV-11229 - change ldouble test to check both native and general
* HDFFV-11229 add second file compare
* HDFFV-11229 fix reference file
* HDFFV-11229 autotools check two refs
* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output
* Committing clang-format changes
* Update release note
* Update attribute type of ref file
* Change source of ninja for macs
* try port instead of brew
* Recommended is to use brew.
* Undo non long double changes
* remove unneeded file
* Fix perl and doxygen CMake code
* Add "option" command for clang options
* Rework CMake add_custom to use the BYPRODUCTS argument
* Add stamp files to BYPRODUCTS
* Only one copy of file exists
* Fix custom cmmand depends targets
* Fix fortran custom command DEPENDS
* Add LD_LIBRARY_PATH to tests
* Add custom target for DEPENDS
* Add h5detect conditionaly to generated target DEPENDS
* Correct DEPENDS targets
* Parallel builds need the mpi compiler for pkgconfig scripts.
* install only if MPI build
* Fortran target depends
* Remove incorrect source attribute
* doxygen adjustments
* doxygen build updates
* Correct version
* Correct function version - function has been merged to 1.12
* Correct version string for map functions
* Cleanup warnings for tools debug builds
* TRILAB-227 - fix indexing for h5diff selections
* Correct location of pos to index function call
* TRILAB-227 Enable test
* Quote subset args
* Use MATCHES because of AppleClang
* if blocks needed for build modes
* Update list of DT platforms
* VS2019 correctly displays float values
* revert VS2019 change
* Issue #669 remove version from pkgcfg filename
* remove version from h5cc script
* Java reference functions updated
enabled fortran in cmake gcc action yaml file
java reference test changed to correctly test refs
jni reference functions that create ids changed to use jni id logging
* Correct BYPRODUCTS argument
* Correct more genereated files BYPRODUCTS
* BYPRODUCTS must have unique locations
* Fix typo
* Fix fortran configure checks
* Rework H5_PAC_C_MAX_REAL_PRECISION setting logic
* Add note about fortran configure change
* Adds a quick for for some egregious chunk_info badness (#722)
* Fixes issue with ccmake that prevents building Fortran (#723)
ccmake runs iteratively, and the check_fortran_source_runs
macros were clobbering a single output file that did not
get updated on further configure iterations
* Fix conflicts with merge
* Move MAX_PRECISION back to HDF5UseFortran.cmake
* Use STREQUAL to test macro argument
* Move C language test to ConfigureChecks from HDF5UseFortran
* MAX_PRECISION defines must be defined
* Organize flags and align autotools and cmake
* Fix comment in no-error-general warnings files.
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
* Committing clang-format changes
* Cache code tidying
* Constification of cache code
* Renaming of static calls in cache
* Fixes H5C mess made by git during merge
* Committing clang-format changes
* Fixes a printf format issue w/ parallel
* Revert "Committing clang-format changes"
This reverts commit 1265fe87fec6589f029cf3b1de6d586c90168654.
* Turns off clang formatter in H5C while syncing with develop
* Adds a lot of HD prefixes and cleans up err.h usage
* Committing clang-format changes
* Brings cache skip list optimization from develop
* Brings recent changes from develop
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'test/page_buffer.c')
-rw-r--r-- | test/page_buffer.c | 572 |
1 files changed, 275 insertions, 297 deletions
diff --git a/test/page_buffer.c b/test/page_buffer.c index f21c568..429b4c8 100644 --- a/test/page_buffer.c +++ b/test/page_buffer.c @@ -310,8 +310,7 @@ error: } H5E_END_TRY; return (1); - -} /* create_file() */ +} /* create_file */ /*------------------------------------------------------------------------- * Function: open_file() @@ -353,11 +352,11 @@ open_file(char *filename, hid_t fapl, hsize_t page_size, size_t page_buffer_size if (NULL == (f = (H5F_t *)H5VL_object(file_id))) FAIL_STACK_ERROR; - if (f->shared->pb_ptr == NULL) + if (f->shared->page_buf == NULL) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->page_size != page_size) + if (f->shared->page_buf->page_size != page_size) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->max_size != page_buffer_size) + if (f->shared->page_buf->max_size != page_buffer_size) FAIL_STACK_ERROR; if ((grp_id = H5Gopen2(file_id, "GROUP", H5P_DEFAULT)) < 0) @@ -450,7 +449,7 @@ set_multi_split(const char *env_h5_drvr, hid_t fapl, hsize_t pagesize) /* Set memb_addr aligned */ for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) memb_addr[mt] = ((memb_addr[mt] + pagesize - 1) / pagesize) * pagesize; - } + } /* end else */ /* Set multi driver with new FAPLs */ if (H5Pset_fapl_multi(fapl, memb_map, memb_fapl_arr, (const char *const *)memb_name, memb_addr, @@ -459,8 +458,9 @@ set_multi_split(const char *env_h5_drvr, hid_t fapl, hsize_t pagesize) /* Free memb_name */ for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) - free(memb_name[mt]); - } + HDfree(memb_name[mt]); + + } /* end if */ return 0; @@ -534,7 +534,7 @@ test_args(hid_t orig_fapl, const char *env_h5_drvr) /* Test setting a page buffer with a size smaller than a single * page size - should fail */ - if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, 0, 1) < 0) + if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, 0, (hsize_t)1) < 0) TEST_ERROR; if (H5Pset_file_space_page_size(fcpl, 512) < 0) @@ -568,7 +568,7 @@ test_args(hid_t orig_fapl, const char *env_h5_drvr) TEST_ERROR; /* Test setting a page buffer with a size equal to a single page size */ - if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, 0, 1) < 0) + if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, 0, (hsize_t)1) < 0) TEST_ERROR; if (H5Pset_file_space_page_size(fcpl, 512) < 0) @@ -586,7 +586,7 @@ test_args(hid_t orig_fapl, const char *env_h5_drvr) /* Test setting a page buffer with a size slightly larger than a * single page size */ - if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, 0, 1) < 0) + if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, 0, (hsize_t)1) < 0) TEST_ERROR; if (H5Pset_file_space_page_size(fcpl, 512) < 0) @@ -605,7 +605,7 @@ test_args(hid_t orig_fapl, const char *env_h5_drvr) TEST_ERROR; /* Test setting a large page buffer size and page size */ - if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, 0, 1) < 0) + if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, 0, (hsize_t)1) < 0) TEST_ERROR; if (H5Pset_file_space_page_size(fcpl, 4194304) < 0) @@ -624,7 +624,7 @@ test_args(hid_t orig_fapl, const char *env_h5_drvr) TEST_ERROR; /* Test setting a 512 byte page buffer size and page size */ - if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, 0, 1) < 0) + if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, 0, (hsize_t)1) < 0) TEST_ERROR; if (H5Pset_file_space_page_size(fcpl, 512) < 0) @@ -1200,7 +1200,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr, bool vfd_swmr_m * Get the number of pages inserted, and verify that it is the * expected value. */ - base_page_cnt = f->shared->pb_ptr->curr_pages; + base_page_cnt = f->shared->page_buf->curr_pages; if (base_page_cnt != 2) TEST_ERROR; @@ -1228,57 +1228,48 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr, bool vfd_swmr_m page_count++; - if ((f->shared->pb_ptr->curr_pages != page_count + base_page_cnt) && - ((vfd_swmr_mode) && (f->shared->pb_ptr->curr_pages != base_page_cnt))) + if ((f->shared->page_buf->curr_pages != page_count + base_page_cnt) && + ((vfd_swmr_mode) && (f->shared->page_buf->curr_pages != base_page_cnt))) FAIL_STACK_ERROR; /* update elements 300 - 450, with values 300 - - this will bring two more pages into the page buffer. */ for (i = 0; i < 150; i++) data[i] = i + 300; - if (H5F_block_write(f, H5FD_MEM_DRAW, addr + (sizeof(int) * 300), sizeof(int) * 150, data) < 0) FAIL_STACK_ERROR; - page_count += 2; - - if ((f->shared->pb_ptr->curr_pages != page_count + base_page_cnt) && - ((vfd_swmr_mode) && (f->shared->pb_ptr->curr_pages != base_page_cnt))) + if ((f->shared->page_buf->curr_pages != page_count + base_page_cnt) && + ((vfd_swmr_mode) && (f->shared->page_buf->curr_pages != base_page_cnt))) FAIL_STACK_ERROR; /* update elements 100 - 300, this will go to disk but also update existing pages in the page buffer. */ for (i = 0; i < 200; i++) data[i] = i + 100; - if (H5F_block_write(f, H5FD_MEM_DRAW, addr + (sizeof(int) * 100), sizeof(int) * 200, data) < 0) FAIL_STACK_ERROR; - - if ((f->shared->pb_ptr->curr_pages != page_count + base_page_cnt) && - ((vfd_swmr_mode) && (f->shared->pb_ptr->curr_pages != base_page_cnt))) + if ((f->shared->page_buf->curr_pages != page_count + base_page_cnt) && + ((vfd_swmr_mode) && (f->shared->page_buf->curr_pages != base_page_cnt))) FAIL_STACK_ERROR; /* Update elements 225-300 - this will update an existing page in the PB */ /* Changes: 450 - 600; 150 */ for (i = 0; i < 150; i++) data[i] = i + 450; - if (H5F_block_write(f, H5FD_MEM_DRAW, addr + (sizeof(int) * 450), sizeof(int) * 150, data) < 0) FAIL_STACK_ERROR; - - if ((f->shared->pb_ptr->curr_pages != page_count + base_page_cnt) && - ((vfd_swmr_mode) && (f->shared->pb_ptr->curr_pages != base_page_cnt))) + if ((f->shared->page_buf->curr_pages != page_count + base_page_cnt) && + ((vfd_swmr_mode) && (f->shared->page_buf->curr_pages != base_page_cnt))) FAIL_STACK_ERROR; /* Do a full page write to block 600-800 - should bypass the PB */ for (i = 0; i < 200; i++) data[i] = i + 600; - if (H5F_block_write(f, H5FD_MEM_DRAW, addr + (sizeof(int) * 600), sizeof(int) * 200, data) < 0) FAIL_STACK_ERROR; - - if ((f->shared->pb_ptr->curr_pages != page_count + base_page_cnt) && - ((vfd_swmr_mode) && (f->shared->pb_ptr->curr_pages != base_page_cnt))) + if ((f->shared->page_buf->curr_pages != page_count + base_page_cnt) && + ((vfd_swmr_mode) && (f->shared->page_buf->curr_pages != base_page_cnt))) FAIL_STACK_ERROR; /* read elements 800 - 1200, this should not affect the PB, and should @@ -1286,7 +1277,6 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr, bool vfd_swmr_m */ if (H5F_block_read(f, H5FD_MEM_DRAW, addr + (sizeof(int) * 800), sizeof(int) * 400, data) < 0) FAIL_STACK_ERROR; - for (i = 0; i < 400; i++) { if (data[i] != -1) { HDfprintf(stderr, "Read different values than written\n"); @@ -1294,9 +1284,8 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr, bool vfd_swmr_m FAIL_STACK_ERROR; } } - - if ((f->shared->pb_ptr->curr_pages != page_count + base_page_cnt) && - ((vfd_swmr_mode) && (f->shared->pb_ptr->curr_pages != base_page_cnt))) + if ((f->shared->page_buf->curr_pages != page_count + base_page_cnt) && + ((vfd_swmr_mode) && (f->shared->page_buf->curr_pages != base_page_cnt))) FAIL_STACK_ERROR; /* read elements 1200 - 1201, this should read -1 and bring in an @@ -1304,7 +1293,6 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr, bool vfd_swmr_m */ if (H5F_block_read(f, H5FD_MEM_DRAW, addr + (sizeof(int) * 1200), sizeof(int) * 1, data) < 0) FAIL_STACK_ERROR; - for (i = 0; i < 1; i++) { if (data[i] != -1) { HDfprintf(stderr, "Read different values than written\n"); @@ -1313,9 +1301,8 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr, bool vfd_swmr_m } } page_count++; - - if ((f->shared->pb_ptr->curr_pages != page_count + base_page_cnt) && - ((vfd_swmr_mode) && (f->shared->pb_ptr->curr_pages != base_page_cnt))) + if ((f->shared->page_buf->curr_pages != page_count + base_page_cnt) && + ((vfd_swmr_mode) && (f->shared->page_buf->curr_pages != base_page_cnt))) TEST_ERROR; /* read elements 175 - 225, this should use the PB existing pages */ @@ -1323,7 +1310,6 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr, bool vfd_swmr_m /* read elements 175 - 225, this should use the PB existing pages */ if (H5F_block_read(f, H5FD_MEM_DRAW, addr + (sizeof(int) * 350), sizeof(int) * 100, data) < 0) FAIL_STACK_ERROR; - for (i = 0; i < 100; i++) { if (data[i] != i + 350) { HDfprintf(stderr, "Read different values than written\n"); @@ -1331,9 +1317,8 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr, bool vfd_swmr_m TEST_ERROR; } } - - if ((f->shared->pb_ptr->curr_pages != page_count + base_page_cnt) && - ((vfd_swmr_mode) && (f->shared->pb_ptr->curr_pages != base_page_cnt))) + if ((f->shared->page_buf->curr_pages != page_count + base_page_cnt) && + ((vfd_swmr_mode) && (f->shared->page_buf->curr_pages != base_page_cnt))) TEST_ERROR; /* read elements 0 - 800 using the VFD. @@ -1346,7 +1331,6 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr, bool vfd_swmr_m */ if (H5FD_read(f->shared->lf, H5FD_MEM_DRAW, addr, sizeof(int) * 800, data) < 0) FAIL_STACK_ERROR; - i = 0; while (i < 800) { if ((vfd_swmr_mode) || (i >= 100 && i < 300) || i >= 600) { @@ -1372,8 +1356,8 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr, bool vfd_swmr_m if (H5F_block_read(f, H5FD_MEM_DRAW, addr, sizeof(int) * 800, data) < 0) FAIL_STACK_ERROR; - if ((f->shared->pb_ptr->curr_pages != page_count + base_page_cnt) && - ((vfd_swmr_mode) && (f->shared->pb_ptr->curr_pages != base_page_cnt))) + if ((f->shared->page_buf->curr_pages != page_count + base_page_cnt) && + ((vfd_swmr_mode) && (f->shared->page_buf->curr_pages != base_page_cnt))) TEST_ERROR; for (i = 0; i < 800; i++) { @@ -1396,8 +1380,8 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr, bool vfd_swmr_m page_count -= 2; - if ((f->shared->pb_ptr->curr_pages != page_count + base_page_cnt) && - ((vfd_swmr_mode) && (f->shared->pb_ptr->curr_pages != base_page_cnt))) + if ((f->shared->page_buf->curr_pages != page_count + base_page_cnt) && + ((vfd_swmr_mode) && (f->shared->page_buf->curr_pages != base_page_cnt))) TEST_ERROR; /* read elements 0 - 1000.. this should go to disk then update the @@ -1425,8 +1409,8 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr, bool vfd_swmr_m i++; } - if ((f->shared->pb_ptr->curr_pages != page_count + base_page_cnt) && - ((vfd_swmr_mode) && (f->shared->pb_ptr->curr_pages != base_page_cnt))) + if ((f->shared->page_buf->curr_pages != page_count + base_page_cnt) && + ((vfd_swmr_mode) && (f->shared->page_buf->curr_pages != base_page_cnt))) TEST_ERROR; if (H5Fclose(file_id) < 0) @@ -1541,7 +1525,7 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr) FAIL_STACK_ERROR; /* there should be no raw data pages in the page buffer -- verify this */ - if (f->shared->pb_ptr->curr_rd_pages != 0) + if (f->shared->page_buf->curr_rd_pages != 0) FAIL_STACK_ERROR; /* update the first 100 elements to have values 0-99 - this will be @@ -1557,7 +1541,7 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr) search_addr = addr; if ((H5PB_page_exists(f->shared, search_addr, &page_exists) < 0) || (!page_exists)) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_rd_pages != 1) + if (f->shared->page_buf->curr_rd_pages != 1) FAIL_STACK_ERROR; /* update elements 300 - 450, with values 300 - 449 - this will @@ -1579,13 +1563,13 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr) search_addr = addr + sizeof(int) * 400; if ((H5PB_page_exists(f->shared, search_addr, &page_exists) < 0) || (!page_exists)) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_rd_pages != 2) + if (f->shared->page_buf->curr_rd_pages != 2) FAIL_STACK_ERROR; /* at this point, the page buffer entries created at file open should * have been evicted. */ - if (f->shared->pb_ptr->curr_md_pages != 0) + if (f->shared->page_buf->curr_md_pages != 0) FAIL_STACK_ERROR; /* update elements 300-301, this will update page addr + 200 in @@ -1605,9 +1589,9 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr) search_addr = addr + sizeof(int) * 400; if ((H5PB_page_exists(f->shared, search_addr, &page_exists) < 0) || (!page_exists)) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_rd_pages != 2) + if (f->shared->page_buf->curr_rd_pages != 2) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_pages != 2) + if (f->shared->page_buf->curr_pages != 2) FAIL_STACK_ERROR; /* read elements 1200 - 1201, this should read -1, bring in page @@ -1632,9 +1616,9 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr) search_addr = addr + sizeof(int) * 1200; if ((H5PB_page_exists(f->shared, search_addr, &page_exists) < 0) || (!page_exists)) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_rd_pages != 2) + if (f->shared->page_buf->curr_rd_pages != 2) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_pages != 2) + if (f->shared->page_buf->curr_pages != 2) FAIL_STACK_ERROR; /* read elements 350 - 450, this should load page addr + 400 and move @@ -1659,9 +1643,9 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr) search_addr = addr + sizeof(int) * 400; if ((H5PB_page_exists(f->shared, search_addr, &page_exists) < 0) || (!page_exists)) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_rd_pages != 2) + if (f->shared->page_buf->curr_rd_pages != 2) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_pages != 2) + if (f->shared->page_buf->curr_pages != 2) FAIL_STACK_ERROR; /* update elements 400 - 1400 to value 0, this will overwrite and @@ -1677,9 +1661,9 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr) search_addr = addr + sizeof(int) * 200; if ((H5PB_page_exists(f->shared, search_addr, &page_exists) < 0) || (!page_exists)) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_rd_pages != 1) + if (f->shared->page_buf->curr_rd_pages != 1) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_pages != 1) + if (f->shared->page_buf->curr_pages != 1) FAIL_STACK_ERROR; if (H5Fclose(file_id) < 0) @@ -1759,7 +1743,7 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) int64_t base_meta_cnt = 0; int i; int num_elements = 1000; - H5PB_t *pb_ptr; + H5PB_t *page_buf; haddr_t meta_addr = HADDR_UNDEF; haddr_t raw_addr = HADDR_UNDEF; int * data = NULL; @@ -1806,10 +1790,10 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) */ HDassert(f); HDassert(f->shared); - HDassert(f->shared->pb_ptr); + HDassert(f->shared->page_buf); - base_raw_cnt = f->shared->pb_ptr->curr_rd_pages; - base_meta_cnt = f->shared->pb_ptr->curr_md_pages; + base_raw_cnt = f->shared->page_buf->curr_rd_pages; + base_meta_cnt = f->shared->page_buf->curr_md_pages; if (base_raw_cnt != 0) TEST_ERROR; @@ -1817,12 +1801,12 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) if (base_meta_cnt != 2) TEST_ERROR; - pb_ptr = f->shared->pb_ptr; + page_buf = f->shared->page_buf; - if (pb_ptr->min_md_pages != 5) + if (page_buf->min_md_pages != 5) TEST_ERROR; - if (pb_ptr->min_rd_pages != 0) + if (page_buf->min_rd_pages != 0) TEST_ERROR; if (HADDR_UNDEF == (meta_addr = H5MF_alloc(f, H5FD_MEM_SUPER, sizeof(int) * (size_t)num_elements))) @@ -1852,10 +1836,10 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) if (H5F_block_write(f, H5FD_MEM_DRAW, raw_addr + (sizeof(int) * 800), sizeof(int) * 100, data) < 0) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_pages != base_meta_cnt) + if (f->shared->page_buf->curr_pages != base_meta_cnt) FAIL_STACK_ERROR; - if (pb_ptr->curr_rd_pages != 0) + if (page_buf->curr_rd_pages != 0) TEST_ERROR; /* write all meta data, this would end up in page buffer */ @@ -1874,13 +1858,13 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) if (H5F_block_read(f, H5FD_MEM_SUPER, meta_addr + (sizeof(int) * 800), sizeof(int) * 50, data) < 0) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_pages != 5) + if (f->shared->page_buf->curr_pages != 5) FAIL_STACK_ERROR; - if (pb_ptr->curr_md_pages != 5) + if (page_buf->curr_md_pages != 5) TEST_ERROR; - if (pb_ptr->curr_rd_pages != 0) + if (page_buf->curr_rd_pages != 0) TEST_ERROR; /* write and read more raw data and make sure that they don't end up in @@ -1901,13 +1885,13 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) if (H5F_block_read(f, H5FD_MEM_DRAW, raw_addr + (sizeof(int) * 900), sizeof(int) * 100, data) < 0) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_pages != 5) + if (f->shared->page_buf->curr_pages != 5) FAIL_STACK_ERROR; - if (pb_ptr->curr_md_pages != 5) + if (page_buf->curr_md_pages != 5) TEST_ERROR; - if (pb_ptr->curr_rd_pages != 0) + if (page_buf->curr_rd_pages != 0) TEST_ERROR; if (H5Fclose(file_id) < 0) @@ -1932,10 +1916,10 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) */ HDassert(f); HDassert(f->shared); - HDassert(f->shared->pb_ptr); + HDassert(f->shared->page_buf); - base_raw_cnt = f->shared->pb_ptr->curr_rd_pages; - base_meta_cnt = f->shared->pb_ptr->curr_md_pages; + base_raw_cnt = f->shared->page_buf->curr_rd_pages; + base_meta_cnt = f->shared->page_buf->curr_md_pages; if (base_raw_cnt != 0) TEST_ERROR; @@ -1943,11 +1927,11 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) if (base_meta_cnt != 0) TEST_ERROR; - pb_ptr = f->shared->pb_ptr; + page_buf = f->shared->page_buf; - if (pb_ptr->min_md_pages != 0) + if (page_buf->min_md_pages != 0) TEST_ERROR; - if (pb_ptr->min_rd_pages != 5) + if (page_buf->min_rd_pages != 5) FAIL_STACK_ERROR; if (HADDR_UNDEF == (meta_addr = H5MF_alloc(f, H5FD_MEM_SUPER, sizeof(int) * (size_t)num_elements))) @@ -1978,9 +1962,9 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) if (H5F_block_write(f, H5FD_MEM_SUPER, meta_addr + (sizeof(int) * 800), sizeof(int) * 100, data) < 0) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_pages != 0) + if (f->shared->page_buf->curr_pages != 0) FAIL_STACK_ERROR; - if (pb_ptr->curr_md_pages != 0) + if (page_buf->curr_md_pages != 0) TEST_ERROR; /* write/read all raw data, this would end up in page buffer */ @@ -1999,13 +1983,13 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) if (H5F_block_read(f, H5FD_MEM_DRAW, raw_addr + (sizeof(int) * 800), sizeof(int) * 100, data) < 0) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_pages != 5) + if (f->shared->page_buf->curr_pages != 5) FAIL_STACK_ERROR; - if (pb_ptr->curr_rd_pages != 5) + if (page_buf->curr_rd_pages != 5) TEST_ERROR; - if (pb_ptr->curr_md_pages != 0) + if (page_buf->curr_md_pages != 0) TEST_ERROR; /* write and read more meta data and make sure that they don't end up in @@ -2026,13 +2010,13 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) if (H5F_block_read(f, H5FD_MEM_SUPER, meta_addr + (sizeof(int) * 900), sizeof(int) * 50, data) < 0) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_pages != 5) + if (f->shared->page_buf->curr_pages != 5) FAIL_STACK_ERROR; - if (pb_ptr->curr_rd_pages != 5) + if (page_buf->curr_rd_pages != 5) TEST_ERROR; - if (pb_ptr->curr_md_pages != 0) + if (page_buf->curr_md_pages != 0) TEST_ERROR; if (H5Fclose(file_id) < 0) @@ -2062,21 +2046,20 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) * metadata entry counts. */ - base_raw_cnt = f->shared->pb_ptr->curr_rd_pages; - base_meta_cnt = f->shared->pb_ptr->curr_md_pages; + base_raw_cnt = f->shared->page_buf->curr_rd_pages; + base_meta_cnt = f->shared->page_buf->curr_md_pages; if (base_raw_cnt != 0) TEST_ERROR; if (base_meta_cnt != 2) TEST_ERROR; + page_buf = f->shared->page_buf; - pb_ptr = f->shared->pb_ptr; - - if (pb_ptr->min_md_pages != 2) + if (page_buf->min_md_pages != 2) TEST_ERROR; - if (pb_ptr->min_rd_pages != 2) + if (page_buf->min_rd_pages != 2) TEST_ERROR; if (HADDR_UNDEF == (meta_addr = H5MF_alloc(f, H5FD_MEM_SUPER, sizeof(int) * (size_t)num_elements))) @@ -2114,10 +2097,10 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) if (H5F_block_write(f, H5FD_MEM_DRAW, raw_addr + (sizeof(int) * 800), sizeof(int) * 100, data) < 0) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_pages != 5) + if (f->shared->page_buf->curr_pages != 5) TEST_ERROR; - if (f->shared->pb_ptr->curr_rd_pages != 5 - base_meta_cnt) + if (f->shared->page_buf->curr_rd_pages != 5 - base_meta_cnt) TEST_ERROR; /* add 3 meta entries evicting 1 raw entry */ @@ -2130,13 +2113,13 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) if (H5F_block_write(f, H5FD_MEM_SUPER, meta_addr + (sizeof(int) * 400), sizeof(int) * 100, data) < 0) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_pages != 5) + if (f->shared->page_buf->curr_pages != 5) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_md_pages != 3) + if (f->shared->page_buf->curr_md_pages != 3) TEST_ERROR; - if (f->shared->pb_ptr->curr_rd_pages != 2) + if (f->shared->page_buf->curr_rd_pages != 2) TEST_ERROR; /* adding more meta entires should replace meta entries since raw data @@ -2148,10 +2131,10 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) if (H5F_block_write(f, H5FD_MEM_SUPER, meta_addr + (sizeof(int) * 800), sizeof(int) * 100, data) < 0) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_md_pages != 3) + if (f->shared->page_buf->curr_md_pages != 3) TEST_ERROR; - if (f->shared->pb_ptr->curr_rd_pages != 2) + if (f->shared->page_buf->curr_rd_pages != 2) TEST_ERROR; /* bring existing raw entires up the LRU */ @@ -2164,10 +2147,10 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) if (H5F_block_read(f, H5FD_MEM_DRAW, raw_addr + (sizeof(int) * 350), sizeof(int) * 100, data) < 0) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_md_pages != 2) + if (f->shared->page_buf->curr_md_pages != 2) TEST_ERROR; - if (f->shared->pb_ptr->curr_rd_pages != 3) + if (f->shared->page_buf->curr_rd_pages != 3) TEST_ERROR; /* read a metadata entry to force the flush of the metadata entries @@ -2187,10 +2170,10 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) if (H5F_block_read(f, H5FD_MEM_DRAW, raw_addr + (sizeof(int) * 550), sizeof(int) * 100, data) < 0) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_md_pages != 2) + if (f->shared->page_buf->curr_md_pages != 2) TEST_ERROR; - if (f->shared->pb_ptr->curr_rd_pages != 3) + if (f->shared->page_buf->curr_rd_pages != 3) TEST_ERROR; /* adding 2 meta entries should replace 2 entires at the bottom @@ -2202,34 +2185,30 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) if (H5F_block_read(f, H5FD_MEM_SUPER, meta_addr + (sizeof(int) * 242), sizeof(int) * 100, data) < 0) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_md_pages != 2) + if (f->shared->page_buf->curr_md_pages != 2) TEST_ERROR; - if (f->shared->pb_ptr->curr_rd_pages != 3) + if (f->shared->page_buf->curr_rd_pages != 3) TEST_ERROR; if (H5Fclose(file_id) < 0) FAIL_STACK_ERROR; HDprintf("\tMinimum metadata threshold = 20%%\n"); - /* keep 5 pages at max in the page buffer and 1 meta page minimum */ if (H5Pset_page_buffer_size(fapl, sizeof(int) * 1000, 39, 0) < 0) TEST_ERROR; - /* create the file */ if ((file_id = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0) FAIL_STACK_ERROR; - /* Get a pointer to the internal file object */ if (NULL == (f = (H5F_t *)H5VL_object(file_id))) FAIL_STACK_ERROR; + page_buf = f->shared->page_buf; - pb_ptr = f->shared->pb_ptr; - - if (pb_ptr->min_md_pages != 1) + if (page_buf->min_md_pages != 1) TEST_ERROR; - if (pb_ptr->min_rd_pages != 0) + if (page_buf->min_rd_pages != 0) TEST_ERROR; if (HADDR_UNDEF == (meta_addr = H5MF_alloc(f, H5FD_MEM_SUPER, sizeof(int) * (size_t)num_elements))) @@ -2267,13 +2246,13 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) if (H5F_block_write(f, H5FD_MEM_DRAW, raw_addr + (sizeof(int) * 800), sizeof(int) * 100, data) < 0) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_pages != 5) + if (f->shared->page_buf->curr_pages != 5) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_md_pages != 1) + if (f->shared->page_buf->curr_md_pages != 1) TEST_ERROR; - if (f->shared->pb_ptr->curr_rd_pages != 4) + if (f->shared->page_buf->curr_rd_pages != 4) TEST_ERROR; /* add 2 meta entries evicting 2 raw entries */ @@ -2283,13 +2262,13 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) if (H5F_block_write(f, H5FD_MEM_SUPER, meta_addr + (sizeof(int) * 200), sizeof(int) * 100, data) < 0) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_pages != 5) + if (f->shared->page_buf->curr_pages != 5) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_md_pages != 3) + if (f->shared->page_buf->curr_md_pages != 3) TEST_ERROR; - if (f->shared->pb_ptr->curr_rd_pages != 2) + if (f->shared->page_buf->curr_rd_pages != 2) TEST_ERROR; /* bring the rest of the raw entries up the LRU */ @@ -2306,13 +2285,13 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) if (H5F_block_write(f, H5FD_MEM_DRAW, raw_addr + (sizeof(int) * 100), sizeof(int) * 100, data) < 0) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_pages != 5) + if (f->shared->page_buf->curr_pages != 5) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_md_pages != 1) + if (f->shared->page_buf->curr_md_pages != 1) TEST_ERROR; - if (f->shared->pb_ptr->curr_rd_pages != 4) + if (f->shared->page_buf->curr_rd_pages != 4) TEST_ERROR; /* write one more raw entry which should replace another raw entry @@ -2321,13 +2300,13 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) if (H5F_block_write(f, H5FD_MEM_DRAW, raw_addr + (sizeof(int) * 300), sizeof(int) * 100, data) < 0) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_pages != 5) + if (f->shared->page_buf->curr_pages != 5) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_md_pages != 1) + if (f->shared->page_buf->curr_md_pages != 1) TEST_ERROR; - if (f->shared->pb_ptr->curr_rd_pages != 4) + if (f->shared->page_buf->curr_rd_pages != 4) TEST_ERROR; /* write a metadata entry that should replace the metadata entry @@ -2336,13 +2315,13 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) if (H5F_block_write(f, H5FD_MEM_SUPER, meta_addr + (sizeof(int) * 500), sizeof(int) * 100, data) < 0) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_pages != 5) + if (f->shared->page_buf->curr_pages != 5) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->curr_md_pages != 1) + if (f->shared->page_buf->curr_md_pages != 1) TEST_ERROR; - if (f->shared->pb_ptr->curr_rd_pages != 4) + if (f->shared->page_buf->curr_rd_pages != 4) TEST_ERROR; if (H5Fclose(file_id) < 0) @@ -2361,19 +2340,19 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) return 0; error: + H5E_BEGIN_TRY { - if (fapl != H5I_INVALID_HID) - H5Pclose(fapl); - if (fcpl != H5I_INVALID_HID) - H5Pclose(fcpl); - if (file_id != H5I_INVALID_HID) - H5Fclose(file_id); - if (data != NULL) + H5Pclose(fapl); + H5Pclose(fcpl); + H5Fclose(file_id); + if (data) HDfree(data); } H5E_END_TRY; + return 1; + } /* test_min_threshold */ /*------------------------------------------------------------------------- @@ -2442,7 +2421,7 @@ test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr) if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) TEST_ERROR; - if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, 0, 1) < 0) + if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, 0, (hsize_t)1) < 0) TEST_ERROR; if (H5Pset_file_space_page_size(fcpl, sizeof(int) * 200) < 0) @@ -2465,10 +2444,10 @@ test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr) */ HDassert(f); HDassert(f->shared); - HDassert(f->shared->pb_ptr); + HDassert(f->shared->page_buf); - base_raw_cnt = f->shared->pb_ptr->curr_rd_pages; - base_meta_cnt = f->shared->pb_ptr->curr_md_pages; + base_raw_cnt = f->shared->page_buf->curr_rd_pages; + base_meta_cnt = f->shared->page_buf->curr_md_pages; if (base_raw_cnt != 0) TEST_ERROR; @@ -2575,47 +2554,48 @@ test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr) FAIL_STACK_ERROR; /* was 9, 16, 0 -- review this */ - if ((f->shared->pb_ptr->accesses[0] != 10) || (f->shared->pb_ptr->accesses[1] != 16) || - (f->shared->pb_ptr->accesses[2] != 0)) { + if ((f->shared->page_buf->accesses[0] != 10) || (f->shared->page_buf->accesses[1] != 16) || + (f->shared->page_buf->accesses[2] != 0)) { - HDfprintf(stderr, "accesses[] = {%d, %d, %d}. {10, 16, 0} expected\n", f->shared->pb_ptr->accesses[0], - f->shared->pb_ptr->accesses[1], f->shared->pb_ptr->accesses[2]); + HDfprintf(stderr, "accesses[] = {%d, %d, %d}. {10, 16, 0} expected\n", + f->shared->page_buf->accesses[0], f->shared->page_buf->accesses[1], + f->shared->page_buf->accesses[2]); TEST_ERROR; } /* was 2, 1, 1 -- review this */ - if ((f->shared->pb_ptr->bypasses[0] != 0) || (f->shared->pb_ptr->bypasses[1] != 1) || - (f->shared->pb_ptr->bypasses[2] != 1)) { + if ((f->shared->page_buf->bypasses[0] != 0) || (f->shared->page_buf->bypasses[1] != 1) || + (f->shared->page_buf->bypasses[2] != 1)) { - HDfprintf(stderr, "bypasses[] = {%d, %d, %d}. {0, 1, 1} expected\n", f->shared->pb_ptr->bypasses[0], - f->shared->pb_ptr->bypasses[1], f->shared->pb_ptr->bypasses[2]); + HDfprintf(stderr, "bypasses[] = {%d, %d, %d}. {0, 1, 1} expected\n", f->shared->page_buf->bypasses[0], + f->shared->page_buf->bypasses[1], f->shared->page_buf->bypasses[2]); TEST_ERROR; } - if ((f->shared->pb_ptr->hits[0] != 0) || (f->shared->pb_ptr->hits[1] != 4) || - (f->shared->pb_ptr->hits[2] != 0)) { + if ((f->shared->page_buf->hits[0] != 0) || (f->shared->page_buf->hits[1] != 4) || + (f->shared->page_buf->hits[2] != 0)) { - HDfprintf(stderr, "hits[] = {%d, %d, %d}. {0, 4, 0} expected\n", f->shared->pb_ptr->hits[0], - f->shared->pb_ptr->hits[1], f->shared->pb_ptr->hits[2]); + HDfprintf(stderr, "hits[] = {%d, %d, %d}. {0, 4, 0} expected\n", f->shared->page_buf->hits[0], + f->shared->page_buf->hits[1], f->shared->page_buf->hits[2]); TEST_ERROR; } /* was 9, 16. 0 -- review this */ - if ((f->shared->pb_ptr->misses[0] != 10) || (f->shared->pb_ptr->misses[1] != 16) || - (f->shared->pb_ptr->misses[2] != 0)) { + if ((f->shared->page_buf->misses[0] != 10) || (f->shared->page_buf->misses[1] != 16) || + (f->shared->page_buf->misses[2] != 0)) { - HDfprintf(stderr, "misses[] = {%d, %d, %d}. {10, 16, 0} expected\n", f->shared->pb_ptr->misses[0], - f->shared->pb_ptr->misses[1], f->shared->pb_ptr->misses[2]); + HDfprintf(stderr, "misses[] = {%d, %d, %d}. {10, 16, 0} expected\n", f->shared->page_buf->misses[0], + f->shared->page_buf->misses[1], f->shared->page_buf->misses[2]); TEST_ERROR; } /* was 7, 9, 0 -- review this */ - if ((f->shared->pb_ptr->evictions[0] != 9) || (f->shared->pb_ptr->evictions[1] != 9) || - (f->shared->pb_ptr->evictions[2] != 0)) { + if ((f->shared->page_buf->evictions[0] != 9) || (f->shared->page_buf->evictions[1] != 9) || + (f->shared->page_buf->evictions[2] != 0)) { HDfprintf(stderr, "evictions[] = {%d, %d, %d}. {%d, %d, 0} expected\n", - f->shared->pb_ptr->evictions[0], f->shared->pb_ptr->evictions[1], - f->shared->pb_ptr->evictions[2], 7, 9); + f->shared->page_buf->evictions[0], f->shared->page_buf->evictions[1], + f->shared->page_buf->evictions[2], 7, 9); TEST_ERROR; } @@ -2669,7 +2649,6 @@ test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr) if (H5Freset_page_buffering_stats(file_id) < 0) FAIL_STACK_ERROR; - if (H5Fget_page_buffering_stats(file_id, accesses, hits, misses, evictions, bypasses) < 0) FAIL_STACK_ERROR; @@ -2693,7 +2672,7 @@ test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr) TEST_ERROR; if (evictions[1] != 0) TEST_ERROR; - } + } /* end block */ if (H5Fclose(file_id) < 0) FAIL_STACK_ERROR; @@ -2709,13 +2688,10 @@ test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr) error: H5E_BEGIN_TRY { - if (fapl != H5I_INVALID_HID) - H5Pclose(fapl); - if (fcpl != H5I_INVALID_HID) - H5Pclose(fcpl); - if (file_id != H5I_INVALID_HID) - H5Fclose(file_id); - if (data != NULL) + H5Pclose(fapl); + H5Pclose(fcpl); + H5Fclose(file_id); + if (data) HDfree(data); } H5E_END_TRY; @@ -2767,7 +2743,7 @@ verify_page_buffering_disabled(hid_t orig_fapl, const char *env_h5_drvr) if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) FAIL_STACK_ERROR; - if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, 0, 1) < 0) + if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, 0, (hsize_t)1) < 0) FAIL_STACK_ERROR; if (H5Pset_file_space_page_size(fcpl, 4096) < 0) @@ -2792,7 +2768,7 @@ verify_page_buffering_disabled(hid_t orig_fapl, const char *env_h5_drvr) if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) FAIL_STACK_ERROR; - if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, 0, 1) < 0) + if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, 0, (hsize_t)1) < 0) FAIL_STACK_ERROR; if (H5Pset_file_space_page_size(fcpl, 4096) < 0) @@ -2832,12 +2808,9 @@ error: H5E_BEGIN_TRY { - if (fapl != H5I_INVALID_HID) - H5Pclose(fapl); - if (fcpl != H5I_INVALID_HID) - H5Pclose(fcpl); - if (file_id != H5I_INVALID_HID) - H5Fclose(file_id); + H5Pclose(fapl); + H5Pclose(fcpl); + H5Fclose(file_id); } H5E_END_TRY; @@ -3264,7 +3237,7 @@ md_entry_splitting_boundary_test(hid_t orig_fapl, const char *env_h5_drvr, bool * Get the number of pages inserted, and verify that it is the * expected value. */ - base_page_cnt = f->shared->pb_ptr->curr_pages; + base_page_cnt = f->shared->page_buf->curr_pages; if (base_page_cnt != 1) TEST_ERROR; @@ -3355,7 +3328,7 @@ md_entry_splitting_boundary_test(hid_t orig_fapl, const char *env_h5_drvr, bool for (i = 0; i < (int)test_len; i++) write_buf[i] = 1; - if (H5PB_reset_stats(f->shared->pb_ptr) < 0) + if (H5PB_reset_stats(f->shared->page_buf) < 0) FAIL_STACK_ERROR; if (H5F_block_write(f, H5FD_MEM_SUPER, start_addr, test_len, write_buf) < 0) @@ -3389,13 +3362,14 @@ md_entry_splitting_boundary_test(hid_t orig_fapl, const char *env_h5_drvr, bool } } - if ((f->shared->pb_ptr->md_read_splits != 0) || (f->shared->pb_ptr->md_write_splits != 0)) + if ((f->shared->page_buf->md_read_splits != 0) || (f->shared->page_buf->md_write_splits != 0)) TEST_ERROR; - if ((f->shared->pb_ptr->accesses[H5PB__STATS_MD] != 4) || - (f->shared->pb_ptr->hits[H5PB__STATS_MD] != 3) || (f->shared->pb_ptr->misses[H5PB__STATS_MD] != 1) || - (f->shared->pb_ptr->loads[H5PB__STATS_MD] != 1) || - (f->shared->pb_ptr->insertions[H5PB__STATS_MD] != 1)) + if ((f->shared->page_buf->accesses[H5PB__STATS_MD] != 4) || + (f->shared->page_buf->hits[H5PB__STATS_MD] != 3) || + (f->shared->page_buf->misses[H5PB__STATS_MD] != 1) || + (f->shared->page_buf->loads[H5PB__STATS_MD] != 1) || + (f->shared->page_buf->insertions[H5PB__STATS_MD] != 1)) TEST_ERROR; /* 2) splittable md entry that is page aligned and exactly two @@ -3430,7 +3404,7 @@ md_entry_splitting_boundary_test(hid_t orig_fapl, const char *env_h5_drvr, bool for (i = 0; i < (int)test_len; i++) write_buf[i] = 3; - if (H5PB_reset_stats(f->shared->pb_ptr) < 0) + if (H5PB_reset_stats(f->shared->page_buf) < 0) FAIL_STACK_ERROR; if (H5F_block_write(f, H5FD_MEM_SUPER, start_addr, test_len, write_buf) < 0) @@ -3464,25 +3438,25 @@ md_entry_splitting_boundary_test(hid_t orig_fapl, const char *env_h5_drvr, bool } } - if ((f->shared->pb_ptr->md_read_splits != 0) || (f->shared->pb_ptr->md_write_splits != 0)) + if ((f->shared->page_buf->md_read_splits != 0) || (f->shared->page_buf->md_write_splits != 0)) TEST_ERROR; if (vfd_swmr_mode) { - if ((f->shared->pb_ptr->bypasses[H5PB__STATS_MPMDE] != 0) || - (f->shared->pb_ptr->accesses[H5PB__STATS_MPMDE] != 4) || - (f->shared->pb_ptr->hits[H5PB__STATS_MPMDE] != 3) || - (f->shared->pb_ptr->misses[H5PB__STATS_MPMDE] != 1) || - (f->shared->pb_ptr->loads[H5PB__STATS_MPMDE] != 0) || - (f->shared->pb_ptr->insertions[H5PB__STATS_MPMDE] != 1)) + if ((f->shared->page_buf->bypasses[H5PB__STATS_MPMDE] != 0) || + (f->shared->page_buf->accesses[H5PB__STATS_MPMDE] != 4) || + (f->shared->page_buf->hits[H5PB__STATS_MPMDE] != 3) || + (f->shared->page_buf->misses[H5PB__STATS_MPMDE] != 1) || + (f->shared->page_buf->loads[H5PB__STATS_MPMDE] != 0) || + (f->shared->page_buf->insertions[H5PB__STATS_MPMDE] != 1)) TEST_ERROR; } else { - if ((f->shared->pb_ptr->bypasses[H5PB__STATS_MPMDE] != 4) || - (f->shared->pb_ptr->accesses[H5PB__STATS_MPMDE] != 0) || - (f->shared->pb_ptr->hits[H5PB__STATS_MPMDE] != 0) || - (f->shared->pb_ptr->misses[H5PB__STATS_MPMDE] != 2) || - (f->shared->pb_ptr->loads[H5PB__STATS_MPMDE] != 0) || - (f->shared->pb_ptr->insertions[H5PB__STATS_MPMDE] != 0)) + if ((f->shared->page_buf->bypasses[H5PB__STATS_MPMDE] != 4) || + (f->shared->page_buf->accesses[H5PB__STATS_MPMDE] != 0) || + (f->shared->page_buf->hits[H5PB__STATS_MPMDE] != 0) || + (f->shared->page_buf->misses[H5PB__STATS_MPMDE] != 2) || + (f->shared->page_buf->loads[H5PB__STATS_MPMDE] != 0) || + (f->shared->page_buf->insertions[H5PB__STATS_MPMDE] != 0)) TEST_ERROR; } @@ -3506,7 +3480,7 @@ md_entry_splitting_boundary_test(hid_t orig_fapl, const char *env_h5_drvr, bool for (i = 0; i < (int)test_len; i++) write_buf[i] = 5; - if (H5PB_reset_stats(f->shared->pb_ptr) < 0) + if (H5PB_reset_stats(f->shared->page_buf) < 0) FAIL_STACK_ERROR; if (H5F_block_write(f, H5FD_MEM_SUPER, start_addr, test_len, write_buf) < 0) @@ -3540,14 +3514,15 @@ md_entry_splitting_boundary_test(hid_t orig_fapl, const char *env_h5_drvr, bool } } - if ((f->shared->pb_ptr->md_read_splits != 2) || (f->shared->pb_ptr->md_write_splits != 2)) + if ((f->shared->page_buf->md_read_splits != 2) || (f->shared->page_buf->md_write_splits != 2)) TEST_ERROR; - if ((f->shared->pb_ptr->bypasses[H5PB__STATS_MD] != 0) || - (f->shared->pb_ptr->accesses[H5PB__STATS_MD] != 8) || - (f->shared->pb_ptr->hits[H5PB__STATS_MD] != 6) || (f->shared->pb_ptr->misses[H5PB__STATS_MD] != 2) || - (f->shared->pb_ptr->loads[H5PB__STATS_MD] != 2) || - (f->shared->pb_ptr->insertions[H5PB__STATS_MD] != 2)) + if ((f->shared->page_buf->bypasses[H5PB__STATS_MD] != 0) || + (f->shared->page_buf->accesses[H5PB__STATS_MD] != 8) || + (f->shared->page_buf->hits[H5PB__STATS_MD] != 6) || + (f->shared->page_buf->misses[H5PB__STATS_MD] != 2) || + (f->shared->page_buf->loads[H5PB__STATS_MD] != 2) || + (f->shared->page_buf->insertions[H5PB__STATS_MD] != 2)) TEST_ERROR; /* 4) splittable md entry that is exactly one page and one byte @@ -3572,19 +3547,19 @@ md_entry_splitting_boundary_test(hid_t orig_fapl, const char *env_h5_drvr, bool for (i = 0; i < (int)test_len; i++) write_buf[i] = 7; - if (H5PB_reset_stats(f->shared->pb_ptr) < 0) + if (H5PB_reset_stats(f->shared->page_buf) < 0) FAIL_STACK_ERROR; if (H5F_block_write(f, H5FD_MEM_SUPER, start_addr, test_len, write_buf) < 0) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->md_write_splits != 1) + if (f->shared->page_buf->md_write_splits != 1) TEST_ERROR; if (H5F_block_read(f, H5FD_MEM_SUPER, start_addr, test_len, read_buf) < 0) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->md_read_splits != 1) + if (f->shared->page_buf->md_read_splits != 1) TEST_ERROR; for (i = 0; i < (int)test_len; i++) { @@ -3612,14 +3587,15 @@ md_entry_splitting_boundary_test(hid_t orig_fapl, const char *env_h5_drvr, bool } } - if ((f->shared->pb_ptr->md_read_splits != 2) || (f->shared->pb_ptr->md_write_splits != 2)) + if ((f->shared->page_buf->md_read_splits != 2) || (f->shared->page_buf->md_write_splits != 2)) TEST_ERROR; - if ((f->shared->pb_ptr->bypasses[H5PB__STATS_MD] != 0) || - (f->shared->pb_ptr->accesses[H5PB__STATS_MD] != 8) || - (f->shared->pb_ptr->hits[H5PB__STATS_MD] != 6) || (f->shared->pb_ptr->misses[H5PB__STATS_MD] != 2) || - (f->shared->pb_ptr->loads[H5PB__STATS_MD] != 2) || - (f->shared->pb_ptr->insertions[H5PB__STATS_MD] != 2)) + if ((f->shared->page_buf->bypasses[H5PB__STATS_MD] != 0) || + (f->shared->page_buf->accesses[H5PB__STATS_MD] != 8) || + (f->shared->page_buf->hits[H5PB__STATS_MD] != 6) || + (f->shared->page_buf->misses[H5PB__STATS_MD] != 2) || + (f->shared->page_buf->loads[H5PB__STATS_MD] != 2) || + (f->shared->page_buf->insertions[H5PB__STATS_MD] != 2)) TEST_ERROR; /* 5) splittable md entry that is exactly one page and two bytes @@ -3643,7 +3619,7 @@ md_entry_splitting_boundary_test(hid_t orig_fapl, const char *env_h5_drvr, bool for (i = 0; i < (int)test_len; i++) write_buf[i] = 9; - if (H5PB_reset_stats(f->shared->pb_ptr) < 0) + if (H5PB_reset_stats(f->shared->page_buf) < 0) FAIL_STACK_ERROR; if (H5F_block_write(f, H5FD_MEM_SUPER, start_addr, test_len, write_buf) < 0) @@ -3677,14 +3653,15 @@ md_entry_splitting_boundary_test(hid_t orig_fapl, const char *env_h5_drvr, bool } } - if ((f->shared->pb_ptr->md_read_splits != 2) || (f->shared->pb_ptr->md_write_splits != 2)) + if ((f->shared->page_buf->md_read_splits != 2) || (f->shared->page_buf->md_write_splits != 2)) TEST_ERROR; - if ((f->shared->pb_ptr->bypasses[H5PB__STATS_MD] != 0) || - (f->shared->pb_ptr->accesses[H5PB__STATS_MD] != 12) || - (f->shared->pb_ptr->hits[H5PB__STATS_MD] != 9) || (f->shared->pb_ptr->misses[H5PB__STATS_MD] != 3) || - (f->shared->pb_ptr->loads[H5PB__STATS_MD] != 3) || - (f->shared->pb_ptr->insertions[H5PB__STATS_MD] != 3)) + if ((f->shared->page_buf->bypasses[H5PB__STATS_MD] != 0) || + (f->shared->page_buf->accesses[H5PB__STATS_MD] != 12) || + (f->shared->page_buf->hits[H5PB__STATS_MD] != 9) || + (f->shared->page_buf->misses[H5PB__STATS_MD] != 3) || + (f->shared->page_buf->loads[H5PB__STATS_MD] != 3) || + (f->shared->page_buf->insertions[H5PB__STATS_MD] != 3)) TEST_ERROR; /* 6) splittable md entry that is two bytes long, and starts one @@ -3708,7 +3685,7 @@ md_entry_splitting_boundary_test(hid_t orig_fapl, const char *env_h5_drvr, bool for (i = 0; i < (int)test_len; i++) write_buf[i] = 11; - if (H5PB_reset_stats(f->shared->pb_ptr) < 0) + if (H5PB_reset_stats(f->shared->page_buf) < 0) FAIL_STACK_ERROR; if (H5F_block_write(f, H5FD_MEM_SUPER, start_addr, test_len, write_buf) < 0) @@ -3742,14 +3719,15 @@ md_entry_splitting_boundary_test(hid_t orig_fapl, const char *env_h5_drvr, bool } } - if ((f->shared->pb_ptr->md_read_splits != 2) || (f->shared->pb_ptr->md_write_splits != 2)) + if ((f->shared->page_buf->md_read_splits != 2) || (f->shared->page_buf->md_write_splits != 2)) TEST_ERROR; - if ((f->shared->pb_ptr->bypasses[H5PB__STATS_MD] != 0) || - (f->shared->pb_ptr->accesses[H5PB__STATS_MD] != 8) || - (f->shared->pb_ptr->hits[H5PB__STATS_MD] != 6) || (f->shared->pb_ptr->misses[H5PB__STATS_MD] != 2) || - (f->shared->pb_ptr->loads[H5PB__STATS_MD] != 2) || - (f->shared->pb_ptr->insertions[H5PB__STATS_MD] != 2)) + if ((f->shared->page_buf->bypasses[H5PB__STATS_MD] != 0) || + (f->shared->page_buf->accesses[H5PB__STATS_MD] != 8) || + (f->shared->page_buf->hits[H5PB__STATS_MD] != 6) || + (f->shared->page_buf->misses[H5PB__STATS_MD] != 2) || + (f->shared->page_buf->loads[H5PB__STATS_MD] != 2) || + (f->shared->page_buf->insertions[H5PB__STATS_MD] != 2)) TEST_ERROR; /* 7) splittable md entry that is page aligned and is exactly two @@ -3791,7 +3769,7 @@ md_entry_splitting_boundary_test(hid_t orig_fapl, const char *env_h5_drvr, bool for (i = 0; i < (int)test_len; i++) write_buf[i] = 13; - if (H5PB_reset_stats(f->shared->pb_ptr) < 0) + if (H5PB_reset_stats(f->shared->page_buf) < 0) FAIL_STACK_ERROR; if (H5F_block_write(f, H5FD_MEM_SUPER, start_addr, test_len, write_buf) < 0) @@ -3825,31 +3803,31 @@ md_entry_splitting_boundary_test(hid_t orig_fapl, const char *env_h5_drvr, bool } } - if ((f->shared->pb_ptr->md_read_splits != 2) || (f->shared->pb_ptr->md_write_splits != 2)) + if ((f->shared->page_buf->md_read_splits != 2) || (f->shared->page_buf->md_write_splits != 2)) TEST_ERROR; if (vfd_swmr_mode) { - if ((f->shared->pb_ptr->bypasses[H5PB__STATS_MPMDE] != 0) || - (f->shared->pb_ptr->accesses[H5PB__STATS_MPMDE] != 4) || - (f->shared->pb_ptr->accesses[H5PB__STATS_MD] != 4) || - (f->shared->pb_ptr->hits[H5PB__STATS_MPMDE] != 3) || - (f->shared->pb_ptr->hits[H5PB__STATS_MD] != 3) || - (f->shared->pb_ptr->misses[H5PB__STATS_MPMDE] != 1) || - (f->shared->pb_ptr->misses[H5PB__STATS_MD] != 1) || - (f->shared->pb_ptr->loads[H5PB__STATS_MPMDE] != 0) || - (f->shared->pb_ptr->loads[H5PB__STATS_MD] != 1) || - (f->shared->pb_ptr->insertions[H5PB__STATS_MPMDE] != 1) || - (f->shared->pb_ptr->insertions[H5PB__STATS_MD] != 1)) + if ((f->shared->page_buf->bypasses[H5PB__STATS_MPMDE] != 0) || + (f->shared->page_buf->accesses[H5PB__STATS_MPMDE] != 4) || + (f->shared->page_buf->accesses[H5PB__STATS_MD] != 4) || + (f->shared->page_buf->hits[H5PB__STATS_MPMDE] != 3) || + (f->shared->page_buf->hits[H5PB__STATS_MD] != 3) || + (f->shared->page_buf->misses[H5PB__STATS_MPMDE] != 1) || + (f->shared->page_buf->misses[H5PB__STATS_MD] != 1) || + (f->shared->page_buf->loads[H5PB__STATS_MPMDE] != 0) || + (f->shared->page_buf->loads[H5PB__STATS_MD] != 1) || + (f->shared->page_buf->insertions[H5PB__STATS_MPMDE] != 1) || + (f->shared->page_buf->insertions[H5PB__STATS_MD] != 1)) TEST_ERROR; } else { - if ((f->shared->pb_ptr->bypasses[H5PB__STATS_MPMDE] != 4) || - (f->shared->pb_ptr->accesses[H5PB__STATS_MD] != 4) || - (f->shared->pb_ptr->hits[H5PB__STATS_MD] != 3) || - (f->shared->pb_ptr->misses[H5PB__STATS_MPMDE] != 2) || - (f->shared->pb_ptr->misses[H5PB__STATS_MD] != 1) || - (f->shared->pb_ptr->loads[H5PB__STATS_MD] != 1) || - (f->shared->pb_ptr->insertions[H5PB__STATS_MD] != 1)) + if ((f->shared->page_buf->bypasses[H5PB__STATS_MPMDE] != 4) || + (f->shared->page_buf->accesses[H5PB__STATS_MD] != 4) || + (f->shared->page_buf->hits[H5PB__STATS_MD] != 3) || + (f->shared->page_buf->misses[H5PB__STATS_MPMDE] != 2) || + (f->shared->page_buf->misses[H5PB__STATS_MD] != 1) || + (f->shared->page_buf->loads[H5PB__STATS_MD] != 1) || + (f->shared->page_buf->insertions[H5PB__STATS_MD] != 1)) TEST_ERROR; } @@ -3893,19 +3871,19 @@ md_entry_splitting_boundary_test(hid_t orig_fapl, const char *env_h5_drvr, bool for (i = 0; i < (int)test_len; i++) write_buf[i] = 15; - if (H5PB_reset_stats(f->shared->pb_ptr) < 0) + if (H5PB_reset_stats(f->shared->page_buf) < 0) FAIL_STACK_ERROR; if (H5F_block_write(f, H5FD_MEM_SUPER, start_addr, test_len, write_buf) < 0) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->md_write_splits != 1) + if (f->shared->page_buf->md_write_splits != 1) TEST_ERROR; if (H5F_block_read(f, H5FD_MEM_SUPER, start_addr, test_len, read_buf) < 0) FAIL_STACK_ERROR; - if (f->shared->pb_ptr->md_read_splits != 1) + if (f->shared->page_buf->md_read_splits != 1) TEST_ERROR; for (i = 0; i < (int)test_len; i++) { @@ -3933,31 +3911,31 @@ md_entry_splitting_boundary_test(hid_t orig_fapl, const char *env_h5_drvr, bool } } - if ((f->shared->pb_ptr->md_read_splits != 2) || (f->shared->pb_ptr->md_write_splits != 2)) + if ((f->shared->page_buf->md_read_splits != 2) || (f->shared->page_buf->md_write_splits != 2)) TEST_ERROR; if (vfd_swmr_mode) { - if ((f->shared->pb_ptr->bypasses[H5PB__STATS_MPMDE] != 0) || - (f->shared->pb_ptr->accesses[H5PB__STATS_MPMDE] != 4) || - (f->shared->pb_ptr->accesses[H5PB__STATS_MD] != 4) || - (f->shared->pb_ptr->hits[H5PB__STATS_MPMDE] != 3) || - (f->shared->pb_ptr->hits[H5PB__STATS_MD] != 3) || - (f->shared->pb_ptr->misses[H5PB__STATS_MPMDE] != 1) || - (f->shared->pb_ptr->misses[H5PB__STATS_MD] != 1) || - (f->shared->pb_ptr->loads[H5PB__STATS_MPMDE] != 0) || - (f->shared->pb_ptr->loads[H5PB__STATS_MD] != 1) || - (f->shared->pb_ptr->insertions[H5PB__STATS_MPMDE] != 1) || - (f->shared->pb_ptr->insertions[H5PB__STATS_MD] != 1)) + if ((f->shared->page_buf->bypasses[H5PB__STATS_MPMDE] != 0) || + (f->shared->page_buf->accesses[H5PB__STATS_MPMDE] != 4) || + (f->shared->page_buf->accesses[H5PB__STATS_MD] != 4) || + (f->shared->page_buf->hits[H5PB__STATS_MPMDE] != 3) || + (f->shared->page_buf->hits[H5PB__STATS_MD] != 3) || + (f->shared->page_buf->misses[H5PB__STATS_MPMDE] != 1) || + (f->shared->page_buf->misses[H5PB__STATS_MD] != 1) || + (f->shared->page_buf->loads[H5PB__STATS_MPMDE] != 0) || + (f->shared->page_buf->loads[H5PB__STATS_MD] != 1) || + (f->shared->page_buf->insertions[H5PB__STATS_MPMDE] != 1) || + (f->shared->page_buf->insertions[H5PB__STATS_MD] != 1)) TEST_ERROR; } else { - if ((f->shared->pb_ptr->bypasses[H5PB__STATS_MPMDE] != 4) || - (f->shared->pb_ptr->accesses[H5PB__STATS_MD] != 4) || - (f->shared->pb_ptr->hits[H5PB__STATS_MD] != 3) || - (f->shared->pb_ptr->misses[H5PB__STATS_MPMDE] != 2) || - (f->shared->pb_ptr->misses[H5PB__STATS_MD] != 1) || - (f->shared->pb_ptr->loads[H5PB__STATS_MD] != 1) || - (f->shared->pb_ptr->insertions[H5PB__STATS_MD] != 1)) + if ((f->shared->page_buf->bypasses[H5PB__STATS_MPMDE] != 4) || + (f->shared->page_buf->accesses[H5PB__STATS_MD] != 4) || + (f->shared->page_buf->hits[H5PB__STATS_MD] != 3) || + (f->shared->page_buf->misses[H5PB__STATS_MPMDE] != 2) || + (f->shared->page_buf->misses[H5PB__STATS_MD] != 1) || + (f->shared->page_buf->loads[H5PB__STATS_MD] != 1) || + (f->shared->page_buf->insertions[H5PB__STATS_MD] != 1)) TEST_ERROR; } @@ -3998,7 +3976,7 @@ md_entry_splitting_boundary_test(hid_t orig_fapl, const char *env_h5_drvr, bool for (i = 0; i < (int)test_len; i++) write_buf[i] = 17; - if (H5PB_reset_stats(f->shared->pb_ptr) < 0) + if (H5PB_reset_stats(f->shared->page_buf) < 0) FAIL_STACK_ERROR; if (H5F_block_write(f, H5FD_MEM_SUPER, start_addr, test_len, write_buf) < 0) @@ -4032,31 +4010,31 @@ md_entry_splitting_boundary_test(hid_t orig_fapl, const char *env_h5_drvr, bool } } - if ((f->shared->pb_ptr->md_read_splits != 2) || (f->shared->pb_ptr->md_write_splits != 2)) + if ((f->shared->page_buf->md_read_splits != 2) || (f->shared->page_buf->md_write_splits != 2)) TEST_ERROR; if (vfd_swmr_mode) { - if ((f->shared->pb_ptr->bypasses[H5PB__STATS_MPMDE] != 0) || - (f->shared->pb_ptr->accesses[H5PB__STATS_MPMDE] != 4) || - (f->shared->pb_ptr->accesses[H5PB__STATS_MD] != 8) || - (f->shared->pb_ptr->hits[H5PB__STATS_MPMDE] != 3) || - (f->shared->pb_ptr->hits[H5PB__STATS_MD] != 6) || - (f->shared->pb_ptr->misses[H5PB__STATS_MPMDE] != 1) || - (f->shared->pb_ptr->misses[H5PB__STATS_MD] != 2) || - (f->shared->pb_ptr->loads[H5PB__STATS_MPMDE] != 0) || - (f->shared->pb_ptr->loads[H5PB__STATS_MD] != 2) || - (f->shared->pb_ptr->insertions[H5PB__STATS_MPMDE] != 1) || - (f->shared->pb_ptr->insertions[H5PB__STATS_MD] != 2)) + if ((f->shared->page_buf->bypasses[H5PB__STATS_MPMDE] != 0) || + (f->shared->page_buf->accesses[H5PB__STATS_MPMDE] != 4) || + (f->shared->page_buf->accesses[H5PB__STATS_MD] != 8) || + (f->shared->page_buf->hits[H5PB__STATS_MPMDE] != 3) || + (f->shared->page_buf->hits[H5PB__STATS_MD] != 6) || + (f->shared->page_buf->misses[H5PB__STATS_MPMDE] != 1) || + (f->shared->page_buf->misses[H5PB__STATS_MD] != 2) || + (f->shared->page_buf->loads[H5PB__STATS_MPMDE] != 0) || + (f->shared->page_buf->loads[H5PB__STATS_MD] != 2) || + (f->shared->page_buf->insertions[H5PB__STATS_MPMDE] != 1) || + (f->shared->page_buf->insertions[H5PB__STATS_MD] != 2)) TEST_ERROR; } else { - if ((f->shared->pb_ptr->bypasses[H5PB__STATS_MPMDE] != 4) || - (f->shared->pb_ptr->accesses[H5PB__STATS_MD] != 8) || - (f->shared->pb_ptr->hits[H5PB__STATS_MD] != 6) || - (f->shared->pb_ptr->misses[H5PB__STATS_MPMDE] != 2) || - (f->shared->pb_ptr->misses[H5PB__STATS_MD] != 2) || - (f->shared->pb_ptr->loads[H5PB__STATS_MD] != 2) || - (f->shared->pb_ptr->insertions[H5PB__STATS_MD] != 2)) + if ((f->shared->page_buf->bypasses[H5PB__STATS_MPMDE] != 4) || + (f->shared->page_buf->accesses[H5PB__STATS_MD] != 8) || + (f->shared->page_buf->hits[H5PB__STATS_MD] != 6) || + (f->shared->page_buf->misses[H5PB__STATS_MPMDE] != 2) || + (f->shared->page_buf->misses[H5PB__STATS_MD] != 2) || + (f->shared->page_buf->loads[H5PB__STATS_MD] != 2) || + (f->shared->page_buf->insertions[H5PB__STATS_MD] != 2)) TEST_ERROR; } @@ -4141,12 +4119,12 @@ main(void) HDputs("Skip page buffering test because paged aggregation is disabled for multi/split drivers"); HDputs("Furthermore, VFD SWMR is not (yet) expected to work with multi/split drivers"); HDexit(EXIT_SUCCESS); - } + } /* end if */ if ((fapl = h5_fileaccess()) < 0) { nerrors++; PUTS_ERROR("Can't get VFD-dependent fapl") - } + } /* end if */ /* Push API context */ if (H5CX_push() < 0) |