diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-01-10 01:41:13 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-01-10 01:41:13 (GMT) |
commit | 987f5d5e4de41c02b682464fa8e94252553ed57c (patch) | |
tree | 2bf74eb88dee718490af7b7dda0e585b0d1b8a95 /test/ttsafe_error.c | |
parent | 12dca9ab3c362fc190feb330232bec4bd552df3c (diff) | |
download | hdf5-987f5d5e4de41c02b682464fa8e94252553ed57c.zip hdf5-987f5d5e4de41c02b682464fa8e94252553ed57c.tar.gz hdf5-987f5d5e4de41c02b682464fa8e94252553ed57c.tar.bz2 |
[svn-r8048] Purpose:
Code cleanup & reorganization
Description:
Move further in the testing framework cleanup, eliminating all the
global variables (moving them into testframe.c as static variables) from the
testing framework code and moving it into the libh5test.a.
Platforms tested:
FreeBSD 4.9 (sleipnir) w & w/o thread-safety, c++ & parallel
h5committested
Diffstat (limited to 'test/ttsafe_error.c')
-rw-r--r-- | test/ttsafe_error.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/test/ttsafe_error.c b/test/ttsafe_error.c index 2cf5a92..8f35a84 100644 --- a/test/ttsafe_error.c +++ b/test/ttsafe_error.c @@ -39,8 +39,7 @@ * * 19 May 2000, Bill Wendling * Modified so that it creates a unique HDF5 file and removes it on - * cleanup. Also added the num_errs flag and increment it when necessary - * to report the errors. + * cleanup. * ********************************************************************/ #include "ttsafe.h" @@ -131,23 +130,17 @@ void tts_error(void) for (i = 0; i < NUM_THREAD; i++) pthread_join(threads[i],NULL); - if (error_flag) { - fprintf(stderr, "Threads reporting different error values!\n"); - num_errs++; - } + if (error_flag) + TestErrPrintf("Threads reporting different error values!\n"); - if (error_count != NUM_THREAD - 1) { - fprintf(stderr, "Error: %d threads failed instead of %d\n", error_count, NUM_THREAD-1); - num_errs++; - } + if (error_count != NUM_THREAD - 1) + TestErrPrintf("Error: %d threads failed instead of %d\n", error_count, NUM_THREAD-1); dataset = H5Dopen(error_file, DATASETNAME); H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &value); - if (value != WRITE_NUMBER) { - fprintf(stderr, "Error: Successful thread wrote value %d instead of %d\n", value, WRITE_NUMBER); - num_errs++; - } + if (value != WRITE_NUMBER) + TestErrPrintf("Error: Successful thread wrote value %d instead of %d\n", value, WRITE_NUMBER); H5Dclose(dataset); H5Fclose(error_file); |