diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-04-23 21:57:26 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-04-23 21:57:26 (GMT) |
commit | 284d51f65077fe69bbc7fe353ce3617dd883f65b (patch) | |
tree | 7cf05241b3c8309d4b9804974195827792fea668 | |
parent | db82e34584287db56f8930fd274f06ad8c45b9fe (diff) | |
download | hdf5-284d51f65077fe69bbc7fe353ce3617dd883f65b.zip hdf5-284d51f65077fe69bbc7fe353ce3617dd883f65b.tar.gz hdf5-284d51f65077fe69bbc7fe353ce3617dd883f65b.tar.bz2 |
[svn-r16850] Description:
Add some extra tests for when we are using extensible array as chunk
index.
Tested on:
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 debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.5.6 (amazon) in debug mode
Mac OS X/32 10.5.6 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
-rw-r--r-- | test/dsets.c | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/test/dsets.c b/test/dsets.c index 9ef74bd..3a8ab0e 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -7343,6 +7343,8 @@ test_chunk_expand(hid_t fapl) hid_t scalar_sid = -1;/* Scalar dataspace ID */ hid_t dsid = -1; /* Dataset ID */ hsize_t dim, max_dim, chunk_dim; /* Dataset and chunk dimensions */ + H5D_chunk_index_t idx_type; /* Dataset chunk index type */ + H5F_libver_t low, high; /* File format bounds */ hsize_t hs_offset; /* Hyperslab offset */ hsize_t hs_size; /* Hyperslab size */ H5D_alloc_time_t alloc_time; /* Storage allocation time */ @@ -7354,9 +7356,12 @@ test_chunk_expand(hid_t fapl) h5_fixname(FILENAME[10], fapl, filename, sizeof filename); - if(sizeof(size_t) <= 4) { + /* Check if we are using the latest version of the format */ + if(H5Pget_libver_bounds(fapl, &low, &high) < 0) FAIL_STACK_ERROR + + if(sizeof(size_t) <= 4 && low != H5F_LIBVER_LATEST) { SKIPPED(); - puts(" Current machine can't test for error"); + puts(" Current machine can't test for error w/old file format"); } /* end if */ else { /* Register "expansion" filter */ @@ -7408,6 +7413,19 @@ test_chunk_expand(hid_t fapl) if((dsid = H5Dcreate2(fid, "dset", H5T_NATIVE_UINT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR + /* Get the chunk index type */ + if(H5D_layout_idx_type_test(dsid, &idx_type) < 0) FAIL_STACK_ERROR + + /* Chunk index tyepe expected depends on whether we are using the latest version of the format */ + if(low == H5F_LIBVER_LATEST) { + /* Verify index type */ + if(idx_type != H5D_CHUNK_EARRAY) FAIL_PUTS_ERROR("should be using extensible array as index"); + } /* end if */ + else { + /* Verify index type */ + if(idx_type != H5D_CHUNK_BTREE) FAIL_PUTS_ERROR("should be using v1 B-tree as index"); + } /* end else */ + /* Fill elements */ hs_size = 1; for(u = 0; u < 100; u++) { @@ -7517,6 +7535,19 @@ test_chunk_expand(hid_t fapl) /* Open dataset */ if((dsid = H5Dopen2(fid, "dset", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR + /* Get the chunk index type */ + if(H5D_layout_idx_type_test(dsid, &idx_type) < 0) FAIL_STACK_ERROR + + /* Chunk index tyepe expected depends on whether we are using the latest version of the format */ + if(low == H5F_LIBVER_LATEST) { + /* Verify index type */ + if(idx_type != H5D_CHUNK_EARRAY) FAIL_PUTS_ERROR("should be using extensible array as index"); + } /* end if */ + else { + /* Verify index type */ + if(idx_type != H5D_CHUNK_BTREE) FAIL_PUTS_ERROR("should be using v1 B-tree as index"); + } /* end else */ + /* Create scalar dataspace */ if((scalar_sid = H5Screate(H5S_SCALAR)) < 0) FAIL_STACK_ERROR |