summaryrefslogtreecommitdiffstats
path: root/test/page_buffer.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@koziol.gov>2020-06-26 23:57:38 (GMT)
committerQuincey Koziol <koziol@koziol.gov>2020-06-26 23:57:38 (GMT)
commite767f44e953047297fece364218147c908e8b585 (patch)
treed4b6909f14b78bb732b6947adc46ac3cd3ca54f6 /test/page_buffer.c
parent949649a2b6e00297cbdc49437e70a27e455e92d2 (diff)
parenta08ab621febde7b09e4d86eab80cb029c123e9f6 (diff)
downloadhdf5-e767f44e953047297fece364218147c908e8b585.zip
hdf5-e767f44e953047297fece364218147c908e8b585.tar.gz
hdf5-e767f44e953047297fece364218147c908e8b585.tar.bz2
Merge remote-tracking branch 'origin/develop' into monotonic_timer
Diffstat (limited to 'test/page_buffer.c')
-rw-r--r--test/page_buffer.c464
1 files changed, 238 insertions, 226 deletions
diff --git a/test/page_buffer.c b/test/page_buffer.c
index 853ef93..a508dc9 100644
--- a/test/page_buffer.c
+++ b/test/page_buffer.c
@@ -21,8 +21,10 @@
#include "h5test.h"
-#include "H5PBprivate.h"
+#include "H5CXprivate.h" /* API Contexts */
#include "H5Iprivate.h"
+#include "H5PBprivate.h"
+#include "H5VLprivate.h" /* Virtual Object Layer */
/*
* This file needs to access private information from the H5F package.
@@ -35,24 +37,26 @@
#include "H5Fpkg.h"
-#define FILENAME_LEN 1024
+#define FILENAME_LEN 1024
+
+/* test routines */
+#ifdef H5_HAVE_PARALLEL
+static unsigned verify_page_buffering_disabled(hid_t orig_fapl,
+ const char *env_h5_drvr);
+#else
#define NUM_DSETS 5
#define NX 100
#define NY 50
-/* helper routines */
-static unsigned create_file(char *filename, hid_t fcpl, hid_t fapl);
-static unsigned open_file(char *filename, hid_t fapl, hsize_t page_size, size_t page_buffer_size);
-
-/* test routines */
static unsigned test_args(hid_t fapl, const char *env_h5_drvr);
static unsigned test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr);
static unsigned test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr);
static unsigned test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr);
static unsigned test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr);
-#ifdef H5_HAVE_PARALLEL
-static unsigned verify_page_buffering_disabled(hid_t orig_fapl,
- const char *env_h5_drvr);
+
+/* helper routines */
+static unsigned create_file(char *filename, hid_t fcpl, hid_t fapl);
+static unsigned open_file(char *filename, hid_t fapl, hsize_t page_size, size_t page_buffer_size);
#endif /* H5_HAVE_PARALLEL */
const char *FILENAME[] = {
@@ -60,6 +64,7 @@ const char *FILENAME[] = {
NULL
};
+#ifndef H5_HAVE_PARALLEL
/*-------------------------------------------------------------------------
* Function: create_file()
@@ -67,9 +72,9 @@ const char *FILENAME[] = {
* Purpose: The purpose of this function appears to be a smoke check
* intended to exercise the page buffer.
*
- * Specifically, the function creates a file, and then goes
- * through a loop in which it creates four data sets, write
- * data to one of them, verifies the data written, and then
+ * Specifically, the function creates a file, and then goes
+ * through a loop in which it creates four data sets, write
+ * data to one of them, verifies the data written, and then
* deletes the three that it didn't write to.
*
* Any data mis-matches or failures reported by the HDF5
@@ -96,7 +101,7 @@ create_file(char *filename, hid_t fcpl, hid_t fapl)
int i;
int num_elements;
int j;
- char dset_name[10];
+ char dset_name[32];
if((file_id = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0)
FAIL_STACK_ERROR;
@@ -153,7 +158,7 @@ create_file(char *filename, hid_t fcpl, hid_t fapl)
HDmemset(data, 0, (size_t)num_elements * sizeof(int));
if((dset_id = H5Dopen2(grp_id, dset_name, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR;
+ FAIL_STACK_ERROR;
if(H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0)
FAIL_STACK_ERROR;
if(H5Dclose(dset_id) < 0)
@@ -208,7 +213,7 @@ error:
* Purpose: The purpose of this function appears to be a smoke check
* intended to exercise the page buffer.
*
- * Specifically, the function opens a file (created by
+ * Specifically, the function opens a file (created by
* create_file()?), and verify the contents of its datasets.
*
* Any data mis-matches or failures reported by the HDF5
@@ -223,7 +228,7 @@ error:
*-------------------------------------------------------------------------
*/
static unsigned
-open_file(char *filename, hid_t fapl, hsize_t page_size,
+open_file(char *filename, hid_t fapl, hsize_t page_size,
size_t page_buffer_size)
{
hid_t file_id = -1;
@@ -233,14 +238,14 @@ open_file(char *filename, hid_t fapl, hsize_t page_size,
int i;
int j;
int num_elements;
- char dset_name[10];
+ char dset_name[32];
H5F_t *f = NULL;
if((file_id = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
- if(NULL == (f = (H5F_t *)H5I_object(file_id)))
+ if(NULL == (f = (H5F_t *)H5VL_object(file_id)))
FAIL_STACK_ERROR;
if(f->shared->page_buf == NULL)
@@ -294,6 +299,7 @@ error:
} H5E_END_TRY;
return 1;
}
+#endif /* H5_HAVE_PARALLEL */
/*
*
@@ -334,7 +340,7 @@ set_multi_split(const char *env_h5_drvr, hid_t fapl, hsize_t pagesize)
memb_addr[H5FD_MEM_DRAW] = ((memb_addr[H5FD_MEM_DRAW] + pagesize - 1) / pagesize) * pagesize;
} else {
/* Set memb_addr aligned */
- for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, mt))
+ for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++)
memb_addr[mt] = ((memb_addr[mt] + pagesize - 1) / pagesize) * pagesize;
} /* end else */
@@ -343,7 +349,7 @@ set_multi_split(const char *env_h5_drvr, hid_t fapl, hsize_t pagesize)
TEST_ERROR
/* Free memb_name */
- for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, mt))
+ for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++)
free(memb_name[mt]);
} /* end if */
@@ -355,6 +361,7 @@ error:
} /* set_multi_split() */
+#ifndef H5_HAVE_PARALLEL
/*-------------------------------------------------------------------------
* Function: test_args()
@@ -363,7 +370,7 @@ error:
*
* 1) verifying that API errors are caught.
*
- * 2) verifying that the page buffer behaves more or less
+ * 2) verifying that the page buffer behaves more or less
* as advertized.
*
* Any data mis-matches or unexpected failures or successes
@@ -377,6 +384,7 @@ error:
*
*-------------------------------------------------------------------------
*/
+
static unsigned
test_args(hid_t orig_fapl, const char *env_h5_drvr)
{
@@ -396,8 +404,8 @@ test_args(hid_t orig_fapl, const char *env_h5_drvr)
TEST_ERROR;
- /* Test setting a page buffer without Paged Aggregation enabled -
- * should fail
+ /* Test setting a page buffer without Paged Aggregation enabled -
+ * should fail
*/
if(H5Pset_page_buffer_size(fapl, 512, 0, 0) < 0)
TEST_ERROR;
@@ -410,8 +418,8 @@ test_args(hid_t orig_fapl, const char *env_h5_drvr)
TEST_ERROR;
- /* Test setting a page buffer with a size smaller than a single
- * page size - should fail
+ /* 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, (hsize_t)1) < 0)
TEST_ERROR;
@@ -430,8 +438,8 @@ test_args(hid_t orig_fapl, const char *env_h5_drvr)
TEST_ERROR;
- /* Test setting a page buffer with sum of min meta and raw
- * data percentage > 100 - should fail
+ /* Test setting a page buffer with sum of min meta and raw
+ * data percentage > 100 - should fail
*/
H5E_BEGIN_TRY {
ret = H5Pset_page_buffer_size(fapl, 512, 50, 51);
@@ -460,8 +468,8 @@ test_args(hid_t orig_fapl, const char *env_h5_drvr)
TEST_ERROR;
- /* Test setting a page buffer with a size slightly larger than a
- * single page size
+ /* 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, (hsize_t)1) < 0)
TEST_ERROR;
@@ -521,7 +529,7 @@ test_args(hid_t orig_fapl, const char *env_h5_drvr)
if(H5Pclose(fapl) < 0)
FAIL_STACK_ERROR;
- PASSED()
+ PASSED();
return 0;
error:
@@ -547,14 +555,14 @@ error:
*
* Programmer: unknown
* ?? / ?? / ??
- *
+ *
* Changes: Added base_page_cnt field as supporting code. This allows
* the test to adjust to the number of page buffer pages
* accessed during file open / create.
*
- * The test for the value of base_page_cnt just after file
+ * The test for the value of base_page_cnt just after file
* open exists detect changes in library behavior. Assuming
- * any such change is not indicative of other issues, these
+ * any such change is not indicative of other issues, these
* tests can be modified to reflect the change.
*
* JRM -- 2/23/17
@@ -570,9 +578,6 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
hid_t file_id = -1; /* File ID */
hid_t fcpl = -1;
hid_t fapl = -1;
- H5FD_io_info_t fdio_info;
- H5P_genplist_t *meta_plist = (H5P_genplist_t *)H5I_object(H5AC_ind_read_dxpl_id);
- H5P_genplist_t *raw_plist = (H5P_genplist_t *)H5I_object(H5AC_rawdata_dxpl_id);
size_t base_page_cnt;
size_t page_count = 0;
int i, num_elements = 2000;
@@ -606,11 +611,11 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
- if(NULL == (f = (H5F_t *)H5I_object(file_id)))
+ if(NULL == (f = (H5F_t *)H5VL_object(file_id)))
FAIL_STACK_ERROR;
/* opening the file inserts one or more pages into the page buffer.
- * Get the number of pages inserted, and verify that it is the
+ * Get the number of pages inserted, and verify that it is the
* the expected value.
*/
base_page_cnt = H5SL_count(f->shared->page_buf->slist_ptr);
@@ -618,13 +623,13 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
TEST_ERROR;
/* allocate space for a 2000 elements */
- if(HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, sizeof(int)*(size_t)num_elements)))
+ if(HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_DRAW, sizeof(int)*(size_t)num_elements)))
FAIL_STACK_ERROR;
- /* intialize all the elements to have a value of -1 */
+ /* initialize all the elements to have a value of -1 */
for(i=0 ; i<num_elements ; i++)
data[i] = -1;
- if(H5F_block_write(f, H5FD_MEM_DRAW, addr, sizeof(int)*(size_t)num_elements, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, addr, sizeof(int)*(size_t)num_elements, data) < 0)
FAIL_STACK_ERROR;
/* update the first 50 elements to have values 0-49 - this will be
@@ -634,7 +639,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
for(i=0 ; i<100 ; i++)
data[i] = i;
- if(H5F_block_write(f, H5FD_MEM_DRAW, addr, sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
page_count ++;
@@ -646,7 +651,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
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, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, addr+(sizeof(int)*300), sizeof(int)*150, data) < 0)
FAIL_STACK_ERROR;
page_count += 2;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count + base_page_cnt)
@@ -656,7 +661,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
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, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, addr+(sizeof(int)*100), sizeof(int)*200, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count + base_page_cnt)
FAIL_STACK_ERROR;
@@ -665,7 +670,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
/* 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, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, addr+(sizeof(int)*450), sizeof(int)*150, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count + base_page_cnt)
FAIL_STACK_ERROR;
@@ -673,13 +678,13 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
/* 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, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, addr+(sizeof(int)*600), sizeof(int)*200, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count + base_page_cnt)
FAIL_STACK_ERROR;
/* read elements 800 - 1200, this should not affect the PB, and should read -1s */
- if(H5F_block_read(f, H5FD_MEM_DRAW, addr+(sizeof(int)*800), sizeof(int)*400, H5AC_rawdata_dxpl_id, data) < 0)
+ 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) {
@@ -690,10 +695,10 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count + base_page_cnt)
FAIL_STACK_ERROR;
- /* read elements 1200 - 1201, this should read -1 and bring in an
- * entire page of addr 1200
+ /* read elements 1200 - 1201, this should read -1 and bring in an
+ * entire page of addr 1200
*/
- if(H5F_block_read(f, H5FD_MEM_DRAW, addr+(sizeof(int)*1200), sizeof(int)*1, H5AC_rawdata_dxpl_id, data) < 0)
+ 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) {
@@ -708,7 +713,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
/* read elements 175 - 225, this should use the PB existing pages */
/* Changes: 350 - 450 */
/* 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, H5AC_rawdata_dxpl_id, data) < 0)
+ 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) {
@@ -721,10 +726,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
/* read elements 0 - 800 using the VFD.. this should result in -1s
except for the writes that went through the PB (100-300 & 600-800) */
- fdio_info.file = f->shared->lf;
- fdio_info.meta_dxpl = meta_plist;
- fdio_info.raw_dxpl = raw_plist;
- if(H5FD_read(&fdio_info, H5FD_MEM_DRAW, addr, sizeof(int)*800, data) < 0)
+ if(H5FD_read(f->shared->lf, H5FD_MEM_DRAW, addr, sizeof(int)*800, data) < 0)
FAIL_STACK_ERROR;
i = 0;
while (i < 800) {
@@ -744,9 +746,9 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
}
/* read elements 0 - 800 using the PB.. this should result in all
- * what we have written so far and should get the updates from the PB
+ * what we have written so far and should get the updates from the PB
*/
- if(H5F_block_read(f, H5FD_MEM_DRAW, addr, sizeof(int)*800, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, addr, sizeof(int)*800, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count + base_page_cnt)
TEST_ERROR;
@@ -759,11 +761,11 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
/* update elements 400 - 1400 to value 0, this will go to disk but
* also evict existing pages from the PB (page 400 & 1200 that are
- * existing).
+ * existing).
*/
for(i=0 ; i<1000 ; i++)
data[i] = 0;
- if(H5F_block_write(f, H5FD_MEM_DRAW, addr+(sizeof(int)*400), sizeof(int)*1000, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, addr+(sizeof(int)*400), sizeof(int)*1000, data) < 0)
FAIL_STACK_ERROR;
page_count -= 2;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count + base_page_cnt)
@@ -772,7 +774,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
/* read elements 0 - 1000.. this should go to disk then update the
* buffer result 200-400 with existing pages
*/
- if(H5F_block_read(f, H5FD_MEM_DRAW, addr, sizeof(int)*1000, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, addr, sizeof(int)*1000, data) < 0)
FAIL_STACK_ERROR;
i=0;
while (i < 1000) {
@@ -801,7 +803,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
HDfree(data);
- PASSED()
+ PASSED();
return 0;
error:
@@ -830,14 +832,14 @@ error:
*
* Programmer: unknown
* ?? / ?? / ??
- *
+ *
* Changes: Added base_page_cnt field as supporting code. This allows
* the test to adjust to the number of page buffer pages
* accessed during file open / create.
*
- * The test for the value of base_page_cnt just after file
+ * The test for the value of base_page_cnt just after file
* open exists detect changes in library behavior. Assuming
- * any such change is not indicative of other issues, these
+ * any such change is not indicative of other issues, these
* tests can be modified to reflect the change.
*
* JRM -- 2/23/17
@@ -892,11 +894,11 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
- if(NULL == (f = (H5F_t *)H5I_object(file_id)))
+ if(NULL == (f = (H5F_t *)H5VL_object(file_id)))
FAIL_STACK_ERROR;
/* opening the file inserts one or more pages into the page buffer.
- * Get the number of pages inserted, and verify that it is the
+ * Get the number of pages inserted, and verify that it is the
* the expected value.
*/
base_page_cnt = H5SL_count(f->shared->page_buf->slist_ptr);
@@ -904,24 +906,24 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr)
TEST_ERROR;
/* allocate space for a 2000 elements */
- if(HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, sizeof(int)*(size_t)num_elements)))
+ if(HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_DRAW, sizeof(int)*(size_t)num_elements)))
FAIL_STACK_ERROR;
- /* intialize all the elements to have a value of -1 */
+ /* initialize all the elements to have a value of -1 */
for(i=0 ; i<num_elements ; i++)
data[i] = -1;
- if(H5F_block_write(f, H5FD_MEM_DRAW, addr, sizeof(int)*(size_t)num_elements, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, addr, sizeof(int)*(size_t)num_elements, data) < 0)
FAIL_STACK_ERROR;
/* update the first 100 elements to have values 0-99 - this will be
* a page buffer update with 1 page resulting in the page
- * buffer.
+ * buffer.
*/
for(i=0 ; i<100 ; i++)
data[i] = i;
- if(H5F_block_write(f, H5FD_MEM_DRAW, addr, sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
page_count ++;
@@ -930,12 +932,12 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr)
TEST_ERROR;
/* update elements 300 - 450, with values 300 - 449 - this will
- * bring two pages into the page buffer and evict 0.
+ * bring two pages into the page buffer and evict 0.
*/
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, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, addr+(sizeof(int)*300), sizeof(int)*150, data) < 0)
FAIL_STACK_ERROR;
page_count = 2;
@@ -964,7 +966,7 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr)
/* Changes: 300 - 301 */
for(i=0 ; i<1 ; i++)
data[i] = i+300;
- if(H5F_block_write(f, H5FD_MEM_DRAW, addr+(sizeof(int)*300), sizeof(int)*1, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, addr+(sizeof(int)*300), sizeof(int)*1, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count)
FAIL_STACK_ERROR;
@@ -972,7 +974,7 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr)
/* read elements 600 - 601, this should read -1 and bring in an
entire page of addr 600, and evict page 200 */
/* Changes: 1200 - 1201; 1200, 400 */
- if(H5F_block_read(f, H5FD_MEM_DRAW, addr+(sizeof(int)*1200), sizeof(int)*1, H5AC_rawdata_dxpl_id, data) < 0)
+ 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) {
@@ -999,7 +1001,7 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
/* read elements 175 - 225, this should move 100 to the top, evict 600 and bring in 200 */
/* Changes: 350 - 450; 200, 1200, 400 */
- if(H5F_block_read(f, H5FD_MEM_DRAW, addr+(sizeof(int)*350), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ 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) {
@@ -1030,7 +1032,7 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr)
/* Changes: 400 - 1400; 400 */
for(i=0 ; i<1000 ; i++)
data[i] = 0;
- if(H5F_block_write(f, H5FD_MEM_DRAW, addr+(sizeof(int)*400), sizeof(int)*1000, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, addr+(sizeof(int)*400), sizeof(int)*1000, data) < 0)
FAIL_STACK_ERROR;
page_count -= 1;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count)
@@ -1054,7 +1056,7 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
HDfree(data);
- PASSED()
+ PASSED();
return 0;
error:
@@ -1072,7 +1074,7 @@ error:
/*-------------------------------------------------------------------------
* Function: test_min_threshold()
*
- * Purpose: Tests verifying observation of minimum and maximum
+ * Purpose: Tests verifying observation of minimum and maximum
* raw and metadata page counts in the page buffer.
*
* Any data mis-matches or failures reported by the HDF5
@@ -1083,16 +1085,16 @@ error:
*
* Programmer: unknown
* ?? / ?? / ??
- *
+ *
* Changes: Added the base_raw_cnt and base_meta_cnt fields and
- * supporting code. This allows the test to adjust to the
- * number of page buffer pages accessed during file open /
+ * supporting code. This allows the test to adjust to the
+ * number of page buffer pages accessed during file open /
* create.
*
* The tests for the values of base_raw_cnt and base_meta_cnt
- * just after file open exist detect changes in library
- * behavior. Assuming any such change is not indicative of
- * other issues, these tests can be modified to reflect the
+ * just after file open exist detect changes in library
+ * behavior. Assuming any such change is not indicative of
+ * other issues, these tests can be modified to reflect the
* change.
*
* JRM -- 2/23/17
@@ -1151,7 +1153,7 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
- if(NULL == (f = (H5F_t *)H5I_object(file_id)))
+ if(NULL == (f = (H5F_t *)H5VL_object(file_id)))
FAIL_STACK_ERROR;
/* opening the file inserts one or more pages into the page buffer.
@@ -1178,13 +1180,13 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
if(page_buf->min_raw_count != 0)
TEST_ERROR;
- if(HADDR_UNDEF == (meta_addr = H5MF_alloc(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, sizeof(int)*(size_t)num_elements)))
+ if(HADDR_UNDEF == (meta_addr = H5MF_alloc(f, H5FD_MEM_SUPER, sizeof(int)*(size_t)num_elements)))
FAIL_STACK_ERROR;
- if(HADDR_UNDEF == (raw_addr = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, sizeof(int)*(size_t)num_elements)))
+ if(HADDR_UNDEF == (raw_addr = H5MF_alloc(f, H5FD_MEM_DRAW, sizeof(int)*(size_t)num_elements)))
FAIL_STACK_ERROR;
- /* write all raw data, this would end up in page buffer since there
+ /* write all raw data, this would end up in page buffer since there
* is no metadata yet
*
* Not necessarily -- opening the file may may load a metadata page.
@@ -1192,19 +1194,19 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
for(i=0 ; i<100 ; i++)
data[i] = i;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*400), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*400), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*600), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*600), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*800), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*800), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
page_count += 5;
@@ -1216,19 +1218,19 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
TEST_ERROR;
/* write all meta data, this would end up in page buffer */
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*200), sizeof(int)*50, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*200), sizeof(int)*50, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*400), sizeof(int)*50, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*400), sizeof(int)*50, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*600), sizeof(int)*50, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*600), sizeof(int)*50, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*800), sizeof(int)*50, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*800), sizeof(int)*50, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count)
@@ -1242,21 +1244,21 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
/* write and read more raw data and make sure that they don't end up in
* page buffer since the minimum metadata is actually the entire
- * page buffer
+ * page buffer
*/
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*350), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*350), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*500), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*500), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*750), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*750), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*900), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*900), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count)
@@ -1286,7 +1288,7 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
- if(NULL == (f = (H5F_t *)H5I_object(file_id)))
+ if(NULL == (f = (H5F_t *)H5VL_object(file_id)))
FAIL_STACK_ERROR;
/* opening the file inserts one or more pages into the page buffer.
@@ -1312,31 +1314,31 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
if(page_buf->min_raw_count != 5)
FAIL_STACK_ERROR;
- if(HADDR_UNDEF == (meta_addr = H5MF_alloc(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, sizeof(int)*(size_t)num_elements)))
+ if(HADDR_UNDEF == (meta_addr = H5MF_alloc(f, H5FD_MEM_SUPER, sizeof(int)*(size_t)num_elements)))
FAIL_STACK_ERROR;
- if(HADDR_UNDEF == (raw_addr = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, sizeof(int)*(size_t)num_elements)))
+ if(HADDR_UNDEF == (raw_addr = H5MF_alloc(f, H5FD_MEM_DRAW, sizeof(int)*(size_t)num_elements)))
TEST_ERROR;
- /* write all meta data, this would end up in page buffer since there
+ /* write all meta data, this would end up in page buffer since there
* is no raw data yet
*/
for(i=0 ; i<100 ; i++)
data[i] = i;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*200), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*200), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*400), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*400), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*600), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*600), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*800), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*800), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
page_count += 5;
@@ -1347,19 +1349,19 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
TEST_ERROR;
/* write/read all raw data, this would end up in page buffer */
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*400), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*400), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*600), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*600), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*800), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*800), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count)
@@ -1373,21 +1375,21 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
/* write and read more meta data and make sure that they don't end up in
* page buffer since the minimum metadata is actually the entire
- * page buffer
+ * page buffer
*/
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*100), sizeof(int)*50, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*100), sizeof(int)*50, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*350), sizeof(int)*50, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*350), sizeof(int)*50, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*500), sizeof(int)*50, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*500), sizeof(int)*50, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*750), sizeof(int)*50, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*750), sizeof(int)*50, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*900), sizeof(int)*50, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*900), sizeof(int)*50, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count)
@@ -1405,8 +1407,8 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
HDprintf("\tMinimum metadata threshold = 40%%, Minimum rawdata threshold = 40%%\n");
page_count = 0;
- /* keep 5 pages at max in the page buffer 2 meta pages, 2 raw pages
- * minimum
+ /* keep 5 pages at max in the page buffer 2 meta pages, 2 raw pages
+ * minimum
*/
if(H5Pset_page_buffer_size(fapl, sizeof(int)*1000, 40, 40) < 0)
TEST_ERROR;
@@ -1416,13 +1418,13 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
- if(NULL == (f = (H5F_t *)H5I_object(file_id)))
+ if(NULL == (f = (H5F_t *)H5VL_object(file_id)))
FAIL_STACK_ERROR;
/* opening the file inserts one or more pages into the page buffer.
*
- * However, with the current 1 metadata page inserted into the
- * the page buffer, it is not necessary to track the base raw and
+ * However, with the current 1 metadata page inserted into the
+ * the page buffer, it is not necessary to track the base raw and
* metadata entry counts.
*/
@@ -1439,39 +1441,39 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
if(page_buf->min_raw_count != 2)
TEST_ERROR;
- if(HADDR_UNDEF == (meta_addr = H5MF_alloc(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, sizeof(int)*(size_t)num_elements)))
+ if(HADDR_UNDEF == (meta_addr = H5MF_alloc(f, H5FD_MEM_SUPER, sizeof(int)*(size_t)num_elements)))
FAIL_STACK_ERROR;
- if(HADDR_UNDEF == (raw_addr = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, sizeof(int)*(size_t)num_elements)))
+ if(HADDR_UNDEF == (raw_addr = H5MF_alloc(f, H5FD_MEM_DRAW, sizeof(int)*(size_t)num_elements)))
FAIL_STACK_ERROR;
- /* intialize all the elements to have a value of -1 */
+ /* initialize all the elements to have a value of -1 */
for(i=0 ; i<num_elements ; i++)
data[i] = -1;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*(size_t)num_elements, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*(size_t)num_elements, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*(size_t)num_elements, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*(size_t)num_elements, data) < 0)
FAIL_STACK_ERROR;
/* fill the page buffer with raw data */
for(i=0 ; i<100 ; i++)
data[i] = i;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*400), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*400), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*600), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*600), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*800), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*800), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
page_count += 5;
@@ -1483,13 +1485,13 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
TEST_ERROR;
/* add 3 meta entries evicting 3 raw entries */
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*200), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*200), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*400), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*400), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count)
@@ -1501,13 +1503,13 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
if(f->shared->page_buf->raw_count != 2)
TEST_ERROR;
- /* adding more meta entires should replace meta entries since raw data
- * is at its minimum
+ /* adding more meta entires should replace meta entries since raw data
+ * is at its minimum
*/
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*600), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*600), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*800), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*800), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
if(f->shared->page_buf->meta_count != 3)
@@ -1517,13 +1519,13 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
TEST_ERROR;
/* bring existing raw entires up the LRU */
- if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*750), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*750), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- /* adding 2 raw entries (even with 1 call) should only evict 1 meta
- * entry and another raw entry
+ /* adding 2 raw entries (even with 1 call) should only evict 1 meta
+ * entry and another raw entry
*/
- if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*350), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*350), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
if(f->shared->page_buf->meta_count != 2)
@@ -1533,10 +1535,10 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
TEST_ERROR;
/* adding 2 meta entries should replace 2 entires at the bottom of the LRU */
- if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*98), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*98), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*242), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*242), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
if(f->shared->page_buf->meta_count != 2)
@@ -1557,7 +1559,7 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
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 *)H5I_object(file_id)))
+ if(NULL == (f = (H5F_t *)H5VL_object(file_id)))
FAIL_STACK_ERROR;
page_buf = f->shared->page_buf;
@@ -1566,39 +1568,39 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
if(page_buf->min_raw_count != 0)
TEST_ERROR;
- if(HADDR_UNDEF == (meta_addr = H5MF_alloc(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, sizeof(int)*(size_t)num_elements)))
+ if(HADDR_UNDEF == (meta_addr = H5MF_alloc(f, H5FD_MEM_SUPER, sizeof(int)*(size_t)num_elements)))
FAIL_STACK_ERROR;
- if(HADDR_UNDEF == (raw_addr = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, sizeof(int)*(size_t)num_elements)))
+ if(HADDR_UNDEF == (raw_addr = H5MF_alloc(f, H5FD_MEM_DRAW, sizeof(int)*(size_t)num_elements)))
FAIL_STACK_ERROR;
- /* intialize all the elements to have a value of -1 */
+ /* initialize all the elements to have a value of -1 */
for(i=0 ; i<num_elements ; i++)
data[i] = -1;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*(size_t)num_elements, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*(size_t)num_elements, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*(size_t)num_elements, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*(size_t)num_elements, data) < 0)
FAIL_STACK_ERROR;
/* fill the page buffer with raw data */
for(i=0 ; i<100 ; i++)
data[i] = i;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*400), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*400), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*600), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*600), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*800), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*800), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
page_count += 5;
@@ -1607,10 +1609,10 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
/* add 2 meta entries evicting 2 raw entries */
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*200), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*200), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count)
@@ -1623,17 +1625,17 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
TEST_ERROR;
/* bring the rest of the raw entries up the LRU */
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*500), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*500), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*700), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*700), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*900), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*900), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
/* write one more raw entry which replace one meta entry */
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*100), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*100), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count)
@@ -1645,10 +1647,10 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
if(f->shared->page_buf->raw_count != 4)
TEST_ERROR;
- /* write one more raw entry which should replace another raw entry
- * keeping min threshold of meta entries
+ /* write one more raw entry which should replace another raw entry
+ * keeping min threshold of meta entries
*/
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*300), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*300), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count)
@@ -1660,10 +1662,10 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
if(f->shared->page_buf->raw_count != 4)
TEST_ERROR;
- /* write a metadata entry that should replace the metadata entry
- * at the bottom of the LRU
+ /* write a metadata entry that should replace the metadata entry
+ * at the bottom of the LRU
*/
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*500), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*500), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count)
@@ -1686,7 +1688,7 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
HDfree(data);
- PASSED()
+ PASSED();
return 0;
@@ -1719,16 +1721,16 @@ error:
*
* Programmer: unknown
* ?? / ?? / ??
- *
+ *
* Changes: Added the base_raw_cnt and base_meta_cnt fields and
- * supporting code. This allows the test to adjust to the
- * number of page buffer pages accessed during file open /
+ * supporting code. This allows the test to adjust to the
+ * number of page buffer pages accessed during file open /
* create.
*
* The tests for the values of base_raw_cnt and base_meta_cnt
- * just after file open exist detect changes in library
- * behavior. Assuming any such change is not indicative of
- * other issues, these tests can be modified to reflect the
+ * just after file open exist detect changes in library
+ * behavior. Assuming any such change is not indicative of
+ * other issues, these tests can be modified to reflect the
* change.
*
* JRM -- 2/23/17
@@ -1781,11 +1783,11 @@ test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
- if(NULL == (f = (H5F_t *)H5I_object(file_id)))
+ if(NULL == (f = (H5F_t *)H5VL_object(file_id)))
FAIL_STACK_ERROR;
/* opening the file inserts one or more pages into the page buffer.
- * Get the raw and meta counts now, so we can adjust the expected
+ * Get the raw and meta counts now, so we can adjust the expected
* statistics accordingly.
*/
HDassert(f);
@@ -1805,99 +1807,99 @@ test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr)
if(H5Freset_page_buffering_stats(file_id) < 0)
FAIL_STACK_ERROR;
- if(HADDR_UNDEF == (meta_addr = H5MF_alloc(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, sizeof(int)*(size_t)num_elements)))
+ if(HADDR_UNDEF == (meta_addr = H5MF_alloc(f, H5FD_MEM_SUPER, sizeof(int)*(size_t)num_elements)))
FAIL_STACK_ERROR;
- if(HADDR_UNDEF == (raw_addr = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, sizeof(int)*(size_t)num_elements)))
+ if(HADDR_UNDEF == (raw_addr = H5MF_alloc(f, H5FD_MEM_DRAW, sizeof(int)*(size_t)num_elements)))
FAIL_STACK_ERROR;
- /* intialize all the elements to have a value of -1 */
+ /* initialize all the elements to have a value of -1 */
for(i=0 ; i<num_elements ; i++)
data[i] = -1;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*(size_t)num_elements, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*(size_t)num_elements, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*(size_t)num_elements, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*(size_t)num_elements, data) < 0)
FAIL_STACK_ERROR;
for(i=0 ; i<200 ; i++)
data[i] = i;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*400), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*400), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*200), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*200), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*600), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*600), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*800), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*800), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*600), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*600), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*500), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*500), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*700), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*700), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*900), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*900), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*400), sizeof(int)*200, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*400), sizeof(int)*200, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*100), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*100), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*300), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*300), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*800), sizeof(int)*182, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*800), sizeof(int)*182, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*400), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*400), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*200), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*200), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*600), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*600), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*800), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*800), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*400), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*400), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*600), sizeof(int)*200, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*600), sizeof(int)*200, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*800), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*800), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
if(f->shared->page_buf->accesses[0] != 8)
@@ -1992,7 +1994,7 @@ test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr)
HDfree(data);
- PASSED()
+ PASSED();
return 0;
error:
@@ -2006,12 +2008,13 @@ error:
return 1;
} /* test_stats_collection */
+#endif /* #ifndef H5_HAVE_PARALLEL */
/*-------------------------------------------------------------------------
* Function: verify_page_buffering_disabled()
*
- * Purpose: This function should only be called in parallel
+ * Purpose: This function should only be called in parallel
* builds.
*
* At present, page buffering should be disabled in parallel
@@ -2022,7 +2025,7 @@ error:
*
* Programmer: John Mainzer
* 03/21/17
- *
+ *
* Changes: None.
*
*-------------------------------------------------------------------------
@@ -2069,7 +2072,7 @@ verify_page_buffering_disabled(hid_t orig_fapl, const char *env_h5_drvr)
if(file_id >= 0)
TEST_ERROR;
- /* now, create a file, close it, and then try to open it with page
+ /* now, create a file, close it, and then try to open it with page
* buffering enabled.
*/
if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
@@ -2089,7 +2092,7 @@ verify_page_buffering_disabled(hid_t orig_fapl, const char *env_h5_drvr)
if(H5Fclose(file_id) < 0)
FAIL_STACK_ERROR;
- /* try to open the file using the fapl prepared above which enables
+ /* try to open the file using the fapl prepared above which enables
* page buffering. Should fail.
*/
H5E_BEGIN_TRY {
@@ -2105,7 +2108,7 @@ verify_page_buffering_disabled(hid_t orig_fapl, const char *env_h5_drvr)
if(H5Pclose(fapl) < 0)
FAIL_STACK_ERROR;
- PASSED()
+ PASSED();
return 0;
@@ -2142,6 +2145,7 @@ main(void)
hid_t fapl = -1; /* File access property list for data files */
unsigned nerrors = 0; /* Cumulative error count */
const char *env_h5_drvr = NULL; /* File Driver value from environment */
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
h5_reset();
@@ -2154,7 +2158,7 @@ main(void)
* Page buffering depends on paged aggregation which is
* currently disabled for multi/split drivers.
*/
- if((0 == HDstrcmp(env_h5_drvr, "multi")) ||
+ if((0 == HDstrcmp(env_h5_drvr, "multi")) ||
(0 == HDstrcmp(env_h5_drvr, "split"))) {
SKIPPED()
@@ -2167,7 +2171,11 @@ main(void)
PUTS_ERROR("Can't get VFD-dependent fapl")
} /* end if */
-#ifdef H5_HAVE_PARALLEL
+ /* Push API context */
+ if(H5CX_push() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = TRUE;
+
+#ifdef H5_HAVE_PARALLEL
HDputs("Page Buffering is disabled for parallel.");
nerrors += verify_page_buffering_disabled(fapl, env_h5_drvr);
@@ -2187,12 +2195,15 @@ main(void)
if(nerrors)
goto error;
+ /* Pop API context */
+ if(api_ctx_pushed && H5CX_pop() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = FALSE;
+
HDputs("All Page Buffering tests passed.");
HDexit(EXIT_SUCCESS);
error:
-
HDprintf("***** %d Page Buffering TEST%s FAILED! *****\n",
nerrors, nerrors > 1 ? "S" : "");
@@ -2200,7 +2211,8 @@ error:
H5Pclose(fapl);
} H5E_END_TRY;
- HDexit(EXIT_FAILURE);
+ if(api_ctx_pushed) H5CX_pop();
+ HDexit(EXIT_FAILURE);
} /* main() */