summaryrefslogtreecommitdiffstats
path: root/test/tsohm.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-05-16 03:04:56 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-05-16 03:04:56 (GMT)
commit22f48585bdf5e13898b7728b33ec71fd7c9cf4ec (patch)
tree3c6f99b03d177a2b1c88442a93cf017a8c465a24 /test/tsohm.c
parentafbdbb8e93d2b2d96098abfa4bf1615205487ca5 (diff)
downloadhdf5-22f48585bdf5e13898b7728b33ec71fd7c9cf4ec.zip
hdf5-22f48585bdf5e13898b7728b33ec71fd7c9cf4ec.tar.gz
hdf5-22f48585bdf5e13898b7728b33ec71fd7c9cf4ec.tar.bz2
[svn-r15015] Description:
Detect chunks that are >4GB before dataset gets created and return error to application. Tweak lots of internal variables that hold the chunk size/dimensions to use an 'uint32_t', instead of a 'size_t', so that the integer size is constant. Correct a number of our tests which were creating datasets with chunks that were >4GB and add some specific tests for >4GB chunk size detection. Minor whitespace & other code cleanups. Tested on: Mac OS X/32 10.5.2 (amazon) Forthcoming testing on other platforms...
Diffstat (limited to 'test/tsohm.c')
-rw-r--r--test/tsohm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/tsohm.c b/test/tsohm.c
index abdbe77..0fc94f2 100644
--- a/test/tsohm.c
+++ b/test/tsohm.c
@@ -121,9 +121,9 @@ const int ENUM_VAL[] = {
20480, 10,
-1001, -10
};
-#define SIZE2_RANK1 10
-#define SIZE2_RANK2 20
-#define SIZE2_DIMS {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}
+#define SIZE2_RANK1 6
+#define SIZE2_RANK2 10
+#define SIZE2_DIMS {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
#define LONG_STRING "00 index. A long string used for testing. To create new strings, set the first two characters to be some ASCII number other than 00, such as 01."
@@ -1376,7 +1376,7 @@ size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_size
/* Constants used in this function */
const int rank1 = SIZE2_RANK1;
const int rank2 = SIZE2_RANK2;
- const hsize_t dims[20] = SIZE2_DIMS;
+ const hsize_t dims[SIZE2_RANK2] = SIZE2_DIMS;
dtype1_struct fill1;
char fill2[DTYPE2_SIZE];
@@ -1745,8 +1745,8 @@ static void size2_verify(void)
char attr_correct_string[NAME_BUF_SIZE];
char attr_name[NAME_BUF_SIZE];
int ndims;
- hsize_t dims[20];
- hsize_t correct_dims[20] = SIZE2_DIMS;
+ hsize_t dims[SIZE2_RANK2];
+ hsize_t correct_dims[SIZE2_RANK2] = SIZE2_DIMS;
file_id = H5Fopen(FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
CHECK_I(file_id, "H5Fopen");