summaryrefslogtreecommitdiffstats
path: root/hl/test
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-08-24 19:07:19 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-08-24 19:07:33 (GMT)
commitba974c031deb709b6d4241da95485b48d747afdd (patch)
treeb580cd124bf1e663e9b4b0db4db2690cc206f2d4 /hl/test
parent884ad149e29f7c99487af676f0bbcd88cbf2735f (diff)
downloadhdf5-ba974c031deb709b6d4241da95485b48d747afdd.zip
hdf5-ba974c031deb709b6d4241da95485b48d747afdd.tar.gz
hdf5-ba974c031deb709b6d4241da95485b48d747afdd.tar.bz2
OESS-29 Update HD prefix mostly
Diffstat (limited to 'hl/test')
-rw-r--r--hl/test/gen_test_ds.c12
-rw-r--r--hl/test/test_ds.c36
-rw-r--r--hl/test/test_file_image.c6
-rw-r--r--hl/test/test_image.c34
-rw-r--r--hl/test/test_packet_vlen.c78
5 files changed, 83 insertions, 83 deletions
diff --git a/hl/test/gen_test_ds.c b/hl/test/gen_test_ds.c
index 273e393..285ab77 100644
--- a/hl/test/gen_test_ds.c
+++ b/hl/test/gen_test_ds.c
@@ -79,12 +79,12 @@ int main(int argc , char **argv)
if (argc < 2) {
- printf("Usage: gen_test [le | be]\n");
+ HDprintf("Usage: gen_test [le | be]\n");
return 1;
}
if ( argv[1] && (strcmp("le",argv[1])!=0) && (strcmp("be",argv[1])!=0) ) {
- printf("Usage: gen_test [le | be]\n");
+ HDprintf("Usage: gen_test [le | be]\n");
return 1;
}
@@ -103,11 +103,11 @@ int main(int argc , char **argv)
nerrors += test_long_scalenames(filename) < 0 ? 1 : 0;
if(nerrors) goto error;
- printf("Dimension scales file generation passed.\n");
+ HDprintf("Dimension scales file generation passed.\n");
return 0;
error:
- printf("***** %d DIMENSION SCALES FILE GENERATION FAILED! *****\n",nerrors);
+ HDprintf("***** %d DIMENSION SCALES FILE GENERATION FAILED! *****\n",nerrors);
return 1;
}
@@ -188,11 +188,11 @@ herr_t test_attach_scale(hid_t fid, hid_t did, const char *name, unsigned int id
if(H5DSis_attached(did, dsid, idx) == 0) {
if(H5DSattach_scale(did, dsid, idx) >= 0) {
if(H5DSis_attached(did, dsid, idx) > 0) {
- /* printf(" scale attached "); */
+ /* HDprintf(" scale attached "); */
ret_value = SUCCEED;
}
else if(H5DSis_attached(did, dsid, idx) == 0) {
- printf(" scale not attached ");
+ HDprintf(" scale not attached ");
}
}
}
diff --git a/hl/test/test_ds.c b/hl/test/test_ds.c
index 9389a0d..79e6f45 100644
--- a/hl/test/test_ds.c
+++ b/hl/test/test_ds.c
@@ -1049,7 +1049,7 @@ herr_t test_attach_scale(hid_t fid, hid_t did, const char *name, unsigned int id
ret_value = SUCCEED;
}
else if(H5DSis_attached(did, dsid, idx) == 0) {
- printf(" scale not attached ");
+ HDprintf(" scale not attached ");
}
}
}
@@ -1153,14 +1153,14 @@ static int test_detachscales(void)
/* make datasets; they are three dimensional*/
for (i=0; i < 2; i++) {
- sprintf(dname,"D%d", i);
+ HDsprintf(dname,"D%d", i);
if(H5LTmake_dataset_int(fid, dname, rank3, dims, buf) < 0)
goto out;
}
/* create datasets and make them dim. scales */
for (i=0; i < 4; i++) {
- sprintf(dname, "DS%d", i);
+ HDsprintf(dname, "DS%d", i);
if(H5LTmake_dataset_int(fid, dname, rank1, dims, buf) < 0)
goto out;
}
@@ -2255,7 +2255,7 @@ static int test_simple(void)
char snames[3];
int i, j;
- printf("Testing API functions\n");
+ HDprintf("Testing API functions\n");
/*-------------------------------------------------------------------------
* create a file for the test
@@ -2919,7 +2919,7 @@ static int test_simple(void)
if((did = H5Dopen2(gid, dname, H5P_DEFAULT)) < 0)
goto out;
for(j = 0; j < 5; j++) {
- sprintf(sname, "ds_%d", j);
+ HDsprintf(sname, "ds_%d", j);
if((dsid = H5Dopen2(gid, sname, H5P_DEFAULT)) < 0)
goto out;
if(H5DSdetach_scale(did, dsid, DIM0) < 0)
@@ -2942,7 +2942,7 @@ static int test_simple(void)
if((did = H5Dopen2(gid,dname, H5P_DEFAULT)) < 0)
goto out;
for(j=0; j<5; j++) {
- sprintf(sname,"ds_%d",j);
+ HDsprintf(sname,"ds_%d",j);
if((dsid = H5Dopen2(gid,sname, H5P_DEFAULT)) < 0)
goto out;
if(H5DSattach_scale(did,dsid,DIM0) < 0)
@@ -3740,7 +3740,7 @@ static int test_errors(void)
hid_t sidds = -1; /* space ID */
hsize_t pal_dims[] = {9,3};
- printf("Testing error conditions\n");
+ HDprintf("Testing error conditions\n");
/*-------------------------------------------------------------------------
* create a file, spaces, dataset and group ids
@@ -4119,7 +4119,7 @@ static int test_iterators(void)
char dname[30]; /* dataset name */
int i;
- printf("Testing iterators\n");
+ HDprintf("Testing iterators\n");
/*-------------------------------------------------------------------------
* create a file, spaces, dataset and group ids
@@ -4198,7 +4198,7 @@ static int test_iterators(void)
for(i=0; i<100; i++) {
/* make a DS */
- sprintf(dname,"ds_%d",i);
+ HDsprintf(dname,"ds_%d",i);
if(H5LTmake_dataset_int(fid,dname,rankds,s1_dim,NULL) < 0)
goto out;
/* open */
@@ -4311,7 +4311,7 @@ static int test_rank(void)
float buff[1]={1};
int i;
- printf("Testing ranks\n");
+ HDprintf("Testing ranks\n");
/*-------------------------------------------------------------------------
* create a file, a dataset, scales
@@ -4349,7 +4349,7 @@ static int test_rank(void)
goto out;
for(i=0; i<3; i++) {
- sprintf(name,"ds_a_%d",i);
+ HDsprintf(name,"ds_a_%d",i);
if((dsid = H5Dopen2(fid,name, H5P_DEFAULT)) < 0)
goto out;
if(H5DSattach_scale(did,dsid,(unsigned)i) < 0)
@@ -4377,7 +4377,7 @@ static int test_rank(void)
goto out;
for(i=0; i<3; i++) {
- sprintf(name,"ds_a_%d",i);
+ HDsprintf(name,"ds_a_%d",i);
if((dsid = H5Dopen2(fid,name, H5P_DEFAULT)) < 0)
goto out;
if(H5DSdetach_scale(did,dsid,(unsigned)i) < 0)
@@ -4403,7 +4403,7 @@ static int test_rank(void)
goto out;
for(i=0; i<3; i++) {
- sprintf(name,"ds_a_%d",i);
+ HDsprintf(name,"ds_a_%d",i);
if((dsid = H5Dopen2(fid,name, H5P_DEFAULT)) < 0)
goto out;
if(H5DSset_scale(dsid,name) < 0)
@@ -4517,7 +4517,7 @@ static int test_types(void)
const char *s1_str = "ABC";
const char *s2_str = "ABCD";
- printf("Testing scales with several datatypes\n");
+ HDprintf("Testing scales with several datatypes\n");
/*-------------------------------------------------------------------------
* create a file for the test
@@ -4694,7 +4694,7 @@ static int test_data(void)
float fill=-99; /* fill value */
- printf("Testing reading ASCII data and generate HDF5 data with scales\n");
+ HDprintf("Testing reading ASCII data and generate HDF5 data with scales\n");
/*-------------------------------------------------------------------------
* create a file for the test
@@ -4870,7 +4870,7 @@ static int read_data( const char* fname,
/* read first data file */
f = HDfopen(data_file, "r");
if( f == NULL ) {
- printf( "Could not open file %s\n", data_file );
+ HDprintf( "Could not open file %s\n", data_file );
return -1;
}
@@ -4892,7 +4892,7 @@ static int read_data( const char* fname,
*buf = (float*) HDmalloc (nelms * sizeof( float ));
if ( *buf == NULL ) {
- printf( "memory allocation failed\n" );
+ HDprintf( "memory allocation failed\n" );
HDfclose(f);
return -1;
}
@@ -4930,7 +4930,7 @@ static int test_errors2(void)
int nscales; /* number of scales in DIM */
int count; /* visitor data */
- printf("Testing parameter errors\n");
+ HDprintf("Testing parameter errors\n");
/*-------------------------------------------------------------------------
* create a file, a dataset, scales
diff --git a/hl/test/test_file_image.c b/hl/test/test_file_image.c
index 6cf39e8..fd2d0d2 100644
--- a/hl/test/test_file_image.c
+++ b/hl/test/test_file_image.c
@@ -112,7 +112,7 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags)
filename[i] = (char *)HDmalloc(sizeof(char) * 32);
/* create file name */
- sprintf(filename[i], "image_file%d.h5", (int)i);
+ HDsprintf(filename[i], "image_file%d.h5", (int)i);
/* create file */
if ((file_id[i] = H5Fcreate(filename[i], H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -536,11 +536,11 @@ int main( void )
nerrors += test_file_image(open_images, nflags, flags) < 0? 1 : 0;
if (nerrors) goto error;
- printf("File image tests passed.\n");
+ HDprintf("File image tests passed.\n");
return 0;
error:
- printf("***** %d IMAGE TEST%s FAILED! *****\n",nerrors, 1 == nerrors ? "" : "S");
+ HDprintf("***** %d IMAGE TEST%s FAILED! *****\n",nerrors, 1 == nerrors ? "" : "S");
return 1;
}
diff --git a/hl/test/test_image.c b/hl/test/test_image.c
index e350533..6d13419 100644
--- a/hl/test/test_image.c
+++ b/hl/test/test_image.c
@@ -75,11 +75,11 @@ int main(void)
nerrors += test_generate()<0 ?1:0;
if (nerrors) goto error;
- printf("All image tests passed.\n");
+ HDprintf("All image tests passed.\n");
return 0;
error:
- printf("***** %d IMAGE TEST%s FAILED! *****\n",nerrors, 1 == nerrors ? "" : "S");
+ HDprintf("***** %d IMAGE TEST%s FAILED! *****\n",nerrors, 1 == nerrors ? "" : "S");
return 1;
}
@@ -344,7 +344,7 @@ static int test_data(void)
if ((fid=H5Fcreate(FILE2,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
goto out;
- printf("Testing read ascii image data and generate images\n");
+ HDprintf("Testing read ascii image data and generate images\n");
/*-------------------------------------------------------------------------
* read 8bit image data
@@ -551,7 +551,7 @@ static int test_generate(void)
if ((fid=H5Fcreate(FILE3,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
goto out;
- printf("Testing read and process data and make indexed images\n");
+ HDprintf("Testing read and process data and make indexed images\n");
/*-------------------------------------------------------------------------
* read data; the file data format is described below
@@ -561,7 +561,7 @@ static int test_generate(void)
f = HDfopen( data_file, "r" ) ;
if ( f == NULL )
{
- printf( "Could not find file %s. Try set $srcdir \n", data_file );
+ HDprintf( "Could not find file %s. Try set $srcdir \n", data_file );
goto out;
}
@@ -602,11 +602,11 @@ static int test_generate(void)
if(fscanf( f, "%d %d %d", &imax, &jmax, &kmax ) < 0 && HDferror(f)) {
- printf( "fscanf error in file %s.\n", data_file );
+ HDprintf( "fscanf error in file %s.\n", data_file );
goto out;
} /* end if */
if(fscanf( f, "%f %f %f", &valex, &xmin, &xmax ) < 0 && HDferror(f)) {
- printf( "fscanf error in file %s.\n", data_file );
+ HDprintf( "fscanf error in file %s.\n", data_file );
goto out;
} /* end if */
@@ -638,7 +638,7 @@ static int test_generate(void)
for ( i = 0; i < n_elements; i++ )
{
if(fscanf( f, "%f ", &value ) < 0 && HDferror(f)) {
- printf( "fscanf error in file %s.\n", data_file );
+ HDprintf( "fscanf error in file %s.\n", data_file );
goto out;
} /* end if */
data[i] = value;
@@ -797,37 +797,37 @@ static int read_data(const char* fname, /*IN*/
*/
if(NULL == (f = HDfopen(data_file, "r"))) {
- printf( "Could not open file %s. Try set $srcdir \n", data_file );
+ HDprintf( "Could not open file %s. Try set $srcdir \n", data_file );
goto out;
}
if(fscanf(f, "%s", str) < 0 && HDferror(f)) {
- printf( "fscanf error in file %s.\n", data_file );
+ HDprintf( "fscanf error in file %s.\n", data_file );
goto out;
} /* end if */
if(fscanf(f, "%d", &color_planes) < 0 && HDferror(f)) {
- printf( "fscanf error in file %s.\n", data_file );
+ HDprintf( "fscanf error in file %s.\n", data_file );
goto out;
} /* end if */
if(fscanf(f, "%s", str) < 0 && HDferror(f)) {
- printf( "fscanf error in file %s.\n", data_file );
+ HDprintf( "fscanf error in file %s.\n", data_file );
goto out;
} /* end if */
if(fscanf(f, "%d", &h) < 0 && HDferror(f)) {
- printf( "fscanf error in file %s.\n", data_file );
+ HDprintf( "fscanf error in file %s.\n", data_file );
goto out;
} /* end if */
if(fscanf(f, "%s", str) < 0 && HDferror(f)) {
- printf( "fscanf error in file %s.\n", data_file );
+ HDprintf( "fscanf error in file %s.\n", data_file );
goto out;
} /* end if */
if(fscanf(f, "%d", &w) < 0 && HDferror(f)) {
- printf( "fscanf error in file %s.\n", data_file );
+ HDprintf( "fscanf error in file %s.\n", data_file );
goto out;
} /* end if */
@@ -861,7 +861,7 @@ static int read_data(const char* fname, /*IN*/
/* Read data elements */
for(i = 0; i < n_elements; i++) {
if(fscanf(f, "%d", &n) < 0 && HDferror(f)) {
- printf( "fscanf error in file %s.\n", data_file );
+ HDprintf( "fscanf error in file %s.\n", data_file );
goto out;
} /* end if */
image_data[i] = (unsigned char)n;
@@ -917,7 +917,7 @@ static int read_palette(const char* fname,
/* open the input file */
if (!(file = HDfopen(data_file, "r")))
{
- printf( "Could not open file %s. Try set $srcdir \n", data_file );
+ HDprintf( "Could not open file %s. Try set $srcdir \n", data_file );
return -1;
}
diff --git a/hl/test/test_packet_vlen.c b/hl/test/test_packet_vlen.c
index 4d83ae6..b41e73d 100644
--- a/hl/test/test_packet_vlen.c
+++ b/hl/test/test_packet_vlen.c
@@ -69,7 +69,7 @@ static int test_VLof_atomic(void)
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(unsigned int));
if (writeBuf[uu].p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
writeBuf[uu].len = uu + 1;
@@ -108,7 +108,7 @@ static int test_VLof_atomic(void)
if (ret < 0)
goto error;
- sprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
+ HDsprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
@@ -120,8 +120,8 @@ static int test_VLof_atomic(void)
for (vv = 0; vv < (uu + 1); vv++)
{
if (((unsigned int *)readBuf[uu].p)[vv] != ((unsigned int *)writeBuf[uu].p)[vv]) {
- printf("Packet %u's value should be %d\n", uu, ((unsigned int *)writeBuf[uu].p)[vv]);
- printf("Packet %u's value in readBuf is %d\n", uu, ((unsigned int *)readBuf[uu].p)[vv]);
+ HDprintf("Packet %u's value should be %d\n", uu, ((unsigned int *)writeBuf[uu].p)[vv]);
+ HDprintf("Packet %u's value in readBuf is %d\n", uu, ((unsigned int *)readBuf[uu].p)[vv]);
}
}
@@ -186,7 +186,7 @@ static int test_VLof_comptype(void)
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(VLcomp_t));
if(writeBuf[uu].p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
writeBuf[uu].len = uu + 1;
@@ -242,7 +242,7 @@ static int test_VLof_comptype(void)
if (ret < 0)
goto error;
- sprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
+ HDsprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
@@ -253,13 +253,13 @@ static int test_VLof_comptype(void)
/* Compare data read in */
for (uu = 0; uu < NRECORDS; uu++) {
if (writeBuf[uu].len != readBuf[uu].len) {
- fprintf(stderr, "%d: VL data length don't match!, writeBuf[%u].len=%d, readBuf[%u].len=%d\n", __LINE__, uu, (int)writeBuf[uu].len, uu, (int)readBuf[uu].len);
+ HDfprintf(stderr, "%d: VL data length don't match!, writeBuf[%u].len=%d, readBuf[%u].len=%d\n", __LINE__, uu, (int)writeBuf[uu].len, uu, (int)readBuf[uu].len);
continue;
} /* write len != read len */
for (vv = 0; vv < (uu + 1); vv++) {
if (((unsigned int *)writeBuf[uu].p)[vv] != ((unsigned int *)readBuf[uu].p)[vv] ) {
- fprintf(stderr, "VL data values don't match!, writeBuf[uu].p[%d]=%d, readBuf[uu].p[%d]=%d\n", vv, (int)((unsigned int *)writeBuf[uu].p)[vv], vv, (int)((unsigned int *)readBuf[uu].p)[vv]);
+ HDfprintf(stderr, "VL data values don't match!, writeBuf[uu].p[%d]=%d, readBuf[uu].p[%d]=%d\n", vv, (int)((unsigned int *)writeBuf[uu].p)[vv], vv, (int)((unsigned int *)readBuf[uu].p)[vv]);
continue;
} /* write value != read value */
}
@@ -334,7 +334,7 @@ static int test_compound_VL_VLtype(void)
writeBuf[uu].f = (float)(uu * 20) / 3.0F;
writeBuf[uu].v.p = HDmalloc((uu + L1_INCM) * sizeof(hvl_t));
if (writeBuf[uu].v.p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
writeBuf[uu].v.len = uu + L1_INCM;
@@ -342,7 +342,7 @@ static int test_compound_VL_VLtype(void)
{
t1->p = HDmalloc((vv + L2_INCM) * sizeof(unsigned int));
if (t1->p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
t1->len = vv + L2_INCM;
@@ -407,7 +407,7 @@ static int test_compound_VL_VLtype(void)
if (ret < 0)
goto error;
- sprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
+ HDsprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
@@ -418,27 +418,27 @@ static int test_compound_VL_VLtype(void)
/* Compare data read in */
for (uu = 0; uu < NRECORDS; uu++) {
if (writeBuf[uu].u != readBuf[uu].u) {
- fprintf(stderr, "Integer components don't match!, writeBuf[%u].u=%u, readBuf[%u].u=%u\n", uu, writeBuf[uu].u, uu, readBuf[uu].u);
+ HDfprintf(stderr, "Integer components don't match!, writeBuf[%u].u=%u, readBuf[%u].u=%u\n", uu, writeBuf[uu].u, uu, readBuf[uu].u);
continue;
} /* end if */
if (!H5_FLT_ABS_EQUAL(writeBuf[uu].f,readBuf[uu].f)) {
- fprintf(stderr, "Float components don't match!, writeBuf[%u].f=%f, readBuf[%u].f=%f\n", uu, (double)writeBuf[uu].f, uu, (double)readBuf[uu].f);
+ HDfprintf(stderr, "Float components don't match!, writeBuf[%u].f=%f, readBuf[%u].f=%f\n", uu, (double)writeBuf[uu].f, uu, (double)readBuf[uu].f);
continue;
} /* end if */
if (writeBuf[uu].v.len != readBuf[uu].v.len) {
- fprintf(stderr, "%d: VL data length don't match!, writeBuf[%d].v.len=%zu, readBuf[%d].v.len=%zu\n", __LINE__, uu, writeBuf[uu].v.len, uu, readBuf[uu].v.len);
+ HDfprintf(stderr, "%d: VL data length don't match!, writeBuf[%d].v.len=%zu, readBuf[%d].v.len=%zu\n", __LINE__, uu, writeBuf[uu].v.len, uu, readBuf[uu].v.len);
continue;
} /* end if */
for (t1 = (hvl_t *)(writeBuf[uu].v.p), t2 = (hvl_t *)(readBuf[uu].v.p), vv = 0; (size_t)vv < readBuf[uu].v.len; vv++, t1++, t2++) {
if (t1->len != t2->len) {
- fprintf(stderr, "%d: VL data length don't match!, uu=%u, vv=%u, t1->len=%zu, t2->len=%zu\n", __LINE__, uu, vv, t1->len, t2->len);
+ HDfprintf(stderr, "%d: VL data length don't match!, uu=%u, vv=%u, t1->len=%zu, t2->len=%zu\n", __LINE__, uu, vv, t1->len, t2->len);
continue;
} /* end if */
for (ww = 0; (size_t)ww < t2->len; ww++) {
if (((unsigned int *)t1->p)[ww] != ((unsigned int *)t2->p)[ww] ) {
- fprintf(stderr, "VL data values don't match!, t1->p[%u]=%u, t2->p[%u]=%u\n", ww, ((unsigned int *)t1->p)[ww], ww, ((unsigned int *)t2->p)[ww]);
+ HDfprintf(stderr, "VL data values don't match!, t1->p[%u]=%u, t2->p[%u]=%u\n", ww, ((unsigned int *)t1->p)[ww], ww, ((unsigned int *)t2->p)[ww]);
continue;
} /* end if */
} /* end for */
@@ -505,7 +505,7 @@ static int test_VLof_VLtype(void)
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(hvl_t));
if (writeBuf[uu].p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
} /* end if */
writeBuf[uu].len = uu + 1;
@@ -513,7 +513,7 @@ static int test_VLof_VLtype(void)
{
t1->p = HDmalloc((vv + 1) * sizeof(unsigned int));
if (t1->p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
t1->len = vv * 1;
@@ -559,7 +559,7 @@ static int test_VLof_VLtype(void)
if (ret < 0)
goto error;
- sprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
+ HDsprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
@@ -628,7 +628,7 @@ static int verify_ptlengthtype(hid_t fid, const char *table_name, herr_t expecte
HDstrcpy(lenthtype, "fixed-length");
if (expected_value == 1)
HDstrcpy(lenthtype, "variable-length");
- fprintf(stderr, "\nPacket table '%s' should be %s but is not\n", table_name, lenthtype);
+ HDfprintf(stderr, "\nPacket table '%s' should be %s but is not\n", table_name, lenthtype);
ret = FAIL;
}
@@ -1062,7 +1062,7 @@ static int testfl_VLof_atomic(void)
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(unsigned int));
if (writeBuf[uu].p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
writeBuf[uu].len = uu + 1;
@@ -1101,7 +1101,7 @@ static int testfl_VLof_atomic(void)
if (ret < 0)
goto error;
- sprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
+ HDsprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
@@ -1113,8 +1113,8 @@ static int testfl_VLof_atomic(void)
for (vv = 0; vv < (uu + 1); vv++)
{
if (((unsigned int *)readBuf[uu].p)[vv] != ((unsigned int *)writeBuf[uu].p)[vv]) {
- printf("Packet %d's value should be %d\n", uu, ((unsigned int *)writeBuf[uu].p)[vv]);
- printf("Packet %d's value in readBuf is %d\n", uu, ((unsigned int *)readBuf[uu].p)[vv]);
+ HDprintf("Packet %d's value should be %d\n", uu, ((unsigned int *)writeBuf[uu].p)[vv]);
+ HDprintf("Packet %d's value in readBuf is %d\n", uu, ((unsigned int *)readBuf[uu].p)[vv]);
}
}
@@ -1179,7 +1179,7 @@ static int testfl_VLof_comptype(void)
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(VLcomp_t));
if(writeBuf[uu].p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
writeBuf[uu].len = uu + 1;
@@ -1235,7 +1235,7 @@ static int testfl_VLof_comptype(void)
if (ret < 0)
goto error;
- sprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
+ HDsprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
@@ -1246,13 +1246,13 @@ static int testfl_VLof_comptype(void)
/* Compare data read in */
for (uu = 0; uu < NRECORDS; uu++) {
if (writeBuf[uu].len != readBuf[uu].len) {
- fprintf(stderr, "%d: VL data length don't match!, writeBuf[%u].len=%zu, readBuf[%u].len=%zu\n",__LINE__, uu, writeBuf[uu].len, uu, readBuf[uu].len);
+ HDfprintf(stderr, "%d: VL data length don't match!, writeBuf[%u].len=%zu, readBuf[%u].len=%zu\n",__LINE__, uu, writeBuf[uu].len, uu, readBuf[uu].len);
continue;
} /* write len != read len */
for (vv = 0; vv < (uu + 1); vv++) {
if (((unsigned int *)writeBuf[uu].p)[vv] != ((unsigned int *)readBuf[uu].p)[vv] ) {
- fprintf(stderr, "VL data values don't match!, writeBuf[uu].p[%u]=%u, readBuf[uu].p[%u]=%u\n", vv, ((unsigned int *)writeBuf[uu].p)[vv], vv, ((unsigned int *)readBuf[uu].p)[vv]);
+ HDfprintf(stderr, "VL data values don't match!, writeBuf[uu].p[%u]=%u, readBuf[uu].p[%u]=%u\n", vv, ((unsigned int *)writeBuf[uu].p)[vv], vv, ((unsigned int *)readBuf[uu].p)[vv]);
continue;
} /* write value != read value */
}
@@ -1327,7 +1327,7 @@ static int testfl_compound_VL_VLtype(void)
writeBuf[uu].f = (float)(uu * 20) / 3.0F;
writeBuf[uu].v.p = HDmalloc((uu + L1_INCM) * sizeof(hvl_t));
if (writeBuf[uu].v.p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
writeBuf[uu].v.len = uu + L1_INCM;
@@ -1335,7 +1335,7 @@ static int testfl_compound_VL_VLtype(void)
{
t1->p = HDmalloc((vv + L2_INCM) * sizeof(unsigned int));
if (t1->p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
t1->len = vv + L2_INCM;
@@ -1400,7 +1400,7 @@ static int testfl_compound_VL_VLtype(void)
if (ret < 0)
goto error;
- sprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
+ HDsprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
@@ -1411,27 +1411,27 @@ static int testfl_compound_VL_VLtype(void)
/* Compare data read in */
for (uu = 0; uu < NRECORDS; uu++) {
if (writeBuf[uu].u != readBuf[uu].u) {
- fprintf(stderr, "Integer components don't match!, writeBuf[%u].u=%u, readBuf[%u].u=%u\n", uu, writeBuf[uu].u, uu, readBuf[uu].u);
+ HDfprintf(stderr, "Integer components don't match!, writeBuf[%u].u=%u, readBuf[%u].u=%u\n", uu, writeBuf[uu].u, uu, readBuf[uu].u);
continue;
} /* end if */
if (!H5_FLT_ABS_EQUAL(writeBuf[uu].f, readBuf[uu].f)) {
- fprintf(stderr, "Float components don't match!, writeBuf[%u].f=%f, readBuf[%u].f=%f\n", uu, (double)writeBuf[uu].f, uu, (double)readBuf[uu].f);
+ HDfprintf(stderr, "Float components don't match!, writeBuf[%u].f=%f, readBuf[%u].f=%f\n", uu, (double)writeBuf[uu].f, uu, (double)readBuf[uu].f);
continue;
} /* end if */
if (writeBuf[uu].v.len != readBuf[uu].v.len) {
- fprintf(stderr, "%d: VL data length don't match!, writeBuf[%u].v.len=%zu, readBuf[%u].v.len=%zu\n", __LINE__, uu, writeBuf[uu].v.len, uu, readBuf[uu].v.len);
+ HDfprintf(stderr, "%d: VL data length don't match!, writeBuf[%u].v.len=%zu, readBuf[%u].v.len=%zu\n", __LINE__, uu, writeBuf[uu].v.len, uu, readBuf[uu].v.len);
continue;
} /* end if */
for (t1 = (hvl_t *)(writeBuf[uu].v.p), t2 = (hvl_t *)(readBuf[uu].v.p), vv = 0; (size_t)vv < readBuf[uu].v.len; vv++, t1++, t2++) {
if (t1->len != t2->len) {
- fprintf(stderr, "%d: VL data length don't match!, uu=%u, vv=%u, t1->len=%zu, t2->len=%zu\n", __LINE__, uu, vv, t1->len, t2->len);
+ HDfprintf(stderr, "%d: VL data length don't match!, uu=%u, vv=%u, t1->len=%zu, t2->len=%zu\n", __LINE__, uu, vv, t1->len, t2->len);
continue;
} /* end if */
for (ww = 0; (size_t)ww < t2->len; ww++) {
if (((unsigned int *)t1->p)[ww] != ((unsigned int *)t2->p)[ww] ) {
- fprintf(stderr, "VL data values don't match!, t1->p[%u]=%u, t2->p[%u]=%u\n", ww, ((unsigned int *)t1->p)[ww], ww, ((unsigned int *)t2->p)[ww]);
+ HDfprintf(stderr, "VL data values don't match!, t1->p[%u]=%u, t2->p[%u]=%u\n", ww, ((unsigned int *)t1->p)[ww], ww, ((unsigned int *)t2->p)[ww]);
continue;
} /* end if */
} /* end for */
@@ -1498,7 +1498,7 @@ static int testfl_VLof_VLtype(void)
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(hvl_t));
if (writeBuf[uu].p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
} /* end if */
writeBuf[uu].len = uu + 1;
@@ -1506,7 +1506,7 @@ static int testfl_VLof_VLtype(void)
{
t1->p = HDmalloc((vv + 1) * sizeof(unsigned int));
if (t1->p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
t1->len = vv + 1;
@@ -1552,7 +1552,7 @@ static int testfl_VLof_VLtype(void)
if (ret < 0)
goto error;
- sprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
+ HDsprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */