diff options
author | Bill Wendling <wendling@ncsa.uiuc.edu> | 2001-09-04 17:37:10 (GMT) |
---|---|---|
committer | Bill Wendling <wendling@ncsa.uiuc.edu> | 2001-09-04 17:37:10 (GMT) |
commit | a34af05801f3eceadd03ff00eba560c7aaccdf35 (patch) | |
tree | 0760fb8ce71e43b0ee82153a3807280d364781bf | |
parent | f0fbd004033b60c343687d8b83134ce20e0f0666 (diff) | |
download | hdf5-a34af05801f3eceadd03ff00eba560c7aaccdf35.zip hdf5-a34af05801f3eceadd03ff00eba560c7aaccdf35.tar.gz hdf5-a34af05801f3eceadd03ff00eba560c7aaccdf35.tar.bz2 |
[svn-r4419]
Purpose:
Bug Fix
Description:
The table of error messages was updated in H5E.c. The change wasn't
reflected in this test because, sadly, we use hardcoded numerical
values for the "error" we want to check for and not the symbols.
Solution:
Bumped up the error number from 32 to 34 to coincide with the error
we expect.
Platforms tested:
Linux
-rw-r--r-- | test/ttsafe_error.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/test/ttsafe_error.c b/test/ttsafe_error.c index b9b8b0b..3915d2e 100644 --- a/test/ttsafe_error.c +++ b/test/ttsafe_error.c @@ -9,11 +9,13 @@ * entry. * * Temporary files generated: - * ttsafe_error.h5 + * + * ttsafe_error.h5 * * HDF5 APIs exercised in thread: - * H5Screate_simple, H5Tcopy, H5Tset_order, H5Dcreate, H5Dclose, - * H5Tclose, H5Sclose. + * + * H5Screate_simple, H5Tcopy, H5Tset_order, H5Dcreate, H5Dclose, + * H5Tclose, H5Sclose. * * Created: Apr 28 2000 * Programmer: Chee Wai LEE @@ -33,21 +35,19 @@ static int dummy; /* just to create a non-empty object file */ #else -#define NUM_THREAD 16 -#define FILENAME "ttsafe_error.h5" +#define NUM_THREAD 16 +#define FILENAME "ttsafe_error.h5" /* Having a common dataset name is an error */ #define DATASETNAME "commonname" #define EXPECTED_ERROR_DEPTH 3 #define WRITE_NUMBER 37 -/* Global variables */ -extern int num_errs; -extern int Verbosity; +static herr_t error_callback(void *); +static herr_t walk_error_callback(int, H5E_error_t *, void *); +static void *tts_error_thread(void *); -herr_t error_callback(void *); -herr_t walk_error_callback(int, H5E_error_t *, void *); -void *tts_error_thread(void *); +/* Global variables */ hid_t error_file; typedef struct err_num_struct { @@ -58,7 +58,7 @@ typedef struct err_num_struct { err_num_t expected[] = { {15, 23}, {15, 23}, - {10, 32} + {10, 34} }; int error_flag = 0; @@ -127,6 +127,7 @@ void tts_error(void) H5Eset_auto(old_error_cb, old_error_client_data); } +static void *tts_error_thread(void *arg) { hid_t dataspace, datatype, dataset; @@ -153,17 +154,21 @@ void *tts_error_thread(void *arg) H5Tclose(datatype); H5Sclose(dataspace); - return (NULL); + arg = arg; /* gets rid of annoying warning message */ + return NULL; } +static herr_t error_callback(void *client_data) { pthread_mutex_lock(&error_mutex); error_count++; pthread_mutex_unlock(&error_mutex); + client_data = client_data; /* gets rid of annoying warning message */ return H5Ewalk(H5E_WALK_DOWNWARD, walk_error_callback, NULL); } +static herr_t walk_error_callback(int n, H5E_error_t *err_desc, void *client_data) { int maj_num, min_num; @@ -178,6 +183,7 @@ herr_t walk_error_callback(int n, H5E_error_t *err_desc, void *client_data) } error_flag = -1; + client_data = client_data; /* gets rid of annoying warning message */ return SUCCEED; } |