From b6fa15d1bb2d0510161d906d975592645d9a2dde Mon Sep 17 00:00:00 2001 From: Leon Arber Date: Mon, 18 Oct 2004 17:47:53 -0500 Subject: [svn-r9431] Purpose: Bug fix. Description: If a subtest failed, the error would not propogate properly to the main function, thereby resulting in a succesful run, even though the test failed. Solution: Fixed error return values. The dtransform test will now fail for real. Platforms tested: sol + eirene + copper --- test/dtransform.c | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/test/dtransform.c b/test/dtransform.c index 2414235..1b60250 100644 --- a/test/dtransform.c +++ b/test/dtransform.c @@ -268,6 +268,7 @@ int test_int(const hid_t dxpl_id_c_to_f, const hid_t dxpl_id_polynomial) { H5_FAILED(); fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); + goto error; } else PASSED(); @@ -278,6 +279,7 @@ int test_int(const hid_t dxpl_id_c_to_f, const hid_t dxpl_id_polynomial) { H5_FAILED(); fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); + goto error; } else PASSED(); @@ -288,6 +290,7 @@ int test_int(const hid_t dxpl_id_c_to_f, const hid_t dxpl_id_polynomial) { H5_FAILED(); fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); + goto error; } else PASSED(); @@ -329,6 +332,7 @@ int test_float(const hid_t dxpl_id_c_to_f, const hid_t dxpl_id_polynomial) { H5_FAILED(); fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); + goto error; } else PASSED(); @@ -339,6 +343,7 @@ int test_float(const hid_t dxpl_id_c_to_f, const hid_t dxpl_id_polynomial) { H5_FAILED(); fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); + goto error; } else PASSED(); @@ -349,6 +354,7 @@ int test_float(const hid_t dxpl_id_c_to_f, const hid_t dxpl_id_polynomial) { H5_FAILED(); fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); + goto error; } else PASSED(); @@ -372,6 +378,7 @@ int test_uchar(const hid_t dxpl_id_utrans_inv) { H5_FAILED(); fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); + goto error; } else PASSED(); @@ -394,6 +401,7 @@ int test_schar(const hid_t dxpl_id_c_to_f) { H5_FAILED(); fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); + goto error; } else PASSED(); @@ -416,6 +424,7 @@ int test_char(const hid_t dxpl_id_c_to_f) { H5_FAILED(); fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); + goto error; } else PASSED(); @@ -441,6 +450,7 @@ int test_uint(const hid_t dxpl_id_utrans_inv) { H5_FAILED(); fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); + goto error; } else PASSED(); @@ -464,6 +474,7 @@ int test_ushort(const hid_t dxpl_id_utrans_inv) { H5_FAILED(); fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); + goto error; } else PASSED(); @@ -487,6 +498,7 @@ int test_short(const hid_t dxpl_id_c_to_f) { H5_FAILED(); fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); + goto error; } else PASSED(); @@ -512,6 +524,7 @@ int test_long(const hid_t dxpl_id_c_to_f) { H5_FAILED(); fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); + goto error; } else PASSED(); @@ -534,6 +547,7 @@ int test_ulong(const hid_t dxpl_id_utrans_inv) { H5_FAILED(); fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); + goto error; } else PASSED(); @@ -557,6 +571,7 @@ int test_llong(const hid_t dxpl_id_c_to_f) { H5_FAILED(); fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); + goto error; } else PASSED(); @@ -580,6 +595,7 @@ int test_ullong(const hid_t dxpl_id_utrans_inv) { H5_FAILED(); fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); + goto error; } else PASSED(); @@ -603,6 +619,7 @@ int test_double(const hid_t dxpl_id_c_to_f) { H5_FAILED(); fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); + goto error; } else PASSED(); @@ -625,6 +642,7 @@ int test_ldouble(const hid_t dxpl_id_c_to_f) { H5_FAILED(); fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); + goto error; } else PASSED(); @@ -667,6 +685,7 @@ int test_copy(const hid_t dxpl_id_c_to_f_copy, const hid_t dxpl_id_polynomial_co { H5_FAILED(); fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); + goto error; } else PASSED(); @@ -677,6 +696,7 @@ int test_copy(const hid_t dxpl_id_c_to_f_copy, const hid_t dxpl_id_polynomial_co { H5_FAILED(); fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); + goto error; } else PASSED(); @@ -695,8 +715,6 @@ int test_trivial(const hid_t dxpl_id_simple) herr_t err; int row, col; - int failed = 0; - TESTING("data transform, trivial transform, without type conversion") if((err = H5Dread(dset_id_float, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, dxpl_id_simple, windchillFfloatread))<0) TEST_ERROR; for(row = 0; row