diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2016-02-07 15:37:33 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2016-02-07 15:37:33 (GMT) |
commit | 48bebcc39ef565796356c159d16f09bfb0efba4d (patch) | |
tree | d571607d2e1003b4fb2d6a2294198f482c1929e1 /test/farray.c | |
parent | 66947641209890553871e69f4474b450ed502ae5 (diff) | |
download | hdf5-48bebcc39ef565796356c159d16f09bfb0efba4d.zip hdf5-48bebcc39ef565796356c159d16f09bfb0efba4d.tar.gz hdf5-48bebcc39ef565796356c159d16f09bfb0efba4d.tar.bz2 |
[svn-r29057] added dxpl type checking when debug mode is enabled (H5_DEBUG_BUILD)
tested on bb-8 with Serial and Parallel, debug and production builds.
Diffstat (limited to 'test/farray.c')
-rw-r--r-- | test/farray.c | 114 |
1 files changed, 57 insertions, 57 deletions
diff --git a/test/farray.c b/test/farray.c index 50a9856..ac9132a 100644 --- a/test/farray.c +++ b/test/farray.c @@ -402,11 +402,11 @@ finish(hid_t file, hid_t fapl, H5F_t *f, H5FA_t *fa, haddr_t fa_addr) h5_stat_size_t file_size; /* File size, after deleting array */ /* Close the fixed array */ - if(H5FA_close(fa, H5P_DATASET_XFER_DEFAULT) < 0) + if(H5FA_close(fa, H5AC_dxpl_id) < 0) FAIL_STACK_ERROR /* Delete array */ - if(H5FA_delete(f, H5P_DATASET_XFER_DEFAULT, fa_addr, NULL) < 0) + if(H5FA_delete(f, H5AC_dxpl_id, fa_addr, NULL) < 0) FAIL_STACK_ERROR /* Close the file */ @@ -464,11 +464,11 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE HDmemcpy(&test_cparam, cparam, sizeof(test_cparam)); test_cparam.raw_elmt_size = 0; H5E_BEGIN_TRY { - fa = H5FA_create(f, H5P_DATASET_XFER_DEFAULT, &test_cparam, NULL); + fa = H5FA_create(f, H5AC_dxpl_id, &test_cparam, NULL); } H5E_END_TRY; if(fa) { /* Close opened fixed array */ - H5FA_close(fa, H5P_DATASET_XFER_DEFAULT); + H5FA_close(fa, H5AC_dxpl_id); fa = NULL; /* Indicate error */ @@ -479,11 +479,11 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE HDmemcpy(&test_cparam, cparam, sizeof(test_cparam)); test_cparam.max_dblk_page_nelmts_bits = 0; H5E_BEGIN_TRY { - fa = H5FA_create(f, H5P_DATASET_XFER_DEFAULT, &test_cparam, NULL); + fa = H5FA_create(f, H5AC_dxpl_id, &test_cparam, NULL); } H5E_END_TRY; if(fa) { /* Close opened fixed array */ - H5FA_close(fa, H5P_DATASET_XFER_DEFAULT); + H5FA_close(fa, H5AC_dxpl_id); fa = NULL; /* Indicate error */ @@ -494,11 +494,11 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE HDmemcpy(&test_cparam, cparam, sizeof(test_cparam)); test_cparam.nelmts = 0; H5E_BEGIN_TRY { - fa = H5FA_create(f, H5P_DATASET_XFER_DEFAULT, &test_cparam, NULL); + fa = H5FA_create(f, H5AC_dxpl_id, &test_cparam, NULL); } H5E_END_TRY; if(fa) { /* Close opened fixed array */ - H5FA_close(fa, H5P_DATASET_XFER_DEFAULT); + H5FA_close(fa, H5AC_dxpl_id); fa = NULL; /* Indicate error */ @@ -518,7 +518,7 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE TESTING("fixed array creation"); /* Create array */ - if(create_array(f, H5P_DATASET_XFER_DEFAULT, cparam, &fa, &fa_addr) < 0) + if(create_array(f, H5AC_dxpl_id, cparam, &fa, &fa_addr) < 0) TEST_ERROR PASSED() @@ -542,7 +542,7 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE error: H5E_BEGIN_TRY { if(fa) - H5FA_close(fa, H5P_DATASET_XFER_DEFAULT); + H5FA_close(fa, H5AC_dxpl_id); H5Fclose(file); } H5E_END_TRY; @@ -578,19 +578,19 @@ test_reopen(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam) TESTING("create, close & reopen fixed array"); /* Create array */ - if(create_array(f, H5P_DATASET_XFER_DEFAULT, cparam, &fa, &fa_addr) < 0) + if(create_array(f, H5AC_dxpl_id, cparam, &fa, &fa_addr) < 0) TEST_ERROR /* Close the fixed array */ - if(H5FA_close(fa, H5P_DATASET_XFER_DEFAULT) < 0) + if(H5FA_close(fa, H5AC_dxpl_id) < 0) FAIL_STACK_ERROR /* Check for closing & re-opening the file */ - if(reopen_file(&file, &f, fapl, H5P_DATASET_XFER_DEFAULT, NULL, HADDR_UNDEF, tparam) < 0) + if(reopen_file(&file, &f, fapl, H5AC_dxpl_id, NULL, HADDR_UNDEF, tparam) < 0) TEST_ERROR /* Re-open the array */ - if(NULL == (fa = H5FA_open(f, H5P_DATASET_XFER_DEFAULT, fa_addr, NULL))) + if(NULL == (fa = H5FA_open(f, H5AC_dxpl_id, fa_addr, NULL))) FAIL_STACK_ERROR /* Verify the creation parameters */ @@ -609,7 +609,7 @@ test_reopen(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam) error: H5E_BEGIN_TRY { if(fa) - H5FA_close(fa, H5P_DATASET_XFER_DEFAULT); + H5FA_close(fa, H5AC_dxpl_id); H5Fclose(file); } H5E_END_TRY; @@ -648,11 +648,11 @@ test_open_twice(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam) TESTING("open fixed array twice"); /* Create array */ - if(create_array(f, H5P_DATASET_XFER_DEFAULT, cparam, &fa, &fa_addr) < 0) + if(create_array(f, H5AC_dxpl_id, cparam, &fa, &fa_addr) < 0) TEST_ERROR /* Open the array again, through the first file handle */ - if(NULL == (fa2 = H5FA_open(f, H5P_DATASET_XFER_DEFAULT, fa_addr, NULL))) + if(NULL == (fa2 = H5FA_open(f, H5AC_dxpl_id, fa_addr, NULL))) FAIL_STACK_ERROR /* Verify the creation parameters */ @@ -662,12 +662,12 @@ test_open_twice(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam) TEST_ERROR /* Close the second fixed array wrapper */ - if(H5FA_close(fa2, H5P_DATASET_XFER_DEFAULT) < 0) + if(H5FA_close(fa2, H5AC_dxpl_id) < 0) FAIL_STACK_ERROR fa2 = NULL; /* Check for closing & re-opening the file */ - if(reopen_file(&file, &f, fapl, H5P_DATASET_XFER_DEFAULT, &fa, fa_addr, tparam) < 0) + if(reopen_file(&file, &f, fapl, H5AC_dxpl_id, &fa, fa_addr, tparam) < 0) TEST_ERROR /* Re-open the file */ @@ -679,7 +679,7 @@ test_open_twice(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam) FAIL_STACK_ERROR /* Open the fixed array through the second file handle */ - if(NULL == (fa2 = H5FA_open(f2, H5P_DATASET_XFER_DEFAULT, fa_addr, NULL))) + if(NULL == (fa2 = H5FA_open(f2, H5AC_dxpl_id, fa_addr, NULL))) FAIL_STACK_ERROR /* Verify the creation parameters */ @@ -687,7 +687,7 @@ test_open_twice(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam) TEST_ERROR /* Close the first extensible array wrapper */ - if(H5FA_close(fa, H5P_DATASET_XFER_DEFAULT) < 0) + if(H5FA_close(fa, H5AC_dxpl_id) < 0) FAIL_STACK_ERROR fa = NULL; @@ -710,9 +710,9 @@ test_open_twice(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam) error: H5E_BEGIN_TRY { if(fa) - H5FA_close(fa, H5P_DATASET_XFER_DEFAULT); + H5FA_close(fa, H5AC_dxpl_id); if(fa2) - H5FA_close(fa2, H5P_DATASET_XFER_DEFAULT); + H5FA_close(fa2, H5AC_dxpl_id); H5Fclose(file); H5Fclose(file2); } H5E_END_TRY; @@ -760,11 +760,11 @@ test_open_twice_diff(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tpa TEST_ERROR /* Create array */ - if(create_array(f, H5P_DATASET_XFER_DEFAULT, cparam, &fa, &fa_addr) < 0) + if(create_array(f, H5AC_dxpl_id, cparam, &fa, &fa_addr) < 0) TEST_ERROR /* Open the array again, through the first file handle */ - if(NULL == (fa2 = H5FA_open(f, H5P_DATASET_XFER_DEFAULT, fa_addr, NULL))) + if(NULL == (fa2 = H5FA_open(f, H5AC_dxpl_id, fa_addr, NULL))) FAIL_STACK_ERROR /* Verify the creation parameters */ @@ -774,7 +774,7 @@ test_open_twice_diff(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tpa TEST_ERROR /* Close the second fixed array wrapper */ - if(H5FA_close(fa2, H5P_DATASET_XFER_DEFAULT) < 0) + if(H5FA_close(fa2, H5AC_dxpl_id) < 0) FAIL_STACK_ERROR fa2 = NULL; @@ -786,11 +786,11 @@ test_open_twice_diff(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tpa FAIL_STACK_ERROR /* Check for closing & re-opening the file */ - if(reopen_file(&file, &f, fapl, H5P_DATASET_XFER_DEFAULT, &fa, fa_addr, tparam) < 0) + if(reopen_file(&file, &f, fapl, H5AC_dxpl_id, &fa, fa_addr, tparam) < 0) TEST_ERROR /* Close the first fixed array wrapper */ - if(H5FA_close(fa, H5P_DATASET_XFER_DEFAULT) < 0) + if(H5FA_close(fa, H5AC_dxpl_id) < 0) FAIL_STACK_ERROR fa = NULL; @@ -821,7 +821,7 @@ test_open_twice_diff(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tpa FAIL_STACK_ERROR /* Open the fixed array through the second file handle */ - if(NULL == (fa2 = H5FA_open(f2, H5P_DATASET_XFER_DEFAULT, fa_addr, NULL))) + if(NULL == (fa2 = H5FA_open(f2, H5AC_dxpl_id, fa_addr, NULL))) FAIL_STACK_ERROR /* Verify the creation parameters */ @@ -846,9 +846,9 @@ test_open_twice_diff(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tpa error: H5E_BEGIN_TRY { if(fa) - H5FA_close(fa, H5P_DATASET_XFER_DEFAULT); + H5FA_close(fa, H5AC_dxpl_id); if(fa2) - H5FA_close(fa2, H5P_DATASET_XFER_DEFAULT); + H5FA_close(fa2, H5AC_dxpl_id); H5Fclose(file); H5Fclose(file2); H5Fclose(file0); @@ -889,15 +889,15 @@ test_delete_open(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam) TESTING("deleting open fixed array"); /* Create array */ - if(create_array(f, H5P_DATASET_XFER_DEFAULT, cparam, &fa, &fa_addr) < 0) + if(create_array(f, H5AC_dxpl_id, cparam, &fa, &fa_addr) < 0) TEST_ERROR /* Open the array again */ - if(NULL == (fa2 = H5FA_open(f, H5P_DATASET_XFER_DEFAULT, fa_addr, NULL))) + if(NULL == (fa2 = H5FA_open(f, H5AC_dxpl_id, fa_addr, NULL))) FAIL_STACK_ERROR /* Request that the array be deleted */ - if(H5FA_delete(f, H5P_DATASET_XFER_DEFAULT, fa_addr, NULL) < 0) + if(H5FA_delete(f, H5AC_dxpl_id, fa_addr, NULL) < 0) FAIL_STACK_ERROR /* Verify the creation parameters */ @@ -907,38 +907,38 @@ test_delete_open(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam) TEST_ERROR /* Close the second fixed array wrapper */ - if(H5FA_close(fa2, H5P_DATASET_XFER_DEFAULT) < 0) + if(H5FA_close(fa2, H5AC_dxpl_id) < 0) FAIL_STACK_ERROR fa2 = NULL; /* Try re-opening the array again (should fail, as array will be deleted) */ H5E_BEGIN_TRY { - fa2 = H5FA_open(f, H5P_DATASET_XFER_DEFAULT, fa_addr, NULL); + fa2 = H5FA_open(f, H5AC_dxpl_id, fa_addr, NULL); } H5E_END_TRY; if(fa2) { /* Close opened array */ - H5FA_close(fa2, H5P_DATASET_XFER_DEFAULT); + H5FA_close(fa2, H5AC_dxpl_id); /* Indicate error */ TEST_ERROR } /* end if */ /* Close the first fixed array wrapper */ - if(H5FA_close(fa, H5P_DATASET_XFER_DEFAULT) < 0) + if(H5FA_close(fa, H5AC_dxpl_id) < 0) FAIL_STACK_ERROR fa = NULL; /* Check for closing & re-opening the file */ - if(reopen_file(&file, &f, fapl, H5P_DATASET_XFER_DEFAULT, NULL, HADDR_UNDEF, tparam) < 0) + if(reopen_file(&file, &f, fapl, H5AC_dxpl_id, NULL, HADDR_UNDEF, tparam) < 0) TEST_ERROR /* Try re-opening the array again (should fail, as array is now deleted) */ H5E_BEGIN_TRY { - fa = H5FA_open(f, H5P_DATASET_XFER_DEFAULT, fa_addr, NULL); + fa = H5FA_open(f, H5AC_dxpl_id, fa_addr, NULL); } H5E_END_TRY; if(fa) { /* Close opened array */ - H5FA_close(fa, H5P_DATASET_XFER_DEFAULT); + H5FA_close(fa, H5AC_dxpl_id); /* Indicate error */ TEST_ERROR @@ -964,9 +964,9 @@ test_delete_open(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam) error: H5E_BEGIN_TRY { if(fa) - H5FA_close(fa, H5P_DATASET_XFER_DEFAULT); + H5FA_close(fa, H5AC_dxpl_id); if(fa2) - H5FA_close(fa2, H5P_DATASET_XFER_DEFAULT); + H5FA_close(fa2, H5AC_dxpl_id); H5Fclose(file); } H5E_END_TRY; @@ -1393,7 +1393,7 @@ test_set_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam, TEST_ERROR /* Create array */ - if(create_array(f, H5P_DATASET_XFER_DEFAULT, cparam, &fa, &fa_addr) < 0) + if(create_array(f, H5AC_dxpl_id, cparam, &fa, &fa_addr) < 0) TEST_ERROR /* Verify the creation parameters */ @@ -1401,7 +1401,7 @@ test_set_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam, TEST_ERROR /* Check for closing & re-opening the file */ - if(reopen_file(&file, &f, fapl, H5P_DATASET_XFER_DEFAULT, &fa, fa_addr, tparam) < 0) + if(reopen_file(&file, &f, fapl, H5AC_dxpl_id, &fa, fa_addr, tparam) < 0) TEST_ERROR if(H5FA_get_nelmts(fa, &fa_nelmts) < 0) @@ -1433,7 +1433,7 @@ test_set_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam, /* Retrieve element of array (not set yet) */ relmt = (uint64_t)0; - if(H5FA_get(fa, H5P_DATASET_XFER_DEFAULT, idx, &relmt) < 0) + if(H5FA_get(fa, H5AC_dxpl_id, idx, &relmt) < 0) FAIL_STACK_ERROR /* Verify that the retrieved is correct */ @@ -1460,7 +1460,7 @@ test_set_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam, idx = (hsize_t)sidx; relmt = (uint64_t)0; - if(H5FA_get(fa, H5P_DATASET_XFER_DEFAULT, idx, &relmt) < 0) + if(H5FA_get(fa, H5AC_dxpl_id, idx, &relmt) < 0) FAIL_STACK_ERROR /* Verify that the retrieved element is correct */ @@ -1469,12 +1469,12 @@ test_set_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam, /* Set element of array */ welmt = (uint64_t)7 + idx; - if(H5FA_set(fa, H5P_DATASET_XFER_DEFAULT, idx, &welmt) < 0) + if(H5FA_set(fa, H5AC_dxpl_id, idx, &welmt) < 0) FAIL_STACK_ERROR /* Retrieve element of array (set now) */ relmt = (uint64_t)0; - if(H5FA_get(fa, H5P_DATASET_XFER_DEFAULT, idx, &relmt) < 0) + if(H5FA_get(fa, H5AC_dxpl_id, idx, &relmt) < 0) FAIL_STACK_ERROR /* Verify that the retrieved element is correct */ @@ -1504,7 +1504,7 @@ test_set_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam, error: H5E_BEGIN_TRY { if(fa) - H5FA_close(fa, H5P_DATASET_XFER_DEFAULT); + H5FA_close(fa, H5AC_dxpl_id); H5Fclose(file); } H5E_END_TRY; @@ -1548,7 +1548,7 @@ test_skip_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam, TEST_ERROR /* Create array */ - if(create_array(f, H5P_DATASET_XFER_DEFAULT, cparam, &fa, &fa_addr) < 0) + if(create_array(f, H5AC_dxpl_id, cparam, &fa, &fa_addr) < 0) TEST_ERROR /* Verify the creation parameters */ @@ -1556,7 +1556,7 @@ test_skip_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam, TEST_ERROR /* Check for closing & re-opening the file */ - if(reopen_file(&file, &f, fapl, H5P_DATASET_XFER_DEFAULT, &fa, fa_addr, tparam) < 0) + if(reopen_file(&file, &f, fapl, H5AC_dxpl_id, &fa, fa_addr, tparam) < 0) TEST_ERROR if(H5FA_get_nelmts(fa, &fa_nelmts) < 0) @@ -1578,7 +1578,7 @@ test_skip_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam, /* Retrieve element of array (not set yet) */ relmt = (uint64_t)0; - if(H5FA_get(fa, H5P_DATASET_XFER_DEFAULT, idx, &relmt) < 0) + if(H5FA_get(fa, H5AC_dxpl_id, idx, &relmt) < 0) FAIL_STACK_ERROR /* Verify that the retrieved is correct */ @@ -1587,7 +1587,7 @@ test_skip_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam, /* Set element of array */ welmt = (uint64_t)7 + idx; - if(H5FA_set(fa, H5P_DATASET_XFER_DEFAULT, idx, &welmt) < 0) + if(H5FA_set(fa, H5AC_dxpl_id, idx, &welmt) < 0) FAIL_STACK_ERROR /* Verify array state */ @@ -1598,7 +1598,7 @@ test_skip_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam, /* Retrieve element of array (set now) */ relmt = (uint64_t)0; - if(H5FA_get(fa, H5P_DATASET_XFER_DEFAULT, idx, &relmt) < 0) + if(H5FA_get(fa, H5AC_dxpl_id, idx, &relmt) < 0) FAIL_STACK_ERROR /* Verify that the retrieved is correct */ @@ -1610,7 +1610,7 @@ test_skip_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam, for(cnt = 0; cnt < skip_elmts; cnt++) { /* Retrieve element of array (not set yet) */ relmt = (uint64_t)0; - if(H5FA_get(fa, H5P_DATASET_XFER_DEFAULT, cnt, &relmt) < 0) + if(H5FA_get(fa, H5AC_dxpl_id, cnt, &relmt) < 0) FAIL_STACK_ERROR /* Verify that the retrieved is correct */ @@ -1631,7 +1631,7 @@ test_skip_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam, error: H5E_BEGIN_TRY { if(fa) - H5FA_close(fa, H5P_DATASET_XFER_DEFAULT); + H5FA_close(fa, H5AC_dxpl_id); H5Fclose(file); } H5E_END_TRY; |