summaryrefslogtreecommitdiffstats
path: root/test/mf.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-06-11 15:03:54 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-06-11 15:03:54 (GMT)
commit22243fd75d15d40ab491e7f8ac74ad2bb8a77486 (patch)
tree959fd9ba0a3fbed7b387a98f3f8a47ddee0b2057 /test/mf.c
parenteda3b5015f7e5822c72423b66861653bca1d93bc (diff)
downloadhdf5-22243fd75d15d40ab491e7f8ac74ad2bb8a77486.zip
hdf5-22243fd75d15d40ab491e7f8ac74ad2bb8a77486.tar.gz
hdf5-22243fd75d15d40ab491e7f8ac74ad2bb8a77486.tar.bz2
[svn-r17031] Description:
Correct latent bug in one file space allocation test which was not getting a new file pointer when reopening a file. Also, add a couple more asserts to the file space allocation code in the library to help detect this problem earlier. Tested on: Linux/32 2.6 (jam) w/core VFD
Diffstat (limited to 'test/mf.c')
-rw-r--r--test/mf.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/mf.c b/test/mf.c
index 4259520..8b5c51b 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -3753,6 +3753,10 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl1)) < 0)
FAIL_STACK_ERROR
+ /* Get a pointer to the internal file object */
+ if(NULL == (f = (H5F_t *)H5I_object(file)))
+ FAIL_STACK_ERROR
+
/* shrink the block */
if(H5MF_try_shrink(f, type, H5P_DATASET_XFER_DEFAULT, addr1, (hsize_t)TEST_BLOCK_SIZE50) <= 0)
TEST_ERROR
@@ -3804,6 +3808,10 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl1)) < 0)
FAIL_STACK_ERROR
+ /* Get a pointer to the internal file object */
+ if(NULL == (f = (H5F_t *)H5I_object(file)))
+ FAIL_STACK_ERROR
+
/* try to extend the block */
extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr1, (hsize_t)TEST_BLOCK_SIZE50, (hsize_t)TEST_BLOCK_SIZE30);
@@ -5864,7 +5872,7 @@ main(void)
nerrors += test_mf_align_alloc4(env_h5_drvr, fapl, new_fapl);
nerrors += test_mf_align_alloc5(env_h5_drvr, fapl, new_fapl);
nerrors += test_mf_align_alloc6(env_h5_drvr, fapl, new_fapl);
- }
+ } /* end if */
if(nerrors)
goto error;