summaryrefslogtreecommitdiffstats
path: root/Tools/unicode
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2010-03-19 13:37:08 (GMT)
committerFlorent Xicluna <florent.xicluna@gmail.com>2010-03-19 13:37:08 (GMT)
commitfaa663f03dfeb11274f6edd787e2ec1f73623308 (patch)
tree1890e324edafe90c42cce8b782d37e288666c3af /Tools/unicode
parent431065247a3ef0051d30d90ba4910f14303b401c (diff)
downloadcpython-faa663f03dfeb11274f6edd787e2ec1f73623308.zip
cpython-faa663f03dfeb11274f6edd787e2ec1f73623308.tar.gz
cpython-faa663f03dfeb11274f6edd787e2ec1f73623308.tar.bz2
Fixed a failure in test_bigmem.
Merged revision 79059 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r79059 | florent.xicluna | 2010-03-18 22:50:06 +0100 (jeu, 18 mar 2010) | 2 lines Issue #8024: Update the Unicode database to 5.2 ........
Diffstat (limited to 'Tools/unicode')
-rw-r--r--Tools/unicode/makeunicodedata.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Tools/unicode/makeunicodedata.py b/Tools/unicode/makeunicodedata.py
index 454e435..040ac89 100644
--- a/Tools/unicode/makeunicodedata.py
+++ b/Tools/unicode/makeunicodedata.py
@@ -31,7 +31,7 @@ SCRIPT = sys.argv[0]
VERSION = "2.6"
# The Unicode Database
-UNIDATA_VERSION = "5.1.0"
+UNIDATA_VERSION = "5.2.0"
UNICODE_DATA = "UnicodeData%s.txt"
COMPOSITION_EXCLUSIONS = "CompositionExclusions%s.txt"
EASTASIAN_WIDTH = "EastAsianWidth%s.txt"
option>space:mode:
Diffstat (limited to 'test')
-rw-r--r--test/cmpd_dset.c53
-rw-r--r--test/dsets.c92
-rw-r--r--test/dt_arith.c16
-rw-r--r--test/gheap.c84
-rw-r--r--test/h5test.c32
-rw-r--r--test/tattr.c44
-rw-r--r--test/tchecksum.c23
-rw-r--r--test/th5o.c32
-rw-r--r--test/theap.c47
-rw-r--r--test/titerate.c13
-rw-r--r--test/tskiplist.c51
-rw-r--r--test/tvltypes.c12
12 files changed, 385 insertions, 114 deletions
diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c
index 311b9bb..a7f3902 100644
--- a/test/cmpd_dset.c
+++ b/test/cmpd_dset.c
@@ -154,30 +154,28 @@ static unsigned
test_compound (char *filename, hid_t fapl)
{
/* First dataset */
- static s1_t s1[NX*NY];
+ s1_t *s1 = NULL;
hid_t s1_tid;
/* Second dataset */
- static s2_t s2[NX*NY];
+ s2_t *s2 = NULL;
hid_t s2_tid;
/* Third dataset */
- static s3_t s3[NX*NY];
+ s3_t *s3 = NULL;
hid_t s3_tid;
/* Fourth dataset */
- static s4_t s4[NX*NY];
+ s4_t *s4 = NULL;
hid_t s4_tid;
/* Fifth dataset */
- static s5_t s5[NX*NY];
+ s5_t *s5 = NULL;
hid_t s5_tid;
- static s6_t s6[NX*NY];
- hid_t s6_tid;
-
-
/* Sixth dataset */
+ s6_t *s6 = NULL;
+ hid_t s6_tid;
/* Seventh dataset */
hid_t s7_sid;
@@ -204,6 +202,20 @@ test_compound (char *filename, hid_t fapl)
hsize_t memb_size[1] = {4};
int ret_code;
+ /* Allocate buffers for datasets */
+ if(NULL == (s1 = (s1_t *)HDmalloc(sizeof(s1_t) * NX * NY)))
+ goto error;
+ if(NULL == (s2 = (s2_t *)HDmalloc(sizeof(s2_t) * NX * NY)))
+ goto error;
+ if(NULL == (s3 = (s3_t *)HDmalloc(sizeof(s3_t) * NX * NY)))
+ goto error;
+ if(NULL == (s4 = (s4_t *)HDmalloc(sizeof(s4_t) * NX * NY)))
+ goto error;
+ if(NULL == (s5 = (s5_t *)HDmalloc(sizeof(s5_t) * NX * NY)))
+ goto error;
+ if(NULL == (s6 = (s6_t *)HDmalloc(sizeof(s6_t) * NX * NY)))
+ goto error;
+
/* Create the file */
if ((file = H5Fcreate (filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) {
goto error;
@@ -848,11 +860,34 @@ test_compound (char *filename, hid_t fapl)
H5Dclose (dataset);
H5Fclose (file);
+ /* Release buffers */
+ HDfree(s1);
+ HDfree(s2);
+ HDfree(s3);
+ HDfree(s4);
+ HDfree(s5);
+ HDfree(s6);
+
PASSED();
return 0;
error:
puts("*** DATASET TESTS FAILED ***");
+
+ /* Release resources */
+ if(s1)
+ HDfree(s1);
+ if(s2)
+ HDfree(s2);
+ if(s3)
+ HDfree(s3);
+ if(s4)
+ HDfree(s4);
+ if(s5)
+ HDfree(s5);
+ if(s6)
+ HDfree(s6);
+
return 1;
}
diff --git a/test/dsets.c b/test/dsets.c
index fe6a0c0..8aa073f 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -240,6 +240,10 @@ double points_dbl[DSET_DIM1][DSET_DIM2], check_dbl[DSET_DIM1][DSET_DIM2];
size_t count_nbytes_read = 0;
size_t count_nbytes_written = 0;
+/* Temporary buffer dimensions */
+#define DSET_TMP_DIM1 50
+#define DSET_TMP_DIM2 100
+
/* Declarations for test_idx_compatible() */
#define DSET "dset"
#define DSET_FILTER "dset_filter"
@@ -7942,11 +7946,10 @@ test_big_chunks_bypass_cache(hid_t fapl)
int fvalue = BYPASS_FILL_VALUE; /* Fill value */
hsize_t count, stride, offset, block; /* Setting for hyperslab (1-D) */
hsize_t t_count[2], t_stride[2], t_offset[2], t_block[2]; /* Setting for hyperslab (2-D) */
- /* Buffer for reading and writing data (1-D) */
- static int wdata[BYPASS_CHUNK_DIM/2], rdata1[BYPASS_DIM],
- rdata2[BYPASS_CHUNK_DIM/2];
+ /* Buffers for reading and writing data (1-D) */
+ int *wdata = NULL, *rdata1 = NULL, *rdata2 = NULL;
/* Buffer for reading and writing data (2-D) */
- static int t_wdata[BYPASS_CHUNK_DIM/2][BYPASS_CHUNK_DIM/2], t_rdata1[BYPASS_DIM][BYPASS_DIM],
+ int t_wdata[BYPASS_CHUNK_DIM/2][BYPASS_CHUNK_DIM/2], t_rdata1[BYPASS_DIM][BYPASS_DIM],
t_rdata2[BYPASS_CHUNK_DIM/2][BYPASS_CHUNK_DIM/2];
int i, j; /* Local index variables */
H5F_libver_t low; /* File format low bound */
@@ -8031,6 +8034,14 @@ test_big_chunks_bypass_cache(hid_t fapl)
if(H5Sselect_hyperslab(t_sid, H5S_SELECT_SET, t_offset, t_stride, t_count, t_block) < 0)
FAIL_STACK_ERROR
+ /* Allocate buffers */
+ if(NULL == (wdata = (int *)HDmalloc(sizeof(int) * (BYPASS_CHUNK_DIM / 2))))
+ TEST_ERROR
+ if(NULL == (rdata1 = (int *)HDmalloc(sizeof(int) * BYPASS_DIM)))
+ TEST_ERROR
+ if(NULL == (rdata2 = (int *)HDmalloc(sizeof(int) * (BYPASS_CHUNK_DIM / 2))))
+ TEST_ERROR
+
/* Initialize data to write for 1-D dataset */
for(i = 0; i < BYPASS_CHUNK_DIM / 2; i++)
wdata[i] = i;
@@ -8165,6 +8176,11 @@ test_big_chunks_bypass_cache(hid_t fapl)
if(H5Pclose(fapl_local) < 0) FAIL_STACK_ERROR
if(H5Fclose(fid) < 0) FAIL_STACK_ERROR
+ /* Release buffers */
+ HDfree(wdata);
+ HDfree(rdata1);
+ HDfree(rdata2);
+
PASSED();
return 0;
@@ -8179,6 +8195,12 @@ error:
H5Sclose(t_sid);
H5Fclose(fid);
} H5E_END_TRY;
+ if(wdata)
+ HDfree(wdata);
+ if(rdata1)
+ HDfree(rdata1);
+ if(rdata2)
+ HDfree(rdata2);
return -1;
} /* end test_big_chunks_bypass_cache() */
@@ -9265,9 +9287,9 @@ test_fixed_array(hid_t fapl)
hsize_t msize_big[1] = {POINTS_BIG}; /* Size of memory space for big dataset */
int wbuf[POINTS]; /* write buffer */
- int wbuf_big[POINTS_BIG]; /* write buffer for big dataset */
+ int *wbuf_big = NULL; /* write buffer for big dataset */
int rbuf[POINTS]; /* read buffer */
- int rbuf_big[POINTS_BIG]; /* read buffer for big dataset */
+ int *rbuf_big = NULL; /* read buffer for big dataset */
hsize_t chunk_dim2[2] = {4, 3}; /* Chunk dimensions */
int chunks[12][6]; /* # of chunks for dataset dimensions */
@@ -9309,6 +9331,12 @@ test_fixed_array(hid_t fapl)
if((empty_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
+ /* Allocate the "big" buffers */
+ if(NULL == (wbuf_big = (int *)HDmalloc(sizeof(int) * POINTS_BIG)))
+ TEST_ERROR
+ if(NULL == (rbuf_big = (int *)HDmalloc(sizeof(int) * POINTS_BIG)))
+ TEST_ERROR
+
#ifdef H5_HAVE_FILTER_DEFLATE
/* Loop over compressing chunks */
for(compress = FALSE; compress <= TRUE; compress++) {
@@ -9567,7 +9595,7 @@ test_fixed_array(hid_t fapl)
/* Verify that written and read data are the same */
for(i = 0; i < POINTS_BIG; i++)
- if(rbuf_big[i] != wbuf_big[i]){
+ if(rbuf_big[i] != wbuf_big[i]) {
printf(" Line %d: Incorrect value, wbuf_bif[%u]=%d, rbuf_big[%u]=%d\n",
__LINE__,(unsigned)i,wbuf_big[i],(unsigned)i,rbuf_big[i]);
TEST_ERROR;
@@ -9599,6 +9627,10 @@ test_fixed_array(hid_t fapl)
} /* end for */
#endif /* H5_HAVE_FILTER_DEFLATE */
+ /* Release buffers */
+ HDfree(wbuf_big);
+ HDfree(rbuf_big);
+
PASSED();
return 0;
@@ -9610,6 +9642,10 @@ error:
H5Sclose(mem_id);
H5Fclose(fid);
} H5E_END_TRY;
+ if(wbuf_big)
+ HDfree(wbuf_big);
+ if(rbuf_big)
+ HDfree(rbuf_big);
return -1;
} /* end test_fixed_array() */
@@ -9650,11 +9686,11 @@ test_single_chunk(hid_t fapl)
hid_t sid = -1, sid_max = -1; /* Dataspace ID for dataset with fixed dimensions */
hid_t did = -1, did_max = -1; /* Dataset ID for dataset with fixed dimensions */
hsize_t dim2[2] = {DSET_DIM1, DSET_DIM2}; /* Dataset dimensions */
- hsize_t t_dim2[2] = {50, 100}; /* Dataset dimensions */
- int wbuf[DSET_DIM1*DSET_DIM2]; /* write buffer */
- int t_wbuf[50*100]; /* write buffer */
- int rbuf[DSET_DIM1*DSET_DIM2]; /* read buffer */
- int t_rbuf[50*100]; /* read buffer */
+ hsize_t t_dim2[2] = {DSET_TMP_DIM1, DSET_TMP_DIM2}; /* Dataset dimensions */
+ int *wbuf = NULL; /* write buffer */
+ int *t_wbuf = NULL; /* write buffer */
+ int *rbuf = NULL; /* read buffer */
+ int *t_rbuf = NULL; /* read buffer */
H5D_chunk_index_t idx_type; /* Dataset chunk index type */
H5F_libver_t low, high; /* File format bounds */
@@ -9686,10 +9722,20 @@ test_single_chunk(hid_t fapl)
if((empty_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
+ /* Allocate the buffers */
+ if(NULL == (wbuf = (int *)HDmalloc(sizeof(int) * (DSET_DIM1 * DSET_DIM2))))
+ TEST_ERROR
+ if(NULL == (rbuf = (int *)HDmalloc(sizeof(int) * (DSET_DIM1 * DSET_DIM2))))
+ TEST_ERROR
+ if(NULL == (t_wbuf = (int *)HDmalloc(sizeof(int) * (DSET_TMP_DIM1 * DSET_TMP_DIM2))))
+ TEST_ERROR
+ if(NULL == (t_rbuf = (int *)HDmalloc(sizeof(int) * (DSET_TMP_DIM1 * DSET_TMP_DIM2))))
+ TEST_ERROR
+
for(i = n = 0; i < (DSET_DIM1 * DSET_DIM2); i++)
wbuf[i] = (int)n++;
- for(i = n = 0; i < (50* 100); i++)
+ for(i = n = 0; i < (DSET_TMP_DIM1* DSET_TMP_DIM2); i++)
t_wbuf[i] = (int)n++;
#ifdef H5_HAVE_FILTER_DEFLATE
@@ -9800,14 +9846,14 @@ test_single_chunk(hid_t fapl)
/* Open the second dataset */
if((did = H5Dopen2(fid, DSET_SINGLE_NOMAX, H5P_DEFAULT)) < 0) TEST_ERROR;
- HDmemset(rbuf, 0, sizeof(rbuf));
+ HDmemset(rbuf, 0, sizeof(int) * (DSET_DIM1 * DSET_DIM2));
/* Read from dataset */
if(H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, t_rbuf) < 0) TEST_ERROR;
/* Verify that written and read data are the same */
- for(i = 0; i < (50* 100); i++)
- if(t_rbuf[i] != t_wbuf[i]){
+ for(i = 0; i < (DSET_TMP_DIM1* DSET_TMP_DIM2); i++)
+ if(t_rbuf[i] != t_wbuf[i]) {
printf(" Line %d: Incorrect value, t_wbuf[%u]=%d, t_rbuf[%u]=%d\n",
__LINE__,(unsigned)i,t_wbuf[i],(unsigned)i,t_rbuf[i]);
TEST_ERROR;
@@ -9836,6 +9882,12 @@ test_single_chunk(hid_t fapl)
} /* end for */
#endif /* H5_HAVE_FILTER_DEFLATE */
+ /* Release buffers */
+ HDfree(wbuf);
+ HDfree(rbuf);
+ HDfree(t_wbuf);
+ HDfree(t_rbuf);
+
PASSED();
return 0;
@@ -9849,6 +9901,14 @@ error:
H5Sclose(sid_max);
H5Fclose(fid);
} H5E_END_TRY;
+ if(wbuf)
+ HDfree(wbuf);
+ if(rbuf)
+ HDfree(rbuf);
+ if(t_wbuf)
+ HDfree(t_wbuf);
+ if(t_rbuf)
+ HDfree(t_rbuf);
return -1;
} /* end test_single_chunk() */
diff --git a/test/dt_arith.c b/test/dt_arith.c