summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/big.c8
-rw-r--r--test/dtypes.c17
2 files changed, 14 insertions, 11 deletions
diff --git a/test/big.c b/test/big.c
index 985e1de..463b5cc 100644
--- a/test/big.c
+++ b/test/big.c
@@ -386,23 +386,23 @@ main (void)
if (sizeof(long_long)<8 || 0==GB8LL) {
puts("Test skipped because sizeof(long_long) is too small. This");
puts("hardware apparently doesn't support 64-bit integer types.");
- H5Pclose(fapl);
+ h5_cleanup(fapl);
exit(0);
}
if (!is_sparse()) {
puts("Test skipped because file system does not support holes.");
- H5Pclose(fapl);
+ h5_cleanup(fapl);
exit(0);
}
if (!enough_room(fapl)) {
puts("Test skipped because of quota (file size or num open files).");
- H5Pclose(fapl);
+ h5_cleanup(fapl);
exit(0);
}
if (sizeof(hsize_t)<=4) {
puts("Test skipped because the hdf5 library was configured with the");
puts("--disable-hsizet flag in order to work around a compiler bug.");
- H5Pclose(fapl);
+ h5_cleanup(fapl);
exit(0);
}
diff --git a/test/dtypes.c b/test/dtypes.c
index bf369e6..285a174 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -13,6 +13,9 @@
/* Number of times to run each test */
#define NTESTS 1
+/* Number of elements in each test */
+#define NTESTELEM 100000
+
/* Define if you want to see a count of overflows */
#undef SHOW_OVERFLOWS
@@ -436,7 +439,7 @@ test_compound_2(void)
int e, d, c[4], b, a;
} *d_ptr;
- const int nelmts = 200000;
+ const int nelmts = NTESTELEM;
const size_t four = 4;
unsigned char *buf=NULL, *orig=NULL, *bkg=NULL;
hid_t st=-1, dt=-1;
@@ -550,7 +553,7 @@ test_compound_3(void)
int a, c[4], e;
} *d_ptr;
- const int nelmts = 200000;
+ const int nelmts = NTESTELEM;
const size_t four = 4;
unsigned char *buf=NULL, *orig=NULL, *bkg=NULL;
hid_t st=-1, dt=-1;
@@ -664,7 +667,7 @@ test_compound_4(void)
int e;
} *d_ptr;
- const int nelmts = 200000;
+ const int nelmts = NTESTELEM;
const size_t four = 4;
unsigned char *buf=NULL, *orig=NULL, *bkg=NULL;
hid_t st=-1, dt=-1;
@@ -1363,7 +1366,7 @@ test_conv_str_2(void)
{
char *buf=NULL, s[80];
hid_t c_type, f_type;
- const size_t nelmts = 200000, ntests=NTESTS;
+ const size_t nelmts = NTESTELEM, ntests=NTESTS;
size_t i, j, nchars;
int ret_value = 1;
@@ -1423,7 +1426,7 @@ test_conv_str_2(void)
static int
test_conv_enum_1(void)
{
- const int nelmts=200000, ntests=NTESTS;
+ const int nelmts=NTESTELEM, ntests=NTESTS;
int i, val, *buf=NULL;
hid_t t1, t2;
char s[80];
@@ -1808,7 +1811,7 @@ static int
test_conv_int_1(const char *name, hid_t src, hid_t dst)
{
const size_t ntests=NTESTS; /*number of tests */
- const size_t nelmts=200000; /*num values per test */
+ const size_t nelmts=NTESTELEM; /*num values per test */
const size_t max_fails=8; /*max number of failures*/
size_t fails_all_tests=0; /*number of failures */
size_t fails_this_test; /*fails for this test */
@@ -2960,7 +2963,7 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
{
flt_t src_type, dst_type; /*data types */
const size_t ntests=NTESTS; /*number of tests */
- const size_t nelmts=200000; /*num values per test */
+ const size_t nelmts=NTESTELEM; /*num values per test */
const size_t max_fails=8; /*max number of failures*/
size_t fails_all_tests=0; /*number of failures */
size_t fails_this_test; /*fails for this test */