diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2013-09-26 06:51:10 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2013-09-26 06:51:10 (GMT) |
commit | ebc0b44fe18a40b7f31bdde45ec9f16edd4f658a (patch) | |
tree | f629cedcff80a5ae2c3ae49a66d05cb13e39c445 | |
parent | ae927c6070d1ca5ffd3bf27c553156b51e6ec6e4 (diff) | |
download | hdf5-ebc0b44fe18a40b7f31bdde45ec9f16edd4f658a.zip hdf5-ebc0b44fe18a40b7f31bdde45ec9f16edd4f658a.tar.gz hdf5-ebc0b44fe18a40b7f31bdde45ec9f16edd4f658a.tar.bz2 |
[svn-r24202] Bug fix: HDFFV-8271 Big.c error in address generated by random number.
Description:
There is a bug in the current big.c tests. In a nut-shell,
the writing part randomly picks 50 locations and write 4KB
from that location. Random location range is from byte 0
to end of dataset. There is the problem--if the random location
is greater than (end of dataset - 4KB), then error.
Solution:
Adjust the random number to be at least 4KB less than the end of the
dataset. That allows it write 4KB more from the generated starting
position.
Tested: h5comittest plus jam serial build and test.
-rw-r--r-- | test/big.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -435,7 +435,8 @@ writer (char* filename, hid_t fapl, fsizes_t testsize, int wrt_n) hs_size[0] = WRT_SIZE; if ((mem_space = H5Screate_simple (1, hs_size, hs_size)) < 0) goto error; for (i=0; i<wrt_n; i++) { - hs_start[0] = randll (size2[0], i); + /* start position must be at least hs_size from the end */ + hs_start[0] = randll (size2[0]-hs_size[0], i); HDfprintf (out, "#%03d 0x%016Hx\n", i, hs_start[0]); if (H5Sselect_hyperslab (space2, H5S_SELECT_SET, hs_start, NULL, hs_size, NULL) < 0) goto error; |