summaryrefslogtreecommitdiffstats
path: root/test/ttsafe_error.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/ttsafe_error.c')
-rw-r--r--test/ttsafe_error.c21
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);