summaryrefslogtreecommitdiffstats
path: root/test/earray.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2012-12-12 21:31:27 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2012-12-12 21:31:27 (GMT)
commitadc36c3b4b53520a6f4ba263943f847e3fafeb71 (patch)
treeee8ed7f3af787db40569df33c0387fd66362383d /test/earray.c
parentc481032c1b3e5bd7b462e306b4d193932835334b (diff)
downloadhdf5-adc36c3b4b53520a6f4ba263943f847e3fafeb71.zip
hdf5-adc36c3b4b53520a6f4ba263943f847e3fafeb71.tar.gz
hdf5-adc36c3b4b53520a6f4ba263943f847e3fafeb71.tar.bz2
[svn-r23095] Purpose: Refactor flush dependency code, add support for multiple parents
Description: Reworked how flush dependencies worked internally, allowing multiple flush dependency parents, and removing the notion of flush dependency heights, instead keeping track of the number of dirty descendents to determine if parents can be flushed. Also removed the requirement that cache clients destroy flush dependencies before eviction (this is now handled by the cache) and removed the maximum number of passes (the cache should detect infinite loops elsewhere). Added test cases for this. Tested: durandal
Diffstat (limited to 'test/earray.c')
-rw-r--r--test/earray.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/earray.c b/test/earray.c
index 132913b..5474d7e 100644
--- a/test/earray.c
+++ b/test/earray.c
@@ -312,10 +312,10 @@ finish_tparam(earray_test_param_t *tparam)
*-------------------------------------------------------------------------
*/
static int
-create_file(hid_t fapl, hid_t *file, H5F_t **f)
+create_file(unsigned flags, hid_t fapl, hid_t *file, H5F_t **f)
{
/* Create the file to work on */
- if((*file = H5Fcreate(filename_g, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ if((*file = H5Fcreate(filename_g, flags, H5P_DEFAULT, fapl)) < 0)
FAIL_STACK_ERROR
/* Get a pointer to the internal file object */
@@ -825,7 +825,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t UNUSED *tpara
haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
/* Create file & retrieve pointer to internal file object */
- if(create_file(fapl, &file, &f) < 0)
+ if(create_file(H5F_ACC_TRUNC, fapl, &file, &f) < 0)
TEST_ERROR
/*
@@ -1047,7 +1047,7 @@ test_reopen(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
/* Create file & retrieve pointer to internal file object */
- if(create_file(fapl, &file, &f) < 0)
+ if(create_file(H5F_ACC_TRUNC, fapl, &file, &f) < 0)
TEST_ERROR
/*
@@ -1120,7 +1120,7 @@ test_open_twice(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
/* Create file & retrieve pointer to internal file object */
- if(create_file(fapl, &file, &f) < 0)
+ if(create_file(H5F_ACC_TRUNC, fapl, &file, &f) < 0)
TEST_ERROR
/*
@@ -1226,7 +1226,7 @@ test_delete_open(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
h5_stat_size_t file_size; /* File size, after deleting array */
/* Create file & retrieve pointer to internal file object */
- if(create_file(fapl, &file, &f) < 0)
+ if(create_file(H5F_ACC_TRUNC, fapl, &file, &f) < 0)
TEST_ERROR
/*
@@ -1415,7 +1415,7 @@ test_flush_depend(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t UNUSED
hsize_t idx; /* Index value of element */
/* Create file & retrieve pointer to internal file object */
- if(create_file(fapl, &file, &f) < 0)
+ if(create_file(H5F_ACC_TRUNC | H5F_ACC_SWMR_WRITE, fapl, &file, &f) < 0)
TEST_ERROR
/*
@@ -2469,7 +2469,7 @@ test_set_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam,
TESTING(test_str);
/* Create file & retrieve pointer to internal file object */
- if(create_file(fapl, &file, &f) < 0)
+ if(create_file(H5F_ACC_TRUNC, fapl, &file, &f) < 0)
TEST_ERROR
/* Create array */
@@ -2643,7 +2643,7 @@ test_skip_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam,
TESTING(test_str);
/* Create file & retrieve pointer to internal file object */
- if(create_file(fapl, &file, &f) < 0)
+ if(create_file(H5F_ACC_TRUNC, fapl, &file, &f) < 0)
TEST_ERROR
/* Create array */