summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/big.c2
-rw-r--r--test/bittests.c80
-rw-r--r--test/cmpd_dset.c30
-rw-r--r--test/dsets.c24
-rw-r--r--test/dtypes.c118
-rw-r--r--test/enum.c6
-rw-r--r--test/extend.c2
-rw-r--r--test/external.c30
-rw-r--r--test/fillval.c24
-rw-r--r--test/flush2.c2
-rw-r--r--test/gheap.c30
-rw-r--r--test/h5test.c2
-rw-r--r--test/h5test.h8
-rw-r--r--test/istore.c24
-rw-r--r--test/lheap.c12
-rw-r--r--test/links.c22
-rw-r--r--test/mount.c30
-rw-r--r--test/mtime.c4
-rw-r--r--test/ohdr.c48
-rw-r--r--test/stab.c2
-rw-r--r--test/unlink.c2
21 files changed, 251 insertions, 251 deletions
diff --git a/test/big.c b/test/big.c
index e123a3d..0cc1f12 100644
--- a/test/big.c
+++ b/test/big.c
@@ -311,7 +311,7 @@ reader (hid_t fapl)
else if (buf[j]!=i+1) wrong++;
}
if (zero) {
- FAILED();
+ H5_FAILED();
printf(" %d zero%s\n", zero, 1==zero?"":"s");
} else if (wrong) {
SKIPPED();
diff --git a/test/bittests.c b/test/bittests.c
index 2c8daef..a8b8471 100644
--- a/test/bittests.c
+++ b/test/bittests.c
@@ -46,13 +46,13 @@ test_find (void)
memset (v1, 0xaa, sizeof v1);
n = H5T_bit_find (v1, 0, 0, H5T_BIT_LSB, TRUE);
if (-1!=n) {
- FAILED();
+ H5_FAILED();
puts (" Zero length test failed (lsb)!");
goto failed;
}
n = H5T_bit_find (v1, 0, 0, H5T_BIT_MSB, TRUE);
if (-1!=n) {
- FAILED();
+ H5_FAILED();
puts (" Zero length test failed (msb)!");
goto failed;
}
@@ -62,13 +62,13 @@ test_find (void)
memset (v1, 0, sizeof v1);
n = H5T_bit_find (v1, 0, 8*sizeof(v1), H5T_BIT_LSB, TRUE);
if (-1!=n) {
- FAILED();
+ H5_FAILED();
puts (" Zero buffer test failed (lsb)!");
goto failed;
}
n = H5T_bit_find (v1, 0, 8*sizeof(v1), H5T_BIT_MSB, TRUE);
if (-1!=n) {
- FAILED();
+ H5_FAILED();
puts (" Zero buffer test failed (msb)!");
goto failed;
}
@@ -79,13 +79,13 @@ test_find (void)
v1[i/8] = 1<<(i%8);
n = H5T_bit_find (v1, 0, 8*sizeof(v1), H5T_BIT_LSB, TRUE);
if ((ssize_t)i!=n) {
- FAILED();
+ H5_FAILED();
printf (" Test for set bit %d failed (lsb)!\n", i);
goto failed;
}
n = H5T_bit_find (v1, 0, 8*sizeof(v1), H5T_BIT_MSB, TRUE);
if ((ssize_t)i!=n) {
- FAILED();
+ H5_FAILED();
printf (" Test for set bit %d failed (msb)!\n", i);
goto failed;
}
@@ -95,13 +95,13 @@ test_find (void)
memset (v1, 0xff, sizeof v1);
n = H5T_bit_find (v1, 0, 8*sizeof(v1), H5T_BIT_LSB, FALSE);
if (-1!=n) {
- FAILED();
+ H5_FAILED();
puts (" One buffer test failed (lsb)!");
goto failed;
}
n = H5T_bit_find (v1, 0, 8*sizeof(v1), H5T_BIT_MSB, FALSE);
if (-1!=n) {
- FAILED();
+ H5_FAILED();
puts (" One buffer test failed (msb)!");
goto failed;
}
@@ -112,13 +112,13 @@ test_find (void)
v1[i/8] &= ~(1<<(i%8));
n = H5T_bit_find (v1, 0, 8*sizeof(v1), H5T_BIT_LSB, FALSE);
if ((ssize_t)i!=n) {
- FAILED();
+ H5_FAILED();
printf (" Test for clear bit %d failed (lsb)!\n", i);
goto failed;
}
n = H5T_bit_find (v1, 0, 8*sizeof(v1), H5T_BIT_MSB, FALSE);
if ((ssize_t)i!=n) {
- FAILED();
+ H5_FAILED();
printf (" Test for clear bit %d failed (lsb)!\n", i);
goto failed;
}
@@ -174,12 +174,12 @@ test_copy (void)
H5T_bit_copy (v2, d_offset, v1, s_offset, size);
for (j=0; j<(intn)sizeof(v2); j++) if (v2[j]) break;
if (size>0 && j>=(intn)sizeof(v2)) {
- FAILED();
+ H5_FAILED();
puts (" Unabled to find copied region in destination");
goto failed;
}
if (0==size && j<(intn)sizeof(v2)) {
- FAILED();
+ H5_FAILED();
puts (" Found copied bits when we shouldn't have");
goto failed;
}
@@ -188,25 +188,25 @@ test_copy (void)
/* Look for the zeros and ones */
n = H5T_bit_find (v2, 0, 8*sizeof(v2), H5T_BIT_LSB, 1);
if (size>0 && n!=(ssize_t)d_offset) {
- FAILED();
+ H5_FAILED();
printf (" Unable to find first copied bit in destination "
"(n=%d)\n", (int)n);
goto failed;
}
if (0==size && n>=0) {
- FAILED();
+ H5_FAILED();
puts (" Found copied bits and shouldn't have!");
goto failed;
}
n = H5T_bit_find (v2, d_offset, 8*sizeof(v2)-d_offset, H5T_BIT_LSB, 0);
if (d_offset+size<8*sizeof(v2) && n!=(ssize_t)size) {
- FAILED();
+ H5_FAILED();
printf (" Unable to find last copied bit in destination "
"(n=%d)\n", (int)n);
goto failed;
}
if (d_offset+size==8*sizeof(v2) && n>=0) {
- FAILED();
+ H5_FAILED();
puts (" High-order zeros are present and shouldn't be!");
goto failed;
}
@@ -217,25 +217,25 @@ test_copy (void)
*/
n = H5T_bit_find (v2, 0, 8*sizeof(v2), H5T_BIT_MSB, 1);
if (size>0 && (size_t)(n+1)!=d_offset+size) {
- FAILED();
+ H5_FAILED();
printf (" Unable to find last copied bit in destination "
"(reverse, n=%d)\n", (int)n);
goto failed;
}
if (0==size && n>=0) {
- FAILED();
+ H5_FAILED();
puts (" Found copied bits but shouldn't have (reverse)!");
goto failed;
}
n = H5T_bit_find (v2, 0, d_offset+size, H5T_BIT_MSB, 0);
if (d_offset>0 && n+1!=(ssize_t)d_offset) {
- FAILED();
+ H5_FAILED();
printf (" Unable to find beginning of copied data "
"(reverse, n=%d)\n", (int)n);
goto failed;
}
if (0==d_offset && n>=0) {
- FAILED();
+ H5_FAILED();
puts (" Found leading original data but shouldn't have!");
goto failed;
}
@@ -294,12 +294,12 @@ test_set (void)
H5T_bit_set (v2, d_offset, size, TRUE);
for (j=0; j<(intn)sizeof(v2); j++) if (v2[j]) break;
if (size>0 && j>=(intn)sizeof(v2)) {
- FAILED();
+ H5_FAILED();
puts (" Unabled to find set region in buffer");
goto failed;
}
if (0==size && j<(intn)sizeof(v2)) {
- FAILED();
+ H5_FAILED();
puts (" Found set bits when we shouldn't have");
goto failed;
}
@@ -308,25 +308,25 @@ test_set (void)
/* Look for the zeros and ones */
n = H5T_bit_find (v2, 0, 8*sizeof(v2), H5T_BIT_LSB, 1);
if (size>0 && n!=(ssize_t)d_offset) {
- FAILED();
+ H5_FAILED();
printf (" Unable to find first set bit in destination "
"(n=%d)\n", (int)n);
goto failed;
}
if (0==size && n>=0) {
- FAILED();
+ H5_FAILED();
puts (" Found set bits and shouldn't have!");
goto failed;
}
n = H5T_bit_find (v2, d_offset, 8*sizeof(v2)-d_offset, H5T_BIT_LSB, 0);
if (d_offset+size<8*sizeof(v2) && n!=(ssize_t)size) {
- FAILED();
+ H5_FAILED();
printf (" Unable to find last set bit in destination "
"(n=%d)\n", (int)n);
goto failed;
}
if (d_offset+size==8*sizeof(v2) && n>=0) {
- FAILED();
+ H5_FAILED();
puts (" High-order zeros are present and shouldn't be!");
goto failed;
}
@@ -337,25 +337,25 @@ test_set (void)
*/
n = H5T_bit_find (v2, 0, 8*sizeof(v2), H5T_BIT_MSB, 1);
if (size>0 && (size_t)(n+1)!=d_offset+size) {
- FAILED();
+ H5_FAILED();
printf (" Unable to find last set bit in destination "
"(reverse, n=%d)\n", (int)n);
goto failed;
}
if (0==size && n>=0) {
- FAILED();
+ H5_FAILED();
puts (" Found set bits but shouldn't have (reverse)!");
goto failed;
}
n = H5T_bit_find (v2, 0, d_offset+size, H5T_BIT_MSB, 0);
if (d_offset>0 && n+1!=(ssize_t)d_offset) {
- FAILED();
+ H5_FAILED();
printf (" Unable to find beginning of set bit region "
"(reverse, n=%d)\n", (int)n);
goto failed;
}
if (0==d_offset && n>=0) {
- FAILED();
+ H5_FAILED();
puts (" Found leading zeros but shouldn't have!");
goto failed;
}
@@ -411,12 +411,12 @@ test_clear (void)
H5T_bit_set (v2, d_offset, size, FALSE);
for (j=0; j<(intn)sizeof(v2); j++) if (0xff!=v2[j]) break;
if (size>0 && j>=(intn)sizeof(v2)) {
- FAILED();
+ H5_FAILED();
puts (" Unabled to find cleared region in buffer");
goto failed;
}
if (0==size && j<(intn)sizeof(v2)) {
- FAILED();
+ H5_FAILED();
puts (" Found cleared bits when we shouldn't have");
goto failed;
}
@@ -425,25 +425,25 @@ test_clear (void)
/* Look for the zeros and ones */
n = H5T_bit_find (v2, 0, 8*sizeof(v2), H5T_BIT_LSB, 0);
if (size>0 && n!=(ssize_t)d_offset) {
- FAILED();
+ H5_FAILED();
printf (" Unable to find first cleared bit in destination "
"(n=%d)\n", (int)n);
goto failed;
}
if (0==size && n>=0) {
- FAILED();
+ H5_FAILED();
puts (" Found cleared bits and shouldn't have!");
goto failed;
}
n = H5T_bit_find (v2, d_offset, 8*sizeof(v2)-d_offset, H5T_BIT_LSB, 1);
if (d_offset+size<8*sizeof(v2) && n!=(ssize_t)size) {
- FAILED();
+ H5_FAILED();
printf (" Unable to find last cleared bit in destination "
"(n=%d)\n", (int)n);
goto failed;
}
if (d_offset+size==8*sizeof(v2) && n>=0) {
- FAILED();
+ H5_FAILED();
puts (" High-order ones are present and shouldn't be!");
goto failed;
}
@@ -454,25 +454,25 @@ test_clear (void)
*/
n = H5T_bit_find (v2, 0, 8*sizeof(v2), H5T_BIT_MSB, 0);
if (size>0 && (size_t)(n+1)!=d_offset+size) {
- FAILED();
+ H5_FAILED();
printf (" Unable to find last cleared bit in destination "
"(reverse, n=%d)\n", (int)n);
goto failed;
}
if (0==size && n>=0) {
- FAILED();
+ H5_FAILED();
puts (" Found cleared bits but shouldn't have (reverse)!");
goto failed;
}
n = H5T_bit_find (v2, 0, d_offset+size, H5T_BIT_MSB, 1);
if (d_offset>0 && n+1!=(ssize_t)d_offset) {
- FAILED();
+ H5_FAILED();
printf (" Unable to find beginning of cleared bit region "
"(reverse, n=%d)\n", (int)n);
goto failed;
}
if (0==d_offset && n>=0) {
- FAILED();
+ H5_FAILED();
puts (" Found leading ones but shouldn't have!");
goto failed;
}
diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c
index 6f63ef0..4b0eb69 100644
--- a/test/cmpd_dset.c
+++ b/test/cmpd_dset.c
@@ -236,7 +236,7 @@ main (int argc, char *argv[])
s1[i].c[3]!=s2[i].c[3] ||
s1[i].d!=s2[i].d ||
s1[i].e!=s2[i].e) {
- FAILED();
+ H5_FAILED();
puts(" Incorrect values read from the file");
goto error;
}
@@ -278,7 +278,7 @@ main (int argc, char *argv[])
s1[i].c[3]!=s3[i].c[3] ||
s1[i].d!=s3[i].d ||
s1[i].e!=s3[i].e) {
- FAILED();
+ H5_FAILED();
puts(" Incorrect values read from the file");
goto error;
}
@@ -306,7 +306,7 @@ main (int argc, char *argv[])
for (i=0; i<NX*NY; i++) {
if (s1[i].b!=s4[i].b ||
s1[i].d!=s4[i].d) {
- FAILED();
+ H5_FAILED();
puts(" Incorrect values read from the file");
goto error;
}
@@ -355,7 +355,7 @@ main (int argc, char *argv[])
s1[i].c[3]!=s5[i].c[3] ||
s1[i].d!=s5[i].d ||
s1[i].e!=s5[i].e) {
- FAILED();
+ H5_FAILED();
puts(" Incorrect values read from the file");
goto error;
}
@@ -367,7 +367,7 @@ main (int argc, char *argv[])
s5[i].mid1 != 1001+4*i ||
s5[i].mid2 != 1002+4*i ||
s5[i].post != 1003+4*i) {
- FAILED();
+ H5_FAILED();
puts(" Memory values were clobbered");
goto error;
}
@@ -408,7 +408,7 @@ main (int argc, char *argv[])
s1[i].c[3] != 8*i+5 ||
s1[i].d != 8*i+6 ||
s1[i].e != 8*i+7) {
- FAILED();
+ H5_FAILED();
printf(" i==%u, row=%u, col=%u\n", i, i/NY, i%NY);
printf(" got: {%7d,%7d,[%7d,%7d,%7d,%7d],%7d,%7d}\n",
s1[i].a, s1[i].b, s1[i].c[0], s1[i].c[1], s1[i].c[2],
@@ -446,7 +446,7 @@ main (int argc, char *argv[])
s2[i].c[3] != s1[i].c[3] ||
s2[i].d != s1[i].d ||
s2[i].e != s1[i].e) {
- FAILED();
+ H5_FAILED();
puts(" Incorrect values read from file");
goto error;
}
@@ -494,7 +494,7 @@ main (int argc, char *argv[])
ps8->c[3] != ps1->c[3] ||
ps8->d != ps1->d ||
ps8->e != ps1->e) {
- FAILED();
+ H5_FAILED();
puts(" Incorrect values read from file");
goto error;
}
@@ -541,7 +541,7 @@ main (int argc, char *argv[])
ps2->c[3] != ps1->c[3] ||
ps2->d != ps1->d ||
ps2->e != ps1->e) {
- FAILED();
+ H5_FAILED();
puts(" Memory values clobbered");
goto error;
}
@@ -554,7 +554,7 @@ main (int argc, char *argv[])
ps2->c[3] != (unsigned)(-1) ||
ps2->d != (unsigned)(-1) ||
ps2->e != (unsigned)(-1)) {
- FAILED();
+ H5_FAILED();
puts(" Incorrect values read from file");
goto error;
}
@@ -603,7 +603,7 @@ main (int argc, char *argv[])
ps5->d != ps1->d ||
ps5->e != ps1->e ||
ps5->post != (unsigned)(-1)) {
- FAILED();
+ H5_FAILED();
puts(" Memory values clobbered");
goto error;
}
@@ -620,7 +620,7 @@ main (int argc, char *argv[])
ps5->d != (unsigned)(-1) ||
ps5->e != (unsigned)(-1) ||
ps5->post != (unsigned)(-1)) {
- FAILED();
+ H5_FAILED();
puts(" Incorrect values read from file");
goto error;
}
@@ -672,7 +672,7 @@ main (int argc, char *argv[])
ps1->c[2] != 8*(i*NY+j)+4 ||
ps1->c[3] != 8*(i*NY+j)+5 ||
ps1->e != 8*(i*NY+j)+7) {
- FAILED();
+ H5_FAILED();
puts(" Write clobbered values");
goto error;
}
@@ -683,14 +683,14 @@ main (int argc, char *argv[])
(hsize_t)j<f_offset[1]+h_size[1]) {
if (ps1->b != (unsigned)(-1) ||
ps1->d != (unsigned)(-1)) {
- FAILED();
+ H5_FAILED();
puts(" Wrong values written or read");
goto error;
}
} else {
if (ps1->b != 8*(i*NY+j)+1 ||
ps1->d != 8*(i*NY+j)+6) {
- FAILED();
+ H5_FAILED();
puts(" Write clobbered values");
goto error;
}
diff --git a/test/dsets.c b/test/dsets.c
index 824e000..8653718 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -82,7 +82,7 @@ test_create(hid_t file)
H5P_DEFAULT);
} H5E_END_TRY;
if (dataset >= 0) {
- FAILED();
+ H5_FAILED();
puts(" Library allowed overwrite of existing dataset.");
goto error;
}
@@ -103,7 +103,7 @@ test_create(hid_t file)
dataset = H5Dopen(file, "does_not_exist");
} H5E_END_TRY;
if (dataset >= 0) {
- FAILED();
+ H5_FAILED();
puts(" Opened a non-existent dataset.");
goto error;
}
@@ -125,7 +125,7 @@ test_create(hid_t file)
create_parms);
} H5E_END_TRY;
if (dataset >= 0) {
- FAILED();
+ H5_FAILED();
puts(" Opened a dataset with incorrect chunking parameters.");
goto error;
}
@@ -216,7 +216,7 @@ test_simple_io(hid_t file)
for (i = 0; i < 100; i++) {
for (j = 0; j < 200; j++) {
if (points[i][j] != check[i][j]) {
- FAILED();
+ H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %d,%d\n", i, j);
goto error;
@@ -295,7 +295,7 @@ test_tconv(hid_t file)
in[4*i+1]!=out[4*i+2] ||
in[4*i+2]!=out[4*i+1] ||
in[4*i+3]!=out[4*i+0]) {
- FAILED();
+ H5_FAILED();
puts(" Read with byte order conversion failed.");
goto error;
}
@@ -413,7 +413,7 @@ test_compression(hid_t file)
for (i=0; i<size[0]; i++) {
for (j=0; j<size[1]; j++) {
if (0!=check[i][j]) {
- FAILED();
+ H5_FAILED();
printf(" Read a non-zero value.\n");
printf(" At index %lu,%lu\n",
(unsigned long)i, (unsigned long)j);
@@ -464,7 +464,7 @@ test_compression(hid_t file)
for (i=0; i<size[0]; i++) {
for (j=0; j<size[1]; j++) {
if (points[i][j] != check[i][j]) {
- FAILED();
+ H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu,%lu\n",
(unsigned long)i, (unsigned long)j);
@@ -504,7 +504,7 @@ test_compression(hid_t file)
for (i=0; i<size[0]; i++) {
for (j=0; j<size[1]; j++) {
if (points[i][j] != check[i][j]) {
- FAILED();
+ H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu,%lu\n",
(unsigned long)i, (unsigned long)j);
@@ -536,7 +536,7 @@ test_compression(hid_t file)
for (i=0; i<size[0]; i++) {
for (j=0; j<size[1]; j++) {
if (points[i][j] != check[i][j]) {
- FAILED();
+ H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu,%lu\n",
(unsigned long)i, (unsigned long)j);
@@ -577,7 +577,7 @@ test_compression(hid_t file)
for (j=0; j<hs_size[1]; j++) {
if (points[hs_offset[0]+i][hs_offset[1]+j] !=
check[hs_offset[0]+i][hs_offset[1]+j]) {
- FAILED();
+ H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu,%lu\n",
(unsigned long)(hs_offset[0]+i),
@@ -620,7 +620,7 @@ test_compression(hid_t file)
for (i=0; i<size[0]; i++) {
for (j=0; j<size[1]; j++) {
if (points[i][j] != check[i][j]) {
- FAILED();
+ H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu,%lu\n",
(unsigned long)i, (unsigned long)j);
@@ -693,7 +693,7 @@ test_multiopen (hid_t file)
if ((space = H5Dget_space (dset2))<0) goto error;
if (H5Sget_simple_extent_dims (space, tmp_size, NULL)<0) goto error;
if (cur_size[0]!=tmp_size[0]) {
- FAILED();
+ H5_FAILED();
printf (" Got %d instead of %d!\n",
(int)tmp_size[0], (int)cur_size[0]);
goto error;
diff --git a/test/dtypes.c b/test/dtypes.c
index 77bf585..5cfb08b 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -306,13 +306,13 @@ test_classes(void)
if ((tcls=H5Tget_class(H5T_NATIVE_INT))<0) goto error;
if (H5T_INTEGER!=tcls) {
- FAILED();
+ H5_FAILED();
puts(" Invalid type class for H5T_NATIVE_INT");
goto error;
}
if ((tcls=H5Tget_class(H5T_NATIVE_DOUBLE))<0) goto error;
if (H5T_FLOAT!=tcls) {
- FAILED();
+ H5_FAILED();
puts(" Invalid type class for H5T_NATIVE_DOUBLE");
goto error;
}
@@ -356,7 +356,7 @@ test_copy(void)
status = H5Tclose (H5T_NATIVE_SCHAR);
} H5E_END_TRY;
if (status>=0) {
- FAILED();
+ H5_FAILED();
puts (" Should not be able to close a predefined type!");
goto error;
}
@@ -501,7 +501,7 @@ test_compound_2(void)
s_ptr->c[3] != d_ptr->c[3] ||
s_ptr->d != d_ptr->d ||
s_ptr->e != d_ptr->e) {
- FAILED();
+ H5_FAILED();
printf(" i=%d\n", i);
printf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n",
s_ptr->a, s_ptr->b, s_ptr->c[0], s_ptr->c[1], s_ptr->c[2],
@@ -615,7 +615,7 @@ test_compound_3(void)
s_ptr->c[2] != d_ptr->c[2] ||
s_ptr->c[3] != d_ptr->c[3] ||
s_ptr->e != d_ptr->e) {
- FAILED();
+ H5_FAILED();
printf(" i=%d\n", i);
printf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n",
s_ptr->a, s_ptr->b, s_ptr->c[0], s_ptr->c[1], s_ptr->c[2],
@@ -737,7 +737,7 @@ test_compound_4(void)
s_ptr->c[3] != d_ptr->c[3] ||
s_ptr->d != d_ptr->d ||
s_ptr->e != d_ptr->e) {
- FAILED();
+ H5_FAILED();
printf(" i=%d\n", i);
printf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n",
s_ptr->a, s_ptr->b, s_ptr->c[0], s_ptr->c[1], s_ptr->c[2],
@@ -862,7 +862,7 @@ test_compound_5(void)
src[1].coll_ids[1]!=dst[1].coll_ids[1] ||
src[1].coll_ids[2]!=dst[1].coll_ids[2] ||
src[1].coll_ids[3]!=dst[1].coll_ids[3]) {
- FAILED();
+ H5_FAILED();
return 1;
}
@@ -944,7 +944,7 @@ test_compound_6(void)
d_ptr = ((struct dt*)buf) + i;
if (s_ptr->b != d_ptr->b ||
s_ptr->d != d_ptr->d) {
- FAILED();
+ H5_FAILED();
printf(" i=%d\n", i);
printf(" src={b=%d, d=%d\n",
(int)s_ptr->b, (int)s_ptr->d);
@@ -1006,7 +1006,7 @@ test_transient (hid_t fapl)
status = H5Tset_precision (H5T_NATIVE_INT, 256);
} H5E_END_TRY;
if (status>=0) {
- FAILED();
+ H5_FAILED();
puts (" Predefined types should not be modifiable!");
goto error;
}
@@ -1014,7 +1014,7 @@ test_transient (hid_t fapl)
status = H5Tclose (H5T_NATIVE_INT);
} H5E_END_TRY;
if (status>=0) {
- FAILED();
+ H5_FAILED();
puts (" Predefined types should not be closable!");
goto error;
}
@@ -1028,7 +1028,7 @@ test_transient (hid_t fapl)
status = H5Acreate (type, "attr1", H5T_NATIVE_INT, space, H5P_DEFAULT);
} H5E_END_TRY;
if (status>=0) {
- FAILED();
+ H5_FAILED();
puts (" Attributes should not be allowed for transient types!");
goto error;
}
@@ -1045,7 +1045,7 @@ test_transient (hid_t fapl)
status = H5Tset_precision (t2, 256);
} H5E_END_TRY;
if (status>=0) {
- FAILED();
+ H5_FAILED();
puts (" Dataset data types should not be modifiable!");
goto error;
}
@@ -1062,7 +1062,7 @@ test_transient (hid_t fapl)
status = H5Tset_precision (t2, 256);
} H5E_END_TRY;
if (status>=0) {
- FAILED();
+ H5_FAILED();
puts (" Dataset data types should not be modifiable!");
goto error;
}
@@ -1136,7 +1136,7 @@ test_named (hid_t fapl)
H5T_NATIVE_INT);
} H5E_END_TRY;
if (status>=0) {
- FAILED();
+ H5_FAILED();
puts (" Predefined types should not be committable!");
goto error;
}
@@ -1146,7 +1146,7 @@ test_named (hid_t fapl)
if (H5Tcommit (file, "native-int", type)<0) goto error;
if ((status=H5Tcommitted (type))<0) goto error;
if (0==status) {
- FAILED();
+ H5_FAILED();
puts (" H5Tcommitted() returned false!");
goto error;
}
@@ -1156,7 +1156,7 @@ test_named (hid_t fapl)
status = H5Tset_precision (type, 256);
} H5E_END_TRY;
if (status>=0) {
- FAILED();
+ H5_FAILED();
puts (" Committed type is not constant!");
goto error;
}
@@ -1166,7 +1166,7 @@ test_named (hid_t fapl)
status = H5Tcommit(file, "test_named_2 (should not exist)", type);
} H5E_END_TRY;
if (status>=0) {
- FAILED();
+ H5_FAILED();
puts (" Committed types should not be recommitted!");
goto error;
}
@@ -1185,7 +1185,7 @@ test_named (hid_t fapl)
if ((t2 = H5Tcopy (type))<0) goto error;
if ((status=H5Tcommitted (t2))<0) goto error;
if (status) {
- FAILED();
+ H5_FAILED();
puts (" Copying a named type should result in a transient type!");
goto error;
}
@@ -1199,7 +1199,7 @@ test_named (hid_t fapl)
if ((type=H5Topen (file, "native-int"))<0) goto error;
if ((status=H5Tcommitted (type))<0) goto error;
if (!status) {
- FAILED();
+ H5_FAILED();
puts (" Opened named types should be named types!");
goto error;
}
@@ -1213,7 +1213,7 @@ test_named (hid_t fapl)
if ((t2 = H5Dget_type (dset))<0) goto error;
if ((status=H5Tcommitted (t2))<0) goto error;
if (!status) {
- FAILED();
+ H5_FAILED();
puts (" Dataset type should be a named type!");
goto error;
}
@@ -1227,7 +1227,7 @@ test_named (hid_t fapl)
if ((t2 = H5Dget_type (dset))<0) goto error;
if ((status=H5Tcommitted (t2))<0) goto error;
if (!status) {
- FAILED();
+ H5_FAILED();
puts (" Dataset type should be a named type!");
goto error;
}
@@ -1248,7 +1248,7 @@ test_named (hid_t fapl)
if ((t2 = H5Dget_type (dset))<0) goto error;
if ((status=H5Tcommitted (t2))<0) goto error;
if (!status) {
- FAILED();
+ H5_FAILED();
puts (" Dataset type should be a named type!");
goto error;
}
@@ -1344,13 +1344,13 @@ test_conv_str_1(void)
memcpy(buf, "abcdefghi\0abcdefghi\0", 20);
if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcd\0abcd\0abcdefghi\0", 20)) {
- FAILED();
+ H5_FAILED();
puts(" Truncated C-string test failed");
goto error;
}
if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcd\0\0\0\0\0\0abcd\0\0\0\0\0\0", 20)) {
- FAILED();
+ H5_FAILED();
puts(" Extended C-string test failed");
goto error;
}
@@ -1367,13 +1367,13 @@ test_conv_str_1(void)
memcpy(buf, "abcdefghijabcdefghij", 20);
if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcdeabcdeabcdefghij", 20)) {
- FAILED();
+ H5_FAILED();
puts(" Truncated C buffer test failed");
goto error;
}
if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", 20)) {
- FAILED();
+ H5_FAILED();
puts(" Extended C buffer test failed");
goto error;
}
@@ -1390,13 +1390,13 @@ test_conv_str_1(void)
memcpy(buf, "abcdefghijabcdefghij", 20);
if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcdeabcdeabcdefghij", 20)) {
- FAILED();
+ H5_FAILED();
puts(" Truncated Fortran-string test failed");
goto error;
}
if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcde abcde ", 20)) {
- FAILED();
+ H5_FAILED();
puts(" Extended Fortran-string test failed");
goto error;
}
@@ -1416,7 +1416,7 @@ test_conv_str_1(void)
memcpy(buf, "abcdefghijabcdefghij", 20);
if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcdefghijabcdefghij", 20)) {
- FAILED();
+ H5_FAILED();
puts(" Non-terminated string test 1");
goto error;
}
@@ -1425,14 +1425,14 @@ test_conv_str_1(void)
memcpy(buf, "abcdefghijabcdefghij", 20);
if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcd\0abcd\0abcdefghij", 20)) {
- FAILED();
+ H5_FAILED();
puts(" Non-terminated string test 2");
goto error;
}
memcpy(buf, "abcdeabcdexxxxxxxxxx", 20);
if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", 20)) {
- FAILED();
+ H5_FAILED();
puts(" Non-terminated string test 2");
goto error;
}
@@ -1449,13 +1449,13 @@ test_conv_str_1(void)
memcpy(buf, "abcdefghi\0abcdefghi\0", 20);
if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcdefghi abcdefghi ", 20)) {
- FAILED();
+ H5_FAILED();
puts(" C string to Fortran test 1");
goto error;
}
if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcdefghi\0abcdefghi\0", 20)) {
- FAILED();
+ H5_FAILED();
puts(" Fortran to C string test 1");
goto error;
}
@@ -1464,13 +1464,13 @@ test_conv_str_1(void)
memcpy(buf, "abcdefgh\0\0abcdefgh\0\0", 20);
if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcdeabcdeabcdefgh\0\0", 20)) {
- FAILED();
+ H5_FAILED();
puts(" C string to Fortran test 2");
goto error;
}
if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", 20)) {
- FAILED();
+ H5_FAILED();
puts(" Fortran to C string test 2");
goto error;
}
@@ -1481,13 +1481,13 @@ test_conv_str_1(void)
memcpy(buf, "abcd\0abcd\0xxxxxxxxxx", 20);
if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcd abcd ", 20)) {
- FAILED();
+ H5_FAILED();
puts(" C string to Fortran test 3");
goto error;
}
if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcd\0abcd\0abcd ", 20)) {
- FAILED();
+ H5_FAILED();
puts(" Fortran to C string test 3");
goto error;
}
@@ -1504,13 +1504,13 @@ test_conv_str_1(void)
memcpy(buf, "abcdefghijabcdefghij", 20);
if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcdefghijabcdefghij", 20)) {
- FAILED();
+ H5_FAILED();
puts(" C buffer to Fortran test 1");
goto error;
}
if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcdefghijabcdefghij", 20)) {
- FAILED();
+ H5_FAILED();
puts(" Fortran to C buffer test 1");
goto error;
}
@@ -1519,13 +1519,13 @@ test_conv_str_1(void)
memcpy(buf, "abcdefgh\0\0abcdefgh\0\0", 20);
if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcdeabcdeabcdefgh\0\0", 20)) {
- FAILED();
+ H5_FAILED();
puts(" C buffer to Fortran test 2");
goto error;
}
if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", 20)) {
- FAILED();
+ H5_FAILED();
puts(" Fortran to C buffer test 2");
goto error;
}
@@ -1536,13 +1536,13 @@ test_conv_str_1(void)
memcpy(buf, "abcd\0abcd\0xxxxxxxxxx", 20);
if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcd abcd ", 20)) {
- FAILED();
+ H5_FAILED();
puts(" C buffer to Fortran test 3");
goto error;
}
if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcd\0abcd\0abcd ", 20)) {
- FAILED();
+ H5_FAILED();
puts(" Fortran to C buffer test 3");
goto error;
}
@@ -1733,7 +1733,7 @@ test_conv_bitfield(void)
buf[2] = buf[3] = 0x55; /*irrelevant*/
if (H5Tconvert(st, dt, (hsize_t)1, buf, NULL, H5P_DEFAULT)<0) goto error;
if (buf[0]!=0xAA || buf[1]!=0xAA || buf[2]!=0 || buf[3]!=0) {
- FAILED();
+ H5_FAILED();
printf(" s=0xaaaa, d=0x%02x%02x%02x%02x (test 1)\n",
buf[3], buf[2], buf[1], buf[0]);
goto error;
@@ -1752,7 +1752,7 @@ test_conv_bitfield(void)
buf[0] = 0xA8; buf[1] = 0x2A; buf[2] = buf[3] = 0;
if (H5Tconvert(st, dt, (hsize_t)1, buf, NULL, H5P_DEFAULT)<0) goto error;
if (buf[0]!=0 || buf[1]!=0xA8 || buf[2]!=0x2A || buf[3]!=0) {
- FAILED();
+ H5_FAILED();
printf(" s=0x2AA8 d=0x%02x%02x%02x%02x (test 2)\n",
buf[3], buf[2], buf[1], buf[0]);
goto error;
@@ -1766,7 +1766,7 @@ test_conv_bitfield(void)
buf[0] = 0xA8; buf[1] = 0x2A; buf[2] = buf[3] = 0;
if (H5Tconvert(st, dt, (hsize_t)1, buf, NULL, H5P_DEFAULT)<0) goto error;
if (buf[0]!=0xff || buf[1]!=0xAB || buf[2]!=0xEA || buf[3]!=0xff) {
- FAILED();
+ H5_FAILED();
printf(" s=0x2AA8 d=0x%02x%02x%02x%02x (test 3)\n",
buf[3], buf[2], buf[1], buf[0]);
goto error;
@@ -1851,7 +1851,7 @@ test_opaque(void)
status = H5Tconvert(st, dt, (hsize_t)OPAQUE_NELMTS, buf, NULL, H5P_DEFAULT);
} H5E_END_TRY;
if (status>=0) {
- FAILED();
+ H5_FAILED();
printf(" opaque conversion should have failed but succeeded\n");
goto error;
}
@@ -1863,7 +1863,7 @@ test_opaque(void)
/* Try the conversion again, this time it should work */
if (H5Tconvert(st, dt, (hsize_t)OPAQUE_NELMTS, buf, NULL, H5P_DEFAULT)<0) goto error;
if (saved+1 != num_opaque_conversions_g) {
- FAILED();
+ H5_FAILED();
printf(" unexpected number of opaque conversions\n");
goto error;
}
@@ -1876,7 +1876,7 @@ test_opaque(void)
error:
if (st>0) H5Tclose(st);
if (dt>0) H5Tclose(dt);
- FAILED();
+ H5_FAILED();
return 1;
}
@@ -1915,7 +1915,7 @@ test_conv_int (void)
goto error;
}
if (byte[0]!=0xff || byte[1]!=0xff) {
- FAILED();
+ H5_FAILED();
printf(" src: 0x80000000 unsigned\n");
printf(" dst: 0x%02x%02x unsigned\n", byte[1], byte[0]);
printf(" ans: 0xffff unsigned\n");
@@ -1928,7 +1928,7 @@ test_conv_int (void)
goto error;
}
if (byte[0]!=0xff || byte[1]!=0x7f) {
- FAILED();
+ H5_FAILED();
printf(" src: 0xffffffff unsigned\n");
printf(" dst: 0x%02x%02x signed\n", byte[1], byte[0]);
printf(" ans: 0x7fff signed\n");
@@ -1941,7 +1941,7 @@ test_conv_int (void)
goto error;
}
if (byte[0]!=0x00 || byte[1]!=0x00) {
- FAILED();
+ H5_FAILED();
printf(" src: 0xffffffff signed\n");
printf(" dst: 0x%02x%02x unsigned\n", byte[1], byte[0]);
printf(" ans: 0x0000 unsigned\n");
@@ -1955,7 +1955,7 @@ test_conv_int (void)
goto error;
}
if (byte[0]!=0xff || byte[1]!=0xff) {
- FAILED();
+ H5_FAILED();
printf(" src: 0x7fffffff signed\n");
printf(" dst: 0x%02x%02x unsigned\n", byte[1], byte[0]);
printf(" ans: 0xffff unsigned\n");
@@ -1969,7 +1969,7 @@ test_conv_int (void)
goto error;
}
if (byte[0]!=0xff || byte[1]!=0x7f) {
- FAILED();
+ H5_FAILED();
printf(" src: 0x7fffffff signed\n");
printf(" dst: 0x%02x%02x signed\n", byte[1], byte[0]);
printf(" ans: 0x7fff signed\n");
@@ -1983,7 +1983,7 @@ test_conv_int (void)
goto error;
}
if (byte[0]!=0x00 || byte[1]!=0x80) {
- FAILED();
+ H5_FAILED();
printf(" src: 0xbfffffff signed\n");
printf(" dst: 0x%02x%02x signed\n", byte[1], byte[0]);
printf(" ans: 0x8000 signed\n");
@@ -2135,7 +2135,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
sprintf(str, "Testing random %s %s -> %s conversions",
name, src_type_name, dst_type_name);
printf("%-70s", str);
- FAILED();
+ H5_FAILED();
puts(" Unknown data type.");
goto error;
}
@@ -2851,7 +2851,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
}
/* Print errors */
- if (0==fails_this_test++) FAILED();
+ if (0==fails_this_test++) H5_FAILED();
printf(" test %u elmt %u\n", (unsigned)i+1, (unsigned)j);
printf(" src = ");
@@ -3273,7 +3273,7 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
sprintf(str, "Testing random %s %s -> %s conversions",
name, src_type_name, dst_type_name);
printf("%-70s", str);
- FAILED();
+ H5_FAILED();
puts(" Unknown data type.");
goto error;
}
@@ -3476,7 +3476,7 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
}
#endif
- if (0==fails_this_test++) FAILED();
+ if (0==fails_this_test++) H5_FAILED();
printf(" test %u, elmt %u\n", (unsigned)i+1, (unsigned)j);
printf(" src =");
diff --git a/test/enum.c b/test/enum.c
index dce0fa8..5921ef1 100644
--- a/test/enum.c
+++ b/test/enum.c
@@ -141,7 +141,7 @@ test_noconv(hid_t file)
for (i=0; i<ds_size[0]; i++) {
if (data1[i]!=data2[i]) {
- FAILED();
+ H5_FAILED();
printf(" data1[%lu]=%d, data2[%lu]=%d (should be same)\n",
(unsigned long)i, (int)(data1[i]),
(unsigned long)i, (int)(data2[i]));
@@ -223,7 +223,7 @@ test_tr1(hid_t file)
for (i=0; i<ds_size[0]; i++) {
if (data1[i]!=data2[i]) {
- FAILED();
+ H5_FAILED();
printf(" data1[%lu]=%d, data2[%lu]=%d (should be same)\n",
(unsigned long)i, (int)(data1[i]),
(unsigned long)i, (int)(data2[i]));
@@ -303,7 +303,7 @@ test_tr2(hid_t file)
for (i=0; i<ds_size[0]; i++) {
if (data1[i]!=data2[i]) {
- FAILED();
+ H5_FAILED();
printf(" data1[%lu]=%d, data2[%lu]=%d (should be same)\n",
(unsigned long)i, (int)(data1[i]),
(unsigned long)i, (int)(data2[i]));
diff --git a/test/extend.c b/test/extend.c
index ae9fee0..e344370 100644
--- a/test/extend.c
+++ b/test/extend.c
@@ -119,7 +119,7 @@ main (void)
for (k=0; k<NX/2; k++) {
for (m=0; m<NY/2; m++) {
if (buf2[k][m]!=buf1[(i%2)*NX/2+k][(j%2)*NY/2+m]) {
- FAILED();
+ H5_FAILED();
printf(" i=%d, j=%d, k=%d, m=%d\n", i, j, k, m);
goto error;
}
diff --git a/test/external.c b/test/external.c
index 810d5b8..d7a4899 100644
--- a/test/external.c
+++ b/test/external.c
@@ -112,7 +112,7 @@ test_1a(hid_t file)
if ((dcpl = H5Dget_create_plist (dset))<0) goto error;
if ((n=H5Pget_external_count (dcpl))<0) goto error;
if (1!=n) {
- FAILED();
+ H5_FAILED();
puts(" Returned external count is wrong.");
printf(" got: %d\n ans: 1\n", n);
goto error;
@@ -121,13 +121,13 @@ test_1a(hid_t file)
if (H5Pget_external (dcpl, 0, sizeof(name)-4, name, &file_offset,
&file_size)<0) goto error;
if (file_offset!=0) {
- FAILED();
+ H5_FAILED();
puts(" Wrong file offset.");
printf(" got: %lu\n ans: 0\n", (unsigned long)file_offset);
goto error;
}
if (file_size!=(max_size[0]*sizeof(int))) {
- FAILED();
+ H5_FAILED();
puts(" Wrong file size.");
printf(" got: %lu\n ans: %lu\n", (unsigned long)file_size,
(unsigned long)max_size[0]*sizeof(int));
@@ -184,7 +184,7 @@ test_1b(hid_t file)
dset = H5Dcreate (file, "dset2", H5T_NATIVE_INT, space, dcpl);
} H5E_END_TRY;
if (dset>=0) {
- FAILED();
+ H5_FAILED();
puts(" Small external file succeeded instead of failing.");
goto error;
}
@@ -292,7 +292,7 @@ test_1d(hid_t file)
dset = H5Dcreate (file, "dset4", H5T_NATIVE_INT, space, dcpl);
} H5E_END_TRY;
if (dset>=0) {
- FAILED();
+ H5_FAILED();
puts(" Small external file succeeded instead of failing.");
goto error;
}
@@ -360,7 +360,7 @@ test_1e(hid_t file)
if ((dcpl = H5Dget_create_plist (dset))<0) goto error;
if ((n = H5Pget_external_count (dcpl))<0) goto error;
if (1!=n) {
- FAILED();
+ H5_FAILED();
puts(" Returned external count is wrong.");
printf(" got: %d\n ans: 1\n", n);
goto error;
@@ -369,13 +369,13 @@ test_1e(hid_t file)
if (H5Pget_external (dcpl, 0, sizeof(name)-4, name, &file_offset,
&file_size)<0) goto error;
if (file_offset!=0) {
- FAILED();
+ H5_FAILED();
puts(" Wrong file offset.");
printf(" got: %lu\n ans: 0\n", (unsigned long)file_offset);
goto error;
}
if (H5F_UNLIMITED!=file_size) {
- FAILED();
+ H5_FAILED();
puts(" Wrong file size.");
printf(" got: %lu\n ans: INF\n", (unsigned long)file_size);
goto error;
@@ -481,13 +481,13 @@ test_1g(void)
status = H5Pset_external(dcpl, "ext2.data", (off_t)0, (hsize_t)100);
} H5E_END_TRY;
if (status>=0) {
- FAILED();
+ H5_FAILED();
puts (" H5Pset_external() succeeded when it should have failed.");
goto error;
}
if ((n = H5Pget_external_count(dcpl))<0) goto error;
if (1!=n) {
- FAILED();
+ H5_FAILED();
puts(" Wrong external file count returned.");
goto error;
}
@@ -533,7 +533,7 @@ test_1h(void)
status = H5Pset_external(dcpl, "ext2.data", (off_t)0, (hsize_t)100);
} H5E_END_TRY;
if (status>=0) {
- FAILED();
+ H5_FAILED();
puts(" H5Pset_external() succeeded when it should have failed.");
goto error;
}
@@ -635,7 +635,7 @@ test_2 (hid_t fapl)
goto error;
for (i=0; i<100; i++) {
if (whole[i]!=(signed)i) {
- FAILED();
+ H5_FAILED();
puts(" Incorrect value(s) read.");
goto error;
}
@@ -653,7 +653,7 @@ test_2 (hid_t fapl)
if (H5Sclose (hs_space)<0) goto error;
for (i=hs_start; i<hs_start+hs_count; i++) {
if (whole[i]!=(signed)i) {
- FAILED();
+ H5_FAILED();
puts(" Incorrect value(s) read.");
goto error;
}
@@ -731,7 +731,7 @@ test_3 (hid_t fapl)
for (i=1; i<=4; i++) {
sprintf(filename, "extern_%db.raw", i);
if ((fd= open(filename, O_RDWR|O_CREAT|O_TRUNC, 0666))<0) {
- FAILED();
+ H5_FAILED();
printf(" cannot open %s: %s\n", filename, strerror(errno));
goto error;
}
@@ -755,7 +755,7 @@ test_3 (hid_t fapl)
sprintf (name1, "extern_%da.raw", i+1);
sprintf (name2, "extern_%db.raw", i+1);
if (!same_contents (name1, name2)) {
- FAILED();
+ H5_FAILED();
puts (" Output differs from expected value.");
goto error;
}
diff --git a/test/fillval.c b/test/fillval.c
index 86fa6a7..3e71ad0 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -89,7 +89,7 @@ test_getset(void)
status = H5Pget_fill_value(dcpl, H5T_NATIVE_INT, &fill_i);
} H5E_END_TRY;
if (status>=0) {
- FAILED();
+ H5_FAILED();
puts(" H5Pget_fill_value() should have been negative");
goto error;
}
@@ -106,7 +106,7 @@ test_getset(void)
*/
if (H5Pget_fill_value(dcpl, type_ss, &fill_ss_rd)<0) goto error;
if (fill_ss.v1!=fill_ss_rd.v1 || fill_ss.v2!=fill_ss_rd.v2) {
- FAILED();
+ H5_FAILED();
puts(" Failed to get fill value using same data type that was ");
puts(" used to set the fill value.");
goto error;
@@ -117,7 +117,7 @@ test_getset(void)
*/
if (H5Pget_fill_value(dcpl, type_si, &fill_si)<0) goto error;
if (fill_ss.v1!=fill_si.v1 || fill_ss.v2!=fill_si.v2) {
- FAILED();
+ H5_FAILED();
puts(" Failed to get fill value using a data type other than what");
puts(" was used to set the fill value.");
goto error;
@@ -129,7 +129,7 @@ test_getset(void)
if (H5Pset_fill_value(dcpl, type_si, &fill_si)<0) goto error;
if (H5Pget_fill_value(dcpl, type_ss, &fill_ss)<0) goto error;
if (fill_si.v1!=fill_ss.v1 || fill_si.v2!=fill_ss.v2) {
- FAILED();
+ H5_FAILED();
puts(" Resetting the fill value was unsuccessful.");
goto error;
}
@@ -237,7 +237,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
#ifndef NO_FILLING
if (H5Pget_fill_value(dcpl, H5T_NATIVE_SHORT, &rd_s)<0) goto error;
if (rd_s!=fill_s) {
- FAILED();
+ H5_FAILED();
puts(" Got a different fill value than what was set.");
printf(" Got %d, set %d\n", rd_s, fill_s);
goto error;
@@ -252,7 +252,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
#ifndef NO_FILLING
if (H5Pget_fill_value(dcpl, H5T_NATIVE_LONG, &rd_l)<0) goto error;
if (rd_l!=fill_l) {
- FAILED();
+ H5_FAILED();
puts(" Got a different fill value than what was set.");
printf(" Got %ld, set %ld\n", rd_l, fill_l);
goto error;
@@ -267,7 +267,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
#ifndef NO_FILLING
if (H5Pget_fill_value(dcpl, H5T_NATIVE_LONG, &rd_l)<0) goto error;
if (rd_l!=fill_l) {
- FAILED();
+ H5_FAILED();
puts(" Got a different fill value than what was set.");
printf(" Got %ld, set %ld\n", rd_l, fill_l);
goto error;
@@ -360,7 +360,7 @@ test_rdwr(hid_t fapl, const char *base_name, H5D_layout_t layout)
if (H5Dread(dset, H5T_NATIVE_INT, mspace, fspace, H5P_DEFAULT,
&val_rd)<0) goto error;
if (val_rd!=fillval) {
- FAILED();
+ H5_FAILED();
puts(" Value read was not a fill value.");
printf(" Elmt={%ld,%ld,%ld,%ld,%ld}, read: %u, "
"Fill value: %u\n",
@@ -405,7 +405,7 @@ test_rdwr(hid_t fapl, const char *base_name, H5D_layout_t layout)
&val_rd)<0) goto error;
if (val_rd!=should_be) {
- FAILED();
+ H5_FAILED();
puts(" Value read was not correct.");
printf(" Elmt={%ld,%ld,%ld,%ld,%ld}, read: %u, "
"should be: %u\n",
@@ -558,7 +558,7 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout)
if (H5Dread(dset, H5T_NATIVE_INT, mspace, fspace, H5P_DEFAULT,
&val_rd)<0) goto error;
if (val_rd!=fillval) {
- FAILED();
+ H5_FAILED();
puts(" Value read was not a fill value.");
printf(" Elmt={%ld,%ld,%ld,%ld,%ld}, read: %u, "
"Fill value: %u\n",
@@ -603,7 +603,7 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout)
&val_rd)<0) goto error;
if (val_rd!=should_be) {
- FAILED();
+ H5_FAILED();
puts(" Value read was not correct.");
printf(" Elmt={%ld,%ld,%ld,%ld,%ld}, read: %u, "
"should be: %u\n",
@@ -639,7 +639,7 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout)
&val_rd)<0) goto error;
if (val_rd!=should_be) {
- FAILED();
+ H5_FAILED();
puts(" Value read was not correct.");
printf(" Elmt={%ld,%ld,%ld,%ld,%ld}, read: %u, "
"should be: %u\n",
diff --git a/test/flush2.c b/test/flush2.c
index ffdae59..8e7fb24 100644
--- a/test/flush2.c
+++ b/test/flush2.c
@@ -69,7 +69,7 @@ main(void)
*/
error = fabs(the_data[i][j]-(double)(hssize_t)i/((hssize_t)j+1));
if (error>0.0001) {
- FAILED();
+ H5_FAILED();
printf(" dset[%lu][%lu] = %g\n",
(unsigned long)i, (unsigned long)j, the_data[i][j]);
printf(" should be %g\n",
diff --git a/test/gheap.c b/test/gheap.c
index 85e09be..7d651e5 100644
--- a/test/gheap.c
+++ b/test/gheap.c
@@ -65,7 +65,7 @@ test_1 (hid_t fapl)
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
goto error;
if (NULL==(f=H5I_object(file))) {
- FAILED();
+ H5_FAILED();
puts(" Unable to create file");
goto error;
}
@@ -81,11 +81,11 @@ test_1 (hid_t fapl)
H5Eclear ();
status = H5HG_insert (f, size, out, obj+i);
if (status<0) {
- FAILED();
+ H5_FAILED();
puts(" Unable to insert object into global heap");
nerrors++;
} else if (i && H5F_addr_gt (obj[i-1].addr, obj[i].addr)) {
- FAILED();
+ H5_FAILED();
puts(" Collection addresses are not monotonically increasing");
nerrors++;
}
@@ -99,11 +99,11 @@ test_1 (hid_t fapl)
memset (out, 'A'+i%26, size);
H5Eclear ();
if (NULL==H5HG_read (f, obj+i, in)) {
- FAILED();
+ H5_FAILED();
puts(" Unable to read object");
nerrors++;
} else if (memcmp (in, out, size)) {
- FAILED();
+ H5_FAILED();
puts(" Value read doesn't match value written");
nerrors++;
}
@@ -159,7 +159,7 @@ test_2 (hid_t fapl)
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
goto error;
if (NULL==(f=H5I_object(file))) {
- FAILED();
+ H5_FAILED();
puts(" Unable to create file");
goto error;
}
@@ -172,7 +172,7 @@ test_2 (hid_t fapl)
memset (out, 'A'+i%26, size);
H5Eclear ();
if (H5HG_insert (f, size, out, obj+i)<0) {
- FAILED();
+ H5_FAILED();
puts(" Unable to insert object into global heap");
nerrors++;
}
@@ -186,11 +186,11 @@ test_2 (hid_t fapl)
memset (out, 'A'+i%26, size);
H5Eclear ();
if (NULL==H5HG_read (f, obj+i, in)) {
- FAILED();
+ H5_FAILED();
puts(" Unable to read object");
nerrors++;
} else if (memcmp (in, out, size)) {
- FAILED();
+ H5_FAILED();
puts(" Value read doesn't match value written");
nerrors++;
}
@@ -246,7 +246,7 @@ test_3 (hid_t fapl)
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
goto error;
if (NULL==(f=H5I_object(file))) {
- FAILED();
+ H5_FAILED();
puts(" Unable to create file");
goto error;
}
@@ -258,7 +258,7 @@ test_3 (hid_t fapl)
H5Eclear ();
status = H5HG_insert (f, size, out, obj+i);
if (status<0) {
- FAILED();
+ H5_FAILED();
puts(" Unable to insert object into global heap");
nerrors++;
}
@@ -268,7 +268,7 @@ test_3 (hid_t fapl)
for (i=0; i<1024; i++) {
status = H5HG_remove (f, obj+i);
if (status<0) {
- FAILED();
+ H5_FAILED();
puts(" Unable to remove object");
nerrors++;
}
@@ -325,7 +325,7 @@ test_4 (hid_t fapl)
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
goto error;
if (NULL==(f=H5I_object(file))) {
- FAILED();
+ H5_FAILED();
puts(" Unable to create file");
goto error;
}
@@ -337,7 +337,7 @@ test_4 (hid_t fapl)
H5Eclear ();
status = H5HG_insert (f, size, out, obj+i);
if (status<0) {
- FAILED();
+ H5_FAILED();
puts(" Unable to insert object into global heap");
nerrors++;
}
@@ -351,7 +351,7 @@ test_4 (hid_t fapl)
H5Eclear ();
status = H5HG_remove (f, obj+i-1);
if (status<0) {
- FAILED();
+ H5_FAILED();
puts(" Unable to remove object");
nerrors++;
}
diff --git a/test/h5test.c b/test/h5test.c
index db4d59d..ac834bf 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -90,7 +90,7 @@ static const char *multi_letters = "msbrglo";
herr_t
h5_errors(void UNUSED *client_data)
{
- FAILED();
+ H5_FAILED();
H5Eprint (stdout);
return 0;
}
diff --git a/test/h5test.h b/test/h5test.h
index 1dc00c6..325d1f8 100644
--- a/test/h5test.h
+++ b/test/h5test.h
@@ -31,15 +31,15 @@ extern char *paraprefix;
/*
* The name of the test is printed by saying TESTING("something") which will
* result in the string `Testing something' being flushed to standard output.
- * If a test passes, fails, or is skipped then the PASSED(), FAILED(), or
- * SKIPPED() macro should be called. After FAILED() or SKIPPED() the caller
+ * If a test passes, fails, or is skipped then the PASSED(), H5_FAILED(), or
+ * SKIPPED() macro should be called. After H5_FAILED() or SKIPPED() the caller
* should print additional information to stdout indented by at least four
* spaces. If the h5_errors() is used for automatic error handling then
- * the FAILED() macro is invoked automatically when an API function fails.
+ * the H5_FAILED() macro is invoked automatically when an API function fails.
*/
#define TESTING(WHAT) {printf("%-70s", "Testing " WHAT); fflush(stdout);}
#define PASSED() {puts(" PASSED");fflush(stdout);}
-#define FAILED() {puts("*FAILED*");fflush(stdout);}
+#define H5_FAILED() {puts("*FAILED*");fflush(stdout);}
#define SKIPPED() {puts(" -SKIP-");fflush(stdout);}
/*
diff --git a/test/istore.c b/test/istore.c
index f706d60..92941f3 100644
--- a/test/istore.c
+++ b/test/istore.c
@@ -99,7 +99,7 @@ new_object(H5F_t *f, const char *name, uintn ndims, H5G_entry_t *ent/*out*/)
/* Create the object header */
if (H5O_create(f, 64, ent)) {
- FAILED();
+ H5_FAILED();
puts(" H5O_create() = NULL");
goto error;
}
@@ -116,14 +116,14 @@ new_object(H5F_t *f, const char *name, uintn ndims, H5G_entry_t *ent/*out*/)
}
H5F_arr_create(f, &layout/*in,out*/);
if (H5O_modify(ent, H5O_LAYOUT, H5O_NEW_MESG, 0, &layout) < 0) {
- FAILED();
+ H5_FAILED();
puts(" H5O_modify istore message failure.");
goto error;
}
/* Give the object header a name */
if (H5G_insert(H5G_entof(H5G_rootof(f)), name, ent) < 0) {
- FAILED();
+ H5_FAILED();
printf(" H5G_insert(f, name=\"%s\", ent) failed\n", name);
goto error;
}
@@ -237,12 +237,12 @@ test_extend(H5F_t *f, const char *prefix,
goto error;
}
if (NULL == H5O_read(&handle, H5O_LAYOUT, 0, &layout)) {
- FAILED();
+ H5_FAILED();
puts(" Unable to read istore message.");
goto error;
}
if (ndims != layout.ndims) {
- FAILED();
+ H5_FAILED();
printf(" Header read error: istore.ndims != %d\n", ndims);
goto error;
}
@@ -301,7 +301,7 @@ test_extend(H5F_t *f, const char *prefix,
/* Write to disk */
if (H5F_arr_write(f, H5P_DEFAULT, &layout, NULL, NULL, NULL, size,
size, zero, offset, buf)<0) {
- FAILED();
+ H5_FAILED();
printf(" Write failed: ctr=%lu\n", (unsigned long)ctr);
goto error;
}
@@ -310,12 +310,12 @@ test_extend(H5F_t *f, const char *prefix,
memset(check, 0xff, (size_t)nelmts);
if (H5F_arr_read(f, H5P_DEFAULT, &layout, NULL, NULL, NULL, size,
size, zero, offset, check)<0) {
- FAILED();
+ H5_FAILED();
printf(" Read failed: ctr=%lu\n", (unsigned long)ctr);
goto error;
}
if (memcmp(buf, check, (size_t)nelmts)) {
- FAILED();
+ H5_FAILED();
printf(" Read check failed: ctr=%lu\n", (unsigned long)ctr);
printf(" Wrote:\n");
print_array(buf, (size_t)size[0], (size_t)size[1],
@@ -341,7 +341,7 @@ test_extend(H5F_t *f, const char *prefix,
memset(buf, 0xff, nx * ny * nz);
if (H5F_arr_read(f, H5P_DEFAULT, &layout, NULL, NULL, NULL, whole_size,
whole_size, zero, zero, buf)<0) {
- FAILED();
+ H5_FAILED();
puts(" Read failed for whole array.");
goto error;
}
@@ -349,7 +349,7 @@ test_extend(H5F_t *f, const char *prefix,
for (j=0; j<ny; j++) {
for (k=0; k<nz; k++) {
if (whole[i*ny*nz + j*nz + k] != buf[i*ny*nz + j*nz + k]) {
- FAILED();
+ H5_FAILED();
printf(" Check failed at i=%lu", (unsigned long)i);
if (ndims > 1) {
printf(", j=%lu", (unsigned long)j);
@@ -438,7 +438,7 @@ test_sparse(H5F_t *f, const char *prefix, size_t nblocks,
goto error;
}
if (NULL == H5O_read(&handle, H5O_LAYOUT, 0, &layout)) {
- FAILED();
+ H5_FAILED();
printf(" Unable to read istore message\n");
goto error;
}
@@ -454,7 +454,7 @@ test_sparse(H5F_t *f, const char *prefix, size_t nblocks,
/* write to disk */
if (H5F_arr_write(f, H5P_DEFAULT, &layout, NULL, NULL, NULL, size,
size, zero, offset, buf)<0) {
- FAILED();
+ H5_FAILED();
printf(" Write failed: ctr=%lu\n", (unsigned long)ctr);
printf(" offset=(%lu", (unsigned long) (offset[0]));
if (ndims > 1)
diff --git a/test/lheap.c b/test/lheap.c
index a92b066..fc1780b 100644
--- a/test/lheap.c
+++ b/test/lheap.c
@@ -62,12 +62,12 @@ main(void)
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
goto error;
if (NULL==(f=H5I_object(file))) {
- FAILED();
+ H5_FAILED();
H5Eprint(stdout);
goto error;
}
if (H5HL_create(f, 0, &heap_addr/*out*/)<0) {
- FAILED();
+ H5_FAILED();
H5Eprint(stdout);
goto error;
}
@@ -78,7 +78,7 @@ main(void)
if ((size_t)(-1)==(obj[i]=H5HL_insert(f, heap_addr, strlen(buf)+1,
buf))) {
- FAILED();
+ H5_FAILED();
H5Eprint(stdout);
goto error;
}
@@ -93,7 +93,7 @@ main(void)
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
if ((file=H5Fopen(filename, H5F_ACC_RDONLY, fapl))<0) goto error;
if (NULL==(f=H5I_object(file))) {
- FAILED();
+ H5_FAILED();
H5Eprint(stdout);
goto error;
}
@@ -102,12 +102,12 @@ main(void)
for (j=4; j<i; j++) buf[j] = '0' + j%10;
if (j>4) buf[j] = '\0';
if (NULL==(s=H5HL_peek(f, heap_addr, obj[i]))) {
- FAILED();
+ H5_FAILED();
H5Eprint(stdout);
goto error;
}
if (strcmp(s, buf)) {
- FAILED();
+ H5_FAILED();
printf(" i=%d, heap offset=%lu\n", i, (unsigned long)(obj[i]));
printf(" got: \"%s\"\n", s);
printf(" ans: \"%s\"\n", buf);
diff --git a/test/links.c b/test/links.c
index 3a1d659..04a9e27 100644
--- a/test/links.c
+++ b/test/links.c
@@ -122,12 +122,12 @@ cklinks(hid_t fapl)
if (H5Gget_objinfo(file, "d1", TRUE, &sb1)<0) goto error;
if (H5Gget_objinfo(file, "grp1/hard", TRUE, &sb2)<0) goto error;
if (H5G_DATASET!=sb2.type) {
- FAILED();
+ H5_FAILED();
puts(" Unexpected object type should have been a dataset");
goto error;
}
if (sb1.objno[0]!=sb2.objno[0] || sb1.objno[1]!=sb2.objno[1]) {
- FAILED();
+ H5_FAILED();
puts(" Hard link test failed. Link seems not to point to the ");
puts(" expected file location.");
goto error;
@@ -136,12 +136,12 @@ cklinks(hid_t fapl)
/* Symbolic link */
if (H5Gget_objinfo(file, "grp1/soft", TRUE, &sb2)<0) goto error;
if (H5G_DATASET!=sb2.type) {
- FAILED();
+ H5_FAILED();
puts(" Unexpected object type should have been a dataset");
goto error;
}
if (sb1.objno[0]!=sb2.objno[0] || sb1.objno[1]!=sb2.objno[1]) {
- FAILED();
+ H5_FAILED();
puts(" Soft link test failed. Link seems not to point to the ");
puts(" expected file location.");
goto error;
@@ -150,7 +150,7 @@ cklinks(hid_t fapl)
goto error;
}
if (strcmp(linkval, "/d1")) {
- FAILED();
+ H5_FAILED();
puts(" Soft link test failed. Wrong link value");
goto error;
}
@@ -160,13 +160,13 @@ cklinks(hid_t fapl)
status = H5Gget_objinfo(file, "grp1/dangle", TRUE, &sb2);
} H5E_END_TRY;
if (status>=0) {
- FAILED();
+ H5_FAILED();
puts(" H5Gget_objinfo() should have failed for a dangling link.");
goto error;
}
if (H5Gget_objinfo(file, "grp1/dangle", FALSE, &sb2)<0) goto error;
if (H5G_LINK!=sb2.type) {
- FAILED();
+ H5_FAILED();
puts(" Unexpected object type should have been a symbolic link");
goto error;
}
@@ -174,7 +174,7 @@ cklinks(hid_t fapl)
goto error;
}
if (strcmp(linkval, "foobar")) {
- FAILED();
+ H5_FAILED();
puts(" Dangling link test failed. Wrong link value");
goto error;
}
@@ -184,13 +184,13 @@ cklinks(hid_t fapl)
status = H5Gget_objinfo(file, "grp1/recursive", TRUE, &sb2);
} H5E_END_TRY;
if (status>=0) {
- FAILED();
+ H5_FAILED();
puts(" H5Gget_objinfo() should have failed for a recursive link.");
goto error;
}
if (H5Gget_objinfo(file, "grp1/recursive", FALSE, &sb2)<0) goto error;
if (H5G_LINK!=sb2.type) {
- FAILED();
+ H5_FAILED();
puts(" Unexpected object type should have been a symbolic link");
goto error;
}
@@ -198,7 +198,7 @@ cklinks(hid_t fapl)
goto error;
}
if (strcmp(linkval, "/grp1/recursive")) {
- FAILED();
+ H5_FAILED();
puts(" Recursive link test failed. Wrong link value");
goto error;
}
diff --git a/test/mount.c b/test/mount.c
index de06d65..caaf466 100644
--- a/test/mount.c
+++ b/test/mount.c
@@ -167,7 +167,7 @@ test_illegal(hid_t fapl)
status = H5Fmount(file1, "/mnt1", file1, H5P_DEFAULT);
} H5E_END_TRY;
if (status>=0) {
- FAILED();
+ H5_FAILED();
puts(" Mounting a file on itself should have failed.");
goto error;
}
@@ -183,7 +183,7 @@ test_illegal(hid_t fapl)
status = H5Fmount(mnt, ".", file3, H5P_DEFAULT);
} H5E_END_TRY;
if (status>=0) {
- FAILED();
+ H5_FAILED();
puts(" Mounting two files at one mount point should have failed.");
goto error;
}
@@ -253,7 +253,7 @@ test_hide(hid_t fapl)
grp = H5Gopen(file1, "/mnt1/file1");
} H5E_END_TRY;
if (grp>=0) {
- FAILED();
+ H5_FAILED();
puts(" Name is still accessible under mount point.");
goto error;
}
@@ -265,7 +265,7 @@ test_hide(hid_t fapl)
if (H5Gget_objinfo(file1, "/file1", TRUE, &sb2)<0) goto error;
if (sb1.fileno[0]!=sb2.fileno[0] || sb1.fileno[1]!=sb2.fileno[1] ||
sb1.objno[0]!=sb2.objno[0] || sb1.objno[1]!=sb2.objno[1]) {
- FAILED();
+ H5_FAILED();
puts(" Hard link failed for hidden object.");
goto error;
}
@@ -333,7 +333,7 @@ test_assoc(hid_t fapl)
if (H5Gget_objinfo(file1, "/mnt1", TRUE, &sb2)<0) goto error;
if (sb1.fileno[0]!=sb2.fileno[0] || sb1.fileno[1]!=sb2.fileno[1] ||
sb1.objno[0]!=sb2.objno[0] || sb1.objno[1]!=sb2.objno[1]) {
- FAILED();
+ H5_FAILED();
puts(" Association failed.");
goto error;
}
@@ -456,7 +456,7 @@ test_move(hid_t fapl)
status = H5Gmove(file1, "/mnt1/rename_b/y", "/y");
} H5E_END_TRY;
if (status>=0) {
- FAILED();
+ H5_FAILED();
puts(" Moving an object across files should't have been possible");
goto error;
}
@@ -656,7 +656,7 @@ test_unlink(hid_t fapl)
status = H5Gget_objinfo(mnt, "file2", TRUE, NULL);
} H5E_END_TRY;
if (status>=0) {
- FAILED();
+ H5_FAILED();
puts(" Incorrect traversal from mount point!");
goto error;
}
@@ -673,7 +673,7 @@ test_unlink(hid_t fapl)
status = H5Gget_objinfo(mnt, "file2", TRUE, NULL);
} H5E_END_TRY;
if (status>=0) {
- FAILED();
+ H5_FAILED();
puts(" Traversal through mount point should not have worked!");
goto error;
}
@@ -681,7 +681,7 @@ test_unlink(hid_t fapl)
status = H5Gget_objinfo(file2, "/mnt_unlink/file2", TRUE, NULL);
} H5E_END_TRY;
if (status>=0) {
- FAILED();
+ H5_FAILED();
puts(" Traversal through mount point should not have worked!");
goto error;
}
@@ -695,7 +695,7 @@ test_unlink(hid_t fapl)
status = H5Funmount(file1, "/mnt_unlink");
} H5E_END_TRY;
if (status>=0) {
- FAILED();
+ H5_FAILED();
puts(" Unmount by name should not have been allowed!");
goto error;
}
@@ -703,7 +703,7 @@ test_unlink(hid_t fapl)
status = H5Funmount(file2, "/");
} H5E_END_TRY;
if (status>=0) {
- FAILED();
+ H5_FAILED();
puts(" Unmount by name should not have been allowed!");
goto error;
}
@@ -821,7 +821,7 @@ test_interlink(hid_t fapl)
status = H5Glink(file1, H5G_LINK_HARD, "/mnt1/file2", "/file2");
} H5E_END_TRY;
if (status>=0) {
- FAILED();
+ H5_FAILED();
puts(" Interfile hard link should not have been allowed!");
goto error;
}
@@ -831,7 +831,7 @@ test_interlink(hid_t fapl)
status = H5Gmove(file1, "/mnt1/file2", "/file2");
} H5E_END_TRY;
if (status>=0) {
- FAILED();
+ H5_FAILED();
puts(" Interfile renaming should not have been allowed!");
goto error;
}
@@ -844,7 +844,7 @@ test_interlink(hid_t fapl)
dset = H5Dcreate(file1, "/mnt1/file2/dset", type, space, H5P_DEFAULT);
} H5E_END_TRY;
if (dset>=0) {
- FAILED();
+ H5_FAILED();
puts(" Dataset and shared type must be in the same file!");
goto error;
}
@@ -976,7 +976,7 @@ test_close(hid_t fapl)
status = H5Gget_objinfo(file2, "/mnt1", TRUE, NULL);
} H5E_END_TRY;
if (status>=0) {
- FAILED();
+ H5_FAILED();
puts(" File1 contents are still accessible!");
goto error;
}
diff --git a/test/mtime.c b/test/mtime.c
index 5c5992b..a579d93 100644
--- a/test/mtime.c
+++ b/test/mtime.c
@@ -78,7 +78,7 @@ main(void)
/* Compare times from the two ways of calling H5Gget_objinfo() */
if (sb1.objno[0]!=sb2.objno[0] || sb1.objno[1]!=sb2.objno[1] ||
sb1.mtime!=sb2.mtime) {
- FAILED();
+ H5_FAILED();
puts(" Calling H5Gget_objinfo() with the dataset ID returned");
puts(" different values than calling it with a file and dataset");
puts(" name.");
@@ -93,7 +93,7 @@ main(void)
puts(" cannot be queried on this system. See H5O_mtime_decode().");
return 0;
} else if (fabs(HDdifftime(now, sb1.mtime))>60.0) {
- FAILED();
+ H5_FAILED();
tm = localtime(&(sb1.mtime));
strftime((char*)buf1, sizeof buf1, "%Y-%m-%d %H:%M:%S", tm);
tm = localtime(&now);
diff --git a/test/ohdr.c b/test/ohdr.c
index 114ac02..8cc61d1 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -63,7 +63,7 @@ main(void)
*/
TESTING("object header creation");
if (H5O_create(f, 64, &oh_ent/*out*/)<0) {
- FAILED();
+ H5_FAILED();
H5Eprint(stdout);
goto error;
}
@@ -74,23 +74,23 @@ main(void)
stab.btree_addr = 11111111;
stab.heap_addr = 22222222;
if (H5O_modify(&oh_ent, H5O_STAB, H5O_NEW_MESG, 0, &stab)<0) {
- FAILED();
+ H5_FAILED();
H5Eprint(stdout);
goto error;
}
if (H5AC_flush(f, NULL, HADDR_UNDEF, TRUE)<0) {
- FAILED();
+ H5_FAILED();
H5Eprint(stdout);
goto error;
}
if (NULL==H5O_read(&oh_ent, H5O_STAB, 0, &ro)) {
- FAILED();
+ H5_FAILED();
H5Eprint(stdout);
goto error;
}
if (H5F_addr_ne(ro.btree_addr, stab.btree_addr) ||
H5F_addr_ne(ro.heap_addr, stab.heap_addr)) {
- FAILED();
+ H5_FAILED();
HDfprintf(stdout, " got: {%a, %a}\n",
ro.btree_addr, ro.heap_addr);
HDfprintf(stdout, " ans: {%a, %a}\n",
@@ -106,23 +106,23 @@ main(void)
stab.btree_addr = 33333333;
stab.heap_addr = 44444444;
if (H5O_modify(&oh_ent, H5O_STAB, 0, 0, &stab)<0) {
- FAILED();
+ H5_FAILED();
H5Eprint(stdout);
goto error;
}
if (H5AC_flush(f, NULL, HADDR_UNDEF, TRUE)<0) {
- FAILED();
+ H5_FAILED();
H5Eprint(stdout);
goto error;
}
if (NULL==H5O_read(&oh_ent, H5O_STAB, 0, &ro)) {
- FAILED();
+ H5_FAILED();
H5Eprint(stdout);
goto error;
}
if (H5F_addr_ne(ro.btree_addr, stab.btree_addr) ||
H5F_addr_ne(ro.heap_addr, stab.heap_addr)) {
- FAILED();
+ H5_FAILED();
HDfprintf(stdout, " got: {%a, %a}\n",
ro.btree_addr, ro.heap_addr);
HDfprintf(stdout, " ans: {%a, %a}\n",
@@ -139,23 +139,23 @@ main(void)
stab.btree_addr = 55555555;
stab.heap_addr = 66666666;
if (H5O_modify(&oh_ent, H5O_STAB, H5O_NEW_MESG, 0, &stab)<0) {
- FAILED();
+ H5_FAILED();
H5Eprint(stdout);
goto error;
}
if (H5AC_flush(f, NULL, HADDR_UNDEF, TRUE)<0) {
- FAILED();
+ H5_FAILED();
H5Eprint(stdout);
goto error;
}
if (NULL==H5O_read(&oh_ent, H5O_STAB, 1, &ro)) {
- FAILED();
+ H5_FAILED();
H5Eprint(stdout);
goto error;
}
if (H5F_addr_ne(ro.btree_addr, stab.btree_addr) ||
H5F_addr_ne(ro.heap_addr, stab.heap_addr)) {
- FAILED();
+ H5_FAILED();
HDfprintf(stdout, " got: {%a, %a}\n",
ro.btree_addr, ro.heap_addr);
HDfprintf(stdout, " ans: {%a, %a}\n",
@@ -171,23 +171,23 @@ main(void)
stab.btree_addr = 77777777;
stab.heap_addr = 88888888;
if (H5O_modify(&oh_ent, H5O_STAB, 1, 0, &stab)<0) {
- FAILED();
+ H5_FAILED();
H5Eprint(stdout);
goto error;
}
if (H5AC_flush(f, NULL, HADDR_UNDEF, TRUE)<0) {
- FAILED();
+ H5_FAILED();
H5Eprint(stdout);
goto error;
}
if (NULL==H5O_read(&oh_ent, H5O_STAB, 1, &ro)) {
- FAILED();
+ H5_FAILED();
H5Eprint(stdout);
goto error;
}
if (H5F_addr_ne(ro.btree_addr, stab.btree_addr) ||
H5F_addr_ne(ro.heap_addr, stab.heap_addr)) {
- FAILED();
+ H5_FAILED();
HDfprintf(stdout, " got: {%a, %a}\n",
ro.btree_addr, ro.heap_addr);
HDfprintf(stdout, " ans: {%a, %a}\n",
@@ -205,13 +205,13 @@ main(void)
stab.btree_addr = (i+1)*1000+1;
stab.heap_addr = (i+1)*1000+2;
if (H5O_modify(&oh_ent, H5O_STAB, H5O_NEW_MESG, 0, &stab)<0) {
- FAILED();
+ H5_FAILED();
H5Eprint(stdout);
goto error;
}
}
if (H5AC_flush(f, NULL, HADDR_UNDEF, TRUE)<0) {
- FAILED();
+ H5_FAILED();
H5Eprint(stdout);
goto error;
}
@@ -226,12 +226,12 @@ main(void)
stab.btree_addr = (i + 1) * 1000 + 10;
stab.heap_addr = (i + 1) * 1000 + 20;
if (H5O_modify(&oh_ent, H5O_STAB, H5O_NEW_MESG, 0, &stab)<0) {
- FAILED();
+ H5_FAILED();
H5Eprint(stdout);
goto error;
}
if (H5AC_flush(f, NULL, HADDR_UNDEF, TRUE)<0) {
- FAILED();
+ H5_FAILED();
H5Eprint(stdout);
goto error;
}
@@ -243,12 +243,12 @@ main(void)
*/
TESTING("message deletion");
if (H5O_remove(&oh_ent, H5O_STAB, H5O_ALL)<0) {
- FAILED();
+ H5_FAILED();
H5Eprint(stdout);
goto error;
}
if (H5O_read(&oh_ent, H5O_STAB, 0, &ro)) {
- FAILED();
+ H5_FAILED();
puts(" H5O_read() should have failed but didn't");
H5Eclear();
goto error;
@@ -259,7 +259,7 @@ main(void)
/* release resources */
TESTING("object header closing");
if (H5O_close(&oh_ent)<0) {
- FAILED();
+ H5_FAILED();
H5Eprint(stdout);
goto error;
}
diff --git a/test/stab.c b/test/stab.c
index 46c9ca9..4517930 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -66,7 +66,7 @@ test_misc(hid_t fapl)
if ((g3=H5Gopen(file, "/test_1b"))<0) goto error;
if (H5Gget_comment(g3, "././.", sizeof comment, comment)<0) goto error;
if (strcmp(comment, "hello world")) {
- FAILED();
+ H5_FAILED();
puts(" Read the wrong comment string from the group.");
printf(" got: \"%s\"\n ans: \"hello world\"\n", comment);
goto error;
diff --git a/test/unlink.c b/test/unlink.c
index 84802b3..fbf9f99 100644
--- a/test/unlink.c
+++ b/test/unlink.c
@@ -64,7 +64,7 @@ test_one(hid_t file)
status = H5Gunlink(grp, ".");
} H5E_END_TRY;
if (status>=0) {
- FAILED();
+ H5_FAILED();
puts(" Unlinking object w/o a name should have failed.");
goto error;
}