summaryrefslogtreecommitdiffstats
path: root/test/earray.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-11-18 03:42:13 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-11-18 03:42:13 (GMT)
commita19434caa09bce8d1d7cdc97911b35b3201c8d4e (patch)
tree4903b5a03996f8e1f6802f6725634d5929d80634 /test/earray.c
parenta28e8407cf5a526a20ad682382f0faed58aace76 (diff)
downloadhdf5-a19434caa09bce8d1d7cdc97911b35b3201c8d4e.zip
hdf5-a19434caa09bce8d1d7cdc97911b35b3201c8d4e.tar.gz
hdf5-a19434caa09bce8d1d7cdc97911b35b3201c8d4e.tar.bz2
[svn-r16094] Description:
Add initial support for data block 'page init' bitmasks to super blocks. Tested on: Mac OS X/32 10.5.5 (amazon) in debug mode Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'test/earray.c')
-rw-r--r--test/earray.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/earray.c b/test/earray.c
index a3c56fb..053fc14 100644
--- a/test/earray.c
+++ b/test/earray.c
@@ -565,6 +565,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t UNUSED *tpara
if(ea) {
/* Close opened extensible array */
H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ ea = NULL;
/* Indicate error */
TEST_ERROR
@@ -579,6 +580,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t UNUSED *tpara
if(ea) {
/* Close opened extensible array */
H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ ea = NULL;
/* Indicate error */
TEST_ERROR
@@ -592,6 +594,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t UNUSED *tpara
if(ea) {
/* Close opened extensible array */
H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ ea = NULL;
/* Indicate error */
TEST_ERROR
@@ -606,6 +609,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t UNUSED *tpara
if(ea) {
/* Close opened extensible array */
H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ ea = NULL;
/* Indicate error */
TEST_ERROR
@@ -618,6 +622,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t UNUSED *tpara
if(ea) {
/* Close opened extensible array */
H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ ea = NULL;
/* Indicate error */
TEST_ERROR
@@ -630,6 +635,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t UNUSED *tpara
if(ea) {
/* Close opened extensible array */
H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ ea = NULL;
/* Indicate error */
TEST_ERROR
@@ -644,12 +650,41 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t UNUSED *tpara
if(ea) {
/* Close opened extensible array */
H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ ea = NULL;
/* Indicate error */
TEST_ERROR
} /* end if */
/* Set invalid max. # of elements per data block page bits */
+ if(test_cparam.idx_blk_elmts > 0) {
+ HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
+ test_cparam.max_dblk_page_nelmts_bits = H5V_log2_gen((uint64_t)test_cparam.idx_blk_elmts) - 1;
+ H5E_BEGIN_TRY {
+ ea = H5EA_create(f, H5P_DATASET_XFER_DEFAULT, &test_cparam);
+ } H5E_END_TRY;
+ if(ea) {
+ /* Close opened extensible array */
+ H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ ea = NULL;
+
+ /* Indicate error */
+ TEST_ERROR
+ } /* end if */
+ } /* end if */
+ HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
+ test_cparam.max_dblk_page_nelmts_bits = 4; /* corresponds to 16 elements in data block page, which is less than the 64 elements for the default settings */
+ H5E_BEGIN_TRY {
+ ea = H5EA_create(f, H5P_DATASET_XFER_DEFAULT, &test_cparam);
+ } H5E_END_TRY;
+ if(ea) {
+ /* Close opened extensible array */
+ H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ ea = NULL;
+
+ /* Indicate error */
+ TEST_ERROR
+ } /* end if */
HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.max_dblk_page_nelmts_bits = test_cparam.max_nelmts_bits + 1;
H5E_BEGIN_TRY {
@@ -658,6 +693,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t UNUSED *tpara
if(ea) {
/* Close opened extensible array */
H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ ea = NULL;
/* Indicate error */
TEST_ERROR