[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
This commit is contained in:
Bill Wendling 2001-09-04 12:37:10 -05:00
parent f0fbd00403
commit a34af05801

View File

@ -9,9 +9,11 @@
* entry. * entry.
* *
* Temporary files generated: * Temporary files generated:
*
* ttsafe_error.h5 * ttsafe_error.h5
* *
* HDF5 APIs exercised in thread: * HDF5 APIs exercised in thread:
*
* H5Screate_simple, H5Tcopy, H5Tset_order, H5Dcreate, H5Dclose, * H5Screate_simple, H5Tcopy, H5Tset_order, H5Dcreate, H5Dclose,
* H5Tclose, H5Sclose. * H5Tclose, H5Sclose.
* *
@ -41,13 +43,11 @@ static int dummy; /* just to create a non-empty object file */
#define EXPECTED_ERROR_DEPTH 3 #define EXPECTED_ERROR_DEPTH 3
#define WRITE_NUMBER 37 #define WRITE_NUMBER 37
/* Global variables */ static herr_t error_callback(void *);
extern int num_errs; static herr_t walk_error_callback(int, H5E_error_t *, void *);
extern int Verbosity; static void *tts_error_thread(void *);
herr_t error_callback(void *); /* Global variables */
herr_t walk_error_callback(int, H5E_error_t *, void *);
void *tts_error_thread(void *);
hid_t error_file; hid_t error_file;
typedef struct err_num_struct { typedef struct err_num_struct {
@ -58,7 +58,7 @@ typedef struct err_num_struct {
err_num_t expected[] = { err_num_t expected[] = {
{15, 23}, {15, 23},
{15, 23}, {15, 23},
{10, 32} {10, 34}
}; };
int error_flag = 0; int error_flag = 0;
@ -127,6 +127,7 @@ void tts_error(void)
H5Eset_auto(old_error_cb, old_error_client_data); H5Eset_auto(old_error_cb, old_error_client_data);
} }
static
void *tts_error_thread(void *arg) void *tts_error_thread(void *arg)
{ {
hid_t dataspace, datatype, dataset; hid_t dataspace, datatype, dataset;
@ -153,17 +154,21 @@ void *tts_error_thread(void *arg)
H5Tclose(datatype); H5Tclose(datatype);
H5Sclose(dataspace); H5Sclose(dataspace);
return (NULL); arg = arg; /* gets rid of annoying warning message */
return NULL;
} }
static
herr_t error_callback(void *client_data) herr_t error_callback(void *client_data)
{ {
pthread_mutex_lock(&error_mutex); pthread_mutex_lock(&error_mutex);
error_count++; error_count++;
pthread_mutex_unlock(&error_mutex); pthread_mutex_unlock(&error_mutex);
client_data = client_data; /* gets rid of annoying warning message */
return H5Ewalk(H5E_WALK_DOWNWARD, walk_error_callback, NULL); 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) herr_t walk_error_callback(int n, H5E_error_t *err_desc, void *client_data)
{ {
int maj_num, min_num; 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; error_flag = -1;
client_data = client_data; /* gets rid of annoying warning message */
return SUCCEED; return SUCCEED;
} }