diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2011-06-06 17:05:37 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2011-06-06 17:05:37 (GMT) |
commit | aabfb1d7567ed7b69ec2d4b10bb254aec9cabbc3 (patch) | |
tree | 0c0721cb078b71c3163498616bbe06431fcf195e /test/error_test.c | |
parent | 5fe34ffd25c659ec4033e8d0521bc6be41c70b4d (diff) | |
download | hdf5-aabfb1d7567ed7b69ec2d4b10bb254aec9cabbc3.zip hdf5-aabfb1d7567ed7b69ec2d4b10bb254aec9cabbc3.tar.gz hdf5-aabfb1d7567ed7b69ec2d4b10bb254aec9cabbc3.tar.bz2 |
[svn-r20934] Issue 4278 - When reading data fails, the error message should say which filter isn't registered. This is the follow-up commit (20929 and 20930). The check-vfd in Makefile has trouble with the file name. Because the test file
is pre-generated, I use the default FAPL to create the full file name to avoid some driver test.
Tested on jam - simple change.
Diffstat (limited to 'test/error_test.c')
-rw-r--r-- | test/error_test.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/test/error_test.c b/test/error_test.c index aa7dc63..760351d 100644 --- a/test/error_test.c +++ b/test/error_test.c @@ -25,7 +25,7 @@ #ifdef H5_USE_16_API int main(void) { - printf("Test skipped because backward compatbility with v1.6 is configured in\n"); + fprintf(stderr, "Test skipped because backward compatbility with v1.6 is configured in\n"); return 0; } #else /* H5_USE_16_API */ @@ -363,7 +363,7 @@ test_long_desc(void) if(H5Epush(H5E_DEFAULT, __FILE__, test_FUNC, __LINE__, ERR_CLS, ERR_MAJ_TEST, ERR_MIN_SUBROUTINE, format, long_desc) < 0) TEST_ERROR; /* Create the string that should be in the description */ - HDsnprintf(full_desc, (size_t)(LONG_DESC_SIZE + 128), format, long_desc); + snprintf(full_desc, (size_t)(LONG_DESC_SIZE + 128), format, long_desc); /* Make certain that the description is correct */ if(H5Ewalk2(H5E_DEFAULT, H5E_WALK_UPWARD, long_desc_cb, full_desc) < 0) TEST_ERROR; @@ -747,18 +747,20 @@ main(void) if(close_error() < 0) TEST_ERROR; - /* Test error message during data reading when filter isn't registered */ - h5_fixname(FILENAME[1], fapl, filename, sizeof filename); + /* 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. */ + h5_fixname(FILENAME[1], H5P_DEFAULT, filename, sizeof filename); if(test_filter_error(filename) < 0) TEST_ERROR; h5_cleanup(FILENAME, fapl); - printf("All error API tests passed.\n"); + fprintf(stderr, "\nAll error API tests passed.\n"); return 0; error: - printf("***** ERROR TEST FAILED! *****\n"); + fprintf(stderr, "\n***** ERROR TEST FAILED (real problem)! *****\n"); return 1; } #endif /* H5_USE_16_API */ |