summaryrefslogtreecommitdiffstats
path: root/test/set_extent.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-07-16 14:56:58 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-07-16 14:56:58 (GMT)
commite9cc951e034865fb1f2e9dc0385ed34072675bba (patch)
treecac0264cea02f3a795d27189dfd6570b2184f119 /test/set_extent.c
parent046a2e6c0a78ece5ad464af8c506c6ba776eec1d (diff)
downloadhdf5-e9cc951e034865fb1f2e9dc0385ed34072675bba.zip
hdf5-e9cc951e034865fb1f2e9dc0385ed34072675bba.tar.gz
hdf5-e9cc951e034865fb1f2e9dc0385ed34072675bba.tar.bz2
[svn-r7232] Purpose:
Bug fix Description: When a non-default indexed storage B-tree internal 'K' value is set by the user, the chunked datasets created in that file (until it is closed) use the user's 'K' value and the data can be accessed correctly, but the 'K' value is not stored in the file. However, once the file is closed and re-opened, the non-default 'K' value is lost and the data in the chunked datasets will not be able to be accessed correctly. Solution: Store the indexed storage B-tree internal 'K' value in the superblock. Platforms tested: FreeBSD 4.8 (sleipnir) h5committest
Diffstat (limited to 'test/set_extent.c')
-rw-r--r--test/set_extent.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/set_extent.c b/test/set_extent.c
index 90d1654..067dabc 100644
--- a/test/set_extent.c
+++ b/test/set_extent.c
@@ -33,6 +33,7 @@
*/
#define RANK 2
+#define ISTORE_IK 64
int main( void )
@@ -42,6 +43,7 @@ int main( void )
hid_t dataset_id=(-1);
hid_t space_id=(-1);
hid_t plist_id=(-1);
+ hid_t fcpl; /* File creation property list */
hsize_t dims[RANK] = { 90, 90 };
hsize_t dims_new[RANK] = { 70, 70 };
hsize_t dims_chunk[RANK] = { 20, 20 };
@@ -280,10 +282,17 @@ int main( void )
*-------------------------------------------------------------------------
*/
+ /* Create a file creation property list */
+ if((fcpl = H5Pcreate(H5P_FILE_CREATE))<0) goto out;
- /* Create a new file using default properties. */
- if ((file_id = H5Fcreate( "set_extent_read.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT ))<0) goto out;
+ /* Set non-default indexed storage B-tree internal 'K' value */
+ if(H5Pset_istore_k(fcpl,ISTORE_IK)<0) goto out;
+
+ /* Create a new file using properties. */
+ if ((file_id = H5Fcreate( "set_extent_read.h5", H5F_ACC_TRUNC, fcpl, H5P_DEFAULT ))<0) goto out;
+ /* Close property list */
+ if(H5Pclose(fcpl)<0) goto out;
TESTING("extend dataset read with fill value");