summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-08-04 20:19:04 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-08-04 20:19:51 (GMT)
commitc60ceb8c08b6c5472bd79ebf2464b2409a398919 (patch)
treeaa7c4ba3198a66459dd32efd55194d627c848c53 /test
parentab1ce69900caa0b249e07db8992e66f95b0af1dc (diff)
downloadhdf5-c60ceb8c08b6c5472bd79ebf2464b2409a398919.zip
hdf5-c60ceb8c08b6c5472bd79ebf2464b2409a398919.tar.gz
hdf5-c60ceb8c08b6c5472bd79ebf2464b2409a398919.tar.bz2
Merge reconciliation and VFD test fixes
Diffstat (limited to 'test')
-rw-r--r--test/cache_image.c6
-rw-r--r--test/dsets.c519
-rw-r--r--test/error_test.c54
-rw-r--r--test/flush2.c8
-rw-r--r--test/gheap.c26
-rw-r--r--test/h5test.c2
-rw-r--r--test/mf.c1
7 files changed, 306 insertions, 310 deletions
diff --git a/test/cache_image.c b/test/cache_image.c
index f8252ac..9150836 100644
--- a/test/cache_image.c
+++ b/test/cache_image.c
@@ -93,7 +93,6 @@ static unsigned evict_on_close_test(hbool_t single_file_vfd);
#define DSET_SIZE (40 * CHUNK_SIZE)
#define MAX_NUM_DSETS 256
-
static void
create_datasets(hid_t file_id, int min_dset, int max_dset)
{
@@ -4486,7 +4485,6 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if ( show_progress )
HDfprintf(stdout, "%s:L3 cp = %d, max_dset = %d, pass = %d.\n",
fcn_name, cp + 2, max_dset, pass);
-
} /* end while */
cp += 3;
@@ -5111,8 +5109,8 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
* extension message has been deleted.
*/
i = min_group;
- while ( ( pass ) && ( i <= max_group ) ) {
- sprintf(process_group_name, "/process_%d", i);
+ while ( ( pass ) && ( i <= max_group ) ) {
+ sprintf(process_group_name, "/process_%d", i);
validate_zoo(file_id, process_group_name, i++);
}
diff --git a/test/dsets.c b/test/dsets.c
index 5976df5..50a6907 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -88,7 +88,6 @@ const char *FILENAME[] = {
#define OHMIN_FILENAME_A "ohdr_min_a"
-
#define FILENAME_BUF_SIZE 1024
#define KB 1024
@@ -401,7 +400,7 @@ test_create(hid_t file)
} H5E_END_TRY;
if(dataset >= 0) {
H5_FAILED();
- puts(" Library allowed overwrite of existing dataset.");
+ HDputs(" Library allowed overwrite of existing dataset.");
goto error;
}
@@ -423,7 +422,7 @@ test_create(hid_t file)
} H5E_END_TRY;
if(dataset >= 0) {
H5_FAILED();
- puts(" Opened a non-existent dataset.");
+ HDputs(" Opened a non-existent dataset.");
goto error;
}
@@ -445,7 +444,7 @@ test_create(hid_t file)
} H5E_END_TRY;
if(dataset >= 0) {
H5_FAILED();
- puts(" Opened a dataset with incorrect chunking parameters.");
+ HDputs(" Opened a dataset with incorrect chunking parameters.");
goto error;
}
@@ -566,8 +565,8 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
for(j = 0; j < DSET_DIM2; j++) {
if(points[i][j] != check[i][j]) {
H5_FAILED();
- printf(" Read different values than written.\n");
- printf(" At index %d,%d\n", i, j);
+ HDprintf(" Read different values than written.\n");
+ HDprintf(" At index %d,%d\n", i, j);
goto error;
}
}
@@ -590,8 +589,8 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
for(j = 0; j < DSET_DIM2; j++) {
if(points[i][j] != rdata[i][j]) {
H5_FAILED();
- printf(" Read different values than written.\n");
- printf(" At index %d,%d\n", i, j);
+ HDprintf(" Read different values than written.\n");
+ HDprintf(" At index %d,%d\n", i, j);
goto error;
}
}
@@ -605,7 +604,7 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- puts(" Current VFD doesn't support continuous address space");
+ HDputs(" Current VFD doesn't support continuous address space");
} /* end else */
return SUCCEED;
@@ -699,8 +698,8 @@ test_userblock_offset(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
for(j = 0; j < DSET_DIM2; j++) {
if(points[i][j] != rdata[i][j]) {
H5_FAILED();
- printf(" Read different values than written.\n");
- printf(" At index %d,%d\n", i, j);
+ HDprintf(" Read different values than written.\n");
+ HDprintf(" At index %d,%d\n", i, j);
goto error;
}
}
@@ -713,7 +712,7 @@ test_userblock_offset(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
} /* end if */
else {
SKIPPED();
- puts(" Current VFD doesn't support continuous address space");
+ HDputs(" Current VFD doesn't support continuous address space");
} /* end else */
return SUCCEED;
@@ -814,10 +813,10 @@ test_compact_io(hid_t fapl)
for(j = 0; j < 8; j++)
if(rbuf[i][j] != wbuf[i][j]) {
H5_FAILED();
- printf(" Read different values than written.\n");
- printf(" At index %d,%d\n", i, j);
- printf(" wbuf[%d][%d]=%d\n", i, j, wbuf[i][j]);
- printf(" rbuf[%d][%d]=%d\n", i, j, rbuf[i][j]);
+ HDprintf(" Read different values than written.\n");
+ HDprintf(" At index %d,%d\n", i, j);
+ HDprintf(" wbuf[%d][%d]=%d\n", i, j, wbuf[i][j]);
+ HDprintf(" rbuf[%d][%d]=%d\n", i, j, rbuf[i][j]);
goto error;
} /* end */
@@ -872,10 +871,10 @@ test_compact_io(hid_t fapl)
for(j = 0; j < 8; j++)
if(rbuf[i][j] != wbuf[i][j]) {
H5_FAILED();
- printf(" Read different values than written.\n");
- printf(" At index %d,%d\n", i, j);
- printf(" wbuf[%d][%d]=%d\n", i, j, wbuf[i][j]);
- printf(" rbuf[%d][%d]=%d\n", i, j, rbuf[i][j]);
+ HDprintf(" Read different values than written.\n");
+ HDprintf(" At index %d,%d\n", i, j);
+ HDprintf(" wbuf[%d][%d]=%d\n", i, j, wbuf[i][j]);
+ HDprintf(" rbuf[%d][%d]=%d\n", i, j, rbuf[i][j]);
goto error;
} /* end */
@@ -1013,8 +1012,8 @@ test_max_compact(hid_t fapl)
for(u = 0; u < compact_size; u++)
if(rbuf[u] != wbuf[u]) {
H5_FAILED();
- printf(" Read different values than written.\n");
- printf(" At index %u\n", (unsigned)u);
+ HDprintf(" Read different values than written.\n");
+ HDprintf(" At index %u\n", (unsigned)u);
goto error;
} /* end if */
@@ -1313,7 +1312,7 @@ test_conv_buffer(hid_t fid)
} H5E_END_TRY;
if(status >= 0) {
H5_FAILED();
- puts(" Library shouldn't allow conversion buffer too small");
+ HDputs(" Library shouldn't allow conversion buffer too small");
goto error;
}
@@ -1338,7 +1337,7 @@ test_conv_buffer(hid_t fid)
HDfree(cf);
HDfree(cfrR);
- puts(" PASSED");
+ HDputs(" PASSED");
return SUCCEED;
error:
@@ -1415,7 +1414,7 @@ test_tconv(hid_t file)
in[4 * i + 2] != out[4 * i + 1] ||
in[4 * i + 3] != out[4 * i + 0]) {
H5_FAILED();
- puts(" Read with byte order conversion failed.");
+ HDputs(" Read with byte order conversion failed.");
goto error;
}
}
@@ -1425,7 +1424,7 @@ test_tconv(hid_t file)
HDfree(out);
HDfree(in);
- puts(" PASSED");
+ HDputs(" PASSED");
return SUCCEED;
error:
@@ -1771,7 +1770,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
/* Check if all the filters are available */
if(H5Pall_filters_avail(dcpl)!=TRUE) {
H5_FAILED();
- printf(" Line %d: Incorrect filter availability\n",__LINE__);
+ HDprintf(" Line %d: Incorrect filter availability\n",__LINE__);
goto error;
} /* end if */
@@ -1794,8 +1793,8 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
for(j=0; j<(size_t)size[1]; j++) {
if(0!=check[i][j]) {
H5_FAILED();
- printf(" Read a non-zero value.\n");
- printf(" At index %lu,%lu\n",
+ HDprintf(" Read a non-zero value.\n");
+ HDprintf(" At index %lu,%lu\n",
(unsigned long)i, (unsigned long)j);
goto error;
}
@@ -1860,10 +1859,10 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
for(j=0; j<size[1]; j++) {
if(points[i][j] != check[i][j]) {
H5_FAILED();
- fprintf(stderr," Read different values than written.\n");
- fprintf(stderr," At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
- fprintf(stderr," At original: %d\n", (int)points[i][j]);
- fprintf(stderr," At returned: %d\n", (int)check[i][j]);
+ HDfprintf(stderr," Read different values than written.\n");
+ HDfprintf(stderr," At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
+ HDfprintf(stderr," At original: %d\n", (int)points[i][j]);
+ HDfprintf(stderr," At returned: %d\n", (int)check[i][j]);
goto error;
}
}
@@ -1920,8 +1919,8 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
for(j=0; j<size[1]; j++) {
if(points[i][j] != check[i][j]) {
H5_FAILED();
- printf(" Read different values than written.\n");
- printf(" At index %lu,%lu\n",
+ HDprintf(" Read different values than written.\n");
+ HDprintf(" At index %lu,%lu\n",
(unsigned long)i, (unsigned long)j);
goto error;
}
@@ -1974,8 +1973,8 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
for(j = 0; j < size[1]; j++)
if(points[i][j] != check[i][j]) {
H5_FAILED();
- printf(" Read different values than written.\n");
- printf(" At index %lu,%lu\n",
+ HDprintf(" Read different values than written.\n");
+ HDprintf(" At index %lu,%lu\n",
(unsigned long)i, (unsigned long)j);
goto error;
} /* end if */
@@ -2034,13 +2033,13 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
if(points[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j] !=
check[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j]) {
H5_FAILED();
- fprintf(stderr," Read different values than written.\n");
- fprintf(stderr," At index %lu,%lu\n",
+ HDfprintf(stderr," Read different values than written.\n");
+ HDfprintf(stderr," At index %lu,%lu\n",
(unsigned long)((size_t)hs_offset[0]+i),
(unsigned long)((size_t)hs_offset[1]+j));
- fprintf(stderr," At original: %d\n",
+ HDfprintf(stderr," At original: %d\n",
(int)points[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j]);
- fprintf(stderr," At returned: %d\n",
+ HDfprintf(stderr," At returned: %d\n",
(int)check[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j]);
goto error;
}
@@ -2302,7 +2301,7 @@ H5_ATTR_UNUSED
* STEP 0: Test null I/O filter by itself.
*----------------------------------------------------------
*/
- puts("Testing 'null' filter");
+ HDputs("Testing 'null' filter");
if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error;
if(H5Zregister (H5Z_BOGUS) < 0) goto error;
@@ -2317,7 +2316,7 @@ H5_ATTR_UNUSED
* STEP 1: Test Fletcher32 Checksum by itself.
*----------------------------------------------------------
*/
- puts("Testing Fletcher32 checksum(enabled for read)");
+ HDputs("Testing Fletcher32 checksum(enabled for read)");
if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error;
if(H5Pset_filter(dc, H5Z_FILTER_FLETCHER32, 0, (size_t)0, NULL) < 0) goto error;
@@ -2326,21 +2325,21 @@ H5_ATTR_UNUSED
if(test_filter_internal(file,DSET_FLETCHER32_NAME,dc,ENABLE_FLETCHER32,DATA_NOT_CORRUPTED,&fletcher32_size) < 0) goto error;
if(fletcher32_size<=null_size) {
H5_FAILED();
- puts(" Size after checksumming is incorrect.");
+ HDputs(" Size after checksumming is incorrect.");
goto error;
} /* end if */
/* Disable checksum during read */
- puts("Testing Fletcher32 checksum(disabled for read)");
+ HDputs("Testing Fletcher32 checksum(disabled for read)");
if(test_filter_internal(file,DSET_FLETCHER32_NAME_2,dc,DISABLE_FLETCHER32,DATA_NOT_CORRUPTED,&fletcher32_size) < 0) goto error;
if(fletcher32_size<=null_size) {
H5_FAILED();
- puts(" Size after checksumming is incorrect.");
+ HDputs(" Size after checksumming is incorrect.");
goto error;
} /* end if */
/* Try to corrupt data and see if checksum fails */
- puts("Testing Fletcher32 checksum(when data is corrupted)");
+ HDputs("Testing Fletcher32 checksum(when data is corrupted)");
data_corrupt[0] = 52;
data_corrupt[1] = 33;
data_corrupt[2] = 27;
@@ -2350,7 +2349,7 @@ H5_ATTR_UNUSED
if(test_filter_internal(file,DSET_FLETCHER32_NAME_3,dc,DISABLE_FLETCHER32,DATA_CORRUPTED,&fletcher32_size) < 0) goto error;
if(fletcher32_size<=null_size) {
H5_FAILED();
- puts(" Size after checksumming is incorrect.");
+ HDputs(" Size after checksumming is incorrect.");
goto error;
} /* end if */
@@ -2363,7 +2362,7 @@ H5_ATTR_UNUSED
*----------------------------------------------------------
*/
#ifdef H5_HAVE_FILTER_DEFLATE
- puts("Testing deflate filter");
+ HDputs("Testing deflate filter");
if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error;
if(H5Pset_deflate (dc, 6) < 0) goto error;
@@ -2374,7 +2373,7 @@ H5_ATTR_UNUSED
#else /* H5_HAVE_FILTER_DEFLATE */
TESTING("deflate filter");
SKIPPED();
- puts(" Deflate filter not enabled");
+ HDputs(" Deflate filter not enabled");
#endif /* H5_HAVE_FILTER_DEFLATE */
/*----------------------------------------------------------
@@ -2387,7 +2386,7 @@ H5_ATTR_UNUSED
if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error;
- puts("");
+ HDputs("");
if(H5Pset_szip(dc, szip_options_mask, szip_pixels_per_block) < 0) goto error;
if(test_filter_internal(file,DSET_SZIP_NAME,dc,DISABLE_FLETCHER32,DATA_NOT_CORRUPTED,&szip_size) < 0) goto error;
if(H5Pclose (dc) < 0) goto error;
@@ -2399,7 +2398,7 @@ H5_ATTR_UNUSED
TESTING("szip filter (without encoder)");
if( h5_szip_can_encode() != 1) {
- puts("");
+ HDputs("");
if(test_filter_noencoder(NOENCODER_SZIP_DATASET) < 0) goto error;
}
else {
@@ -2409,14 +2408,14 @@ H5_ATTR_UNUSED
#else /* H5_HAVE_FILTER_SZIP */
TESTING("szip filter");
SKIPPED();
- puts(" Szip filter not enabled");
+ HDputs(" Szip filter not enabled");
#endif /* H5_HAVE_FILTER_SZIP */
/*----------------------------------------------------------
* STEP 4: Test shuffling by itself.
*----------------------------------------------------------
*/
- puts("Testing shuffle filter");
+ HDputs("Testing shuffle filter");
if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error;
if(H5Pset_shuffle (dc) < 0) goto error;
@@ -2424,7 +2423,7 @@ H5_ATTR_UNUSED
if(test_filter_internal(file,DSET_SHUFFLE_NAME,dc,DISABLE_FLETCHER32,DATA_NOT_CORRUPTED,&shuffle_size) < 0) goto error;
if(shuffle_size!=null_size) {
H5_FAILED();
- puts(" Shuffled size not the same as uncompressed size.");
+ HDputs(" Shuffled size not the same as uncompressed size.");
goto error;
} /* end if */
@@ -2436,7 +2435,7 @@ H5_ATTR_UNUSED
*----------------------------------------------------------
*/
#ifdef H5_HAVE_FILTER_DEFLATE
- puts("Testing shuffle+deflate+checksum filters(checksum first)");
+ HDputs("Testing shuffle+deflate+checksum filters(checksum first)");
if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error;
if(H5Pset_fletcher32 (dc) < 0) goto error;
@@ -2448,7 +2447,7 @@ H5_ATTR_UNUSED
/* Clean up objects used for this test */
if(H5Pclose (dc) < 0) goto error;
- puts("Testing shuffle+deflate+checksum filters(checksum last)");
+ HDputs("Testing shuffle+deflate+checksum filters(checksum last)");
if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error;
if(H5Pset_shuffle (dc) < 0) goto error;
@@ -2462,7 +2461,7 @@ H5_ATTR_UNUSED
#else /* H5_HAVE_FILTER_DEFLATE */
TESTING("shuffle+deflate+fletcher32 filters");
SKIPPED();
- puts(" Deflate filter not enabled");
+ HDputs(" Deflate filter not enabled");
#endif /* H5_HAVE_FILTER_DEFLATE */
/*----------------------------------------------------------
@@ -2479,7 +2478,7 @@ H5_ATTR_UNUSED
/* Make sure encoding is enabled */
if( h5_szip_can_encode() == 1) {
- puts("");
+ HDputs("");
if(H5Pset_szip(dc, szip_options_mask, szip_pixels_per_block) < 0) goto error;
if(test_filter_internal(file,DSET_SHUF_SZIP_FLET_NAME,dc,ENABLE_FLETCHER32,DATA_NOT_CORRUPTED,&combo_size) < 0) goto error;
}
@@ -2490,7 +2489,7 @@ H5_ATTR_UNUSED
TESTING("shuffle+szip+checksum filters(checksum first, without encoder)");
if( h5_szip_can_encode() != 1) {
- puts("");
+ HDputs("");
if(test_filter_noencoder(NOENCODER_SZIP_SHUFF_FLETCH_DATASET) < 0) goto error;
}
else {
@@ -2504,7 +2503,7 @@ H5_ATTR_UNUSED
/* Make sure encoding is enabled */
if( h5_szip_can_encode() == 1) {
- puts("");
+ HDputs("");
if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error;
if(H5Pset_shuffle (dc) < 0) goto error;
@@ -2523,7 +2522,7 @@ H5_ATTR_UNUSED
#else /* H5_HAVE_FILTER_SZIP */
TESTING("shuffle+szip+fletcher32 filters");
SKIPPED();
- puts(" szip filter not enabled");
+ HDputs(" szip filter not enabled");
#endif /* H5_HAVE_FILTER_SZIP */
return SUCCEED;
@@ -2847,8 +2846,8 @@ test_onebyte_shuffle(hid_t file)
for(j=0; j<(size_t)size[1]; j++) {
if(new_data[i][j] != orig_data[i][j]) {
H5_FAILED();
- printf(" Read different values than written.\n");
- printf(" At index %lu,%lu\n",
+ HDprintf(" Read different values than written.\n");
+ HDprintf(" At index %lu,%lu\n",
(unsigned long)i, (unsigned long)j);
goto error;
}
@@ -2893,7 +2892,7 @@ test_nbit_int(hid_t file)
double power;
size_t i, j;
- puts("Testing nbit filter");
+ HDputs("Testing nbit filter");
TESTING(" nbit int (setup)");
/* Define dataset datatype (integer), and set precision, offset */
@@ -2963,8 +2962,8 @@ test_nbit_int(hid_t file)
for(j=0; j<(size_t)size[1]; j++) {
if(((unsigned)new_data[i][j] & mask) != ((unsigned)orig_data[i][j] & mask)) {
H5_FAILED();
- printf(" Read different values than written.\n");
- printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
+ HDprintf(" Read different values than written.\n");
+ HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
goto error;
}
}
@@ -3078,8 +3077,8 @@ test_nbit_float(hid_t file)
continue; /* skip if value is NaN */
if(!H5_FLT_ABS_EQUAL(new_data[i][j], orig_data[i][j])) {
H5_FAILED();
- printf(" Read different values than written.\n");
- printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
+ HDprintf(" Read different values than written.\n");
+ HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
goto error;
}
}
@@ -3210,8 +3209,8 @@ test_nbit_double(hid_t file)
continue; /* skip if value is NaN */
if(!H5_DBL_ABS_EQUAL(new_data[i][j], orig_data[i][j])) {
H5_FAILED();
- printf(" Read different values than written.\n");
- printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
+ HDprintf(" Read different values than written.\n");
+ HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
goto error;
}
}
@@ -3338,8 +3337,8 @@ test_nbit_array(hid_t file)
for(n = 0; n < (size_t)adims[1]; n++) {
if(new_data[i][j][m][n]!= orig_data[i][j][m][n]) {
H5_FAILED();
- printf(" Read different values than written.\n");
- printf(" At index %lu,%lu,%lu,%lu\n",
+ HDprintf(" Read different values than written.\n");
+ HDprintf(" At index %lu,%lu,%lu,%lu\n",
(unsigned long)i, (unsigned long)j, (unsigned long)m, (unsigned long)n);
goto error;
}
@@ -3544,8 +3543,8 @@ test_nbit_compound(hid_t file)
(orig_data[i][j].f == orig_data[i][j].f && !H5_FLT_ABS_EQUAL(new_data[i][j].f, orig_data[i][j].f)))
{
H5_FAILED();
- printf(" Read different values than written.\n");
- printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
+ HDprintf(" Read different values than written.\n");
+ HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
goto error;
}
}
@@ -3875,8 +3874,8 @@ out:
(new_data[i][j].a.f == new_data[i][j].a.f && !H5_FLT_ABS_EQUAL(new_data[i][j].a.f, new_data[i][j].a.f)) ||
new_data[i][j].v != orig_data[i][j].v || b_failed || d_failed) {
H5_FAILED();
- printf(" Read different values than written.\n");
- printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
+ HDprintf(" Read different values than written.\n");
+ HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
goto error;
}
}
@@ -4058,8 +4057,8 @@ test_nbit_compound_3(hid_t file)
new_data[i].r != orig_data[i].r)
{
H5_FAILED();
- printf(" Read different values than written.\n");
- printf(" At index %lu\n", (unsigned long)i);
+ HDprintf(" Read different values than written.\n");
+ HDprintf(" At index %lu\n", (unsigned long)i);
goto error;
}
@@ -4067,8 +4066,8 @@ test_nbit_compound_3(hid_t file)
if(((unsigned int *)orig_data[i].v.p)[k] !=((unsigned int *)new_data[i].v.p)[k])
{
H5_FAILED();
- printf(" Read different values than written.\n");
- printf(" At index %lu\n", (unsigned long)i);
+ HDprintf(" Read different values than written.\n");
+ HDprintf(" At index %lu\n", (unsigned long)i);
goto error;
}
@@ -4076,8 +4075,8 @@ test_nbit_compound_3(hid_t file)
if(orig_data[i].o[j] != new_data[i].o[j])
{
H5_FAILED();
- printf(" Read different values than written.\n");
- printf(" At index %lu\n", (unsigned long)i);
+ HDprintf(" Read different values than written.\n");
+ HDprintf(" At index %lu\n", (unsigned long)i);
goto error;
}
}
@@ -4138,41 +4137,41 @@ test_nbit_int_size(hid_t file)
/* Define dataset datatype (integer), and set precision, offset */
if((datatype = H5Tcopy(H5T_NATIVE_INT)) < 0) {
H5_FAILED();
- printf(" line %d: H5Tcopy failed\n",__LINE__);
+ HDprintf(" line %d: H5Tcopy failed\n",__LINE__);
goto error;
} /* end if */
precision = 16; /* precision includes sign bit */
if(H5Tset_precision(datatype,precision)<0) {
H5_FAILED();
- printf(" line %d: H5Pset_precision failed\n",__LINE__);
+ HDprintf(" line %d: H5Pset_precision failed\n",__LINE__);
goto error;
} /* end if */
offset = 8;
if(H5Tset_offset(datatype,offset)<0) {
H5_FAILED();
- printf(" line %d: H5Tset_offset failed\n",__LINE__);
+ HDprintf(" line %d: H5Tset_offset failed\n",__LINE__);
goto error;
} /* end if */
/* Copy to memory datatype */
if((mem_datatype = H5Tcopy(datatype)) < 0) {
H5_FAILED();
- printf(" line %d: H5Tcopy failed\n",__LINE__);
+ HDprintf(" line %d: H5Tcopy failed\n",__LINE__);
goto error;
} /* end if */
/* Set order of dataset datatype */
if(H5Tset_order(datatype, H5T_ORDER_BE)<0) {
H5_FAILED();
- printf(" line %d: H5Pset_order failed\n",__LINE__);
+ HDprintf(" line %d: H5Pset_order failed\n",__LINE__);
goto error;
} /* end if */
if(H5Tset_size(datatype, 4)<0) {
H5_FAILED();
- printf(" line %d: H5Pset_size failed\n",__LINE__);
+ HDprintf(" line %d: H5Pset_size failed\n",__LINE__);
goto error;
} /* end if */
@@ -4191,7 +4190,7 @@ test_nbit_int_size(hid_t file)
dims[1] = DSET_DIM2;
if((dataspace = H5Screate_simple (2, dims, NULL))<0) {
H5_FAILED();
- printf(" line %d: H5Pcreate failed\n",__LINE__);
+ HDprintf(" line %d: H5Pcreate failed\n",__LINE__);
goto error;
} /* end if */
@@ -4202,13 +4201,13 @@ test_nbit_int_size(hid_t file)
chunk_size[1] = DSET_DIM2/10;
if((dset_create_props = H5Pcreate (H5P_DATASET_CREATE))<0) {
H5_FAILED();
- printf(" line %d: H5Pcreate failed\n",__LINE__);
+ HDprintf(" line %d: H5Pcreate failed\n",__LINE__);
goto error;
} /* end if */
if(H5Pset_chunk (dset_create_props, 2, chunk_size)<0) {
H5_FAILED();
- printf(" line %d: H5Pset_chunk failed\n",__LINE__);
+ HDprintf(" line %d: H5Pset_chunk failed\n",__LINE__);
goto error;
} /* end if */
@@ -4217,7 +4216,7 @@ test_nbit_int_size(hid_t file)
*/
if(H5Pset_nbit (dset_create_props)<0) {
H5_FAILED();
- printf(" line %d: H5Pset_nbit failed\n",__LINE__);
+ HDprintf(" line %d: H5Pset_nbit failed\n",__LINE__);
goto error;
} /* end if */
@@ -4228,7 +4227,7 @@ test_nbit_int_size(hid_t file)
dataspace, H5P_DEFAULT,
dset_create_props, H5P_DEFAULT))<0) {
H5_FAILED();
- printf(" line %d: H5dwrite failed\n",__LINE__);
+ HDprintf(" line %d: H5dwrite failed\n",__LINE__);
goto error;
} /* end if */
@@ -4238,7 +4237,7 @@ test_nbit_int_size(hid_t file)
if(H5Dwrite (dataset, mem_datatype, H5S_ALL, H5S_ALL,
H5P_DEFAULT, orig_data)<0) {
H5_FAILED();
- printf(" Line %d: H5Dwrite failed\n",__LINE__);
+ HDprintf(" Line %d: H5Dwrite failed\n",__LINE__);
goto error;
} /* end if */
@@ -4247,7 +4246,7 @@ test_nbit_int_size(hid_t file)
*/
if((precision = H5Tget_precision(datatype)) == 0) {
H5_FAILED();
- printf(" Line %d: wrong precision size: %zu\n",__LINE__, precision);
+ HDprintf(" Line %d: wrong precision size: %zu\n",__LINE__, precision);
goto error;
} /* end if */
@@ -4327,7 +4326,7 @@ test_nbit_flt_size(hid_t file)
*-------------------------------------------------------------------*/
if((datatype = H5Tcopy(H5T_IEEE_F32LE)) < 0) {
H5_FAILED();
- printf(" line %d: H5Tcopy failed\n",__LINE__);
+ HDprintf(" line %d: H5Tcopy failed\n",__LINE__);
goto error;
} /* end if */
@@ -4341,38 +4340,38 @@ test_nbit_flt_size(hid_t file)
if(H5Tset_fields(datatype, spos, epos, esize, mpos, msize)<0) {
H5_FAILED();
- printf(" line %d: H5Tset_fields failed\n",__LINE__);
+ HDprintf(" line %d: H5Tset_fields failed\n",__LINE__);
goto error;
} /* end if */
if(H5Tset_offset(datatype,offset)<0) {
H5_FAILED();
- printf(" line %d: H5Tset_offset failed\n",__LINE__);
+ HDprintf(" line %d: H5Tset_offset failed\n",__LINE__);
goto error;
} /* end if */
if(H5Tset_precision(datatype,precision)<0) {
H5_FAILED();
- printf(" line %d: H5Tset_precision failed\n",__LINE__);
+ HDprintf(" line %d: H5Tset_precision failed\n",__LINE__);
goto error;
} /* end if */
if(H5Tset_size(datatype, 4)<0) {
H5_FAILED();
- printf(" line %d: H5Pset_size failed\n",__LINE__);
+ HDprintf(" line %d: H5Pset_size failed\n",__LINE__);
goto error;
} /* end if */
/* Set order of dataset datatype */
if(H5Tset_order(datatype, H5T_ORDER_BE)<0) {
H5_FAILED();
- printf(" line %d: H5Pset_order failed\n",__LINE__);
+ HDprintf(" line %d: H5Pset_order failed\n",__LINE__);
goto error;
} /* end if */
if(H5Tset_ebias(datatype, 31)<0) {
H5_FAILED();
- printf(" line %d: H5Pset_size failed\n",__LINE__);
+ HDprintf(" line %d: H5Pset_size failed\n",__LINE__);
goto error;
} /* end if */
@@ -4389,7 +4388,7 @@ test_nbit_flt_size(hid_t file)
dims[1] = DSET_DIM2;
if((dataspace = H5Screate_simple (2, dims, NULL))<0) {
H5_FAILED();
- printf(" line %d: H5Pcreate failed\n",__LINE__);
+ HDprintf(" line %d: H5Pcreate failed\n",__LINE__);
goto error;
} /* end if */
@@ -4400,13 +4399,13 @@ test_nbit_flt_size(hid_t file)
chunk_size[1] = DSET_DIM2/10;
if((dset_create_props = H5Pcreate (H5P_DATASET_CREATE))<0) {
H5_FAILED();
- printf(" line %d: H5Pcreate failed\n",__LINE__);
+ HDprintf(" line %d: H5Pcreate failed\n",__LINE__);
goto error;
} /* end if */
if(H5Pset_chunk (dset_create_props, 2, chunk_size)<0) {
H5_FAILED();
- printf(" line %d: H5Pset_chunk failed\n",__LINE__);
+ HDprintf(" line %d: H5Pset_chunk failed\n",__LINE__);
goto error;
} /* end if */
@@ -4415,7 +4414,7 @@ test_nbit_flt_size(hid_t file)
*/
if(H5Pset_nbit (dset_create_props)<0) {
H5_FAILED();
- printf(" line %d: H5Pset_nbit failed\n",__LINE__);
+ HDprintf(" line %d: H5Pset_nbit failed\n",__LINE__);
goto error;
} /* end if */
@@ -4426,7 +4425,7 @@ test_nbit_flt_size(hid_t file)
dataspace, H5P_DEFAULT,
dset_create_props, H5P_DEFAULT))<0) {
H5_FAILED();
- printf(" line %d: H5dwrite failed\n",__LINE__);
+ HDprintf(" line %d: H5dwrite failed\n",__LINE__);
goto error;
} /* end if */
@@ -4436,7 +4435,7 @@ test_nbit_flt_size(hid_t file)
if(H5Dwrite (dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL,
H5P_DEFAULT, orig_data)<0) {
H5_FAILED();
- printf(" Line %d: H5Dwrite failed\n",__LINE__);
+ HDprintf(" Line %d: H5Dwrite failed\n",__LINE__);
goto error;
} /* end if */
@@ -4445,7 +4444,7 @@ test_nbit_flt_size(hid_t file)
*/
if((precision = H5Tget_precision(datatype)) == 0) {
H5_FAILED();
- printf(" Line %d: wrong precision size: %zu\n",__LINE__, precision);
+ HDprintf(" Line %d: wrong precision size: %zu\n",__LINE__, precision);
goto error;
} /* end if */
@@ -4496,7 +4495,7 @@ test_scaleoffset_int(hid_t file)
int new_data[2][5];
size_t i, j;
- puts("Testing scaleoffset filter");
+ HDputs("Testing scaleoffset filter");
TESTING(" scaleoffset int without fill value (setup)");
datatype = H5Tcopy(H5T_NATIVE_INT);
@@ -4559,8 +4558,8 @@ test_scaleoffset_int(hid_t file)
for(j=0; j<(size_t)size[1]; j++) {
if(new_data[i][j] != orig_data[i][j]) {
H5_FAILED();
- printf(" Read different values than written.\n");
- printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
+ HDprintf(" Read different values than written.\n");
+ HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
goto error;
}
}
@@ -4688,8 +4687,8 @@ test_scaleoffset_int_2(hid_t file)
for(j=0; j<(size_t)size[1]; j++) {
if(new_data[0][j] != orig_data[0][j]) {
H5_FAILED();
- printf(" Read different values than written.\n");
- printf(" At index %lu,%lu\n", (unsigned long)0, (unsigned long)j);
+ HDprintf(" Read different values than written.\n");
+ HDprintf(" At index %lu,%lu\n", (unsigned long)0, (unsigned long)j);
goto error;
}
}
@@ -4800,8 +4799,8 @@ test_scaleoffset_float(hid_t file)
for(j=0; j<(size_t)size[1]; j++) {
if(HDfabs(new_data[i][j]-orig_data[i][j]) > HDpow(10.0F, -3.0F)) {
H5_FAILED();
- printf(" Read different values than written.\n");
- printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
+ HDprintf(" Read different values than written.\n");
+ HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
goto error;
}
}
@@ -4931,8 +4930,8 @@ test_scaleoffset_float_2(hid_t file)
for(j=0; j<(size_t)size[1]; j++) {
if(HDfabs(new_data[0][j]-orig_data[0][j]) > HDpow(10.0F, -3.0F)) {
H5_FAILED();
- printf(" Read different values than written.\n");
- printf(" At index %lu,%lu\n", (unsigned long)0, (unsigned long)j);
+ HDprintf(" Read different values than written.\n");
+ HDprintf(" At index %lu,%lu\n", (unsigned long)0, (unsigned long)j);
goto error;
}
}
@@ -5042,8 +5041,8 @@ test_scaleoffset_double(hid_t file)
for(j=0; j<(size_t)size[1]; j++) {
if(HDfabs(new_data[i][j]-orig_data[i][j]) > HDpow(10.0F, -7.0F)) {
H5_FAILED();
- printf(" Read different values than written.\n");
- printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
+ HDprintf(" Read different values than written.\n");
+ HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
goto error;
}
}
@@ -5173,8 +5172,8 @@ test_scaleoffset_double_2(hid_t file)
for(j=0; j<(size_t)size[1]; j++) {
if(HDfabs(new_data[0][j]-orig_data[0][j]) > HDpow(10.0F, -7.0F)) {
H5_FAILED();
- printf(" Read different values than written.\n");
- printf(" At index %lu,%lu\n", (unsigned long)0, (unsigned long)j);
+ HDprintf(" Read different values than written.\n");
+ HDprintf(" At index %lu,%lu\n", (unsigned long)0, (unsigned long)j);
goto error;
}
}
@@ -5240,7 +5239,7 @@ test_multiopen (hid_t file)
if(H5Sget_simple_extent_dims(space, tmp_size, NULL) < 0) goto error;
if(cur_size[0] != tmp_size[0]) {
H5_FAILED();
- printf(" Got %d instead of %d!\n", (int)tmp_size[0], (int)cur_size[0]);
+ HDprintf(" Got %d instead of %d!\n", (int)tmp_size[0], (int)cur_size[0]);
goto error;
} /* end if */
@@ -5402,30 +5401,30 @@ test_can_apply(hid_t file)
/* Create dcpl with special filter */
if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
H5_FAILED();
- printf(" Line %d: Can't create dcpl\n",__LINE__);
+ HDprintf(" Line %d: Can't create dcpl\n",__LINE__);
goto error;
} /* end if */
if(H5Pset_chunk(dcpl, 2, chunk_dims) < 0) {
H5_FAILED();
- printf(" Line %d: Can't set chunk sizes\n",__LINE__);
+ HDprintf(" Line %d: Can't set chunk sizes\n",__LINE__);
goto error;
} /* end if */
if(H5Zregister (H5Z_CAN_APPLY_TEST) < 0) {
H5_FAILED();
- printf(" Line %d: Can't register 'can apply' filter\n",__LINE__);
+ HDprintf(" Line %d: Can't register 'can apply' filter\n",__LINE__);
goto error;
}
/* The filter is mandate. */
if(H5Pset_filter(dcpl, H5Z_FILTER_CAN_APPLY_TEST, 0, (size_t)0, NULL) < 0) {
H5_FAILED();
- printf(" Line %d: Can't set bogus filter\n",__LINE__);
+ HDprintf(" Line %d: Can't set bogus filter\n",__LINE__);
goto error;
}
/* Create the data space */
if((sid = H5Screate_simple(2, dims, NULL)) < 0) {
H5_FAILED();
- printf(" Line %d: Can't open dataspace\n",__LINE__);
+ HDprintf(" Line %d: Can't open dataspace\n",__LINE__);
goto error;
} /* end if */
@@ -5437,7 +5436,7 @@ test_can_apply(hid_t file)
} H5E_END_TRY;
if(dsid >=0) {
H5_FAILED();
- printf(" Line %d: Shouldn't have created dataset!\n",__LINE__);
+ HDprintf(" Line %d: Shouldn't have created dataset!\n",__LINE__);
H5Dclose(dsid);
goto error;
} /* end if */
@@ -5448,7 +5447,7 @@ test_can_apply(hid_t file)
} H5E_END_TRY;
if(dsid >=0) {
H5_FAILED();
- printf(" Line %d: Shouldn't have created dataset!\n",__LINE__);
+ HDprintf(" Line %d: Shouldn't have created dataset!\n",__LINE__);
H5Dclose(dsid);
goto error;
} /* end if */
@@ -5456,42 +5455,42 @@ test_can_apply(hid_t file)
/* Create new dataset */
if((dsid = H5Dcreate2(file, DSET_CAN_APPLY_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) {
H5_FAILED();
- printf(" Line %d: Can't create dataset\n",__LINE__);
+ HDprintf(" Line %d: Can't create dataset\n",__LINE__);
goto error;
} /* end if */
/* Write data */
if(H5Dwrite(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points) < 0) {
H5_FAILED();
- printf(" Line %d: Error writing dataset data\n",__LINE__);
+ HDprintf(" Line %d: Error writing dataset data\n",__LINE__);
goto error;
} /* end if */
/* Flush the file (to clear the cache) */
if(H5Fflush(file, H5F_SCOPE_GLOBAL) < 0) {
H5_FAILED();
- printf(" Line %d: Error flushing file\n",__LINE__);
+ HDprintf(" Line %d: Error flushing file\n",__LINE__);
goto error;
} /* end if */
/* Query the dataset's size on disk */
if((dset_size=H5Dget_storage_size(dsid))==0) {
H5_FAILED();
- printf(" Line %d: Error querying dataset size\n",__LINE__);
+ HDprintf(" Line %d: Error querying dataset size\n",__LINE__);
goto error;
} /* end if */
/* Verify that the size indicates data is uncompressed */
if((H5Tget_size(H5T_NATIVE_INT)*dims[0]*dims[1])!=dset_size) {
H5_FAILED();
- printf(" Line %d: Incorrect dataset size: %lu\n",__LINE__,(unsigned long)dset_size);
+ HDprintf(" Line %d: Incorrect dataset size: %lu\n",__LINE__,(unsigned long)dset_size);
goto error;
} /* end if */
/* Read data */
if(H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check) < 0) {
H5_FAILED();
- printf(" Line %d: Error reading dataset data\n",__LINE__);
+ HDprintf(" Line %d: Error reading dataset data\n",__LINE__);
goto error;
} /* end if */
@@ -5501,10 +5500,10 @@ test_can_apply(hid_t file)
for(j=0; j<(size_t)dims[1]; j++) {
if(points[i][j] != check[i][j]) {
H5_FAILED();
- printf(" Line %d: Read different values than written.\n",__LINE__);
- printf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
- printf(" At original: %d\n",points[i][j]);
- printf(" At returned: %d\n",check[i][j]);
+ HDprintf(" Line %d: Read different values than written.\n",__LINE__);
+ HDprintf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
+ HDprintf(" At original: %d\n",points[i][j]);
+ HDprintf(" At returned: %d\n",check[i][j]);
goto error;
} /* end if */
} /* end for */
@@ -5513,21 +5512,21 @@ test_can_apply(hid_t file)
/* Close dataset */
if(H5Dclose(dsid) < 0) {
H5_FAILED();
- printf(" Line %d: Can't close dataset\n",__LINE__);
+ HDprintf(" Line %d: Can't close dataset\n",__LINE__);
goto error;
} /* end if */
/* Close dataspace */
if(H5Sclose(sid) < 0) {
H5_FAILED();
- printf(" Line %d: Can't close dataspace\n",__LINE__);
+ HDprintf(" Line %d: Can't close dataspace\n",__LINE__);
goto error;
} /* end if */
/* Close dataset creation property list */
if(H5Pclose(dcpl) < 0) {
H5_FAILED();
- printf(" Line %d: Can't close dcpl\n",__LINE__);
+ HDprintf(" Line %d: Can't close dcpl\n",__LINE__);
goto error;
} /* end if */
@@ -5585,72 +5584,72 @@ test_can_apply2(hid_t file)
/* Create dcpl with special filter */
if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
H5_FAILED();
- printf(" Line %d: Can't create dcpl\n",__LINE__);
+ HDprintf(" Line %d: Can't create dcpl\n",__LINE__);
goto error;
} /* end if */
if(H5Pset_chunk(dcpl, 2, chunk_dims) < 0) {
H5_FAILED();
- printf(" Line %d: Can't set chunk sizes\n",__LINE__);
+ HDprintf(" Line %d: Can't set chunk sizes\n",__LINE__);
goto error;
} /* end if */
if(H5Zregister (H5Z_CAN_APPLY_TEST2) < 0) {
H5_FAILED();
- printf(" Line %d: Can't register 'can apply' filter\n",__LINE__);
+ HDprintf(" Line %d: Can't register 'can apply' filter\n",__LINE__);
goto error;
}
/* The filter is optional. */
if(H5Pset_filter(dcpl, H5Z_FILTER_CAN_APPLY_TEST2, H5Z_FLAG_OPTIONAL, (size_t)0, NULL) < 0) {
H5_FAILED();
- printf(" Line %d: Can't set bogus filter\n",__LINE__);
+ HDprintf(" Line %d: Can't set bogus filter\n",__LINE__);
goto error;
}
/* Create the data space */
if((sid = H5Screate_simple(2, dims, NULL)) < 0) {
H5_FAILED();
- printf(" Line %d: Can't open dataspace\n",__LINE__);
+ HDprintf(" Line %d: Can't open dataspace\n",__LINE__);
goto error;
} /* end if */
/* Create new dataset */
if((dsid = H5Dcreate2(file, DSET_CAN_APPLY_NAME2, H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) {
H5_FAILED();
- printf(" Line %d: Can't create dataset\n",__LINE__);
+ HDprintf(" Line %d: Can't create dataset\n",__LINE__);
goto error;
} /* end if */
/* Write data */
if(H5Dwrite(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points) < 0) {
H5_FAILED();
- printf(" Line %d: Error writing dataset data\n",__LINE__);
+ HDprintf(" Line %d: Error writing dataset data\n",__LINE__);
goto error;
} /* end if */
/* Flush the file (to clear the cache) */
if(H5Fflush(file, H5F_SCOPE_GLOBAL) < 0) {
H5_FAILED();
- printf(" Line %d: Error flushing file\n",__LINE__);
+ HDprintf(" Line %d: Error flushing file\n",__LINE__);
goto error;
} /* end if */
/* Query the dataset's size on disk */
if((dset_size=H5Dget_storage_size(dsid))==0) {
H5_FAILED();
- printf(" Line %d: Error querying dataset size\n",__LINE__);
+ HDprintf(" Line %d: Error querying dataset size\n",__LINE__);
goto error;
} /* end if */
/* Verify that the size indicates data is uncompressed */
if((H5Tget_size(H5T_NATIVE_DOUBLE)*dims[0]*dims[1])!=dset_size) {
H5_FAILED();
- printf(" Line %d: Incorrect dataset size: %lu\n",__LINE__,(unsigned long)dset_size);
+ HDprintf(" Line %d: Incorrect dataset size: %lu\n",__LINE__,(unsigned long)dset_size);
goto error;
} /* end if */
/* Read data */
if(H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check) < 0) {
H5_FAILED();
- printf(" Line %d: Error reading dataset data\n",__LINE__);
+ HDprintf(" Line %d: Error reading dataset data\n",__LINE__);
goto error;
} /* end if */
@@ -5660,10 +5659,10 @@ test_can_apply2(hid_t file)
for(j=0; j<(size_t)dims[1]; j++) {
if(points[i][j] != check[i][j]) {
H5_FAILED();
- printf(" Line %d: Read different values than written.\n",__LINE__);
- printf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
- printf(" At original: %d\n",points[i][j]);
- printf(" At returned: %d\n",check[i][j]);
+ HDprintf(" Line %d: Read different values than written.\n",__LINE__);
+ HDprintf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
+ HDprintf(" At original: %d\n",points[i][j]);
+ HDprintf(" At returned: %d\n",check[i][j]);
goto error;
} /* end if */
} /* end for */
@@ -5672,21 +5671,21 @@ test_can_apply2(hid_t file)
/* Close dataset */
if(H5Dclose(dsid) < 0) {
H5_FAILED();
- printf(" Line %d: Can't close dataset\n",__LINE__);
+ HDprintf(" Line %d: Can't close dataset\n",__LINE__);
goto error;
} /* end if */
/* Close dataspace */
if(H5Sclose(sid) < 0) {
H5_FAILED();
- printf(" Line %d: Can't close dataspace\n",__LINE__);
+ HDprintf(" Line %d: Can't close dataspace\n",__LINE__);
goto error;
} /* end if */
/* Close dataset creation property list */
if(H5Pclose(dcpl) < 0) {
H5_FAILED();
- printf(" Line %d: Can't close dcpl\n",__LINE__);
+ HDprintf(" Line %d: Can't close dcpl\n",__LINE__);
goto error;
} /* end if */
@@ -5742,19 +5741,19 @@ file)
/* Create the data space */
if((sid = H5Screate_simple(2, dims, NULL)) < 0) {
H5_FAILED();
- printf(" Line %d: Can't open dataspace\n",__LINE__);
+ HDprintf(" Line %d: Can't open dataspace\n",__LINE__);
goto error;
} /* end if */
/* Create dcpl with special filter */
if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
H5_FAILED();
- printf(" Line %d: Can't create dcpl\n",__LINE__);
+ HDprintf(" Line %d: Can't create dcpl\n",__LINE__);
goto error;
} /* end if */
if(H5Pset_chunk(dcpl, 2, chunk_dims) < 0) {
H5_FAILED();
- printf(" Line %d: Can't set chunk sizes\n",__LINE__);
+ HDprintf(" Line %d: Can't set chunk sizes\n",__LINE__);
goto error;
} /* end if */
@@ -5765,7 +5764,7 @@ file)
} H5E_END_TRY;
if(ret>=0) {
H5_FAILED();
- printf(" Line %d: Shouldn't be able to set szip filter\n",__LINE__);
+ HDprintf(" Line %d: Shouldn't be able to set szip filter\n",__LINE__);
goto error;
}
@@ -5776,7 +5775,7 @@ file)
} H5E_END_TRY;
if(ret>=0) {
H5_FAILED();
- printf(" Line %d: Shouldn't be able to set szip filter\n",__LINE__);
+ HDprintf(" Line %d: Shouldn't be able to set szip filter\n",__LINE__);
goto error;
}
@@ -5784,7 +5783,7 @@ file)
szip_pixels_per_block=2;
if(H5Pset_szip (dcpl, szip_options_mask, szip_pixels_per_block) < 0) {
H5_FAILED();
- printf(" Line %d: Can't set szip filter\n",__LINE__);
+ HDprintf(" Line %d: Can't set szip filter\n",__LINE__);
goto error;
}
@@ -5796,47 +5795,47 @@ file)
} H5E_END_TRY;
if(dsid <=0) {
H5_FAILED();
- printf(" Line %d: Should have created dataset!\n",__LINE__);
+ HDprintf(" Line %d: Should have created dataset!\n",__LINE__);
goto error;
} /* end if */
/* Close dataset */
if(H5Dclose(dsid) < 0) {
H5_FAILED();
- printf(" Line %d: Can't close dataset\n",__LINE__);
+ HDprintf(" Line %d: Can't close dataset\n",__LINE__);
goto error;
} /* end if */
/* Close dataspace */
if(H5Sclose(sid) < 0) {
H5_FAILED();
- printf(" Line %d: Can't close dataspace\n",__LINE__);
+ HDprintf(" Line %d: Can't close dataspace\n",__LINE__);
goto error;
} /* end if */
/* Close dataset creation property list */
if(H5Pclose(dcpl) < 0) {
H5_FAILED();
- printf(" Line %d: Can't close dcpl\n",__LINE__);
+ HDprintf(" Line %d: Can't close dcpl\n",__LINE__);
goto error;
} /* end if */
/* Create another data space */
if((sid = H5Screate_simple(2, dims2, NULL)) < 0) {
H5_FAILED();
- printf(" Line %d: Can't open dataspace\n",__LINE__);
+ HDprintf(" Line %d: Can't open dataspace\n",__LINE__);
goto error;
} /* end if */
/* Create dcpl with special filter */
if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
H5_FAILED();
- printf(" Line %d: Can't create dcpl\n",__LINE__);
+ HDprintf(" Line %d: Can't create dcpl\n",__LINE__);
goto error;
} /* end if */
if(H5Pset_chunk(dcpl, 2, chunk_dims2) < 0) {
H5_FAILED();
- printf(" Line %d: Can't set chunk sizes\n",__LINE__);
+ HDprintf(" Line %d: Can't set chunk sizes\n",__LINE__);
goto error;
} /* end if */
@@ -5844,7 +5843,7 @@ file)
szip_pixels_per_block=32;
if(H5Pset_szip (dcpl, szip_options_mask, szip_pixels_per_block) < 0) {
H5_FAILED();
- printf(" Line %d: Can't set szip filter\n",__LINE__);
+ HDprintf(" Line %d: Can't set szip filter\n",__LINE__);
goto error;
}
@@ -5855,7 +5854,7 @@ file)
} H5E_END_TRY;
if(dsid >=0) {
H5_FAILED();
- printf(" Line %d: Shouldn't have created dataset!\n",__LINE__);
+ HDprintf(" Line %d: Shouldn't have created dataset!\n",__LINE__);
H5Dclose(dsid);
goto error;
} /* end if */
@@ -5863,14 +5862,14 @@ file)
/* Close dataspace */
if(H5Sclose(sid) < 0) {
H5_FAILED();
- printf(" Line %d: Can't close dataspace\n",__LINE__);
+ HDprintf(" Line %d: Can't close dataspace\n",__LINE__);
goto error;
} /* end if */
/* Close dataset creation property list */
if(H5Pclose(dcpl) < 0) {
H5_FAILED();
- printf(" Line %d: Can't close dcpl\n",__LINE__);
+ HDprintf(" Line %d: Can't close dcpl\n",__LINE__);
goto error;
} /* end if */
@@ -5878,11 +5877,11 @@ file)
PASSED();
} else {
SKIPPED();
- puts(" Szip encoding is not enabled.");
+ HDputs(" Szip encoding is not enabled.");
}
#else /* H5_HAVE_FILTER_SZIP */
SKIPPED();
- puts(" Szip filter is not enabled.");
+ HDputs(" Szip filter is not enabled.");
#endif /* H5_HAVE_FILTER_SZIP */
return SUCCEED;
@@ -5948,57 +5947,57 @@ test_set_local(hid_t fapl)
/* Open file */
if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) {
H5_FAILED();
- printf(" Line %d: Can't open file\n",__LINE__);
+ HDprintf(" Line %d: Can't open file\n",__LINE__);
goto error;
}
/* Create dcpl with special filter */
if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
H5_FAILED();
- printf(" Line %d: Can't create dcpl\n",__LINE__);
+ HDprintf(" Line %d: Can't create dcpl\n",__LINE__);
goto error;
} /* end if */
if(H5Pset_chunk(dcpl, 2, chunk_dims) < 0) {
H5_FAILED();
- printf(" Line %d: Can't set chunk sizes\n",__LINE__);
+ HDprintf(" Line %d: Can't set chunk sizes\n",__LINE__);
goto error;
} /* end if */
if(H5Zregister (H5Z_SET_LOCAL_TEST) < 0) {
H5_FAILED();
- printf(" Line %d: Can't register 'set local' filter\n",__LINE__);
+ HDprintf(" Line %d: Can't register 'set local' filter\n",__LINE__);
goto error;
}
if(H5Pset_filter(dcpl, H5Z_FILTER_SET_LOCAL_TEST, 0, (size_t)BOGUS2_PERM_NPARMS, cd_values) < 0) {
H5_FAILED();
- printf(" Line %d: Can't set bogus2 filter\n",__LINE__);
+ HDprintf(" Line %d: Can't set bogus2 filter\n",__LINE__);
goto error;
}
/* Create the data space */
if((sid = H5Screate_simple(2, dims, NULL)) < 0) {
H5_FAILED();
- printf(" Line %d: Can't open dataspace\n",__LINE__);
+ HDprintf(" Line %d: Can't open dataspace\n",__LINE__);
goto error;
} /* end if */
/* Create new dataset */
if((dsid = H5Dcreate2(file, DSET_SET_LOCAL_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) {
H5_FAILED();
- printf(" Line %d: Can't create dataset\n",__LINE__);
+ HDprintf(" Line %d: Can't create dataset\n",__LINE__);
goto error;
} /* end if */
/* Write data */
if(H5Dwrite(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points) < 0) {
H5_FAILED();
- printf(" Line %d: Error writing dataset data\n",__LINE__);
+ HDprintf(" Line %d: Error writing dataset data\n",__LINE__);
goto error;
} /* end if */
/* Close dataset */
if(H5Dclose(dsid) < 0) {
H5_FAILED();
- printf(" Line %d: Can't close dataset\n",__LINE__);
+ HDprintf(" Line %d: Can't close dataset\n",__LINE__);
goto error;
} /* end if */
@@ -6006,77 +6005,77 @@ test_set_local(hid_t fapl)
/* (Shouldn't get modified by output filter) */
if((dsid = H5Dcreate2(file, DSET_SET_LOCAL_NAME_2, H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) {
H5_FAILED();
- printf(" Line %d: Can't create dataset\n",__LINE__);
+ HDprintf(" Line %d: Can't create dataset\n",__LINE__);
goto error;
} /* end if */
/* Write data */
if(H5Dwrite(dsid, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, points_dbl) < 0) {
H5_FAILED();
- printf(" Line %d: Error writing dataset data\n",__LINE__);
+ HDprintf(" Line %d: Error writing dataset data\n",__LINE__);
goto error;
} /* end if */
/* Close dataset */
if(H5Dclose(dsid) < 0) {
H5_FAILED();
- printf(" Line %d: Can't close dataset\n",__LINE__);
+ HDprintf(" Line %d: Can't close dataset\n",__LINE__);
goto error;
} /* end if */
/* Close dataspace */
if(H5Sclose(sid) < 0) {
H5_FAILED();
- printf(" Line %d: Can't close dataspace\n", __LINE__);
+ HDprintf(" Line %d: Can't close dataspace\n", __LINE__);
goto error;
} /* end if */
/* Close dataset creation property list */
if(H5Pclose(dcpl) < 0) {
H5_FAILED();
- printf(" Line %d: Can't close dcpl\n", __LINE__);
+ HDprintf(" Line %d: Can't close dcpl\n", __LINE__);
goto error;
} /* end if */
/* Close file (flushes & empties cache) */
if(H5Fclose(file) < 0) {
H5_FAILED();
- printf(" Line %d: Can't close file\n", __LINE__);
+ HDprintf(" Line %d: Can't close file\n", __LINE__);
goto error;
} /* end if */
/* Open file */
if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) {
H5_FAILED();
- printf(" Line %d: Can't open file\n", __LINE__);
+ HDprintf(" Line %d: Can't open file\n", __LINE__);
goto error;
}
/* Re-open dataset */
if((dsid = H5Dopen2(file, DSET_SET_LOCAL_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- printf(" Line %d: Can't open dataset\n", __LINE__);
+ HDprintf(" Line %d: Can't open dataset\n", __LINE__);
goto error;
} /* end if */
/* Query the dataset's size on disk */
if((dset_size = H5Dget_storage_size(dsid)) == 0) {
H5_FAILED();
- printf(" Line %d: Error querying dataset size\n", __LINE__);
+ HDprintf(" Line %d: Error querying dataset size\n", __LINE__);
goto error;
} /* end if */
/* Verify that the size indicates data is uncompressed */
if((H5Tget_size(H5T_NATIVE_INT) * dims[0] * dims[1]) != dset_size) {
H5_FAILED();
- printf(" Line %d: Incorrect dataset size: %lu\n", __LINE__, (unsigned long)dset_size);
+ HDprintf(" Line %d: Incorrect dataset size: %lu\n", __LINE__, (unsigned long)dset_size);
goto error;
} /* end if */
/* Read data */
if(H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check) < 0) {
H5_FAILED();
- printf(" Line %d: Error reading dataset data\n", __LINE__);
+ HDprintf(" Line %d: Error reading dataset data\n", __LINE__);
goto error;
} /* end if */
@@ -6086,10 +6085,10 @@ test_set_local(hid_t fapl)
for(j=0; j<dims[1]; j++) {
if((points[i][j]+(int)sizeof(int)) != check[i][j]) {
H5_FAILED();
- printf(" Line %d: Read different values than written.\n",__LINE__);
- printf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
- printf(" At original: %d\n",points[i][j]);
- printf(" At returned: %d\n",check[i][j]);
+ HDprintf(" Line %d: Read different values than written.\n",__LINE__);
+ HDprintf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
+ HDprintf(" At original: %d\n",points[i][j]);
+ HDprintf(" At returned: %d\n",check[i][j]);
goto error;
} /* end if */
} /* end for */
@@ -6098,35 +6097,35 @@ test_set_local(hid_t fapl)
/* Close dataset */
if(H5Dclose(dsid) < 0) {
H5_FAILED();
- printf(" Line %d: Can't close dataset\n", __LINE__);
+ HDprintf(" Line %d: Can't close dataset\n", __LINE__);
goto error;
} /* end if */
/* Re-open second dataset */
if((dsid = H5Dopen2(file, DSET_SET_LOCAL_NAME_2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- printf(" Line %d: Can't open dataset\n", __LINE__);
+ HDprintf(" Line %d: Can't open dataset\n", __LINE__);
goto error;
} /* end if */
/* Query the dataset's size on disk */
if((dset_size = H5Dget_storage_size(dsid)) == 0) {
H5_FAILED();
- printf(" Line %d: Error querying dataset size\n", __LINE__);
+ HDprintf(" Line %d: Error querying dataset size\n", __LINE__);
goto error;
} /* end if */
/* Verify that the size indicates data is uncompressed */
if((H5Tget_size(H5T_NATIVE_DOUBLE) * dims[0] * dims[1]) != dset_size) {
H5_FAILED();
- printf(" Line %d: Incorrect dataset size: %lu\n", __LINE__, (unsigned long)dset_size);
+ HDprintf(" Line %d: Incorrect dataset size: %lu\n", __LINE__, (unsigned long)dset_size);
goto error;
} /* end if */
/* Read data */
if(H5Dread(dsid, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, check_dbl) < 0) {
H5_FAILED();
- printf(" Line %d: Error reading dataset data\n", __LINE__);
+ HDprintf(" Line %d: Error reading dataset data\n", __LINE__);
goto error;
} /* end if */
@@ -6138,10 +6137,10 @@ test_set_local(hid_t fapl)
* considered not equal. */
if(!H5_DBL_REL_EQUAL(points_dbl[i][j], check_dbl[i][j], (double)0.00001F)) {
H5_FAILED();
- printf(" Line %d: Read different values than written.\n",__LINE__);
- printf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
- printf(" At original: %f\n",points_dbl[i][j]);
- printf(" At returned: %f\n",check_dbl[i][j]);
+ HDprintf(" Line %d: Read different values than written.\n",__LINE__);
+ HDprintf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
+ HDprintf(" At original: %f\n",points_dbl[i][j]);
+ HDprintf(" At returned: %f\n",check_dbl[i][j]);
goto error;
} /* end if */
} /* end for */
@@ -6150,14 +6149,14 @@ test_set_local(hid_t fapl)
/* Close dataset */
if(H5Dclose(dsid) < 0) {
H5_FAILED();
- printf(" Line %d: Can't close dataset\n",__LINE__);
+ HDprintf(" Line %d: Can't close dataset\n",__LINE__);
goto error;
} /* end if */
/* Close file */
if(H5Fclose(file) < 0) {
H5_FAILED();
- printf(" Line %d: Can't close file\n",__LINE__);
+ HDprintf(" Line %d: Can't close file\n",__LINE__);
goto error;
} /* end if */
@@ -6458,7 +6457,7 @@ test_filter_delete(hid_t file)
} H5E_END_TRY;
if(ret >=0) {
H5_FAILED();
- printf(" Line %d: Shouldn't have deleted filter!\n",__LINE__);
+ HDprintf(" Line %d: Shouldn't have deleted filter!\n",__LINE__);
goto error;
} /* end if */
@@ -6468,7 +6467,7 @@ test_filter_delete(hid_t file)
} H5E_END_TRY;
if(ret >=0) {
H5_FAILED();
- printf(" Line %d: Shouldn't have deleted filter!\n",__LINE__);
+ HDprintf(" Line %d: Shouldn't have deleted filter!\n",__LINE__);
goto error;
} /* end if */
@@ -6566,7 +6565,7 @@ auxread_fdata(hid_t fid, const char *name)
if(nelmts) {
buf = (void *)HDmalloc((size_t)(nelmts * msize));
if(buf == NULL) {
- printf( "cannot read into memory\n" );
+ HDprintf( "cannot read into memory\n" );
goto error;
}
if(H5Dread(dset_id, mtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
@@ -6965,13 +6964,13 @@ test_missing_chunk(hid_t file)
for(u=0; u<MISSING_CHUNK_DIM; u++) {
if((u%10)>=5) {
if(rdata[u]!=911) {
- printf(" Line %d: Incorrect value, rdata[%u]=%d\n",__LINE__,(unsigned)u,rdata[u]);
+ HDprintf(" Line %d: Incorrect value, rdata[%u]=%d\n",__LINE__,(unsigned)u,rdata[u]);
TEST_ERROR;
} /* end if */
} /* end if */
else {
if(rdata[u]!=wdata[u]) {
- printf(" Line %d: Incorrect value, wdata[%u]=%d, rdata[%u]=%d\n",__LINE__,(unsigned)u,wdata[u],(unsigned)u,rdata[u]);
+ HDprintf(" Line %d: Incorrect value, wdata[%u]=%d, rdata[%u]=%d\n",__LINE__,(unsigned)u,wdata[u],(unsigned)u,rdata[u]);
TEST_ERROR;
} /* end if */
} /* end else */
@@ -6983,14 +6982,14 @@ test_missing_chunk(hid_t file)
if((i % 10) >= 5 || (j % 10) >= 5) {
if(rdata2[i][j] != 911) {
- printf(" Line %d: Incorrect value, rdata2[%u][%u] = %d\n",
+ HDprintf(" Line %d: Incorrect value, rdata2[%u][%u] = %d\n",
__LINE__,(unsigned)i, (unsigned)j, rdata2[i][j]);
TEST_ERROR;
} /* end if */
} /* end if */
else {
if(rdata2[i][j] != wdata2[i][j]) {
- printf(" Line %d: Incorrect value, wdata2[%u][%u] = %d, rdata2[%u][%u] = %d\n",
+ HDprintf(" Line %d: Incorrect value, wdata2[%u][%u] = %d, rdata2[%u][%u] = %d\n",
__LINE__,(unsigned)i, (unsigned)j, wdata2[i][j],(unsigned)i, (unsigned)j, rdata2[i][j]);
TEST_ERROR;
} /* end if */
@@ -7154,8 +7153,8 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl)
/* Verify that written and read data are the same */
for(i = 0; i < NPOINTS; i++)
if(rbuf[i] != wbuf[i]){
- printf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n",__LINE__,(unsigned)i,wbuf[i],(unsigned)i,rbuf[i]);
- printf(" coord[%u] = {%lu, %lu}\n", (unsigned)i, (unsigned long)coord[i][0], (unsigned long)coord[i][1]);
+ HDprintf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n",__LINE__,(unsigned)i,wbuf[i],(unsigned)i,rbuf[i]);
+ HDprintf(" coord[%u] = {%lu, %lu}\n", (unsigned)i, (unsigned long)coord[i][0], (unsigned long)coord[i][1]);
TEST_ERROR;
} /* end if */
@@ -7261,7 +7260,7 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl)
/* Verify that written and read data are the same */
for(i = 0; i < NPOINTS; i++)
if(rbuf[i] != wbuf[i]){
- printf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n",__LINE__,(unsigned)i,wbuf[i],(unsigned)i,rbuf[i]);
+ HDprintf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n",__LINE__,(unsigned)i,wbuf[i],(unsigned)i,rbuf[i]);
TEST_ERROR;
} /* end if */
@@ -7367,7 +7366,7 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl)
/* Verify that written and read data are the same */
for(i = 0; i < NPOINTS; i++)
if(rbuf[i] != wbuf[i]){
- printf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n",__LINE__,(unsigned)i,wbuf[i],(unsigned)i,rbuf[i]);
+ HDprintf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n",__LINE__,(unsigned)i,wbuf[i],(unsigned)i,rbuf[i]);
TEST_ERROR;
} /* end if */
@@ -7508,7 +7507,7 @@ test_deprec(hid_t file)
} H5E_END_TRY;
if(dataset >= 0) {
H5_FAILED();
- puts(" Library allowed overwrite of existing dataset.");
+ HDputs(" Library allowed overwrite of existing dataset.");
goto error;
}
@@ -7529,7 +7528,7 @@ test_deprec(hid_t file)
} H5E_END_TRY;
if(dataset >= 0) {
H5_FAILED();
- puts(" Opened a non-existent dataset.");
+ HDputs(" Opened a non-existent dataset.");
goto error;
}
@@ -7578,7 +7577,7 @@ test_deprec(hid_t file)
} H5E_END_TRY;
if(dataset >= 0) {
H5_FAILED();
- puts(" Opened a dataset with incorrect chunking parameters.");
+ HDputs(" Opened a dataset with incorrect chunking parameters.");
goto error;
}
@@ -7630,7 +7629,7 @@ test_deprec(hid_t file)
if(H5Zregister(H5Z_DEPREC) < 0) goto error;
if(H5Pset_filter(dcpl, H5Z_FILTER_DEPREC, 0, (size_t)0, NULL) < 0) goto error;
- puts("");
+ HDputs("");
if(test_filter_internal(file,DSET_DEPREC_NAME_FILTER,dcpl,DISABLE_FLETCHER32,DATA_NOT_CORRUPTED,&deprec_size) < 0) goto error;
if(H5Pclose(dcpl) < 0) goto error;
@@ -8130,15 +8129,15 @@ test_big_chunks_bypass_cache(hid_t fapl)
/* Verify data for the first 1-D dataset */
for(i = 0; i < BYPASS_CHUNK_DIM / 2; i++)
if(rdata1[i] != i) {
- printf(" Read different values than written in the 1st chunk.\n");
- printf(" At line %d and index %d, rdata1 = %d. It should be %d.\n", __LINE__, i, rdata1[i], i);
+ HDprintf(" Read different values than written in the 1st chunk.\n");
+ HDprintf(" At line %d and index %d, rdata1 = %d. It should be %d.\n", __LINE__, i, rdata1[i], i);
TEST_ERROR
} /* end if */
for(j = BYPASS_CHUNK_DIM / 2; j < BYPASS_DIM; j++)
if(rdata1[j] != fvalue) {
- printf(" Read different values than written in the 2nd chunk.\n");
- printf(" At line %d and index %d, rdata1 = %d. It should be %d.\n", __LINE__, i, rdata1[i], fvalue);
+ HDprintf(" Read different values than written in the 2nd chunk.\n");
+ HDprintf(" At line %d and index %d, rdata1 = %d. It should be %d.\n", __LINE__, i, rdata1[i], fvalue);
TEST_ERROR
} /* end if */
@@ -8146,8 +8145,8 @@ test_big_chunks_bypass_cache(hid_t fapl)
for(i = 0; i < BYPASS_CHUNK_DIM / 2; i++)
for(j = 0; j < BYPASS_CHUNK_DIM / 2; j++)
if(t_rdata1[i][j] != j) {
- printf(" Read different values than written in the 1st chunk.\n");
- printf(" At line %d and index (%d, %d), t_rdata1 = %d. It should be %d.\n",
+ HDprintf(" Read different values than written in the 1st chunk.\n");
+ HDprintf(" At line %d and index (%d, %d), t_rdata1 = %d. It should be %d.\n",
__LINE__, i, j, t_rdata1[i][j], j);
TEST_ERROR
} /* end if */
@@ -8155,8 +8154,8 @@ test_big_chunks_bypass_cache(hid_t fapl)
for(i = BYPASS_CHUNK_DIM / 2; i < BYPASS_DIM; i++)
for(j = BYPASS_CHUNK_DIM / 2; j < BYPASS_DIM; j++)
if(t_rdata1[i][j] != fvalue) {
- printf(" Read different values than written in the 2nd chunk.\n");
- printf(" At line %d and index (%d, %d), t_rdata1 = %d. It should be %d.\n",
+ HDprintf(" Read different values than written in the 2nd chunk.\n");
+ HDprintf(" At line %d and index (%d, %d), t_rdata1 = %d. It should be %d.\n",
__LINE__, i, j, t_rdata1[i][j], fvalue);
TEST_ERROR
} /* end if */
@@ -8202,8 +8201,8 @@ test_big_chunks_bypass_cache(hid_t fapl)
/* Verify data for the second 1-D dataset */
for(i = 0; i < BYPASS_CHUNK_DIM / 2; i++)
if(rdata2[i] != i) {
- printf(" Read different values than written in the chunk.\n");
- printf(" At line %d and index %d, rdata2 = %d. It should be %d.\n", __LINE__, i, rdata2[i], i);
+ HDprintf(" Read different values than written in the chunk.\n");
+ HDprintf(" At line %d and index %d, rdata2 = %d. It should be %d.\n", __LINE__, i, rdata2[i], i);
TEST_ERROR
} /* end if */
@@ -8211,8 +8210,8 @@ test_big_chunks_bypass_cache(hid_t fapl)
for(i = 0; i < BYPASS_CHUNK_DIM / 2; i++)
for(j = 0; j < BYPASS_CHUNK_DIM / 2; j++)
if(t_rdata2[i][j] != j) {
- printf(" Read different values than written in the chunk.\n");
- printf(" At line %d and index (%d, %d), t_rdata2 = %d. It should be %d.\n",
+ HDprintf(" Read different values than written in the chunk.\n");
+ HDprintf(" At line %d and index (%d, %d), t_rdata2 = %d. It should be %d.\n",
__LINE__, i, j, t_rdata2[i][j], j);
TEST_ERROR
} /* end if */
@@ -8941,7 +8940,7 @@ test_chunk_expand(hid_t fapl)
if(sizeof(size_t) <= 4 && low != H5F_LIBVER_LATEST) {
SKIPPED();
- puts(" Current machine can't test for error w/old file format");
+ HDputs(" Current machine can't test for error w/old file format");
} /* end if */
else {
/* Register "expansion" filter */
@@ -9604,7 +9603,7 @@ test_fixed_array(hid_t fapl)
/* Verify that written and read data are the same */
for(i = 0; i < POINTS; i++)
if(rbuf[i] != wbuf[i]){
- printf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n",
+ HDprintf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n",
__LINE__,(unsigned)i,wbuf[i],(unsigned)i,rbuf[i]);
TEST_ERROR;
} /* end if */
@@ -9632,7 +9631,7 @@ test_fixed_array(hid_t fapl)
/* Verify that written and read data are the same */
for(i = 0; i < POINTS; i++)
if(rbuf[i] != wbuf[i]){
- printf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n",
+ HDprintf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n",
__LINE__,(unsigned)i,wbuf[i],(unsigned)i,rbuf[i]);
TEST_ERROR;
} /* end if */
@@ -9658,7 +9657,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]) {
- printf(" Line %d: Incorrect value, wbuf_bif[%u]=%d, rbuf_big[%u]=%d\n",
+ HDprintf(" 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;
} /* end if */
@@ -9897,7 +9896,7 @@ test_single_chunk(hid_t fapl)
/* Verify that written and read data are the same */
for(i = 0; i < (DSET_DIM1 * DSET_DIM2); i++)
if(rbuf[i] != wbuf[i]){
- printf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n",
+ HDprintf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n",
__LINE__,(unsigned)i,wbuf[i],(unsigned)i,rbuf[i]);
TEST_ERROR;
} /* end if */
@@ -9916,7 +9915,7 @@ test_single_chunk(hid_t fapl)
/* Verify that written and read data are the same */
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",
+ HDprintf(" 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;
} /* end if */
@@ -11518,7 +11517,7 @@ typedef struct scatter_info_t {
for(k=0; k<(int)(sizeof(ARR[0][0])/sizeof(ARR[0][0][0])); k++) \
if(ARR[i][j][k] != EXP[i][j][k]) { \
H5_FAILED(); AT(); \
- printf(" " #ARR "[%d][%d][%d] == %d, " #EXP "[%d][%d][%d] == %d\n", i, j, k, ARR[i][j][k], i, j, k, EXP[i][j][k]); \
+ HDprintf(" " #ARR "[%d][%d][%d] == %d, " #EXP "[%d][%d][%d] == %d\n", i, j, k, ARR[i][j][k], i, j, k, EXP[i][j][k]); \
goto error; \
}
@@ -13079,10 +13078,12 @@ test_object_header_minimization_dcpl(void)
TEST_ERROR
file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- if (0 > file_id) TEST_ERROR
+ if (file_id == H5I_INVALID_HID)
+ TEST_ERROR
dcpl_id = H5Pcreate(H5P_DATASET_CREATE);
- if (0 > dcpl_id) TEST_ERROR
+ if (dcpl_id == H5I_INVALID_HID)
+ TEST_ERROR
/*********/
/* TESTS */
@@ -13249,20 +13250,20 @@ main(void)
my_fapl = fapl2;
if(paged) {
my_fcpl = fcpl2;
- puts("\nTesting with new file format and paged aggregation");
+ HDputs("\nTesting with new file format and paged aggregation");
} else {
my_fcpl = fcpl;
- puts("\nTesting with new file format and non-paged aggregation");
+ HDputs("\nTesting with new file format and non-paged aggregation");
}
} /* end if */
else {
my_fapl = fapl;
if(paged) {
my_fcpl = fcpl2;
- puts("Testing with old file format and paged aggregation:");
+ HDputs("Testing with old file format and paged aggregation:");
} else {
my_fcpl = fcpl;
- puts("Testing with old file format and non-paged aggregation:");
+ HDputs("Testing with old file format and non-paged aggregation:");
}
} /* end else */
@@ -13273,7 +13274,7 @@ main(void)
if (TRUE == minimized_ohdr) {
if (0 > H5Fset_dset_no_attrs_hint(file, TRUE))
goto error;
- puts("(minimized dataset object headers with file setting)");
+ HDputs("(minimized dataset object headers with file setting)");
}
/* Cause the library to emit initial messages */
@@ -13380,7 +13381,7 @@ main(void)
if(nerrors)
goto error;
- printf("All dataset tests passed.\n");
+ HDprintf("All dataset tests passed.\n");
#ifdef H5_HAVE_FILTER_SZIP
if (GetTestCleanup())
HDremove(NOENCODER_COPY_FILENAME);
@@ -13391,7 +13392,7 @@ main(void)
error:
nerrors = MAX(1, nerrors);
- printf("***** %d DATASET TEST%s FAILED! *****\n",
+ HDprintf("***** %d DATASET TEST%s FAILED! *****\n",
nerrors, 1 == nerrors ? "" : "S");
return EXIT_FAILURE;
} /* end main() */
diff --git a/test/error_test.c b/test/error_test.c
index 44f6210..1de9065 100644
--- a/test/error_test.c
+++ b/test/error_test.c
@@ -12,10 +12,10 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* October 14, 2001
*
- * Purpose: Tests the error API routines.
+ * Purpose: Tests the error API routines.
*/
#include "h5test.h"
#include "H5srcdir.h"
@@ -23,7 +23,7 @@
#ifdef H5_USE_16_API
int main(void)
{
- HDfprintf(stderr, "Test skipped because backward compatbility with v1.6 is configured in\n");
+ HDfprintf(stderr, "Test skipped because backward compatibility with v1.6 is configured in\n");
return 0;
}
#else /* H5_USE_16_API */
@@ -38,7 +38,7 @@ const char *FILENAME[] = {
#define DIM0 100
#define DIM1 200
-int ipoints2[DIM0][DIM1], icheck2[DIM0][DIM1];
+int ipoints2[DIM0][DIM1], icheck2[DIM0][DIM1];
hid_t ERR_CLS;
hid_t ERR_CLS2;
@@ -80,7 +80,7 @@ hid_t ERR_MIN_GETNUM;
static herr_t custom_print_cb(unsigned n, const H5E_error2_t *err_desc,
void *client_data);
-
+
/*-------------------------------------------------------------------------
* Function: test_error
*
@@ -94,10 +94,10 @@ static herr_t custom_print_cb(unsigned n, const H5E_error2_t *err_desc,
static herr_t
test_error(hid_t file)
{
- hid_t dataset = -1;
+ hid_t dataset = -1;
hid_t space = -1;
hid_t estack_id = -1;
- hsize_t dims[2];
+ hsize_t dims[2];
const char *FUNC_test_error = "test_error";
H5E_auto2_t old_func;
void *old_data = NULL;
@@ -169,7 +169,7 @@ test_error(hid_t file)
return -1;
} /* end test_error() */
-
+
/*-------------------------------------------------------------------------
* Function: init_error
*
@@ -245,7 +245,7 @@ error:
return -1;
} /* end init_error() */
-
+
/*-------------------------------------------------------------------------
* Function: error_stack
*
@@ -287,7 +287,7 @@ error:
return -1;
} /* end error_stack() */
-
+
/*-------------------------------------------------------------------------
* Function: long_desc_cb
*
@@ -309,7 +309,7 @@ long_desc_cb(unsigned H5_ATTR_UNUSED n, const H5E_error2_t *err_desc, void *clie
return -1;
} /* end long_desc_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: test_long_desc
*
@@ -384,7 +384,7 @@ error:
} /* end test_long_desc() */
#pragma GCC diagnostic pop
-
+
/*-------------------------------------------------------------------------
* Function: dump_error
*
@@ -414,7 +414,7 @@ error:
return -1;
} /* end dump_error() */
-
+
/*-------------------------------------------------------------------------
* Function: custom_print_cb
*
@@ -445,8 +445,8 @@ custom_print_cb(unsigned n, const H5E_error2_t *err_desc, void* client_data)
TEST_ERROR;
HDfprintf(stream, "%*serror #%03d: %s in %s(): line %u\n",
- indent, "", n, err_desc->file_name,
- err_desc->func_name, err_desc->line);
+ indent, "", n, err_desc->file_name,
+ err_desc->func_name, err_desc->line);
HDfprintf(stream, "%*sclass: %s\n", indent * 2, "", cls);
HDfprintf(stream, "%*smajor: %s\n", indent * 2, "", maj);
HDfprintf(stream, "%*sminor: %s\n", indent * 2, "", min);
@@ -457,7 +457,7 @@ error:
return -1;
} /* end custom_print_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: test_create
*
@@ -540,11 +540,11 @@ test_copy(void)
err_num = H5Eget_num(H5E_DEFAULT);
if (err_num != 1)
TEST_ERROR
-
+
/* Copy error stack, which clears the original */
if ((estack_id = H5Eget_current_stack()) < 0)
TEST_ERROR
-
+
/* Check the number of errors on stack copy */
err_num = H5Eget_num(estack_id);
if (err_num != 1)
@@ -564,7 +564,7 @@ test_copy(void)
if (err_num != 1)
TEST_ERROR
- /* Try to close error stack copy. Should fail because
+ /* Try to close error stack copy. Should fail because
* the current H5Eset_current_stack closes the stack to be set.
*/
H5E_BEGIN_TRY {
@@ -579,7 +579,7 @@ error:
return -1;
} /* end test_copy() */
-
+
/*-------------------------------------------------------------------------
* Function: close_error
*
@@ -615,17 +615,17 @@ error:
return -1;
} /* end close_error() */
-
+
/*-------------------------------------------------------------------------
* Function: test_filter_error
*
* Purpose: Make sure the error message prints out the filter name
- * when the existent file is opened but the filter isn't
- * registered. The existent file was created with
- * gen_filters.c.
+ * when the existent file is opened but the filter isn't
+ * registered. The existent file was created with
+ * gen_filters.c.
*
* Return: Success: 0
- * Failure: -1
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -663,7 +663,7 @@ error:
return -1;
} /* end test_filter_error() */
-
+
/*-------------------------------------------------------------------------
* Function: main
*
@@ -745,7 +745,7 @@ main(void)
if (close_error() < 0)
TEST_ERROR;
- /* Test error message during data reading when filter isn't registered
+ /* Test error message during data reading when filter isn't registered
* Use default FAPL to avoid some VFD drivers by the check-vfd test because
* the test file was pre-generated.
*/
diff --git a/test/flush2.c b/test/flush2.c
index 8ebfb75..0f15903 100644
--- a/test/flush2.c
+++ b/test/flush2.c
@@ -15,10 +15,10 @@
* Programmer: Robb Matzke <matzke@llnl.gov>
* Friday, October 23, 1998
*
- * Purpose: This is the second half of a two-part test that makes sure
- * that a file can be read after an application crashes as long
- * as the file was flushed first. This half tries to read the
- * file created by the first half.
+ * Purpose: This is the second half of a two-part test that makes sure
+ * that a file can be read after an application crashes as long
+ * as the file was flushed first. This half tries to read the
+ * file created by the first half.
*/
#include "h5test.h"
diff --git a/test/gheap.c b/test/gheap.c
index 5b51c0e..09ba1cf 100644
--- a/test/gheap.c
+++ b/test/gheap.c
@@ -57,7 +57,7 @@ const char *FILENAME[] = {
NULL
};
-
+
/*-------------------------------------------------------------------------
* Function: test_1
*
@@ -68,7 +68,7 @@ const char *FILENAME[] = {
*
* Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Tuesday, March 31, 1998
*
*-------------------------------------------------------------------------
@@ -165,7 +165,7 @@ error:
return MAX(1, nerrors);
}
-
+
/*-------------------------------------------------------------------------
* Function: test_2
*
@@ -176,7 +176,7 @@ error:
*
* Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Tuesday, March 31, 1998
*
*-------------------------------------------------------------------------
@@ -264,7 +264,7 @@ test_2 (hid_t fapl)
return MAX(1, nerrors);
}
-
+
/*-------------------------------------------------------------------------
* Function: test_3
*
@@ -275,7 +275,7 @@ test_2 (hid_t fapl)
*
* Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Tuesday, March 31, 1998
*
*-------------------------------------------------------------------------
@@ -353,7 +353,7 @@ test_3 (hid_t fapl)
return MAX(1, nerrors);
}
-
+
/*-------------------------------------------------------------------------
* Function: test_4
*
@@ -365,7 +365,7 @@ test_3 (hid_t fapl)
*
* Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Tuesday, March 31, 1998
*
*-------------------------------------------------------------------------
@@ -448,7 +448,7 @@ test_4 (hid_t fapl)
return MAX(1, nerrors);
}
-
+
/*-------------------------------------------------------------------------
* Function: test_ooo_indices
*
@@ -461,7 +461,7 @@ test_4 (hid_t fapl)
*
* Failure: number of errors
*
- * Programmer: Neil Fortner
+ * Programmer: Neil Fortner
* Monday, October 26, 2009
*
*-------------------------------------------------------------------------
@@ -566,7 +566,7 @@ test_ooo_indices(hid_t fapl)
return MAX(1, nerrors);
} /* end test_ooo_indices */
-
+
/*-------------------------------------------------------------------------
* Function: main
*
@@ -579,8 +579,8 @@ test_ooo_indices(hid_t fapl)
int
main (void)
{
- int nerrors = 0;
- hid_t fapl_id = H5I_INVALID_HID;
+ int nerrors = 0;
+ hid_t fapl_id = H5I_INVALID_HID;
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
h5_reset();
diff --git a/test/h5test.c b/test/h5test.c
index d83c6e7..707c436 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -110,7 +110,6 @@ const char *LIBVER_NAMES[] = {
NULL
};
-
/* Previous error reporting function */
static H5E_auto2_t err_func = NULL;
@@ -1983,7 +1982,6 @@ error:
return NULL;
} /* h5_get_dummy_vfd_class */
-
/*-------------------------------------------------------------------------
* Function: h5_get_dummy_vol_class()
*
diff --git a/test/mf.c b/test/mf.c
index 8c17df5..fe98000 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -6916,7 +6916,6 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
H5FD_mem_t fs_type;
hbool_t contig_addr_vfd;
-
if(new_format)
TESTING("File's free-space is going away with new library format")
else