2003-07-11 04:15:46 +08:00
|
|
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
2007-02-07 22:56:24 +08:00
|
|
|
* Copyright by The HDF Group. *
|
2003-07-11 04:15:46 +08:00
|
|
|
* All rights reserved. *
|
|
|
|
* *
|
|
|
|
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
|
|
|
* terms governing use, modification, and redistribution, is contained in *
|
2017-04-18 03:32:16 +08:00
|
|
|
* the COPYING file, which can be found at the root of the source code *
|
2021-02-17 22:52:04 +08:00
|
|
|
* distribution tree, or in https://www.hdfgroup.org/licenses. *
|
2017-04-18 03:32:16 +08:00
|
|
|
* If you do not have access to either file, you may request a copy from *
|
|
|
|
* help@hdfgroup.org. *
|
2003-07-11 04:15:46 +08:00
|
|
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
|
|
|
|
|
|
/*
|
2019-08-05 04:19:04 +08:00
|
|
|
* Purpose: Tests the error API routines.
|
2003-07-11 04:15:46 +08:00
|
|
|
*/
|
|
|
|
#include "h5test.h"
|
2011-06-03 23:58:49 +08:00
|
|
|
#include "H5srcdir.h"
|
2003-07-11 04:15:46 +08:00
|
|
|
|
2010-09-28 03:02:48 +08:00
|
|
|
#ifdef H5_USE_16_API
|
2020-09-30 22:27:10 +08:00
|
|
|
int
|
|
|
|
main(void)
|
2003-09-25 03:26:50 +08:00
|
|
|
{
|
2023-06-28 23:31:32 +08:00
|
|
|
fprintf(stderr, "Test skipped because backward compatibility with v1.6 is configured in\n");
|
2003-09-25 03:26:50 +08:00
|
|
|
return 0;
|
|
|
|
}
|
2008-10-31 04:49:08 +08:00
|
|
|
#else /* H5_USE_16_API */
|
2003-09-25 03:26:50 +08:00
|
|
|
|
2023-06-19 13:13:38 +08:00
|
|
|
static const char *FILENAME[] = {"errors", NULL};
|
2003-07-11 04:15:46 +08:00
|
|
|
|
2011-06-14 05:28:49 +08:00
|
|
|
#define DATAFILE "filter_error"
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
#define DIM0 100
|
|
|
|
#define DIM1 200
|
2003-07-11 04:15:46 +08:00
|
|
|
|
2023-06-19 13:13:38 +08:00
|
|
|
static int **ipoints2 = NULL;
|
|
|
|
static int **icheck2 = NULL;
|
|
|
|
static int *ipoints2_data = NULL;
|
|
|
|
static int *icheck2_data = NULL;
|
2003-07-16 06:17:09 +08:00
|
|
|
|
2023-06-19 13:13:38 +08:00
|
|
|
static hid_t ERR_CLS;
|
|
|
|
static hid_t ERR_CLS2;
|
|
|
|
static hid_t ERR_STACK;
|
2003-07-16 06:17:09 +08:00
|
|
|
|
2023-06-19 13:13:38 +08:00
|
|
|
static hid_t ERR_MAJ_TEST;
|
|
|
|
static hid_t ERR_MAJ_IO;
|
|
|
|
static hid_t ERR_MAJ_API;
|
2003-07-11 04:15:46 +08:00
|
|
|
|
2023-06-19 13:13:38 +08:00
|
|
|
static hid_t ERR_MIN_SUBROUTINE;
|
|
|
|
static hid_t ERR_MIN_ERRSTACK;
|
|
|
|
static hid_t ERR_MIN_CREATE;
|
|
|
|
static hid_t ERR_MIN_WRITE;
|
|
|
|
static hid_t ERR_MIN_GETNUM;
|
2003-07-11 04:15:46 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
#define DSET_NAME "a_dataset"
|
|
|
|
#define FAKE_ID (hid_t)0
|
2003-07-18 09:46:40 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
#define ERR_CLS_NAME "Error Test"
|
|
|
|
#define ERR_CLS2_NAME "Second Test"
|
|
|
|
#define PROG_NAME "Error Program"
|
|
|
|
#define PROG2_NAME "Second Program"
|
|
|
|
#define PROG_VERS "1.0"
|
2003-07-11 04:15:46 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
#define ERR_MAJ_TEST_MSG "Error in test"
|
|
|
|
#define ERR_MAJ_IO_MSG "Error in IO"
|
|
|
|
#define ERR_MAJ_API_MSG "Error in API"
|
|
|
|
#define ERR_MIN_SUBROUTINE_MSG "Error in subroutine"
|
|
|
|
#define ERR_MIN_ERRSTACK_MSG "Error in error stack"
|
|
|
|
#define ERR_MIN_CREATE_MSG "Error in H5Dcreate2"
|
|
|
|
#define ERR_MIN_WRITE_MSG "Error in H5Dwrite"
|
|
|
|
#define ERR_MIN_GETNUM_MSG "Error in H5Eget_num"
|
2005-01-15 03:36:01 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
#define MSG_SIZE 64
|
|
|
|
#define LONG_DESC_SIZE 8192
|
2011-06-03 23:58:49 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
#define DSET_FILTER_NAME "dataset_with_filter"
|
2003-07-18 09:46:40 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
static herr_t custom_print_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data);
|
2019-08-05 04:19:04 +08:00
|
|
|
|
2003-07-11 04:15:46 +08:00
|
|
|
/*-------------------------------------------------------------------------
|
2017-11-18 07:21:49 +08:00
|
|
|
* Function: test_error
|
2003-07-11 04:15:46 +08:00
|
|
|
*
|
2017-11-18 07:21:49 +08:00
|
|
|
* Purpose: Test error API functions
|
2003-07-11 04:15:46 +08:00
|
|
|
*
|
2017-11-18 07:21:49 +08:00
|
|
|
* Return: Success: 0
|
|
|
|
* Failure: -1
|
2003-07-11 04:15:46 +08:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static herr_t
|
|
|
|
test_error(hid_t file)
|
|
|
|
{
|
2023-09-09 07:06:23 +08:00
|
|
|
hid_t dataset = H5I_INVALID_HID;
|
|
|
|
hid_t space = H5I_INVALID_HID;
|
|
|
|
hid_t estack_id = H5I_INVALID_HID;
|
2020-09-30 22:27:10 +08:00
|
|
|
hsize_t dims[2];
|
|
|
|
const char *FUNC_test_error = "test_error";
|
|
|
|
H5E_auto2_t old_func;
|
2022-07-27 05:45:46 +08:00
|
|
|
void *old_data = NULL;
|
2005-08-14 04:53:35 +08:00
|
|
|
|
2023-06-28 23:31:32 +08:00
|
|
|
fprintf(stderr, "\nTesting error API based on data I/O\n");
|
2003-07-11 04:15:46 +08:00
|
|
|
|
|
|
|
/* Create the data space */
|
|
|
|
dims[0] = DIM0;
|
|
|
|
dims[1] = DIM1;
|
2017-11-18 07:21:49 +08:00
|
|
|
if ((space = H5Screate_simple(2, dims, NULL)) < 0)
|
|
|
|
TEST_ERROR;
|
2003-07-11 04:15:46 +08:00
|
|
|
|
2003-07-22 09:32:27 +08:00
|
|
|
/* Test H5E_BEGIN_TRY */
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
[svn-r14199] Description:
Add H5Dcreate to API versioned routines, replacing internal usage with
H5Dcreate2
Fix thread-safe error stack initialization for API versioned error
stack printing routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-12 00:24:11 +08:00
|
|
|
dataset = H5Dcreate2(FAKE_ID, DSET_NAME, H5T_STD_I32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
2023-06-16 12:49:02 +08:00
|
|
|
H5E_END_TRY
|
2005-08-14 04:53:35 +08:00
|
|
|
|
2003-07-11 04:15:46 +08:00
|
|
|
/* Create the dataset */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dataset = H5Dcreate2(file, DSET_NAME, H5T_STD_I32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
|
|
|
|
0) {
|
2007-08-22 05:08:27 +08:00
|
|
|
H5Epush(H5E_DEFAULT, __FILE__, FUNC_test_error, __LINE__, ERR_CLS, ERR_MAJ_IO, ERR_MIN_CREATE,
|
[svn-r14199] Description:
Add H5Dcreate to API versioned routines, replacing internal usage with
H5Dcreate2
Fix thread-safe error stack initialization for API versioned error
stack printing routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-12 00:24:11 +08:00
|
|
|
"H5Dcreate2 failed");
|
2003-07-18 09:46:40 +08:00
|
|
|
goto error;
|
2017-11-18 07:21:49 +08:00
|
|
|
}
|
2003-07-11 04:15:46 +08:00
|
|
|
|
2003-07-22 09:32:27 +08:00
|
|
|
/* Test enabling and disabling default printing */
|
2017-11-18 07:21:49 +08:00
|
|
|
if (H5Eget_auto2(H5E_DEFAULT, &old_func, &old_data) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (old_data != NULL)
|
|
|
|
TEST_ERROR;
|
2021-05-27 01:05:24 +08:00
|
|
|
if (old_func == NULL)
|
2017-11-18 07:21:49 +08:00
|
|
|
TEST_ERROR;
|
2003-07-11 04:15:46 +08:00
|
|
|
|
2017-11-18 07:21:49 +08:00
|
|
|
if (H5Eset_auto2(H5E_DEFAULT, NULL, NULL) < 0)
|
2003-07-11 04:15:46 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
|
2003-07-22 09:32:27 +08:00
|
|
|
/* Make H5Dwrite fail, verify default print is disabled */
|
2017-11-18 07:21:49 +08:00
|
|
|
if (H5Dwrite(FAKE_ID, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, ipoints2) >= 0) {
|
2007-08-22 05:08:27 +08:00
|
|
|
H5Epush(H5E_DEFAULT, __FILE__, FUNC_test_error, __LINE__, ERR_CLS, ERR_MAJ_IO, ERR_MIN_WRITE,
|
2003-07-22 09:32:27 +08:00
|
|
|
"H5Dwrite shouldn't succeed");
|
|
|
|
goto error;
|
2017-11-18 07:21:49 +08:00
|
|
|
}
|
2003-07-11 04:15:46 +08:00
|
|
|
|
2017-11-18 07:21:49 +08:00
|
|
|
if (H5Eset_auto2(H5E_DEFAULT, old_func, old_data) < 0)
|
2003-07-11 04:15:46 +08:00
|
|
|
TEST_ERROR;
|
2003-07-22 09:32:27 +08:00
|
|
|
|
|
|
|
/* Test saving and restoring the current error stack */
|
2017-11-18 07:21:49 +08:00
|
|
|
if (H5Dwrite(FAKE_ID, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, ipoints2) < 0) {
|
2007-08-22 05:08:27 +08:00
|
|
|
H5Epush(H5E_DEFAULT, __FILE__, FUNC_test_error, __LINE__, ERR_CLS, ERR_MAJ_IO, ERR_MIN_WRITE,
|
2003-07-22 09:32:27 +08:00
|
|
|
"H5Dwrite failed as supposed to");
|
|
|
|
estack_id = H5Eget_current_stack();
|
|
|
|
H5Dclose(dataset);
|
|
|
|
H5Sclose(space);
|
|
|
|
H5Eset_current_stack(estack_id);
|
2005-08-14 04:53:35 +08:00
|
|
|
goto error;
|
2017-11-18 07:21:49 +08:00
|
|
|
}
|
2003-07-11 04:15:46 +08:00
|
|
|
|
2003-07-22 09:32:27 +08:00
|
|
|
/* In case program comes to this point, close dataset */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Dclose(dataset) < 0)
|
2017-11-18 07:21:49 +08:00
|
|
|
TEST_ERROR;
|
2005-08-14 04:53:35 +08:00
|
|
|
|
|
|
|
TEST_ERROR;
|
2003-07-11 04:15:46 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
error:
|
2003-07-11 04:15:46 +08:00
|
|
|
return -1;
|
2007-04-12 09:59:45 +08:00
|
|
|
} /* end test_error() */
|
2003-07-11 04:15:46 +08:00
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
2017-11-18 07:21:49 +08:00
|
|
|
* Function: init_error
|
2003-07-11 04:15:46 +08:00
|
|
|
*
|
2017-11-18 07:21:49 +08:00
|
|
|
* Purpose: Initialize error information.
|
2003-07-11 04:15:46 +08:00
|
|
|
*
|
2017-11-18 07:21:49 +08:00
|
|
|
* Return: Success: 0
|
|
|
|
* Failure: -1
|
2003-07-11 04:15:46 +08:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
2005-08-14 04:53:35 +08:00
|
|
|
static herr_t
|
2003-07-11 04:15:46 +08:00
|
|
|
init_error(void)
|
|
|
|
{
|
2023-09-16 06:13:18 +08:00
|
|
|
ssize_t cls_size = (ssize_t)strlen(ERR_CLS_NAME) + 1;
|
|
|
|
ssize_t msg_size = (ssize_t)strlen(ERR_MIN_SUBROUTINE_MSG) + 1;
|
2022-07-27 05:45:46 +08:00
|
|
|
char *cls_name = NULL;
|
|
|
|
char *msg = NULL;
|
2010-02-20 10:23:44 +08:00
|
|
|
H5E_type_t msg_type;
|
|
|
|
|
2023-09-16 06:13:18 +08:00
|
|
|
if (NULL == (cls_name = (char *)malloc(strlen(ERR_CLS_NAME) + 1)))
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
2023-09-16 06:13:18 +08:00
|
|
|
if (NULL == (msg = (char *)malloc(strlen(ERR_MIN_SUBROUTINE_MSG) + 1)))
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
2005-08-14 04:53:35 +08:00
|
|
|
|
2017-11-18 07:21:49 +08:00
|
|
|
if ((ERR_CLS = H5Eregister_class(ERR_CLS_NAME, PROG_NAME, PROG_VERS)) < 0)
|
2003-07-15 23:49:36 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
|
2017-11-18 07:21:49 +08:00
|
|
|
if (cls_size != H5Eget_class_name(ERR_CLS, cls_name, (size_t)cls_size) + 1)
|
2003-07-15 23:49:36 +08:00
|
|
|
TEST_ERROR;
|
2023-09-16 06:13:18 +08:00
|
|
|
if (strcmp(ERR_CLS_NAME, cls_name) != 0)
|
2003-07-15 23:49:36 +08:00
|
|
|
TEST_ERROR;
|
2005-08-14 04:53:35 +08:00
|
|
|
|
2017-11-18 07:21:49 +08:00
|
|
|
if ((ERR_MAJ_TEST = H5Ecreate_msg(ERR_CLS, H5E_MAJOR, ERR_MAJ_TEST_MSG)) < 0)
|
2003-07-16 06:17:09 +08:00
|
|
|
TEST_ERROR;
|
2017-11-18 07:21:49 +08:00
|
|
|
if ((ERR_MAJ_IO = H5Ecreate_msg(ERR_CLS, H5E_MAJOR, ERR_MAJ_IO_MSG)) < 0)
|
2003-07-16 06:17:09 +08:00
|
|
|
TEST_ERROR;
|
2017-11-18 07:21:49 +08:00
|
|
|
if ((ERR_MAJ_API = H5Ecreate_msg(ERR_CLS, H5E_MAJOR, ERR_MAJ_API_MSG)) < 0)
|
2003-07-18 09:46:40 +08:00
|
|
|
TEST_ERROR;
|
2003-07-16 06:17:09 +08:00
|
|
|
|
2017-11-18 07:21:49 +08:00
|
|
|
if ((ERR_MIN_SUBROUTINE = H5Ecreate_msg(ERR_CLS, H5E_MINOR, ERR_MIN_SUBROUTINE_MSG)) < 0)
|
2003-07-15 23:49:36 +08:00
|
|
|
TEST_ERROR;
|
2017-11-18 07:21:49 +08:00
|
|
|
if ((ERR_MIN_ERRSTACK = H5Ecreate_msg(ERR_CLS, H5E_MINOR, ERR_MIN_ERRSTACK_MSG)) < 0)
|
2003-07-18 09:46:40 +08:00
|
|
|
TEST_ERROR;
|
2017-11-18 07:21:49 +08:00
|
|
|
if ((ERR_MIN_CREATE = H5Ecreate_msg(ERR_CLS, H5E_MINOR, ERR_MIN_CREATE_MSG)) < 0)
|
2003-07-15 23:49:36 +08:00
|
|
|
TEST_ERROR;
|
2017-11-18 07:21:49 +08:00
|
|
|
if ((ERR_MIN_WRITE = H5Ecreate_msg(ERR_CLS, H5E_MINOR, ERR_MIN_WRITE_MSG)) < 0)
|
2003-07-22 09:32:27 +08:00
|
|
|
TEST_ERROR;
|
2017-11-18 07:21:49 +08:00
|
|
|
if ((ERR_MIN_GETNUM = H5Ecreate_msg(ERR_CLS, H5E_MINOR, ERR_MIN_GETNUM_MSG)) < 0)
|
2003-07-18 09:46:40 +08:00
|
|
|
TEST_ERROR;
|
2003-07-15 23:49:36 +08:00
|
|
|
|
2017-11-18 07:21:49 +08:00
|
|
|
if (msg_size != H5Eget_msg(ERR_MIN_SUBROUTINE, &msg_type, msg, (size_t)msg_size) + 1)
|
2003-07-15 23:49:36 +08:00
|
|
|
TEST_ERROR;
|
2017-11-18 07:21:49 +08:00
|
|
|
if (msg_type != H5E_MINOR)
|
2003-07-15 23:49:36 +08:00
|
|
|
TEST_ERROR;
|
2023-09-16 06:13:18 +08:00
|
|
|
if (strcmp(msg, ERR_MIN_SUBROUTINE_MSG) != 0)
|
2003-07-15 23:49:36 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
|
2009-04-23 02:39:10 +08:00
|
|
|
/* Register another class for later testing. */
|
2017-11-18 07:21:49 +08:00
|
|
|
if ((ERR_CLS2 = H5Eregister_class(ERR_CLS2_NAME, PROG2_NAME, PROG_VERS)) < 0)
|
2009-04-23 02:39:10 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
|
2023-06-29 06:48:12 +08:00
|
|
|
free(cls_name);
|
|
|
|
free(msg);
|
2010-02-20 10:23:44 +08:00
|
|
|
|
2003-07-15 04:08:27 +08:00
|
|
|
return 0;
|
|
|
|
|
2007-04-12 09:59:45 +08:00
|
|
|
error:
|
2017-11-18 07:21:49 +08:00
|
|
|
if (cls_name)
|
2023-06-29 06:48:12 +08:00
|
|
|
free(cls_name);
|
2017-11-18 07:21:49 +08:00
|
|
|
if (msg)
|
2023-06-29 06:48:12 +08:00
|
|
|
free(msg);
|
2010-02-20 10:23:44 +08:00
|
|
|
|
2003-07-15 04:08:27 +08:00
|
|
|
return -1;
|
2007-04-12 09:59:45 +08:00
|
|
|
} /* end init_error() */
|
2003-07-15 04:08:27 +08:00
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
2017-11-18 07:21:49 +08:00
|
|
|
* Function: error_stack
|
2003-07-15 04:08:27 +08:00
|
|
|
*
|
2017-11-18 07:21:49 +08:00
|
|
|
* Purpose: Manipulates current error stack.
|
2003-07-15 04:08:27 +08:00
|
|
|
*
|
2017-11-18 07:21:49 +08:00
|
|
|
* Return: Success: 0
|
|
|
|
* Failure: -1
|
2003-07-15 04:08:27 +08:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
2005-08-14 04:53:35 +08:00
|
|
|
static herr_t
|
2003-07-15 04:08:27 +08:00
|
|
|
error_stack(void)
|
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
ssize_t err_num;
|
|
|
|
const char *FUNC_error_stack = "error_stack";
|
2005-08-14 04:53:35 +08:00
|
|
|
|
2017-11-18 07:21:49 +08:00
|
|
|
if ((err_num = H5Eget_num(H5E_DEFAULT)) < 0)
|
2003-07-16 06:17:09 +08:00
|
|
|
TEST_ERROR;
|
2017-11-18 07:21:49 +08:00
|
|
|
if (err_num)
|
2003-07-16 06:17:09 +08:00
|
|
|
TEST_ERROR;
|
2005-08-14 04:53:35 +08:00
|
|
|
|
2017-11-18 07:21:49 +08:00
|
|
|
if ((ERR_STACK = H5Eget_current_stack()) < 0)
|
2003-07-15 23:49:36 +08:00
|
|
|
TEST_ERROR;
|
2003-07-15 04:08:27 +08:00
|
|
|
|
2003-07-22 09:32:27 +08:00
|
|
|
/* Make it push error, force this function to fail */
|
2017-11-18 07:21:49 +08:00
|
|
|
if ((err_num = H5Eget_num(ERR_STACK)) == 0) {
|
2007-08-22 05:08:27 +08:00
|
|
|
H5Epush(ERR_STACK, __FILE__, FUNC_error_stack, __LINE__, ERR_CLS, ERR_MAJ_API, ERR_MIN_GETNUM,
|
2016-08-16 22:02:21 +08:00
|
|
|
"Get number test failed, returned %d", (int)err_num);
|
2003-07-18 09:46:40 +08:00
|
|
|
goto error;
|
2017-11-18 07:21:49 +08:00
|
|
|
}
|
2005-08-14 04:53:35 +08:00
|
|
|
|
|
|
|
/* In case program falls through here, close the stack and let it fail. */
|
2017-11-18 07:21:49 +08:00
|
|
|
if (H5Eclose_stack(ERR_STACK) < 0)
|
2003-07-15 23:49:36 +08:00
|
|
|
TEST_ERROR;
|
2005-08-14 04:53:35 +08:00
|
|
|
|
2003-07-22 09:32:27 +08:00
|
|
|
return -1;
|
2003-07-15 04:08:27 +08:00
|
|
|
|
2007-04-12 09:59:45 +08:00
|
|
|
error:
|
2003-07-15 04:08:27 +08:00
|
|
|
return -1;
|
2007-04-12 09:59:45 +08:00
|
|
|
} /* end error_stack() */
|
2003-07-15 04:08:27 +08:00
|
|
|
|
2005-01-20 04:15:26 +08:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
* Function: long_desc_cb
|
|
|
|
*
|
2017-11-18 07:21:49 +08:00
|
|
|
* Purpose: Callback function to help test long description handling
|
2005-01-20 04:15:26 +08:00
|
|
|
*
|
2017-11-18 07:21:49 +08:00
|
|
|
* Return: Success: 0
|
|
|
|
* Failure: -1
|
2005-01-20 04:15:26 +08:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
2006-01-24 04:46:34 +08:00
|
|
|
static herr_t
|
2015-06-02 03:38:09 +08:00
|
|
|
long_desc_cb(unsigned H5_ATTR_UNUSED n, const H5E_error2_t *err_desc, void *client_data)
|
2005-01-20 04:15:26 +08:00
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
char *real_desc = (char *)client_data;
|
2005-01-20 04:15:26 +08:00
|
|
|
|
2023-09-16 06:13:18 +08:00
|
|
|
if (err_desc->desc != NULL && strcmp(err_desc->desc, real_desc) == 0)
|
2017-11-18 07:21:49 +08:00
|
|
|
return 0;
|
2005-01-20 04:15:26 +08:00
|
|
|
else
|
2017-11-18 07:21:49 +08:00
|
|
|
return -1;
|
2007-04-12 09:59:45 +08:00
|
|
|
} /* end long_desc_cb() */
|
2005-01-20 04:15:26 +08:00
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
2017-11-18 07:21:49 +08:00
|
|
|
* Function: test_long_desc
|
2005-01-20 04:15:26 +08:00
|
|
|
*
|
2017-11-18 07:21:49 +08:00
|
|
|
* Purpose: Test long error description handling
|
2005-01-20 04:15:26 +08:00
|
|
|
*
|
2017-11-18 07:21:49 +08:00
|
|
|
* Return: Success: 0
|
|
|
|
* Failure: -1
|
2005-01-20 04:15:26 +08:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
2019-07-10 11:15:36 +08:00
|
|
|
/* Disable warning for "format not a string literal" here -QAK */
|
|
|
|
/*
|
|
|
|
* This pragma only needs to surround the snprintf() calls with
|
|
|
|
* 'full_desc' in the code below, but early (4.4.7, at least) gcc only
|
|
|
|
* allows diagnostic pragmas to be toggled outside of functions.
|
|
|
|
*/
|
2021-09-16 20:42:20 +08:00
|
|
|
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
|
2005-08-14 04:53:35 +08:00
|
|
|
static herr_t
|
2005-01-20 04:15:26 +08:00
|
|
|
test_long_desc(void)
|
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
const char *format = "Testing very long description string, %s";
|
2022-07-27 05:45:46 +08:00
|
|
|
char *long_desc = NULL;
|
|
|
|
char *full_desc = NULL;
|
2020-09-30 22:27:10 +08:00
|
|
|
size_t u;
|
|
|
|
const char *test_FUNC = "test_long_desc";
|
2005-01-20 04:15:26 +08:00
|
|
|
|
|
|
|
/* Allocate space for the error description info */
|
2023-06-29 06:48:12 +08:00
|
|
|
if (NULL == (long_desc = (char *)malloc(LONG_DESC_SIZE)))
|
2017-11-18 07:21:49 +08:00
|
|
|
TEST_ERROR;
|
2023-06-29 06:48:12 +08:00
|
|
|
if (NULL == (full_desc = (char *)malloc(LONG_DESC_SIZE + 128)))
|
2017-11-18 07:21:49 +08:00
|
|
|
TEST_ERROR;
|
2005-01-20 04:15:26 +08:00
|
|
|
|
|
|
|
/* Create the long part of the error description */
|
2017-11-18 07:21:49 +08:00
|
|
|
for (u = 0; u < LONG_DESC_SIZE; u++)
|
2016-08-13 17:23:53 +08:00
|
|
|
long_desc[u] = (char)('A' + (u % 26));
|
2007-04-12 09:59:45 +08:00
|
|
|
long_desc[LONG_DESC_SIZE - 1] = '\0';
|
2005-01-20 04:15:26 +08:00
|
|
|
|
|
|
|
/* Clear the default error stack */
|
2017-11-18 07:21:49 +08:00
|
|
|
if (H5Eclear2(H5E_DEFAULT) < 0)
|
|
|
|
TEST_ERROR;
|
2005-01-20 04:15:26 +08:00
|
|
|
|
|
|
|
/* Push an error with a long description */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Epush(H5E_DEFAULT, __FILE__, test_FUNC, __LINE__, ERR_CLS, ERR_MAJ_TEST, ERR_MIN_SUBROUTINE, format,
|
|
|
|
long_desc) < 0)
|
2017-11-18 07:21:49 +08:00
|
|
|
TEST_ERROR;
|
2005-01-20 04:15:26 +08:00
|
|
|
|
2023-09-16 06:13:18 +08:00
|
|
|
/* Create the string that should be in the description. Must use snprintf here
|
2017-11-18 07:21:49 +08:00
|
|
|
* because snprintf is _snprintf on Windows
|
|
|
|
*/
|
2023-09-16 06:13:18 +08:00
|
|
|
snprintf(full_desc, (size_t)(LONG_DESC_SIZE + 128), format, long_desc);
|
2005-01-20 04:15:26 +08:00
|
|
|
|
|
|
|
/* Make certain that the description is correct */
|
2017-11-18 07:21:49 +08:00
|
|
|
if (H5Ewalk2(H5E_DEFAULT, H5E_WALK_UPWARD, long_desc_cb, full_desc) < 0)
|
|
|
|
TEST_ERROR;
|
2005-01-20 04:15:26 +08:00
|
|
|
|
|
|
|
/* Clear the default error stack again */
|
2017-11-18 07:21:49 +08:00
|
|
|
if (H5Eclear2(H5E_DEFAULT) < 0)
|
|
|
|
TEST_ERROR;
|
2005-01-20 04:15:26 +08:00
|
|
|
|
2023-06-29 06:48:12 +08:00
|
|
|
free(long_desc);
|
|
|
|
free(full_desc);
|
2007-04-12 09:59:45 +08:00
|
|
|
|
2017-11-18 07:21:49 +08:00
|
|
|
return 0;
|
2005-01-20 04:15:26 +08:00
|
|
|
|
|
|
|
error:
|
2017-11-18 07:21:49 +08:00
|
|
|
if (long_desc)
|
2023-06-29 06:48:12 +08:00
|
|
|
free(long_desc);
|
2017-11-18 07:21:49 +08:00
|
|
|
if (full_desc)
|
2023-06-29 06:48:12 +08:00
|
|
|
free(full_desc);
|
2007-04-12 09:59:45 +08:00
|
|
|
|
2017-11-18 07:21:49 +08:00
|
|
|
return -1;
|
2007-04-12 09:59:45 +08:00
|
|
|
} /* end test_long_desc() */
|
2021-09-16 20:42:20 +08:00
|
|
|
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
|
2005-01-20 04:15:26 +08:00
|
|
|
|
2003-07-18 09:46:40 +08:00
|
|
|
/*-------------------------------------------------------------------------
|
2005-08-14 04:53:35 +08:00
|
|
|
* Function: dump_error
|
2003-07-18 09:46:40 +08:00
|
|
|
*
|
2017-11-18 07:21:49 +08:00
|
|
|
* Purpose: Prints error stack in default and customized ways.
|
2003-07-18 09:46:40 +08:00
|
|
|
*
|
2017-11-18 07:21:49 +08:00
|
|
|
* Return: Success: 0
|
|
|
|
* Failure: -1
|
2003-07-18 09:46:40 +08:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
2005-08-14 04:53:35 +08:00
|
|
|
static herr_t
|
2003-07-18 09:46:40 +08:00
|
|
|
dump_error(hid_t estack)
|
|
|
|
{
|
|
|
|
/* Print errors in library default way */
|
2023-06-28 23:31:32 +08:00
|
|
|
fprintf(stderr, "********* Print error stack in HDF5 default way *********\n");
|
2017-11-18 07:21:49 +08:00
|
|
|
if (H5Eprint2(estack, stderr) < 0)
|
2003-07-22 09:32:27 +08:00
|
|
|
TEST_ERROR;
|
2005-08-14 04:53:35 +08:00
|
|
|
|
2003-07-18 09:46:40 +08:00
|
|
|
/* Customized way to print errors */
|
2023-06-28 23:31:32 +08:00
|
|
|
fprintf(stderr, "\n********* Print error stack in customized way *********\n");
|
2017-11-18 07:21:49 +08:00
|
|
|
if (H5Ewalk2(estack, H5E_WALK_UPWARD, custom_print_cb, stderr) < 0)
|
2003-07-22 09:32:27 +08:00
|
|
|
TEST_ERROR;
|
2005-08-14 04:53:35 +08:00
|
|
|
|
2003-07-18 09:46:40 +08:00
|
|
|
return 0;
|
|
|
|
|
2007-04-12 09:59:45 +08:00
|
|
|
error:
|
2003-07-18 09:46:40 +08:00
|
|
|
return -1;
|
2007-04-12 09:59:45 +08:00
|
|
|
} /* end dump_error() */
|
2003-07-18 09:46:40 +08:00
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
* Function: custom_print_cb
|
|
|
|
*
|
2017-11-18 07:21:49 +08:00
|
|
|
* Purpose: Callback function to print error stack in customized way.
|
2003-07-18 09:46:40 +08:00
|
|
|
*
|
2017-11-18 07:21:49 +08:00
|
|
|
* Return: Success: 0
|
|
|
|
* Failure: -1
|
2003-07-18 09:46:40 +08:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
2009-03-11 03:00:39 +08:00
|
|
|
static herr_t
|
2020-09-30 22:27:10 +08:00
|
|
|
custom_print_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
|
2003-07-18 09:46:40 +08:00
|
|
|
{
|
2022-07-27 05:45:46 +08:00
|
|
|
FILE *stream = (FILE *)client_data;
|
2020-09-30 22:27:10 +08:00
|
|
|
char maj[MSG_SIZE];
|
|
|
|
char min[MSG_SIZE];
|
|
|
|
char cls[MSG_SIZE];
|
|
|
|
const int indent = 4;
|
2003-07-18 09:46:40 +08:00
|
|
|
|
|
|
|
/* Get descriptions for the major and minor error numbers */
|
2017-11-18 07:21:49 +08:00
|
|
|
if (H5Eget_class_name(err_desc->cls_id, cls, MSG_SIZE) < 0)
|
2003-07-22 09:32:27 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
|
2017-11-18 07:21:49 +08:00
|
|
|
if (H5Eget_msg(err_desc->maj_num, NULL, maj, MSG_SIZE) < 0)
|
2003-07-22 09:32:27 +08:00
|
|
|
TEST_ERROR;
|
2005-08-14 04:53:35 +08:00
|
|
|
|
2017-11-18 07:21:49 +08:00
|
|
|
if (H5Eget_msg(err_desc->min_num, NULL, min, MSG_SIZE) < 0)
|
2003-07-22 09:32:27 +08:00
|
|
|
TEST_ERROR;
|
2003-07-18 09:46:40 +08:00
|
|
|
|
2023-06-28 23:31:32 +08:00
|
|
|
fprintf(stream, "%*serror #%03d: %s in %s(): line %u\n", indent, "", n, err_desc->file_name,
|
|
|
|
err_desc->func_name, err_desc->line);
|
|
|
|
fprintf(stream, "%*sclass: %s\n", indent * 2, "", cls);
|
|
|
|
fprintf(stream, "%*smajor: %s\n", indent * 2, "", maj);
|
|
|
|
fprintf(stream, "%*sminor: %s\n", indent * 2, "", min);
|
2003-07-18 09:46:40 +08:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
2007-04-12 09:59:45 +08:00
|
|
|
error:
|
2003-07-18 09:46:40 +08:00
|
|
|
return -1;
|
2007-04-12 09:59:45 +08:00
|
|
|
} /* end custom_print_cb() */
|
2003-07-15 04:08:27 +08:00
|
|
|
|
[svn-r14230] Description:
Add H5Ecreate_stack() API routine, to fill a minor gap in the error
routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-02 03:27:15 +08:00
|
|
|
/*-------------------------------------------------------------------------
|
2017-11-18 07:21:49 +08:00
|
|
|
* Function: test_create
|
[svn-r14230] Description:
Add H5Ecreate_stack() API routine, to fill a minor gap in the error
routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-02 03:27:15 +08:00
|
|
|
*
|
2017-11-18 07:21:49 +08:00
|
|
|
* Purpose: Test creating an empty error stack
|
[svn-r14230] Description:
Add H5Ecreate_stack() API routine, to fill a minor gap in the error
routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-02 03:27:15 +08:00
|
|
|
*
|
2017-11-18 07:21:49 +08:00
|
|
|
* Return: Success: 0
|
|
|
|
* Failure: -1
|
[svn-r14230] Description:
Add H5Ecreate_stack() API routine, to fill a minor gap in the error
routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-02 03:27:15 +08:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static herr_t
|
|
|
|
test_create(void)
|
|
|
|
{
|
2023-09-09 07:06:23 +08:00
|
|
|
const char *err_func = "test_create"; /* Function name for pushing error */
|
|
|
|
const char *err_msg = "Error message"; /* Error message for pushing error */
|
|
|
|
ssize_t err_num; /* Number of errors on stack */
|
|
|
|
hid_t estack_id = H5I_INVALID_HID; /* Error stack ID */
|
[svn-r14230] Description:
Add H5Ecreate_stack() API routine, to fill a minor gap in the error
routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-02 03:27:15 +08:00
|
|
|
|
|
|
|
/* Create an empty error stack */
|
2017-11-18 07:21:49 +08:00
|
|
|
if ((estack_id = H5Ecreate_stack()) < 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
[svn-r14230] Description:
Add H5Ecreate_stack() API routine, to fill a minor gap in the error
routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-02 03:27:15 +08:00
|
|
|
|
|
|
|
/* Check the number of errors on stack */
|
|
|
|
err_num = H5Eget_num(estack_id);
|
2017-11-18 07:21:49 +08:00
|
|
|
if (err_num != 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
[svn-r14230] Description:
Add H5Ecreate_stack() API routine, to fill a minor gap in the error
routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-02 03:27:15 +08:00
|
|
|
|
|
|
|
/* Push an error with a long description */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Epush(estack_id, __FILE__, err_func, __LINE__, ERR_CLS, ERR_MAJ_TEST, ERR_MIN_SUBROUTINE, "%s",
|
|
|
|
err_msg) < 0)
|
2017-11-18 07:21:49 +08:00
|
|
|
TEST_ERROR;
|
[svn-r14230] Description:
Add H5Ecreate_stack() API routine, to fill a minor gap in the error
routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-02 03:27:15 +08:00
|
|
|
|
|
|
|
/* Check the number of errors on stack */
|
|
|
|
err_num = H5Eget_num(estack_id);
|
2017-11-18 07:21:49 +08:00
|
|
|
if (err_num != 1)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
[svn-r14230] Description:
Add H5Ecreate_stack() API routine, to fill a minor gap in the error
routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-02 03:27:15 +08:00
|
|
|
|
|
|
|
/* Clear the error stack */
|
2017-11-18 07:21:49 +08:00
|
|
|
if (H5Eclear2(estack_id) < 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
[svn-r14230] Description:
Add H5Ecreate_stack() API routine, to fill a minor gap in the error
routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-02 03:27:15 +08:00
|
|
|
|
|
|
|
/* Check the number of errors on stack */
|
|
|
|
err_num = H5Eget_num(estack_id);
|
2017-11-18 07:21:49 +08:00
|
|
|
if (err_num != 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
[svn-r14230] Description:
Add H5Ecreate_stack() API routine, to fill a minor gap in the error
routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-02 03:27:15 +08:00
|
|
|
|
|
|
|
/* Close error stack */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Eclose_stack(estack_id) < 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
[svn-r14230] Description:
Add H5Ecreate_stack() API routine, to fill a minor gap in the error
routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-02 03:27:15 +08:00
|
|
|
|
2017-11-18 07:21:49 +08:00
|
|
|
return 0;
|
[svn-r14230] Description:
Add H5Ecreate_stack() API routine, to fill a minor gap in the error
routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-02 03:27:15 +08:00
|
|
|
|
|
|
|
error:
|
2017-11-18 07:21:49 +08:00
|
|
|
return -1;
|
[svn-r14230] Description:
Add H5Ecreate_stack() API routine, to fill a minor gap in the error
routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-02 03:27:15 +08:00
|
|
|
} /* end test_create() */
|
|
|
|
|
2010-09-07 23:41:55 +08:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
* Function: test_copy
|
|
|
|
*
|
2020-11-24 00:18:26 +08:00
|
|
|
* Purpose: Test copying an error stack
|
2010-09-07 23:41:55 +08:00
|
|
|
*
|
|
|
|
* Return: Success: 0
|
|
|
|
* Failure: -1
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static herr_t
|
|
|
|
test_copy(void)
|
|
|
|
{
|
2023-09-09 07:06:23 +08:00
|
|
|
const char *err_func = "test_copy"; /* Function name for pushing error */
|
|
|
|
const char *err_msg = "Error message"; /* Error message for pushing error */
|
|
|
|
ssize_t err_num; /* Number of errors on stack */
|
|
|
|
hid_t estack_id = H5I_INVALID_HID; /* Error stack ID */
|
|
|
|
herr_t ret; /* Generic return value */
|
2010-09-07 23:41:55 +08:00
|
|
|
|
|
|
|
/* Push an error with a long description */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Epush(H5E_DEFAULT, __FILE__, err_func, __LINE__, ERR_CLS, ERR_MAJ_TEST, ERR_MIN_SUBROUTINE, "%s",
|
|
|
|
err_msg) < 0)
|
2017-11-18 07:21:49 +08:00
|
|
|
TEST_ERROR;
|
2010-09-07 23:41:55 +08:00
|
|
|
|
|
|
|
/* Check the number of errors on stack */
|
|
|
|
err_num = H5Eget_num(H5E_DEFAULT);
|
2017-11-18 07:21:49 +08:00
|
|
|
if (err_num != 1)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
2019-08-05 04:19:04 +08:00
|
|
|
|
2010-09-07 23:41:55 +08:00
|
|
|
/* Copy error stack, which clears the original */
|
2017-11-18 07:21:49 +08:00
|
|
|
if ((estack_id = H5Eget_current_stack()) < 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
2019-08-05 04:19:04 +08:00
|
|
|
|
2010-09-07 23:41:55 +08:00
|
|
|
/* Check the number of errors on stack copy */
|
|
|
|
err_num = H5Eget_num(estack_id);
|
2017-11-18 07:21:49 +08:00
|
|
|
if (err_num != 1)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
2010-09-07 23:41:55 +08:00
|
|
|
|
|
|
|
/* Check the number of errors on original stack */
|
|
|
|
err_num = H5Eget_num(H5E_DEFAULT);
|
2017-11-18 07:21:49 +08:00
|
|
|
if (err_num != 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
2010-09-07 23:41:55 +08:00
|
|
|
|
|
|
|
/* Put the stack copy as the default. It closes the stack copy, too. */
|
2017-11-18 07:21:49 +08:00
|
|
|
if (H5Eset_current_stack(estack_id) < 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
2010-09-07 23:41:55 +08:00
|
|
|
|
|
|
|
/* Check the number of errors on default stack */
|
|
|
|
err_num = H5Eget_num(H5E_DEFAULT);
|
2017-11-18 07:21:49 +08:00
|
|
|
if (err_num != 1)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
2010-09-07 23:41:55 +08:00
|
|
|
|
2019-08-05 04:19:04 +08:00
|
|
|
/* Try to close error stack copy. Should fail because
|
2017-11-18 07:21:49 +08:00
|
|
|
* the current H5Eset_current_stack closes the stack to be set.
|
|
|
|
*/
|
2021-03-17 23:25:39 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
ret = H5Eclose_stack(estack_id);
|
|
|
|
}
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_END_TRY
|
2017-11-18 07:21:49 +08:00
|
|
|
if (ret >= 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
2010-09-07 23:41:55 +08:00
|
|
|
|
2017-11-18 07:21:49 +08:00
|
|
|
return 0;
|
2010-09-07 23:41:55 +08:00
|
|
|
|
|
|
|
error:
|
2017-11-18 07:21:49 +08:00
|
|
|
return -1;
|
2010-09-07 23:41:55 +08:00
|
|
|
} /* end test_copy() */
|
|
|
|
|
Bring async branch to develop (#166)
* Add H5Fwait, H5Dwait, and other changes for async vol connector
* Revert temporary testing changes
* Add H5Fwait to header file
* Add H5VLreset_lib_state() routine.
* Correct VOL wrap context when retrieving library state for file open & create.
* Manage the API context's VOL connector state as part of the library state.
* Set the 'VOL connector property valid' flag when restoring the library state.
* Don't push new API context on stack when retrieving "current" one.
* Check for NULL VOL wrap context before decrementing refcount on it, when
freeing the API context state.
* Manage recount of underlying connector for VOL wrap context.
* Add H5TSmutex_acquire() and H5TSmutex_release() routines to acquire and
release the global lock on the HDF5 library.
* Update library with new functions related to library global lock
* Add asynchronous token API
* Add new lightweight FUNC_ENTER / LEAVE macros for helping to structure the
threadsafety (H5TS*) routines.
* Sync w/develop
* Initial event set code framework.
* Elaborate on the H5ES routines, starting to add API routines.
Update the "close ID" callbacks to allow asynchronous request tokens to be
passed in from an asynchronous close API call.
Refactor current asynchronous API routines (H5Fopen/H5Fclose and
H5Dread/H5Dread) to use event sets instead of directly working with request
tokens from the application.
Clean up a few other minor warnings & code style issues.
* Implement H5EScreate, H5ESget_count, and H5ESclose.
It should be possible to write a simple application that creates an event
set and uses it with H5Fopen_async, H5Dread_async, H5Dwrite_async, and
H5Fclose_async, then calls H5ESclose (which waits for all async events to
complete).
* Add source file for event set test.
* Refactor sync & async API routines to call common routine.
Move dataset API read / write routines to src/H5D.c, along with all the other
API routines.
Progress on "fake" async VOL connector, for testing.
* Modify async implementation to wrap async requests in a H5VL_object_t
struct so the VOL layer can find the connector when accessing the
request at a later point.
* Free the requests is H5ESclose. Remove comments implying that request
wait, notify, and cancel callbacks should free the request.
* Fix bug in error handling in H5Fclose.
* Fix bugs in async file routines. Rename H5VL_create_object_generic to
H5VL_create_object.
* Add explicit async version of H5Fcreate.
* Add more _async routines
* Correct typo for return value from H5Awrite changes
* Add H5EStest and H5ESwait routines
* Updated with API tracing info
* Fix NULL pointer dereference in H5ES__wait
* Add H5is_library_terminating() routine, so that VOL connectors can detect
when the library is shutting down.
* Fix typo
* Remove event from event set's linked list
* Move block of code so that vol_obj is valid
* Avoid setting properties in the DXPL when reseting the library state (and in
the test code).
* Refactor argument tracing to implement new capability for tracing arguments
of non-API routines, with the H5ARG_TRACE macro. This macro is updated
automatically with the bin/trace script that runs as part of the autogen.sh
process. Major changes were in src/H5trace.c and bin/trace, with the other
changes being cleanups to the argument lists, to improve their presentation
in the tracing output.
Also - added the "managed string" routines, which can dynamically allocate
strings, appending printf-formatted output to the string efficiently.
* Release memory for managed strings
* Fix printf() formats.
* More printf() format fixes.
* Add H5Eappend_stack routine and regression tests
* Clean up a few missed merge conflicts and update the error stacks.
* Remove unnecessary fork() operations and ten second sleep().
* Restore commented out attribute out, to better enable tracking down the previous failure
* Allow multiple H5ARG_TRACE macros within a routine to be updated
* Switch to using "new" H5ES_insert (which takes the arguments for the caller routine) for all event set operations. Renames H5ES_insert_new to H5ES_insert and removes the previous H5ES_insert.
* Merge "managed" string routines into "ref-counted" strings, and refactor code to use them.
* Add missing file.
* Add caller's name and arguments to event, for error reporting
* Refactor event set setup for "API common" internal routines
* Checkin async API routines for H5A* and H5G* modules as listed in ID-283.
Fix couple h5dump expected output files due to the changes.
* Add some of the error query routines needed for event sets.
* Refactor to make async setup / teardown and "common" routines cleaner
* (1) Add async APIs to H5L, H5F, and H5D modules
(2) Fix errors in previous checkins of async APIs in H5A and H5G modules
(3) h5dump expected output changes
* Enhance event info, for better error handling
* Change name of temporary vol_obj variable, to help reduce coding errors
* Fix oversight with vol_obj pointer
* Minor code cleanup
* Add missing \'valid\' flag for VOL wrapper context, when restoring the library\'s state
* Run source formatter
* Change H5TSmutex lock and release to include a lock count
* Update error reporting ideas
* Minor updates to improve sanity checking for retrieving / restoring library state
* Updated with feedback from h5py team members
* Refactor internal event set list and event handling, add implementation for H5ESget_err_info
* Change the VOL request subclass callbacks that switch from using "H5ES_status_t" to "H5VL_request_status_t", and also add a H5VL_request_status_t* parameter to the 'cancel' callback in the request subclass. Also more code quality cleanups to add iterator callbacks to internal event set routines.
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Fix missed merge marker, and reformatted line
* Clean up some warnings
* Correct level of indirection
* Relocate prototype (and doxygen info) for H5Aclose
* Change non-static function declarations to be static
* Ensure that H5TSpublic.h header gets installed (#129)
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
Co-authored-by: Houjun Tang <htang4@lbl.gov>
Co-authored-by: Neil Fortner <nfortne2@hdfgroup.org>
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
2020-12-14 08:02:17 +08:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
* Function: test_append
|
|
|
|
*
|
|
|
|
* Purpose: Test appending one error stack to another
|
|
|
|
*
|
|
|
|
* Return: Success: 0
|
|
|
|
* Failure: -1
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static herr_t
|
|
|
|
test_append(void)
|
|
|
|
{
|
|
|
|
const char *err_func = "test_append"; /* Function name for pushing error */
|
|
|
|
const char *err_msg1 = "Error message #1"; /* Error message #1 for pushing error */
|
|
|
|
const char *err_msg2 = "Error message #2"; /* Error message #2 for pushing error */
|
|
|
|
ssize_t err_num; /* Number of errors on stack */
|
2023-09-09 07:06:23 +08:00
|
|
|
hid_t estack_id1 = H5I_INVALID_HID; /* Error stack ID */
|
|
|
|
hid_t estack_id2 = H5I_INVALID_HID; /* Error stack ID */
|
Bring async branch to develop (#166)
* Add H5Fwait, H5Dwait, and other changes for async vol connector
* Revert temporary testing changes
* Add H5Fwait to header file
* Add H5VLreset_lib_state() routine.
* Correct VOL wrap context when retrieving library state for file open & create.
* Manage the API context's VOL connector state as part of the library state.
* Set the 'VOL connector property valid' flag when restoring the library state.
* Don't push new API context on stack when retrieving "current" one.
* Check for NULL VOL wrap context before decrementing refcount on it, when
freeing the API context state.
* Manage recount of underlying connector for VOL wrap context.
* Add H5TSmutex_acquire() and H5TSmutex_release() routines to acquire and
release the global lock on the HDF5 library.
* Update library with new functions related to library global lock
* Add asynchronous token API
* Add new lightweight FUNC_ENTER / LEAVE macros for helping to structure the
threadsafety (H5TS*) routines.
* Sync w/develop
* Initial event set code framework.
* Elaborate on the H5ES routines, starting to add API routines.
Update the "close ID" callbacks to allow asynchronous request tokens to be
passed in from an asynchronous close API call.
Refactor current asynchronous API routines (H5Fopen/H5Fclose and
H5Dread/H5Dread) to use event sets instead of directly working with request
tokens from the application.
Clean up a few other minor warnings & code style issues.
* Implement H5EScreate, H5ESget_count, and H5ESclose.
It should be possible to write a simple application that creates an event
set and uses it with H5Fopen_async, H5Dread_async, H5Dwrite_async, and
H5Fclose_async, then calls H5ESclose (which waits for all async events to
complete).
* Add source file for event set test.
* Refactor sync & async API routines to call common routine.
Move dataset API read / write routines to src/H5D.c, along with all the other
API routines.
Progress on "fake" async VOL connector, for testing.
* Modify async implementation to wrap async requests in a H5VL_object_t
struct so the VOL layer can find the connector when accessing the
request at a later point.
* Free the requests is H5ESclose. Remove comments implying that request
wait, notify, and cancel callbacks should free the request.
* Fix bug in error handling in H5Fclose.
* Fix bugs in async file routines. Rename H5VL_create_object_generic to
H5VL_create_object.
* Add explicit async version of H5Fcreate.
* Add more _async routines
* Correct typo for return value from H5Awrite changes
* Add H5EStest and H5ESwait routines
* Updated with API tracing info
* Fix NULL pointer dereference in H5ES__wait
* Add H5is_library_terminating() routine, so that VOL connectors can detect
when the library is shutting down.
* Fix typo
* Remove event from event set's linked list
* Move block of code so that vol_obj is valid
* Avoid setting properties in the DXPL when reseting the library state (and in
the test code).
* Refactor argument tracing to implement new capability for tracing arguments
of non-API routines, with the H5ARG_TRACE macro. This macro is updated
automatically with the bin/trace script that runs as part of the autogen.sh
process. Major changes were in src/H5trace.c and bin/trace, with the other
changes being cleanups to the argument lists, to improve their presentation
in the tracing output.
Also - added the "managed string" routines, which can dynamically allocate
strings, appending printf-formatted output to the string efficiently.
* Release memory for managed strings
* Fix printf() formats.
* More printf() format fixes.
* Add H5Eappend_stack routine and regression tests
* Clean up a few missed merge conflicts and update the error stacks.
* Remove unnecessary fork() operations and ten second sleep().
* Restore commented out attribute out, to better enable tracking down the previous failure
* Allow multiple H5ARG_TRACE macros within a routine to be updated
* Switch to using "new" H5ES_insert (which takes the arguments for the caller routine) for all event set operations. Renames H5ES_insert_new to H5ES_insert and removes the previous H5ES_insert.
* Merge "managed" string routines into "ref-counted" strings, and refactor code to use them.
* Add missing file.
* Add caller's name and arguments to event, for error reporting
* Refactor event set setup for "API common" internal routines
* Checkin async API routines for H5A* and H5G* modules as listed in ID-283.
Fix couple h5dump expected output files due to the changes.
* Add some of the error query routines needed for event sets.
* Refactor to make async setup / teardown and "common" routines cleaner
* (1) Add async APIs to H5L, H5F, and H5D modules
(2) Fix errors in previous checkins of async APIs in H5A and H5G modules
(3) h5dump expected output changes
* Enhance event info, for better error handling
* Change name of temporary vol_obj variable, to help reduce coding errors
* Fix oversight with vol_obj pointer
* Minor code cleanup
* Add missing \'valid\' flag for VOL wrapper context, when restoring the library\'s state
* Run source formatter
* Change H5TSmutex lock and release to include a lock count
* Update error reporting ideas
* Minor updates to improve sanity checking for retrieving / restoring library state
* Updated with feedback from h5py team members
* Refactor internal event set list and event handling, add implementation for H5ESget_err_info
* Change the VOL request subclass callbacks that switch from using "H5ES_status_t" to "H5VL_request_status_t", and also add a H5VL_request_status_t* parameter to the 'cancel' callback in the request subclass. Also more code quality cleanups to add iterator callbacks to internal event set routines.
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Fix missed merge marker, and reformatted line
* Clean up some warnings
* Correct level of indirection
* Relocate prototype (and doxygen info) for H5Aclose
* Change non-static function declarations to be static
* Ensure that H5TSpublic.h header gets installed (#129)
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
Co-authored-by: Houjun Tang <htang4@lbl.gov>
Co-authored-by: Neil Fortner <nfortne2@hdfgroup.org>
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
2020-12-14 08:02:17 +08:00
|
|
|
herr_t ret; /* Generic return value */
|
|
|
|
|
|
|
|
/* Push an error */
|
|
|
|
if (H5Epush(H5E_DEFAULT, __FILE__, err_func, __LINE__, ERR_CLS, ERR_MAJ_TEST, ERR_MIN_SUBROUTINE, "%s",
|
|
|
|
err_msg1) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* Copy error stack, which clears the original */
|
|
|
|
if ((estack_id1 = H5Eget_current_stack()) < 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
Bring async branch to develop (#166)
* Add H5Fwait, H5Dwait, and other changes for async vol connector
* Revert temporary testing changes
* Add H5Fwait to header file
* Add H5VLreset_lib_state() routine.
* Correct VOL wrap context when retrieving library state for file open & create.
* Manage the API context's VOL connector state as part of the library state.
* Set the 'VOL connector property valid' flag when restoring the library state.
* Don't push new API context on stack when retrieving "current" one.
* Check for NULL VOL wrap context before decrementing refcount on it, when
freeing the API context state.
* Manage recount of underlying connector for VOL wrap context.
* Add H5TSmutex_acquire() and H5TSmutex_release() routines to acquire and
release the global lock on the HDF5 library.
* Update library with new functions related to library global lock
* Add asynchronous token API
* Add new lightweight FUNC_ENTER / LEAVE macros for helping to structure the
threadsafety (H5TS*) routines.
* Sync w/develop
* Initial event set code framework.
* Elaborate on the H5ES routines, starting to add API routines.
Update the "close ID" callbacks to allow asynchronous request tokens to be
passed in from an asynchronous close API call.
Refactor current asynchronous API routines (H5Fopen/H5Fclose and
H5Dread/H5Dread) to use event sets instead of directly working with request
tokens from the application.
Clean up a few other minor warnings & code style issues.
* Implement H5EScreate, H5ESget_count, and H5ESclose.
It should be possible to write a simple application that creates an event
set and uses it with H5Fopen_async, H5Dread_async, H5Dwrite_async, and
H5Fclose_async, then calls H5ESclose (which waits for all async events to
complete).
* Add source file for event set test.
* Refactor sync & async API routines to call common routine.
Move dataset API read / write routines to src/H5D.c, along with all the other
API routines.
Progress on "fake" async VOL connector, for testing.
* Modify async implementation to wrap async requests in a H5VL_object_t
struct so the VOL layer can find the connector when accessing the
request at a later point.
* Free the requests is H5ESclose. Remove comments implying that request
wait, notify, and cancel callbacks should free the request.
* Fix bug in error handling in H5Fclose.
* Fix bugs in async file routines. Rename H5VL_create_object_generic to
H5VL_create_object.
* Add explicit async version of H5Fcreate.
* Add more _async routines
* Correct typo for return value from H5Awrite changes
* Add H5EStest and H5ESwait routines
* Updated with API tracing info
* Fix NULL pointer dereference in H5ES__wait
* Add H5is_library_terminating() routine, so that VOL connectors can detect
when the library is shutting down.
* Fix typo
* Remove event from event set's linked list
* Move block of code so that vol_obj is valid
* Avoid setting properties in the DXPL when reseting the library state (and in
the test code).
* Refactor argument tracing to implement new capability for tracing arguments
of non-API routines, with the H5ARG_TRACE macro. This macro is updated
automatically with the bin/trace script that runs as part of the autogen.sh
process. Major changes were in src/H5trace.c and bin/trace, with the other
changes being cleanups to the argument lists, to improve their presentation
in the tracing output.
Also - added the "managed string" routines, which can dynamically allocate
strings, appending printf-formatted output to the string efficiently.
* Release memory for managed strings
* Fix printf() formats.
* More printf() format fixes.
* Add H5Eappend_stack routine and regression tests
* Clean up a few missed merge conflicts and update the error stacks.
* Remove unnecessary fork() operations and ten second sleep().
* Restore commented out attribute out, to better enable tracking down the previous failure
* Allow multiple H5ARG_TRACE macros within a routine to be updated
* Switch to using "new" H5ES_insert (which takes the arguments for the caller routine) for all event set operations. Renames H5ES_insert_new to H5ES_insert and removes the previous H5ES_insert.
* Merge "managed" string routines into "ref-counted" strings, and refactor code to use them.
* Add missing file.
* Add caller's name and arguments to event, for error reporting
* Refactor event set setup for "API common" internal routines
* Checkin async API routines for H5A* and H5G* modules as listed in ID-283.
Fix couple h5dump expected output files due to the changes.
* Add some of the error query routines needed for event sets.
* Refactor to make async setup / teardown and "common" routines cleaner
* (1) Add async APIs to H5L, H5F, and H5D modules
(2) Fix errors in previous checkins of async APIs in H5A and H5G modules
(3) h5dump expected output changes
* Enhance event info, for better error handling
* Change name of temporary vol_obj variable, to help reduce coding errors
* Fix oversight with vol_obj pointer
* Minor code cleanup
* Add missing \'valid\' flag for VOL wrapper context, when restoring the library\'s state
* Run source formatter
* Change H5TSmutex lock and release to include a lock count
* Update error reporting ideas
* Minor updates to improve sanity checking for retrieving / restoring library state
* Updated with feedback from h5py team members
* Refactor internal event set list and event handling, add implementation for H5ESget_err_info
* Change the VOL request subclass callbacks that switch from using "H5ES_status_t" to "H5VL_request_status_t", and also add a H5VL_request_status_t* parameter to the 'cancel' callback in the request subclass. Also more code quality cleanups to add iterator callbacks to internal event set routines.
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Fix missed merge marker, and reformatted line
* Clean up some warnings
* Correct level of indirection
* Relocate prototype (and doxygen info) for H5Aclose
* Change non-static function declarations to be static
* Ensure that H5TSpublic.h header gets installed (#129)
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
Co-authored-by: Houjun Tang <htang4@lbl.gov>
Co-authored-by: Neil Fortner <nfortne2@hdfgroup.org>
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
2020-12-14 08:02:17 +08:00
|
|
|
|
|
|
|
/* Check the number of errors on stack #1 */
|
|
|
|
err_num = H5Eget_num(estack_id1);
|
|
|
|
if (err_num != 1)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
Bring async branch to develop (#166)
* Add H5Fwait, H5Dwait, and other changes for async vol connector
* Revert temporary testing changes
* Add H5Fwait to header file
* Add H5VLreset_lib_state() routine.
* Correct VOL wrap context when retrieving library state for file open & create.
* Manage the API context's VOL connector state as part of the library state.
* Set the 'VOL connector property valid' flag when restoring the library state.
* Don't push new API context on stack when retrieving "current" one.
* Check for NULL VOL wrap context before decrementing refcount on it, when
freeing the API context state.
* Manage recount of underlying connector for VOL wrap context.
* Add H5TSmutex_acquire() and H5TSmutex_release() routines to acquire and
release the global lock on the HDF5 library.
* Update library with new functions related to library global lock
* Add asynchronous token API
* Add new lightweight FUNC_ENTER / LEAVE macros for helping to structure the
threadsafety (H5TS*) routines.
* Sync w/develop
* Initial event set code framework.
* Elaborate on the H5ES routines, starting to add API routines.
Update the "close ID" callbacks to allow asynchronous request tokens to be
passed in from an asynchronous close API call.
Refactor current asynchronous API routines (H5Fopen/H5Fclose and
H5Dread/H5Dread) to use event sets instead of directly working with request
tokens from the application.
Clean up a few other minor warnings & code style issues.
* Implement H5EScreate, H5ESget_count, and H5ESclose.
It should be possible to write a simple application that creates an event
set and uses it with H5Fopen_async, H5Dread_async, H5Dwrite_async, and
H5Fclose_async, then calls H5ESclose (which waits for all async events to
complete).
* Add source file for event set test.
* Refactor sync & async API routines to call common routine.
Move dataset API read / write routines to src/H5D.c, along with all the other
API routines.
Progress on "fake" async VOL connector, for testing.
* Modify async implementation to wrap async requests in a H5VL_object_t
struct so the VOL layer can find the connector when accessing the
request at a later point.
* Free the requests is H5ESclose. Remove comments implying that request
wait, notify, and cancel callbacks should free the request.
* Fix bug in error handling in H5Fclose.
* Fix bugs in async file routines. Rename H5VL_create_object_generic to
H5VL_create_object.
* Add explicit async version of H5Fcreate.
* Add more _async routines
* Correct typo for return value from H5Awrite changes
* Add H5EStest and H5ESwait routines
* Updated with API tracing info
* Fix NULL pointer dereference in H5ES__wait
* Add H5is_library_terminating() routine, so that VOL connectors can detect
when the library is shutting down.
* Fix typo
* Remove event from event set's linked list
* Move block of code so that vol_obj is valid
* Avoid setting properties in the DXPL when reseting the library state (and in
the test code).
* Refactor argument tracing to implement new capability for tracing arguments
of non-API routines, with the H5ARG_TRACE macro. This macro is updated
automatically with the bin/trace script that runs as part of the autogen.sh
process. Major changes were in src/H5trace.c and bin/trace, with the other
changes being cleanups to the argument lists, to improve their presentation
in the tracing output.
Also - added the "managed string" routines, which can dynamically allocate
strings, appending printf-formatted output to the string efficiently.
* Release memory for managed strings
* Fix printf() formats.
* More printf() format fixes.
* Add H5Eappend_stack routine and regression tests
* Clean up a few missed merge conflicts and update the error stacks.
* Remove unnecessary fork() operations and ten second sleep().
* Restore commented out attribute out, to better enable tracking down the previous failure
* Allow multiple H5ARG_TRACE macros within a routine to be updated
* Switch to using "new" H5ES_insert (which takes the arguments for the caller routine) for all event set operations. Renames H5ES_insert_new to H5ES_insert and removes the previous H5ES_insert.
* Merge "managed" string routines into "ref-counted" strings, and refactor code to use them.
* Add missing file.
* Add caller's name and arguments to event, for error reporting
* Refactor event set setup for "API common" internal routines
* Checkin async API routines for H5A* and H5G* modules as listed in ID-283.
Fix couple h5dump expected output files due to the changes.
* Add some of the error query routines needed for event sets.
* Refactor to make async setup / teardown and "common" routines cleaner
* (1) Add async APIs to H5L, H5F, and H5D modules
(2) Fix errors in previous checkins of async APIs in H5A and H5G modules
(3) h5dump expected output changes
* Enhance event info, for better error handling
* Change name of temporary vol_obj variable, to help reduce coding errors
* Fix oversight with vol_obj pointer
* Minor code cleanup
* Add missing \'valid\' flag for VOL wrapper context, when restoring the library\'s state
* Run source formatter
* Change H5TSmutex lock and release to include a lock count
* Update error reporting ideas
* Minor updates to improve sanity checking for retrieving / restoring library state
* Updated with feedback from h5py team members
* Refactor internal event set list and event handling, add implementation for H5ESget_err_info
* Change the VOL request subclass callbacks that switch from using "H5ES_status_t" to "H5VL_request_status_t", and also add a H5VL_request_status_t* parameter to the 'cancel' callback in the request subclass. Also more code quality cleanups to add iterator callbacks to internal event set routines.
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Fix missed merge marker, and reformatted line
* Clean up some warnings
* Correct level of indirection
* Relocate prototype (and doxygen info) for H5Aclose
* Change non-static function declarations to be static
* Ensure that H5TSpublic.h header gets installed (#129)
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
Co-authored-by: Houjun Tang <htang4@lbl.gov>
Co-authored-by: Neil Fortner <nfortne2@hdfgroup.org>
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
2020-12-14 08:02:17 +08:00
|
|
|
|
|
|
|
/* Create another stack, from scratch */
|
|
|
|
if ((estack_id2 = H5Ecreate_stack()) < 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
Bring async branch to develop (#166)
* Add H5Fwait, H5Dwait, and other changes for async vol connector
* Revert temporary testing changes
* Add H5Fwait to header file
* Add H5VLreset_lib_state() routine.
* Correct VOL wrap context when retrieving library state for file open & create.
* Manage the API context's VOL connector state as part of the library state.
* Set the 'VOL connector property valid' flag when restoring the library state.
* Don't push new API context on stack when retrieving "current" one.
* Check for NULL VOL wrap context before decrementing refcount on it, when
freeing the API context state.
* Manage recount of underlying connector for VOL wrap context.
* Add H5TSmutex_acquire() and H5TSmutex_release() routines to acquire and
release the global lock on the HDF5 library.
* Update library with new functions related to library global lock
* Add asynchronous token API
* Add new lightweight FUNC_ENTER / LEAVE macros for helping to structure the
threadsafety (H5TS*) routines.
* Sync w/develop
* Initial event set code framework.
* Elaborate on the H5ES routines, starting to add API routines.
Update the "close ID" callbacks to allow asynchronous request tokens to be
passed in from an asynchronous close API call.
Refactor current asynchronous API routines (H5Fopen/H5Fclose and
H5Dread/H5Dread) to use event sets instead of directly working with request
tokens from the application.
Clean up a few other minor warnings & code style issues.
* Implement H5EScreate, H5ESget_count, and H5ESclose.
It should be possible to write a simple application that creates an event
set and uses it with H5Fopen_async, H5Dread_async, H5Dwrite_async, and
H5Fclose_async, then calls H5ESclose (which waits for all async events to
complete).
* Add source file for event set test.
* Refactor sync & async API routines to call common routine.
Move dataset API read / write routines to src/H5D.c, along with all the other
API routines.
Progress on "fake" async VOL connector, for testing.
* Modify async implementation to wrap async requests in a H5VL_object_t
struct so the VOL layer can find the connector when accessing the
request at a later point.
* Free the requests is H5ESclose. Remove comments implying that request
wait, notify, and cancel callbacks should free the request.
* Fix bug in error handling in H5Fclose.
* Fix bugs in async file routines. Rename H5VL_create_object_generic to
H5VL_create_object.
* Add explicit async version of H5Fcreate.
* Add more _async routines
* Correct typo for return value from H5Awrite changes
* Add H5EStest and H5ESwait routines
* Updated with API tracing info
* Fix NULL pointer dereference in H5ES__wait
* Add H5is_library_terminating() routine, so that VOL connectors can detect
when the library is shutting down.
* Fix typo
* Remove event from event set's linked list
* Move block of code so that vol_obj is valid
* Avoid setting properties in the DXPL when reseting the library state (and in
the test code).
* Refactor argument tracing to implement new capability for tracing arguments
of non-API routines, with the H5ARG_TRACE macro. This macro is updated
automatically with the bin/trace script that runs as part of the autogen.sh
process. Major changes were in src/H5trace.c and bin/trace, with the other
changes being cleanups to the argument lists, to improve their presentation
in the tracing output.
Also - added the "managed string" routines, which can dynamically allocate
strings, appending printf-formatted output to the string efficiently.
* Release memory for managed strings
* Fix printf() formats.
* More printf() format fixes.
* Add H5Eappend_stack routine and regression tests
* Clean up a few missed merge conflicts and update the error stacks.
* Remove unnecessary fork() operations and ten second sleep().
* Restore commented out attribute out, to better enable tracking down the previous failure
* Allow multiple H5ARG_TRACE macros within a routine to be updated
* Switch to using "new" H5ES_insert (which takes the arguments for the caller routine) for all event set operations. Renames H5ES_insert_new to H5ES_insert and removes the previous H5ES_insert.
* Merge "managed" string routines into "ref-counted" strings, and refactor code to use them.
* Add missing file.
* Add caller's name and arguments to event, for error reporting
* Refactor event set setup for "API common" internal routines
* Checkin async API routines for H5A* and H5G* modules as listed in ID-283.
Fix couple h5dump expected output files due to the changes.
* Add some of the error query routines needed for event sets.
* Refactor to make async setup / teardown and "common" routines cleaner
* (1) Add async APIs to H5L, H5F, and H5D modules
(2) Fix errors in previous checkins of async APIs in H5A and H5G modules
(3) h5dump expected output changes
* Enhance event info, for better error handling
* Change name of temporary vol_obj variable, to help reduce coding errors
* Fix oversight with vol_obj pointer
* Minor code cleanup
* Add missing \'valid\' flag for VOL wrapper context, when restoring the library\'s state
* Run source formatter
* Change H5TSmutex lock and release to include a lock count
* Update error reporting ideas
* Minor updates to improve sanity checking for retrieving / restoring library state
* Updated with feedback from h5py team members
* Refactor internal event set list and event handling, add implementation for H5ESget_err_info
* Change the VOL request subclass callbacks that switch from using "H5ES_status_t" to "H5VL_request_status_t", and also add a H5VL_request_status_t* parameter to the 'cancel' callback in the request subclass. Also more code quality cleanups to add iterator callbacks to internal event set routines.
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Fix missed merge marker, and reformatted line
* Clean up some warnings
* Correct level of indirection
* Relocate prototype (and doxygen info) for H5Aclose
* Change non-static function declarations to be static
* Ensure that H5TSpublic.h header gets installed (#129)
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
Co-authored-by: Houjun Tang <htang4@lbl.gov>
Co-authored-by: Neil Fortner <nfortne2@hdfgroup.org>
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
2020-12-14 08:02:17 +08:00
|
|
|
|
|
|
|
/* Check the number of errors on stack #2 */
|
|
|
|
err_num = H5Eget_num(estack_id2);
|
|
|
|
if (err_num != 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
Bring async branch to develop (#166)
* Add H5Fwait, H5Dwait, and other changes for async vol connector
* Revert temporary testing changes
* Add H5Fwait to header file
* Add H5VLreset_lib_state() routine.
* Correct VOL wrap context when retrieving library state for file open & create.
* Manage the API context's VOL connector state as part of the library state.
* Set the 'VOL connector property valid' flag when restoring the library state.
* Don't push new API context on stack when retrieving "current" one.
* Check for NULL VOL wrap context before decrementing refcount on it, when
freeing the API context state.
* Manage recount of underlying connector for VOL wrap context.
* Add H5TSmutex_acquire() and H5TSmutex_release() routines to acquire and
release the global lock on the HDF5 library.
* Update library with new functions related to library global lock
* Add asynchronous token API
* Add new lightweight FUNC_ENTER / LEAVE macros for helping to structure the
threadsafety (H5TS*) routines.
* Sync w/develop
* Initial event set code framework.
* Elaborate on the H5ES routines, starting to add API routines.
Update the "close ID" callbacks to allow asynchronous request tokens to be
passed in from an asynchronous close API call.
Refactor current asynchronous API routines (H5Fopen/H5Fclose and
H5Dread/H5Dread) to use event sets instead of directly working with request
tokens from the application.
Clean up a few other minor warnings & code style issues.
* Implement H5EScreate, H5ESget_count, and H5ESclose.
It should be possible to write a simple application that creates an event
set and uses it with H5Fopen_async, H5Dread_async, H5Dwrite_async, and
H5Fclose_async, then calls H5ESclose (which waits for all async events to
complete).
* Add source file for event set test.
* Refactor sync & async API routines to call common routine.
Move dataset API read / write routines to src/H5D.c, along with all the other
API routines.
Progress on "fake" async VOL connector, for testing.
* Modify async implementation to wrap async requests in a H5VL_object_t
struct so the VOL layer can find the connector when accessing the
request at a later point.
* Free the requests is H5ESclose. Remove comments implying that request
wait, notify, and cancel callbacks should free the request.
* Fix bug in error handling in H5Fclose.
* Fix bugs in async file routines. Rename H5VL_create_object_generic to
H5VL_create_object.
* Add explicit async version of H5Fcreate.
* Add more _async routines
* Correct typo for return value from H5Awrite changes
* Add H5EStest and H5ESwait routines
* Updated with API tracing info
* Fix NULL pointer dereference in H5ES__wait
* Add H5is_library_terminating() routine, so that VOL connectors can detect
when the library is shutting down.
* Fix typo
* Remove event from event set's linked list
* Move block of code so that vol_obj is valid
* Avoid setting properties in the DXPL when reseting the library state (and in
the test code).
* Refactor argument tracing to implement new capability for tracing arguments
of non-API routines, with the H5ARG_TRACE macro. This macro is updated
automatically with the bin/trace script that runs as part of the autogen.sh
process. Major changes were in src/H5trace.c and bin/trace, with the other
changes being cleanups to the argument lists, to improve their presentation
in the tracing output.
Also - added the "managed string" routines, which can dynamically allocate
strings, appending printf-formatted output to the string efficiently.
* Release memory for managed strings
* Fix printf() formats.
* More printf() format fixes.
* Add H5Eappend_stack routine and regression tests
* Clean up a few missed merge conflicts and update the error stacks.
* Remove unnecessary fork() operations and ten second sleep().
* Restore commented out attribute out, to better enable tracking down the previous failure
* Allow multiple H5ARG_TRACE macros within a routine to be updated
* Switch to using "new" H5ES_insert (which takes the arguments for the caller routine) for all event set operations. Renames H5ES_insert_new to H5ES_insert and removes the previous H5ES_insert.
* Merge "managed" string routines into "ref-counted" strings, and refactor code to use them.
* Add missing file.
* Add caller's name and arguments to event, for error reporting
* Refactor event set setup for "API common" internal routines
* Checkin async API routines for H5A* and H5G* modules as listed in ID-283.
Fix couple h5dump expected output files due to the changes.
* Add some of the error query routines needed for event sets.
* Refactor to make async setup / teardown and "common" routines cleaner
* (1) Add async APIs to H5L, H5F, and H5D modules
(2) Fix errors in previous checkins of async APIs in H5A and H5G modules
(3) h5dump expected output changes
* Enhance event info, for better error handling
* Change name of temporary vol_obj variable, to help reduce coding errors
* Fix oversight with vol_obj pointer
* Minor code cleanup
* Add missing \'valid\' flag for VOL wrapper context, when restoring the library\'s state
* Run source formatter
* Change H5TSmutex lock and release to include a lock count
* Update error reporting ideas
* Minor updates to improve sanity checking for retrieving / restoring library state
* Updated with feedback from h5py team members
* Refactor internal event set list and event handling, add implementation for H5ESget_err_info
* Change the VOL request subclass callbacks that switch from using "H5ES_status_t" to "H5VL_request_status_t", and also add a H5VL_request_status_t* parameter to the 'cancel' callback in the request subclass. Also more code quality cleanups to add iterator callbacks to internal event set routines.
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Fix missed merge marker, and reformatted line
* Clean up some warnings
* Correct level of indirection
* Relocate prototype (and doxygen info) for H5Aclose
* Change non-static function declarations to be static
* Ensure that H5TSpublic.h header gets installed (#129)
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
Co-authored-by: Houjun Tang <htang4@lbl.gov>
Co-authored-by: Neil Fortner <nfortne2@hdfgroup.org>
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
2020-12-14 08:02:17 +08:00
|
|
|
|
|
|
|
/* Push an error on stack #2 */
|
|
|
|
if (H5Epush(estack_id2, __FILE__, err_func, __LINE__, ERR_CLS, ERR_MAJ_IO, ERR_MIN_CREATE, "%s",
|
|
|
|
err_msg2) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* Check the number of errors on stack #2 */
|
|
|
|
err_num = H5Eget_num(estack_id2);
|
|
|
|
if (err_num != 1)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
Bring async branch to develop (#166)
* Add H5Fwait, H5Dwait, and other changes for async vol connector
* Revert temporary testing changes
* Add H5Fwait to header file
* Add H5VLreset_lib_state() routine.
* Correct VOL wrap context when retrieving library state for file open & create.
* Manage the API context's VOL connector state as part of the library state.
* Set the 'VOL connector property valid' flag when restoring the library state.
* Don't push new API context on stack when retrieving "current" one.
* Check for NULL VOL wrap context before decrementing refcount on it, when
freeing the API context state.
* Manage recount of underlying connector for VOL wrap context.
* Add H5TSmutex_acquire() and H5TSmutex_release() routines to acquire and
release the global lock on the HDF5 library.
* Update library with new functions related to library global lock
* Add asynchronous token API
* Add new lightweight FUNC_ENTER / LEAVE macros for helping to structure the
threadsafety (H5TS*) routines.
* Sync w/develop
* Initial event set code framework.
* Elaborate on the H5ES routines, starting to add API routines.
Update the "close ID" callbacks to allow asynchronous request tokens to be
passed in from an asynchronous close API call.
Refactor current asynchronous API routines (H5Fopen/H5Fclose and
H5Dread/H5Dread) to use event sets instead of directly working with request
tokens from the application.
Clean up a few other minor warnings & code style issues.
* Implement H5EScreate, H5ESget_count, and H5ESclose.
It should be possible to write a simple application that creates an event
set and uses it with H5Fopen_async, H5Dread_async, H5Dwrite_async, and
H5Fclose_async, then calls H5ESclose (which waits for all async events to
complete).
* Add source file for event set test.
* Refactor sync & async API routines to call common routine.
Move dataset API read / write routines to src/H5D.c, along with all the other
API routines.
Progress on "fake" async VOL connector, for testing.
* Modify async implementation to wrap async requests in a H5VL_object_t
struct so the VOL layer can find the connector when accessing the
request at a later point.
* Free the requests is H5ESclose. Remove comments implying that request
wait, notify, and cancel callbacks should free the request.
* Fix bug in error handling in H5Fclose.
* Fix bugs in async file routines. Rename H5VL_create_object_generic to
H5VL_create_object.
* Add explicit async version of H5Fcreate.
* Add more _async routines
* Correct typo for return value from H5Awrite changes
* Add H5EStest and H5ESwait routines
* Updated with API tracing info
* Fix NULL pointer dereference in H5ES__wait
* Add H5is_library_terminating() routine, so that VOL connectors can detect
when the library is shutting down.
* Fix typo
* Remove event from event set's linked list
* Move block of code so that vol_obj is valid
* Avoid setting properties in the DXPL when reseting the library state (and in
the test code).
* Refactor argument tracing to implement new capability for tracing arguments
of non-API routines, with the H5ARG_TRACE macro. This macro is updated
automatically with the bin/trace script that runs as part of the autogen.sh
process. Major changes were in src/H5trace.c and bin/trace, with the other
changes being cleanups to the argument lists, to improve their presentation
in the tracing output.
Also - added the "managed string" routines, which can dynamically allocate
strings, appending printf-formatted output to the string efficiently.
* Release memory for managed strings
* Fix printf() formats.
* More printf() format fixes.
* Add H5Eappend_stack routine and regression tests
* Clean up a few missed merge conflicts and update the error stacks.
* Remove unnecessary fork() operations and ten second sleep().
* Restore commented out attribute out, to better enable tracking down the previous failure
* Allow multiple H5ARG_TRACE macros within a routine to be updated
* Switch to using "new" H5ES_insert (which takes the arguments for the caller routine) for all event set operations. Renames H5ES_insert_new to H5ES_insert and removes the previous H5ES_insert.
* Merge "managed" string routines into "ref-counted" strings, and refactor code to use them.
* Add missing file.
* Add caller's name and arguments to event, for error reporting
* Refactor event set setup for "API common" internal routines
* Checkin async API routines for H5A* and H5G* modules as listed in ID-283.
Fix couple h5dump expected output files due to the changes.
* Add some of the error query routines needed for event sets.
* Refactor to make async setup / teardown and "common" routines cleaner
* (1) Add async APIs to H5L, H5F, and H5D modules
(2) Fix errors in previous checkins of async APIs in H5A and H5G modules
(3) h5dump expected output changes
* Enhance event info, for better error handling
* Change name of temporary vol_obj variable, to help reduce coding errors
* Fix oversight with vol_obj pointer
* Minor code cleanup
* Add missing \'valid\' flag for VOL wrapper context, when restoring the library\'s state
* Run source formatter
* Change H5TSmutex lock and release to include a lock count
* Update error reporting ideas
* Minor updates to improve sanity checking for retrieving / restoring library state
* Updated with feedback from h5py team members
* Refactor internal event set list and event handling, add implementation for H5ESget_err_info
* Change the VOL request subclass callbacks that switch from using "H5ES_status_t" to "H5VL_request_status_t", and also add a H5VL_request_status_t* parameter to the 'cancel' callback in the request subclass. Also more code quality cleanups to add iterator callbacks to internal event set routines.
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Fix missed merge marker, and reformatted line
* Clean up some warnings
* Correct level of indirection
* Relocate prototype (and doxygen info) for H5Aclose
* Change non-static function declarations to be static
* Ensure that H5TSpublic.h header gets installed (#129)
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
Co-authored-by: Houjun Tang <htang4@lbl.gov>
Co-authored-by: Neil Fortner <nfortne2@hdfgroup.org>
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
2020-12-14 08:02:17 +08:00
|
|
|
|
|
|
|
/* Try to append bad error stack IDs */
|
2021-03-17 23:25:39 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
2023-09-06 04:11:52 +08:00
|
|
|
ret = H5Eappend_stack(H5E_DEFAULT, H5E_DEFAULT, false);
|
2021-03-17 23:25:39 +08:00
|
|
|
}
|
Bring async branch to develop (#166)
* Add H5Fwait, H5Dwait, and other changes for async vol connector
* Revert temporary testing changes
* Add H5Fwait to header file
* Add H5VLreset_lib_state() routine.
* Correct VOL wrap context when retrieving library state for file open & create.
* Manage the API context's VOL connector state as part of the library state.
* Set the 'VOL connector property valid' flag when restoring the library state.
* Don't push new API context on stack when retrieving "current" one.
* Check for NULL VOL wrap context before decrementing refcount on it, when
freeing the API context state.
* Manage recount of underlying connector for VOL wrap context.
* Add H5TSmutex_acquire() and H5TSmutex_release() routines to acquire and
release the global lock on the HDF5 library.
* Update library with new functions related to library global lock
* Add asynchronous token API
* Add new lightweight FUNC_ENTER / LEAVE macros for helping to structure the
threadsafety (H5TS*) routines.
* Sync w/develop
* Initial event set code framework.
* Elaborate on the H5ES routines, starting to add API routines.
Update the "close ID" callbacks to allow asynchronous request tokens to be
passed in from an asynchronous close API call.
Refactor current asynchronous API routines (H5Fopen/H5Fclose and
H5Dread/H5Dread) to use event sets instead of directly working with request
tokens from the application.
Clean up a few other minor warnings & code style issues.
* Implement H5EScreate, H5ESget_count, and H5ESclose.
It should be possible to write a simple application that creates an event
set and uses it with H5Fopen_async, H5Dread_async, H5Dwrite_async, and
H5Fclose_async, then calls H5ESclose (which waits for all async events to
complete).
* Add source file for event set test.
* Refactor sync & async API routines to call common routine.
Move dataset API read / write routines to src/H5D.c, along with all the other
API routines.
Progress on "fake" async VOL connector, for testing.
* Modify async implementation to wrap async requests in a H5VL_object_t
struct so the VOL layer can find the connector when accessing the
request at a later point.
* Free the requests is H5ESclose. Remove comments implying that request
wait, notify, and cancel callbacks should free the request.
* Fix bug in error handling in H5Fclose.
* Fix bugs in async file routines. Rename H5VL_create_object_generic to
H5VL_create_object.
* Add explicit async version of H5Fcreate.
* Add more _async routines
* Correct typo for return value from H5Awrite changes
* Add H5EStest and H5ESwait routines
* Updated with API tracing info
* Fix NULL pointer dereference in H5ES__wait
* Add H5is_library_terminating() routine, so that VOL connectors can detect
when the library is shutting down.
* Fix typo
* Remove event from event set's linked list
* Move block of code so that vol_obj is valid
* Avoid setting properties in the DXPL when reseting the library state (and in
the test code).
* Refactor argument tracing to implement new capability for tracing arguments
of non-API routines, with the H5ARG_TRACE macro. This macro is updated
automatically with the bin/trace script that runs as part of the autogen.sh
process. Major changes were in src/H5trace.c and bin/trace, with the other
changes being cleanups to the argument lists, to improve their presentation
in the tracing output.
Also - added the "managed string" routines, which can dynamically allocate
strings, appending printf-formatted output to the string efficiently.
* Release memory for managed strings
* Fix printf() formats.
* More printf() format fixes.
* Add H5Eappend_stack routine and regression tests
* Clean up a few missed merge conflicts and update the error stacks.
* Remove unnecessary fork() operations and ten second sleep().
* Restore commented out attribute out, to better enable tracking down the previous failure
* Allow multiple H5ARG_TRACE macros within a routine to be updated
* Switch to using "new" H5ES_insert (which takes the arguments for the caller routine) for all event set operations. Renames H5ES_insert_new to H5ES_insert and removes the previous H5ES_insert.
* Merge "managed" string routines into "ref-counted" strings, and refactor code to use them.
* Add missing file.
* Add caller's name and arguments to event, for error reporting
* Refactor event set setup for "API common" internal routines
* Checkin async API routines for H5A* and H5G* modules as listed in ID-283.
Fix couple h5dump expected output files due to the changes.
* Add some of the error query routines needed for event sets.
* Refactor to make async setup / teardown and "common" routines cleaner
* (1) Add async APIs to H5L, H5F, and H5D modules
(2) Fix errors in previous checkins of async APIs in H5A and H5G modules
(3) h5dump expected output changes
* Enhance event info, for better error handling
* Change name of temporary vol_obj variable, to help reduce coding errors
* Fix oversight with vol_obj pointer
* Minor code cleanup
* Add missing \'valid\' flag for VOL wrapper context, when restoring the library\'s state
* Run source formatter
* Change H5TSmutex lock and release to include a lock count
* Update error reporting ideas
* Minor updates to improve sanity checking for retrieving / restoring library state
* Updated with feedback from h5py team members
* Refactor internal event set list and event handling, add implementation for H5ESget_err_info
* Change the VOL request subclass callbacks that switch from using "H5ES_status_t" to "H5VL_request_status_t", and also add a H5VL_request_status_t* parameter to the 'cancel' callback in the request subclass. Also more code quality cleanups to add iterator callbacks to internal event set routines.
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Fix missed merge marker, and reformatted line
* Clean up some warnings
* Correct level of indirection
* Relocate prototype (and doxygen info) for H5Aclose
* Change non-static function declarations to be static
* Ensure that H5TSpublic.h header gets installed (#129)
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
Co-authored-by: Houjun Tang <htang4@lbl.gov>
Co-authored-by: Neil Fortner <nfortne2@hdfgroup.org>
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
2020-12-14 08:02:17 +08:00
|
|
|
H5E_END_TRY
|
|
|
|
if (ret >= 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
2021-03-17 23:25:39 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
2023-09-06 04:11:52 +08:00
|
|
|
ret = H5Eappend_stack(estack_id1, H5E_DEFAULT, false);
|
2021-03-17 23:25:39 +08:00
|
|
|
}
|
Bring async branch to develop (#166)
* Add H5Fwait, H5Dwait, and other changes for async vol connector
* Revert temporary testing changes
* Add H5Fwait to header file
* Add H5VLreset_lib_state() routine.
* Correct VOL wrap context when retrieving library state for file open & create.
* Manage the API context's VOL connector state as part of the library state.
* Set the 'VOL connector property valid' flag when restoring the library state.
* Don't push new API context on stack when retrieving "current" one.
* Check for NULL VOL wrap context before decrementing refcount on it, when
freeing the API context state.
* Manage recount of underlying connector for VOL wrap context.
* Add H5TSmutex_acquire() and H5TSmutex_release() routines to acquire and
release the global lock on the HDF5 library.
* Update library with new functions related to library global lock
* Add asynchronous token API
* Add new lightweight FUNC_ENTER / LEAVE macros for helping to structure the
threadsafety (H5TS*) routines.
* Sync w/develop
* Initial event set code framework.
* Elaborate on the H5ES routines, starting to add API routines.
Update the "close ID" callbacks to allow asynchronous request tokens to be
passed in from an asynchronous close API call.
Refactor current asynchronous API routines (H5Fopen/H5Fclose and
H5Dread/H5Dread) to use event sets instead of directly working with request
tokens from the application.
Clean up a few other minor warnings & code style issues.
* Implement H5EScreate, H5ESget_count, and H5ESclose.
It should be possible to write a simple application that creates an event
set and uses it with H5Fopen_async, H5Dread_async, H5Dwrite_async, and
H5Fclose_async, then calls H5ESclose (which waits for all async events to
complete).
* Add source file for event set test.
* Refactor sync & async API routines to call common routine.
Move dataset API read / write routines to src/H5D.c, along with all the other
API routines.
Progress on "fake" async VOL connector, for testing.
* Modify async implementation to wrap async requests in a H5VL_object_t
struct so the VOL layer can find the connector when accessing the
request at a later point.
* Free the requests is H5ESclose. Remove comments implying that request
wait, notify, and cancel callbacks should free the request.
* Fix bug in error handling in H5Fclose.
* Fix bugs in async file routines. Rename H5VL_create_object_generic to
H5VL_create_object.
* Add explicit async version of H5Fcreate.
* Add more _async routines
* Correct typo for return value from H5Awrite changes
* Add H5EStest and H5ESwait routines
* Updated with API tracing info
* Fix NULL pointer dereference in H5ES__wait
* Add H5is_library_terminating() routine, so that VOL connectors can detect
when the library is shutting down.
* Fix typo
* Remove event from event set's linked list
* Move block of code so that vol_obj is valid
* Avoid setting properties in the DXPL when reseting the library state (and in
the test code).
* Refactor argument tracing to implement new capability for tracing arguments
of non-API routines, with the H5ARG_TRACE macro. This macro is updated
automatically with the bin/trace script that runs as part of the autogen.sh
process. Major changes were in src/H5trace.c and bin/trace, with the other
changes being cleanups to the argument lists, to improve their presentation
in the tracing output.
Also - added the "managed string" routines, which can dynamically allocate
strings, appending printf-formatted output to the string efficiently.
* Release memory for managed strings
* Fix printf() formats.
* More printf() format fixes.
* Add H5Eappend_stack routine and regression tests
* Clean up a few missed merge conflicts and update the error stacks.
* Remove unnecessary fork() operations and ten second sleep().
* Restore commented out attribute out, to better enable tracking down the previous failure
* Allow multiple H5ARG_TRACE macros within a routine to be updated
* Switch to using "new" H5ES_insert (which takes the arguments for the caller routine) for all event set operations. Renames H5ES_insert_new to H5ES_insert and removes the previous H5ES_insert.
* Merge "managed" string routines into "ref-counted" strings, and refactor code to use them.
* Add missing file.
* Add caller's name and arguments to event, for error reporting
* Refactor event set setup for "API common" internal routines
* Checkin async API routines for H5A* and H5G* modules as listed in ID-283.
Fix couple h5dump expected output files due to the changes.
* Add some of the error query routines needed for event sets.
* Refactor to make async setup / teardown and "common" routines cleaner
* (1) Add async APIs to H5L, H5F, and H5D modules
(2) Fix errors in previous checkins of async APIs in H5A and H5G modules
(3) h5dump expected output changes
* Enhance event info, for better error handling
* Change name of temporary vol_obj variable, to help reduce coding errors
* Fix oversight with vol_obj pointer
* Minor code cleanup
* Add missing \'valid\' flag for VOL wrapper context, when restoring the library\'s state
* Run source formatter
* Change H5TSmutex lock and release to include a lock count
* Update error reporting ideas
* Minor updates to improve sanity checking for retrieving / restoring library state
* Updated with feedback from h5py team members
* Refactor internal event set list and event handling, add implementation for H5ESget_err_info
* Change the VOL request subclass callbacks that switch from using "H5ES_status_t" to "H5VL_request_status_t", and also add a H5VL_request_status_t* parameter to the 'cancel' callback in the request subclass. Also more code quality cleanups to add iterator callbacks to internal event set routines.
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Fix missed merge marker, and reformatted line
* Clean up some warnings
* Correct level of indirection
* Relocate prototype (and doxygen info) for H5Aclose
* Change non-static function declarations to be static
* Ensure that H5TSpublic.h header gets installed (#129)
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
Co-authored-by: Houjun Tang <htang4@lbl.gov>
Co-authored-by: Neil Fortner <nfortne2@hdfgroup.org>
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
2020-12-14 08:02:17 +08:00
|
|
|
H5E_END_TRY
|
|
|
|
if (ret >= 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
2021-03-17 23:25:39 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
2023-09-06 04:11:52 +08:00
|
|
|
ret = H5Eappend_stack(H5E_DEFAULT, estack_id2, false);
|
2021-03-17 23:25:39 +08:00
|
|
|
}
|
Bring async branch to develop (#166)
* Add H5Fwait, H5Dwait, and other changes for async vol connector
* Revert temporary testing changes
* Add H5Fwait to header file
* Add H5VLreset_lib_state() routine.
* Correct VOL wrap context when retrieving library state for file open & create.
* Manage the API context's VOL connector state as part of the library state.
* Set the 'VOL connector property valid' flag when restoring the library state.
* Don't push new API context on stack when retrieving "current" one.
* Check for NULL VOL wrap context before decrementing refcount on it, when
freeing the API context state.
* Manage recount of underlying connector for VOL wrap context.
* Add H5TSmutex_acquire() and H5TSmutex_release() routines to acquire and
release the global lock on the HDF5 library.
* Update library with new functions related to library global lock
* Add asynchronous token API
* Add new lightweight FUNC_ENTER / LEAVE macros for helping to structure the
threadsafety (H5TS*) routines.
* Sync w/develop
* Initial event set code framework.
* Elaborate on the H5ES routines, starting to add API routines.
Update the "close ID" callbacks to allow asynchronous request tokens to be
passed in from an asynchronous close API call.
Refactor current asynchronous API routines (H5Fopen/H5Fclose and
H5Dread/H5Dread) to use event sets instead of directly working with request
tokens from the application.
Clean up a few other minor warnings & code style issues.
* Implement H5EScreate, H5ESget_count, and H5ESclose.
It should be possible to write a simple application that creates an event
set and uses it with H5Fopen_async, H5Dread_async, H5Dwrite_async, and
H5Fclose_async, then calls H5ESclose (which waits for all async events to
complete).
* Add source file for event set test.
* Refactor sync & async API routines to call common routine.
Move dataset API read / write routines to src/H5D.c, along with all the other
API routines.
Progress on "fake" async VOL connector, for testing.
* Modify async implementation to wrap async requests in a H5VL_object_t
struct so the VOL layer can find the connector when accessing the
request at a later point.
* Free the requests is H5ESclose. Remove comments implying that request
wait, notify, and cancel callbacks should free the request.
* Fix bug in error handling in H5Fclose.
* Fix bugs in async file routines. Rename H5VL_create_object_generic to
H5VL_create_object.
* Add explicit async version of H5Fcreate.
* Add more _async routines
* Correct typo for return value from H5Awrite changes
* Add H5EStest and H5ESwait routines
* Updated with API tracing info
* Fix NULL pointer dereference in H5ES__wait
* Add H5is_library_terminating() routine, so that VOL connectors can detect
when the library is shutting down.
* Fix typo
* Remove event from event set's linked list
* Move block of code so that vol_obj is valid
* Avoid setting properties in the DXPL when reseting the library state (and in
the test code).
* Refactor argument tracing to implement new capability for tracing arguments
of non-API routines, with the H5ARG_TRACE macro. This macro is updated
automatically with the bin/trace script that runs as part of the autogen.sh
process. Major changes were in src/H5trace.c and bin/trace, with the other
changes being cleanups to the argument lists, to improve their presentation
in the tracing output.
Also - added the "managed string" routines, which can dynamically allocate
strings, appending printf-formatted output to the string efficiently.
* Release memory for managed strings
* Fix printf() formats.
* More printf() format fixes.
* Add H5Eappend_stack routine and regression tests
* Clean up a few missed merge conflicts and update the error stacks.
* Remove unnecessary fork() operations and ten second sleep().
* Restore commented out attribute out, to better enable tracking down the previous failure
* Allow multiple H5ARG_TRACE macros within a routine to be updated
* Switch to using "new" H5ES_insert (which takes the arguments for the caller routine) for all event set operations. Renames H5ES_insert_new to H5ES_insert and removes the previous H5ES_insert.
* Merge "managed" string routines into "ref-counted" strings, and refactor code to use them.
* Add missing file.
* Add caller's name and arguments to event, for error reporting
* Refactor event set setup for "API common" internal routines
* Checkin async API routines for H5A* and H5G* modules as listed in ID-283.
Fix couple h5dump expected output files due to the changes.
* Add some of the error query routines needed for event sets.
* Refactor to make async setup / teardown and "common" routines cleaner
* (1) Add async APIs to H5L, H5F, and H5D modules
(2) Fix errors in previous checkins of async APIs in H5A and H5G modules
(3) h5dump expected output changes
* Enhance event info, for better error handling
* Change name of temporary vol_obj variable, to help reduce coding errors
* Fix oversight with vol_obj pointer
* Minor code cleanup
* Add missing \'valid\' flag for VOL wrapper context, when restoring the library\'s state
* Run source formatter
* Change H5TSmutex lock and release to include a lock count
* Update error reporting ideas
* Minor updates to improve sanity checking for retrieving / restoring library state
* Updated with feedback from h5py team members
* Refactor internal event set list and event handling, add implementation for H5ESget_err_info
* Change the VOL request subclass callbacks that switch from using "H5ES_status_t" to "H5VL_request_status_t", and also add a H5VL_request_status_t* parameter to the 'cancel' callback in the request subclass. Also more code quality cleanups to add iterator callbacks to internal event set routines.
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Fix missed merge marker, and reformatted line
* Clean up some warnings
* Correct level of indirection
* Relocate prototype (and doxygen info) for H5Aclose
* Change non-static function declarations to be static
* Ensure that H5TSpublic.h header gets installed (#129)
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
Co-authored-by: Houjun Tang <htang4@lbl.gov>
Co-authored-by: Neil Fortner <nfortne2@hdfgroup.org>
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
2020-12-14 08:02:17 +08:00
|
|
|
H5E_END_TRY
|
|
|
|
if (ret >= 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
Bring async branch to develop (#166)
* Add H5Fwait, H5Dwait, and other changes for async vol connector
* Revert temporary testing changes
* Add H5Fwait to header file
* Add H5VLreset_lib_state() routine.
* Correct VOL wrap context when retrieving library state for file open & create.
* Manage the API context's VOL connector state as part of the library state.
* Set the 'VOL connector property valid' flag when restoring the library state.
* Don't push new API context on stack when retrieving "current" one.
* Check for NULL VOL wrap context before decrementing refcount on it, when
freeing the API context state.
* Manage recount of underlying connector for VOL wrap context.
* Add H5TSmutex_acquire() and H5TSmutex_release() routines to acquire and
release the global lock on the HDF5 library.
* Update library with new functions related to library global lock
* Add asynchronous token API
* Add new lightweight FUNC_ENTER / LEAVE macros for helping to structure the
threadsafety (H5TS*) routines.
* Sync w/develop
* Initial event set code framework.
* Elaborate on the H5ES routines, starting to add API routines.
Update the "close ID" callbacks to allow asynchronous request tokens to be
passed in from an asynchronous close API call.
Refactor current asynchronous API routines (H5Fopen/H5Fclose and
H5Dread/H5Dread) to use event sets instead of directly working with request
tokens from the application.
Clean up a few other minor warnings & code style issues.
* Implement H5EScreate, H5ESget_count, and H5ESclose.
It should be possible to write a simple application that creates an event
set and uses it with H5Fopen_async, H5Dread_async, H5Dwrite_async, and
H5Fclose_async, then calls H5ESclose (which waits for all async events to
complete).
* Add source file for event set test.
* Refactor sync & async API routines to call common routine.
Move dataset API read / write routines to src/H5D.c, along with all the other
API routines.
Progress on "fake" async VOL connector, for testing.
* Modify async implementation to wrap async requests in a H5VL_object_t
struct so the VOL layer can find the connector when accessing the
request at a later point.
* Free the requests is H5ESclose. Remove comments implying that request
wait, notify, and cancel callbacks should free the request.
* Fix bug in error handling in H5Fclose.
* Fix bugs in async file routines. Rename H5VL_create_object_generic to
H5VL_create_object.
* Add explicit async version of H5Fcreate.
* Add more _async routines
* Correct typo for return value from H5Awrite changes
* Add H5EStest and H5ESwait routines
* Updated with API tracing info
* Fix NULL pointer dereference in H5ES__wait
* Add H5is_library_terminating() routine, so that VOL connectors can detect
when the library is shutting down.
* Fix typo
* Remove event from event set's linked list
* Move block of code so that vol_obj is valid
* Avoid setting properties in the DXPL when reseting the library state (and in
the test code).
* Refactor argument tracing to implement new capability for tracing arguments
of non-API routines, with the H5ARG_TRACE macro. This macro is updated
automatically with the bin/trace script that runs as part of the autogen.sh
process. Major changes were in src/H5trace.c and bin/trace, with the other
changes being cleanups to the argument lists, to improve their presentation
in the tracing output.
Also - added the "managed string" routines, which can dynamically allocate
strings, appending printf-formatted output to the string efficiently.
* Release memory for managed strings
* Fix printf() formats.
* More printf() format fixes.
* Add H5Eappend_stack routine and regression tests
* Clean up a few missed merge conflicts and update the error stacks.
* Remove unnecessary fork() operations and ten second sleep().
* Restore commented out attribute out, to better enable tracking down the previous failure
* Allow multiple H5ARG_TRACE macros within a routine to be updated
* Switch to using "new" H5ES_insert (which takes the arguments for the caller routine) for all event set operations. Renames H5ES_insert_new to H5ES_insert and removes the previous H5ES_insert.
* Merge "managed" string routines into "ref-counted" strings, and refactor code to use them.
* Add missing file.
* Add caller's name and arguments to event, for error reporting
* Refactor event set setup for "API common" internal routines
* Checkin async API routines for H5A* and H5G* modules as listed in ID-283.
Fix couple h5dump expected output files due to the changes.
* Add some of the error query routines needed for event sets.
* Refactor to make async setup / teardown and "common" routines cleaner
* (1) Add async APIs to H5L, H5F, and H5D modules
(2) Fix errors in previous checkins of async APIs in H5A and H5G modules
(3) h5dump expected output changes
* Enhance event info, for better error handling
* Change name of temporary vol_obj variable, to help reduce coding errors
* Fix oversight with vol_obj pointer
* Minor code cleanup
* Add missing \'valid\' flag for VOL wrapper context, when restoring the library\'s state
* Run source formatter
* Change H5TSmutex lock and release to include a lock count
* Update error reporting ideas
* Minor updates to improve sanity checking for retrieving / restoring library state
* Updated with feedback from h5py team members
* Refactor internal event set list and event handling, add implementation for H5ESget_err_info
* Change the VOL request subclass callbacks that switch from using "H5ES_status_t" to "H5VL_request_status_t", and also add a H5VL_request_status_t* parameter to the 'cancel' callback in the request subclass. Also more code quality cleanups to add iterator callbacks to internal event set routines.
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Fix missed merge marker, and reformatted line
* Clean up some warnings
* Correct level of indirection
* Relocate prototype (and doxygen info) for H5Aclose
* Change non-static function declarations to be static
* Ensure that H5TSpublic.h header gets installed (#129)
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
Co-authored-by: Houjun Tang <htang4@lbl.gov>
Co-authored-by: Neil Fortner <nfortne2@hdfgroup.org>
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
2020-12-14 08:02:17 +08:00
|
|
|
|
|
|
|
/* Append error stack #2 to error stack #1, without closing stack #2 */
|
2023-09-06 04:11:52 +08:00
|
|
|
if (H5Eappend_stack(estack_id1, estack_id2, false) < 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
Bring async branch to develop (#166)
* Add H5Fwait, H5Dwait, and other changes for async vol connector
* Revert temporary testing changes
* Add H5Fwait to header file
* Add H5VLreset_lib_state() routine.
* Correct VOL wrap context when retrieving library state for file open & create.
* Manage the API context's VOL connector state as part of the library state.
* Set the 'VOL connector property valid' flag when restoring the library state.
* Don't push new API context on stack when retrieving "current" one.
* Check for NULL VOL wrap context before decrementing refcount on it, when
freeing the API context state.
* Manage recount of underlying connector for VOL wrap context.
* Add H5TSmutex_acquire() and H5TSmutex_release() routines to acquire and
release the global lock on the HDF5 library.
* Update library with new functions related to library global lock
* Add asynchronous token API
* Add new lightweight FUNC_ENTER / LEAVE macros for helping to structure the
threadsafety (H5TS*) routines.
* Sync w/develop
* Initial event set code framework.
* Elaborate on the H5ES routines, starting to add API routines.
Update the "close ID" callbacks to allow asynchronous request tokens to be
passed in from an asynchronous close API call.
Refactor current asynchronous API routines (H5Fopen/H5Fclose and
H5Dread/H5Dread) to use event sets instead of directly working with request
tokens from the application.
Clean up a few other minor warnings & code style issues.
* Implement H5EScreate, H5ESget_count, and H5ESclose.
It should be possible to write a simple application that creates an event
set and uses it with H5Fopen_async, H5Dread_async, H5Dwrite_async, and
H5Fclose_async, then calls H5ESclose (which waits for all async events to
complete).
* Add source file for event set test.
* Refactor sync & async API routines to call common routine.
Move dataset API read / write routines to src/H5D.c, along with all the other
API routines.
Progress on "fake" async VOL connector, for testing.
* Modify async implementation to wrap async requests in a H5VL_object_t
struct so the VOL layer can find the connector when accessing the
request at a later point.
* Free the requests is H5ESclose. Remove comments implying that request
wait, notify, and cancel callbacks should free the request.
* Fix bug in error handling in H5Fclose.
* Fix bugs in async file routines. Rename H5VL_create_object_generic to
H5VL_create_object.
* Add explicit async version of H5Fcreate.
* Add more _async routines
* Correct typo for return value from H5Awrite changes
* Add H5EStest and H5ESwait routines
* Updated with API tracing info
* Fix NULL pointer dereference in H5ES__wait
* Add H5is_library_terminating() routine, so that VOL connectors can detect
when the library is shutting down.
* Fix typo
* Remove event from event set's linked list
* Move block of code so that vol_obj is valid
* Avoid setting properties in the DXPL when reseting the library state (and in
the test code).
* Refactor argument tracing to implement new capability for tracing arguments
of non-API routines, with the H5ARG_TRACE macro. This macro is updated
automatically with the bin/trace script that runs as part of the autogen.sh
process. Major changes were in src/H5trace.c and bin/trace, with the other
changes being cleanups to the argument lists, to improve their presentation
in the tracing output.
Also - added the "managed string" routines, which can dynamically allocate
strings, appending printf-formatted output to the string efficiently.
* Release memory for managed strings
* Fix printf() formats.
* More printf() format fixes.
* Add H5Eappend_stack routine and regression tests
* Clean up a few missed merge conflicts and update the error stacks.
* Remove unnecessary fork() operations and ten second sleep().
* Restore commented out attribute out, to better enable tracking down the previous failure
* Allow multiple H5ARG_TRACE macros within a routine to be updated
* Switch to using "new" H5ES_insert (which takes the arguments for the caller routine) for all event set operations. Renames H5ES_insert_new to H5ES_insert and removes the previous H5ES_insert.
* Merge "managed" string routines into "ref-counted" strings, and refactor code to use them.
* Add missing file.
* Add caller's name and arguments to event, for error reporting
* Refactor event set setup for "API common" internal routines
* Checkin async API routines for H5A* and H5G* modules as listed in ID-283.
Fix couple h5dump expected output files due to the changes.
* Add some of the error query routines needed for event sets.
* Refactor to make async setup / teardown and "common" routines cleaner
* (1) Add async APIs to H5L, H5F, and H5D modules
(2) Fix errors in previous checkins of async APIs in H5A and H5G modules
(3) h5dump expected output changes
* Enhance event info, for better error handling
* Change name of temporary vol_obj variable, to help reduce coding errors
* Fix oversight with vol_obj pointer
* Minor code cleanup
* Add missing \'valid\' flag for VOL wrapper context, when restoring the library\'s state
* Run source formatter
* Change H5TSmutex lock and release to include a lock count
* Update error reporting ideas
* Minor updates to improve sanity checking for retrieving / restoring library state
* Updated with feedback from h5py team members
* Refactor internal event set list and event handling, add implementation for H5ESget_err_info
* Change the VOL request subclass callbacks that switch from using "H5ES_status_t" to "H5VL_request_status_t", and also add a H5VL_request_status_t* parameter to the 'cancel' callback in the request subclass. Also more code quality cleanups to add iterator callbacks to internal event set routines.
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Fix missed merge marker, and reformatted line
* Clean up some warnings
* Correct level of indirection
* Relocate prototype (and doxygen info) for H5Aclose
* Change non-static function declarations to be static
* Ensure that H5TSpublic.h header gets installed (#129)
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
Co-authored-by: Houjun Tang <htang4@lbl.gov>
Co-authored-by: Neil Fortner <nfortne2@hdfgroup.org>
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
2020-12-14 08:02:17 +08:00
|
|
|
|
|
|
|
/* Check the number of errors on stack #1 */
|
|
|
|
err_num = H5Eget_num(estack_id1);
|
|
|
|
if (err_num != 2)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
Bring async branch to develop (#166)
* Add H5Fwait, H5Dwait, and other changes for async vol connector
* Revert temporary testing changes
* Add H5Fwait to header file
* Add H5VLreset_lib_state() routine.
* Correct VOL wrap context when retrieving library state for file open & create.
* Manage the API context's VOL connector state as part of the library state.
* Set the 'VOL connector property valid' flag when restoring the library state.
* Don't push new API context on stack when retrieving "current" one.
* Check for NULL VOL wrap context before decrementing refcount on it, when
freeing the API context state.
* Manage recount of underlying connector for VOL wrap context.
* Add H5TSmutex_acquire() and H5TSmutex_release() routines to acquire and
release the global lock on the HDF5 library.
* Update library with new functions related to library global lock
* Add asynchronous token API
* Add new lightweight FUNC_ENTER / LEAVE macros for helping to structure the
threadsafety (H5TS*) routines.
* Sync w/develop
* Initial event set code framework.
* Elaborate on the H5ES routines, starting to add API routines.
Update the "close ID" callbacks to allow asynchronous request tokens to be
passed in from an asynchronous close API call.
Refactor current asynchronous API routines (H5Fopen/H5Fclose and
H5Dread/H5Dread) to use event sets instead of directly working with request
tokens from the application.
Clean up a few other minor warnings & code style issues.
* Implement H5EScreate, H5ESget_count, and H5ESclose.
It should be possible to write a simple application that creates an event
set and uses it with H5Fopen_async, H5Dread_async, H5Dwrite_async, and
H5Fclose_async, then calls H5ESclose (which waits for all async events to
complete).
* Add source file for event set test.
* Refactor sync & async API routines to call common routine.
Move dataset API read / write routines to src/H5D.c, along with all the other
API routines.
Progress on "fake" async VOL connector, for testing.
* Modify async implementation to wrap async requests in a H5VL_object_t
struct so the VOL layer can find the connector when accessing the
request at a later point.
* Free the requests is H5ESclose. Remove comments implying that request
wait, notify, and cancel callbacks should free the request.
* Fix bug in error handling in H5Fclose.
* Fix bugs in async file routines. Rename H5VL_create_object_generic to
H5VL_create_object.
* Add explicit async version of H5Fcreate.
* Add more _async routines
* Correct typo for return value from H5Awrite changes
* Add H5EStest and H5ESwait routines
* Updated with API tracing info
* Fix NULL pointer dereference in H5ES__wait
* Add H5is_library_terminating() routine, so that VOL connectors can detect
when the library is shutting down.
* Fix typo
* Remove event from event set's linked list
* Move block of code so that vol_obj is valid
* Avoid setting properties in the DXPL when reseting the library state (and in
the test code).
* Refactor argument tracing to implement new capability for tracing arguments
of non-API routines, with the H5ARG_TRACE macro. This macro is updated
automatically with the bin/trace script that runs as part of the autogen.sh
process. Major changes were in src/H5trace.c and bin/trace, with the other
changes being cleanups to the argument lists, to improve their presentation
in the tracing output.
Also - added the "managed string" routines, which can dynamically allocate
strings, appending printf-formatted output to the string efficiently.
* Release memory for managed strings
* Fix printf() formats.
* More printf() format fixes.
* Add H5Eappend_stack routine and regression tests
* Clean up a few missed merge conflicts and update the error stacks.
* Remove unnecessary fork() operations and ten second sleep().
* Restore commented out attribute out, to better enable tracking down the previous failure
* Allow multiple H5ARG_TRACE macros within a routine to be updated
* Switch to using "new" H5ES_insert (which takes the arguments for the caller routine) for all event set operations. Renames H5ES_insert_new to H5ES_insert and removes the previous H5ES_insert.
* Merge "managed" string routines into "ref-counted" strings, and refactor code to use them.
* Add missing file.
* Add caller's name and arguments to event, for error reporting
* Refactor event set setup for "API common" internal routines
* Checkin async API routines for H5A* and H5G* modules as listed in ID-283.
Fix couple h5dump expected output files due to the changes.
* Add some of the error query routines needed for event sets.
* Refactor to make async setup / teardown and "common" routines cleaner
* (1) Add async APIs to H5L, H5F, and H5D modules
(2) Fix errors in previous checkins of async APIs in H5A and H5G modules
(3) h5dump expected output changes
* Enhance event info, for better error handling
* Change name of temporary vol_obj variable, to help reduce coding errors
* Fix oversight with vol_obj pointer
* Minor code cleanup
* Add missing \'valid\' flag for VOL wrapper context, when restoring the library\'s state
* Run source formatter
* Change H5TSmutex lock and release to include a lock count
* Update error reporting ideas
* Minor updates to improve sanity checking for retrieving / restoring library state
* Updated with feedback from h5py team members
* Refactor internal event set list and event handling, add implementation for H5ESget_err_info
* Change the VOL request subclass callbacks that switch from using "H5ES_status_t" to "H5VL_request_status_t", and also add a H5VL_request_status_t* parameter to the 'cancel' callback in the request subclass. Also more code quality cleanups to add iterator callbacks to internal event set routines.
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Fix missed merge marker, and reformatted line
* Clean up some warnings
* Correct level of indirection
* Relocate prototype (and doxygen info) for H5Aclose
* Change non-static function declarations to be static
* Ensure that H5TSpublic.h header gets installed (#129)
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
Co-authored-by: Houjun Tang <htang4@lbl.gov>
Co-authored-by: Neil Fortner <nfortne2@hdfgroup.org>
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
2020-12-14 08:02:17 +08:00
|
|
|
|
|
|
|
/* Check the number of errors on stack #2 */
|
|
|
|
err_num = H5Eget_num(estack_id2);
|
|
|
|
if (err_num != 1)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
Bring async branch to develop (#166)
* Add H5Fwait, H5Dwait, and other changes for async vol connector
* Revert temporary testing changes
* Add H5Fwait to header file
* Add H5VLreset_lib_state() routine.
* Correct VOL wrap context when retrieving library state for file open & create.
* Manage the API context's VOL connector state as part of the library state.
* Set the 'VOL connector property valid' flag when restoring the library state.
* Don't push new API context on stack when retrieving "current" one.
* Check for NULL VOL wrap context before decrementing refcount on it, when
freeing the API context state.
* Manage recount of underlying connector for VOL wrap context.
* Add H5TSmutex_acquire() and H5TSmutex_release() routines to acquire and
release the global lock on the HDF5 library.
* Update library with new functions related to library global lock
* Add asynchronous token API
* Add new lightweight FUNC_ENTER / LEAVE macros for helping to structure the
threadsafety (H5TS*) routines.
* Sync w/develop
* Initial event set code framework.
* Elaborate on the H5ES routines, starting to add API routines.
Update the "close ID" callbacks to allow asynchronous request tokens to be
passed in from an asynchronous close API call.
Refactor current asynchronous API routines (H5Fopen/H5Fclose and
H5Dread/H5Dread) to use event sets instead of directly working with request
tokens from the application.
Clean up a few other minor warnings & code style issues.
* Implement H5EScreate, H5ESget_count, and H5ESclose.
It should be possible to write a simple application that creates an event
set and uses it with H5Fopen_async, H5Dread_async, H5Dwrite_async, and
H5Fclose_async, then calls H5ESclose (which waits for all async events to
complete).
* Add source file for event set test.
* Refactor sync & async API routines to call common routine.
Move dataset API read / write routines to src/H5D.c, along with all the other
API routines.
Progress on "fake" async VOL connector, for testing.
* Modify async implementation to wrap async requests in a H5VL_object_t
struct so the VOL layer can find the connector when accessing the
request at a later point.
* Free the requests is H5ESclose. Remove comments implying that request
wait, notify, and cancel callbacks should free the request.
* Fix bug in error handling in H5Fclose.
* Fix bugs in async file routines. Rename H5VL_create_object_generic to
H5VL_create_object.
* Add explicit async version of H5Fcreate.
* Add more _async routines
* Correct typo for return value from H5Awrite changes
* Add H5EStest and H5ESwait routines
* Updated with API tracing info
* Fix NULL pointer dereference in H5ES__wait
* Add H5is_library_terminating() routine, so that VOL connectors can detect
when the library is shutting down.
* Fix typo
* Remove event from event set's linked list
* Move block of code so that vol_obj is valid
* Avoid setting properties in the DXPL when reseting the library state (and in
the test code).
* Refactor argument tracing to implement new capability for tracing arguments
of non-API routines, with the H5ARG_TRACE macro. This macro is updated
automatically with the bin/trace script that runs as part of the autogen.sh
process. Major changes were in src/H5trace.c and bin/trace, with the other
changes being cleanups to the argument lists, to improve their presentation
in the tracing output.
Also - added the "managed string" routines, which can dynamically allocate
strings, appending printf-formatted output to the string efficiently.
* Release memory for managed strings
* Fix printf() formats.
* More printf() format fixes.
* Add H5Eappend_stack routine and regression tests
* Clean up a few missed merge conflicts and update the error stacks.
* Remove unnecessary fork() operations and ten second sleep().
* Restore commented out attribute out, to better enable tracking down the previous failure
* Allow multiple H5ARG_TRACE macros within a routine to be updated
* Switch to using "new" H5ES_insert (which takes the arguments for the caller routine) for all event set operations. Renames H5ES_insert_new to H5ES_insert and removes the previous H5ES_insert.
* Merge "managed" string routines into "ref-counted" strings, and refactor code to use them.
* Add missing file.
* Add caller's name and arguments to event, for error reporting
* Refactor event set setup for "API common" internal routines
* Checkin async API routines for H5A* and H5G* modules as listed in ID-283.
Fix couple h5dump expected output files due to the changes.
* Add some of the error query routines needed for event sets.
* Refactor to make async setup / teardown and "common" routines cleaner
* (1) Add async APIs to H5L, H5F, and H5D modules
(2) Fix errors in previous checkins of async APIs in H5A and H5G modules
(3) h5dump expected output changes
* Enhance event info, for better error handling
* Change name of temporary vol_obj variable, to help reduce coding errors
* Fix oversight with vol_obj pointer
* Minor code cleanup
* Add missing \'valid\' flag for VOL wrapper context, when restoring the library\'s state
* Run source formatter
* Change H5TSmutex lock and release to include a lock count
* Update error reporting ideas
* Minor updates to improve sanity checking for retrieving / restoring library state
* Updated with feedback from h5py team members
* Refactor internal event set list and event handling, add implementation for H5ESget_err_info
* Change the VOL request subclass callbacks that switch from using "H5ES_status_t" to "H5VL_request_status_t", and also add a H5VL_request_status_t* parameter to the 'cancel' callback in the request subclass. Also more code quality cleanups to add iterator callbacks to internal event set routines.
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Fix missed merge marker, and reformatted line
* Clean up some warnings
* Correct level of indirection
* Relocate prototype (and doxygen info) for H5Aclose
* Change non-static function declarations to be static
* Ensure that H5TSpublic.h header gets installed (#129)
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
Co-authored-by: Houjun Tang <htang4@lbl.gov>
Co-authored-by: Neil Fortner <nfortne2@hdfgroup.org>
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
2020-12-14 08:02:17 +08:00
|
|
|
|
|
|
|
/* Append error stack #2 to error stack #1, and close stack #2 */
|
2023-09-06 04:11:52 +08:00
|
|
|
if (H5Eappend_stack(estack_id1, estack_id2, true) < 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
Bring async branch to develop (#166)
* Add H5Fwait, H5Dwait, and other changes for async vol connector
* Revert temporary testing changes
* Add H5Fwait to header file
* Add H5VLreset_lib_state() routine.
* Correct VOL wrap context when retrieving library state for file open & create.
* Manage the API context's VOL connector state as part of the library state.
* Set the 'VOL connector property valid' flag when restoring the library state.
* Don't push new API context on stack when retrieving "current" one.
* Check for NULL VOL wrap context before decrementing refcount on it, when
freeing the API context state.
* Manage recount of underlying connector for VOL wrap context.
* Add H5TSmutex_acquire() and H5TSmutex_release() routines to acquire and
release the global lock on the HDF5 library.
* Update library with new functions related to library global lock
* Add asynchronous token API
* Add new lightweight FUNC_ENTER / LEAVE macros for helping to structure the
threadsafety (H5TS*) routines.
* Sync w/develop
* Initial event set code framework.
* Elaborate on the H5ES routines, starting to add API routines.
Update the "close ID" callbacks to allow asynchronous request tokens to be
passed in from an asynchronous close API call.
Refactor current asynchronous API routines (H5Fopen/H5Fclose and
H5Dread/H5Dread) to use event sets instead of directly working with request
tokens from the application.
Clean up a few other minor warnings & code style issues.
* Implement H5EScreate, H5ESget_count, and H5ESclose.
It should be possible to write a simple application that creates an event
set and uses it with H5Fopen_async, H5Dread_async, H5Dwrite_async, and
H5Fclose_async, then calls H5ESclose (which waits for all async events to
complete).
* Add source file for event set test.
* Refactor sync & async API routines to call common routine.
Move dataset API read / write routines to src/H5D.c, along with all the other
API routines.
Progress on "fake" async VOL connector, for testing.
* Modify async implementation to wrap async requests in a H5VL_object_t
struct so the VOL layer can find the connector when accessing the
request at a later point.
* Free the requests is H5ESclose. Remove comments implying that request
wait, notify, and cancel callbacks should free the request.
* Fix bug in error handling in H5Fclose.
* Fix bugs in async file routines. Rename H5VL_create_object_generic to
H5VL_create_object.
* Add explicit async version of H5Fcreate.
* Add more _async routines
* Correct typo for return value from H5Awrite changes
* Add H5EStest and H5ESwait routines
* Updated with API tracing info
* Fix NULL pointer dereference in H5ES__wait
* Add H5is_library_terminating() routine, so that VOL connectors can detect
when the library is shutting down.
* Fix typo
* Remove event from event set's linked list
* Move block of code so that vol_obj is valid
* Avoid setting properties in the DXPL when reseting the library state (and in
the test code).
* Refactor argument tracing to implement new capability for tracing arguments
of non-API routines, with the H5ARG_TRACE macro. This macro is updated
automatically with the bin/trace script that runs as part of the autogen.sh
process. Major changes were in src/H5trace.c and bin/trace, with the other
changes being cleanups to the argument lists, to improve their presentation
in the tracing output.
Also - added the "managed string" routines, which can dynamically allocate
strings, appending printf-formatted output to the string efficiently.
* Release memory for managed strings
* Fix printf() formats.
* More printf() format fixes.
* Add H5Eappend_stack routine and regression tests
* Clean up a few missed merge conflicts and update the error stacks.
* Remove unnecessary fork() operations and ten second sleep().
* Restore commented out attribute out, to better enable tracking down the previous failure
* Allow multiple H5ARG_TRACE macros within a routine to be updated
* Switch to using "new" H5ES_insert (which takes the arguments for the caller routine) for all event set operations. Renames H5ES_insert_new to H5ES_insert and removes the previous H5ES_insert.
* Merge "managed" string routines into "ref-counted" strings, and refactor code to use them.
* Add missing file.
* Add caller's name and arguments to event, for error reporting
* Refactor event set setup for "API common" internal routines
* Checkin async API routines for H5A* and H5G* modules as listed in ID-283.
Fix couple h5dump expected output files due to the changes.
* Add some of the error query routines needed for event sets.
* Refactor to make async setup / teardown and "common" routines cleaner
* (1) Add async APIs to H5L, H5F, and H5D modules
(2) Fix errors in previous checkins of async APIs in H5A and H5G modules
(3) h5dump expected output changes
* Enhance event info, for better error handling
* Change name of temporary vol_obj variable, to help reduce coding errors
* Fix oversight with vol_obj pointer
* Minor code cleanup
* Add missing \'valid\' flag for VOL wrapper context, when restoring the library\'s state
* Run source formatter
* Change H5TSmutex lock and release to include a lock count
* Update error reporting ideas
* Minor updates to improve sanity checking for retrieving / restoring library state
* Updated with feedback from h5py team members
* Refactor internal event set list and event handling, add implementation for H5ESget_err_info
* Change the VOL request subclass callbacks that switch from using "H5ES_status_t" to "H5VL_request_status_t", and also add a H5VL_request_status_t* parameter to the 'cancel' callback in the request subclass. Also more code quality cleanups to add iterator callbacks to internal event set routines.
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Fix missed merge marker, and reformatted line
* Clean up some warnings
* Correct level of indirection
* Relocate prototype (and doxygen info) for H5Aclose
* Change non-static function declarations to be static
* Ensure that H5TSpublic.h header gets installed (#129)
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
Co-authored-by: Houjun Tang <htang4@lbl.gov>
Co-authored-by: Neil Fortner <nfortne2@hdfgroup.org>
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
2020-12-14 08:02:17 +08:00
|
|
|
|
|
|
|
/* Try to close error stack #2. Should fail because H5Eappend_stack
|
|
|
|
* should have already closed it.
|
|
|
|
*/
|
2021-03-17 23:25:39 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
ret = H5Eclose_stack(estack_id2);
|
|
|
|
}
|
Bring async branch to develop (#166)
* Add H5Fwait, H5Dwait, and other changes for async vol connector
* Revert temporary testing changes
* Add H5Fwait to header file
* Add H5VLreset_lib_state() routine.
* Correct VOL wrap context when retrieving library state for file open & create.
* Manage the API context's VOL connector state as part of the library state.
* Set the 'VOL connector property valid' flag when restoring the library state.
* Don't push new API context on stack when retrieving "current" one.
* Check for NULL VOL wrap context before decrementing refcount on it, when
freeing the API context state.
* Manage recount of underlying connector for VOL wrap context.
* Add H5TSmutex_acquire() and H5TSmutex_release() routines to acquire and
release the global lock on the HDF5 library.
* Update library with new functions related to library global lock
* Add asynchronous token API
* Add new lightweight FUNC_ENTER / LEAVE macros for helping to structure the
threadsafety (H5TS*) routines.
* Sync w/develop
* Initial event set code framework.
* Elaborate on the H5ES routines, starting to add API routines.
Update the "close ID" callbacks to allow asynchronous request tokens to be
passed in from an asynchronous close API call.
Refactor current asynchronous API routines (H5Fopen/H5Fclose and
H5Dread/H5Dread) to use event sets instead of directly working with request
tokens from the application.
Clean up a few other minor warnings & code style issues.
* Implement H5EScreate, H5ESget_count, and H5ESclose.
It should be possible to write a simple application that creates an event
set and uses it with H5Fopen_async, H5Dread_async, H5Dwrite_async, and
H5Fclose_async, then calls H5ESclose (which waits for all async events to
complete).
* Add source file for event set test.
* Refactor sync & async API routines to call common routine.
Move dataset API read / write routines to src/H5D.c, along with all the other
API routines.
Progress on "fake" async VOL connector, for testing.
* Modify async implementation to wrap async requests in a H5VL_object_t
struct so the VOL layer can find the connector when accessing the
request at a later point.
* Free the requests is H5ESclose. Remove comments implying that request
wait, notify, and cancel callbacks should free the request.
* Fix bug in error handling in H5Fclose.
* Fix bugs in async file routines. Rename H5VL_create_object_generic to
H5VL_create_object.
* Add explicit async version of H5Fcreate.
* Add more _async routines
* Correct typo for return value from H5Awrite changes
* Add H5EStest and H5ESwait routines
* Updated with API tracing info
* Fix NULL pointer dereference in H5ES__wait
* Add H5is_library_terminating() routine, so that VOL connectors can detect
when the library is shutting down.
* Fix typo
* Remove event from event set's linked list
* Move block of code so that vol_obj is valid
* Avoid setting properties in the DXPL when reseting the library state (and in
the test code).
* Refactor argument tracing to implement new capability for tracing arguments
of non-API routines, with the H5ARG_TRACE macro. This macro is updated
automatically with the bin/trace script that runs as part of the autogen.sh
process. Major changes were in src/H5trace.c and bin/trace, with the other
changes being cleanups to the argument lists, to improve their presentation
in the tracing output.
Also - added the "managed string" routines, which can dynamically allocate
strings, appending printf-formatted output to the string efficiently.
* Release memory for managed strings
* Fix printf() formats.
* More printf() format fixes.
* Add H5Eappend_stack routine and regression tests
* Clean up a few missed merge conflicts and update the error stacks.
* Remove unnecessary fork() operations and ten second sleep().
* Restore commented out attribute out, to better enable tracking down the previous failure
* Allow multiple H5ARG_TRACE macros within a routine to be updated
* Switch to using "new" H5ES_insert (which takes the arguments for the caller routine) for all event set operations. Renames H5ES_insert_new to H5ES_insert and removes the previous H5ES_insert.
* Merge "managed" string routines into "ref-counted" strings, and refactor code to use them.
* Add missing file.
* Add caller's name and arguments to event, for error reporting
* Refactor event set setup for "API common" internal routines
* Checkin async API routines for H5A* and H5G* modules as listed in ID-283.
Fix couple h5dump expected output files due to the changes.
* Add some of the error query routines needed for event sets.
* Refactor to make async setup / teardown and "common" routines cleaner
* (1) Add async APIs to H5L, H5F, and H5D modules
(2) Fix errors in previous checkins of async APIs in H5A and H5G modules
(3) h5dump expected output changes
* Enhance event info, for better error handling
* Change name of temporary vol_obj variable, to help reduce coding errors
* Fix oversight with vol_obj pointer
* Minor code cleanup
* Add missing \'valid\' flag for VOL wrapper context, when restoring the library\'s state
* Run source formatter
* Change H5TSmutex lock and release to include a lock count
* Update error reporting ideas
* Minor updates to improve sanity checking for retrieving / restoring library state
* Updated with feedback from h5py team members
* Refactor internal event set list and event handling, add implementation for H5ESget_err_info
* Change the VOL request subclass callbacks that switch from using "H5ES_status_t" to "H5VL_request_status_t", and also add a H5VL_request_status_t* parameter to the 'cancel' callback in the request subclass. Also more code quality cleanups to add iterator callbacks to internal event set routines.
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Fix missed merge marker, and reformatted line
* Clean up some warnings
* Correct level of indirection
* Relocate prototype (and doxygen info) for H5Aclose
* Change non-static function declarations to be static
* Ensure that H5TSpublic.h header gets installed (#129)
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
Co-authored-by: Houjun Tang <htang4@lbl.gov>
Co-authored-by: Neil Fortner <nfortne2@hdfgroup.org>
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
2020-12-14 08:02:17 +08:00
|
|
|
H5E_END_TRY
|
|
|
|
if (ret >= 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
Bring async branch to develop (#166)
* Add H5Fwait, H5Dwait, and other changes for async vol connector
* Revert temporary testing changes
* Add H5Fwait to header file
* Add H5VLreset_lib_state() routine.
* Correct VOL wrap context when retrieving library state for file open & create.
* Manage the API context's VOL connector state as part of the library state.
* Set the 'VOL connector property valid' flag when restoring the library state.
* Don't push new API context on stack when retrieving "current" one.
* Check for NULL VOL wrap context before decrementing refcount on it, when
freeing the API context state.
* Manage recount of underlying connector for VOL wrap context.
* Add H5TSmutex_acquire() and H5TSmutex_release() routines to acquire and
release the global lock on the HDF5 library.
* Update library with new functions related to library global lock
* Add asynchronous token API
* Add new lightweight FUNC_ENTER / LEAVE macros for helping to structure the
threadsafety (H5TS*) routines.
* Sync w/develop
* Initial event set code framework.
* Elaborate on the H5ES routines, starting to add API routines.
Update the "close ID" callbacks to allow asynchronous request tokens to be
passed in from an asynchronous close API call.
Refactor current asynchronous API routines (H5Fopen/H5Fclose and
H5Dread/H5Dread) to use event sets instead of directly working with request
tokens from the application.
Clean up a few other minor warnings & code style issues.
* Implement H5EScreate, H5ESget_count, and H5ESclose.
It should be possible to write a simple application that creates an event
set and uses it with H5Fopen_async, H5Dread_async, H5Dwrite_async, and
H5Fclose_async, then calls H5ESclose (which waits for all async events to
complete).
* Add source file for event set test.
* Refactor sync & async API routines to call common routine.
Move dataset API read / write routines to src/H5D.c, along with all the other
API routines.
Progress on "fake" async VOL connector, for testing.
* Modify async implementation to wrap async requests in a H5VL_object_t
struct so the VOL layer can find the connector when accessing the
request at a later point.
* Free the requests is H5ESclose. Remove comments implying that request
wait, notify, and cancel callbacks should free the request.
* Fix bug in error handling in H5Fclose.
* Fix bugs in async file routines. Rename H5VL_create_object_generic to
H5VL_create_object.
* Add explicit async version of H5Fcreate.
* Add more _async routines
* Correct typo for return value from H5Awrite changes
* Add H5EStest and H5ESwait routines
* Updated with API tracing info
* Fix NULL pointer dereference in H5ES__wait
* Add H5is_library_terminating() routine, so that VOL connectors can detect
when the library is shutting down.
* Fix typo
* Remove event from event set's linked list
* Move block of code so that vol_obj is valid
* Avoid setting properties in the DXPL when reseting the library state (and in
the test code).
* Refactor argument tracing to implement new capability for tracing arguments
of non-API routines, with the H5ARG_TRACE macro. This macro is updated
automatically with the bin/trace script that runs as part of the autogen.sh
process. Major changes were in src/H5trace.c and bin/trace, with the other
changes being cleanups to the argument lists, to improve their presentation
in the tracing output.
Also - added the "managed string" routines, which can dynamically allocate
strings, appending printf-formatted output to the string efficiently.
* Release memory for managed strings
* Fix printf() formats.
* More printf() format fixes.
* Add H5Eappend_stack routine and regression tests
* Clean up a few missed merge conflicts and update the error stacks.
* Remove unnecessary fork() operations and ten second sleep().
* Restore commented out attribute out, to better enable tracking down the previous failure
* Allow multiple H5ARG_TRACE macros within a routine to be updated
* Switch to using "new" H5ES_insert (which takes the arguments for the caller routine) for all event set operations. Renames H5ES_insert_new to H5ES_insert and removes the previous H5ES_insert.
* Merge "managed" string routines into "ref-counted" strings, and refactor code to use them.
* Add missing file.
* Add caller's name and arguments to event, for error reporting
* Refactor event set setup for "API common" internal routines
* Checkin async API routines for H5A* and H5G* modules as listed in ID-283.
Fix couple h5dump expected output files due to the changes.
* Add some of the error query routines needed for event sets.
* Refactor to make async setup / teardown and "common" routines cleaner
* (1) Add async APIs to H5L, H5F, and H5D modules
(2) Fix errors in previous checkins of async APIs in H5A and H5G modules
(3) h5dump expected output changes
* Enhance event info, for better error handling
* Change name of temporary vol_obj variable, to help reduce coding errors
* Fix oversight with vol_obj pointer
* Minor code cleanup
* Add missing \'valid\' flag for VOL wrapper context, when restoring the library\'s state
* Run source formatter
* Change H5TSmutex lock and release to include a lock count
* Update error reporting ideas
* Minor updates to improve sanity checking for retrieving / restoring library state
* Updated with feedback from h5py team members
* Refactor internal event set list and event handling, add implementation for H5ESget_err_info
* Change the VOL request subclass callbacks that switch from using "H5ES_status_t" to "H5VL_request_status_t", and also add a H5VL_request_status_t* parameter to the 'cancel' callback in the request subclass. Also more code quality cleanups to add iterator callbacks to internal event set routines.
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Fix missed merge marker, and reformatted line
* Clean up some warnings
* Correct level of indirection
* Relocate prototype (and doxygen info) for H5Aclose
* Change non-static function declarations to be static
* Ensure that H5TSpublic.h header gets installed (#129)
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
Co-authored-by: Houjun Tang <htang4@lbl.gov>
Co-authored-by: Neil Fortner <nfortne2@hdfgroup.org>
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
2020-12-14 08:02:17 +08:00
|
|
|
|
|
|
|
/* Check the number of errors on stack #1 */
|
|
|
|
err_num = H5Eget_num(estack_id1);
|
|
|
|
if (err_num != 3)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
Bring async branch to develop (#166)
* Add H5Fwait, H5Dwait, and other changes for async vol connector
* Revert temporary testing changes
* Add H5Fwait to header file
* Add H5VLreset_lib_state() routine.
* Correct VOL wrap context when retrieving library state for file open & create.
* Manage the API context's VOL connector state as part of the library state.
* Set the 'VOL connector property valid' flag when restoring the library state.
* Don't push new API context on stack when retrieving "current" one.
* Check for NULL VOL wrap context before decrementing refcount on it, when
freeing the API context state.
* Manage recount of underlying connector for VOL wrap context.
* Add H5TSmutex_acquire() and H5TSmutex_release() routines to acquire and
release the global lock on the HDF5 library.
* Update library with new functions related to library global lock
* Add asynchronous token API
* Add new lightweight FUNC_ENTER / LEAVE macros for helping to structure the
threadsafety (H5TS*) routines.
* Sync w/develop
* Initial event set code framework.
* Elaborate on the H5ES routines, starting to add API routines.
Update the "close ID" callbacks to allow asynchronous request tokens to be
passed in from an asynchronous close API call.
Refactor current asynchronous API routines (H5Fopen/H5Fclose and
H5Dread/H5Dread) to use event sets instead of directly working with request
tokens from the application.
Clean up a few other minor warnings & code style issues.
* Implement H5EScreate, H5ESget_count, and H5ESclose.
It should be possible to write a simple application that creates an event
set and uses it with H5Fopen_async, H5Dread_async, H5Dwrite_async, and
H5Fclose_async, then calls H5ESclose (which waits for all async events to
complete).
* Add source file for event set test.
* Refactor sync & async API routines to call common routine.
Move dataset API read / write routines to src/H5D.c, along with all the other
API routines.
Progress on "fake" async VOL connector, for testing.
* Modify async implementation to wrap async requests in a H5VL_object_t
struct so the VOL layer can find the connector when accessing the
request at a later point.
* Free the requests is H5ESclose. Remove comments implying that request
wait, notify, and cancel callbacks should free the request.
* Fix bug in error handling in H5Fclose.
* Fix bugs in async file routines. Rename H5VL_create_object_generic to
H5VL_create_object.
* Add explicit async version of H5Fcreate.
* Add more _async routines
* Correct typo for return value from H5Awrite changes
* Add H5EStest and H5ESwait routines
* Updated with API tracing info
* Fix NULL pointer dereference in H5ES__wait
* Add H5is_library_terminating() routine, so that VOL connectors can detect
when the library is shutting down.
* Fix typo
* Remove event from event set's linked list
* Move block of code so that vol_obj is valid
* Avoid setting properties in the DXPL when reseting the library state (and in
the test code).
* Refactor argument tracing to implement new capability for tracing arguments
of non-API routines, with the H5ARG_TRACE macro. This macro is updated
automatically with the bin/trace script that runs as part of the autogen.sh
process. Major changes were in src/H5trace.c and bin/trace, with the other
changes being cleanups to the argument lists, to improve their presentation
in the tracing output.
Also - added the "managed string" routines, which can dynamically allocate
strings, appending printf-formatted output to the string efficiently.
* Release memory for managed strings
* Fix printf() formats.
* More printf() format fixes.
* Add H5Eappend_stack routine and regression tests
* Clean up a few missed merge conflicts and update the error stacks.
* Remove unnecessary fork() operations and ten second sleep().
* Restore commented out attribute out, to better enable tracking down the previous failure
* Allow multiple H5ARG_TRACE macros within a routine to be updated
* Switch to using "new" H5ES_insert (which takes the arguments for the caller routine) for all event set operations. Renames H5ES_insert_new to H5ES_insert and removes the previous H5ES_insert.
* Merge "managed" string routines into "ref-counted" strings, and refactor code to use them.
* Add missing file.
* Add caller's name and arguments to event, for error reporting
* Refactor event set setup for "API common" internal routines
* Checkin async API routines for H5A* and H5G* modules as listed in ID-283.
Fix couple h5dump expected output files due to the changes.
* Add some of the error query routines needed for event sets.
* Refactor to make async setup / teardown and "common" routines cleaner
* (1) Add async APIs to H5L, H5F, and H5D modules
(2) Fix errors in previous checkins of async APIs in H5A and H5G modules
(3) h5dump expected output changes
* Enhance event info, for better error handling
* Change name of temporary vol_obj variable, to help reduce coding errors
* Fix oversight with vol_obj pointer
* Minor code cleanup
* Add missing \'valid\' flag for VOL wrapper context, when restoring the library\'s state
* Run source formatter
* Change H5TSmutex lock and release to include a lock count
* Update error reporting ideas
* Minor updates to improve sanity checking for retrieving / restoring library state
* Updated with feedback from h5py team members
* Refactor internal event set list and event handling, add implementation for H5ESget_err_info
* Change the VOL request subclass callbacks that switch from using "H5ES_status_t" to "H5VL_request_status_t", and also add a H5VL_request_status_t* parameter to the 'cancel' callback in the request subclass. Also more code quality cleanups to add iterator callbacks to internal event set routines.
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Fix missed merge marker, and reformatted line
* Clean up some warnings
* Correct level of indirection
* Relocate prototype (and doxygen info) for H5Aclose
* Change non-static function declarations to be static
* Ensure that H5TSpublic.h header gets installed (#129)
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
Co-authored-by: Houjun Tang <htang4@lbl.gov>
Co-authored-by: Neil Fortner <nfortne2@hdfgroup.org>
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
2020-12-14 08:02:17 +08:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
error:
|
|
|
|
return -1;
|
|
|
|
} /* end test_append() */
|
|
|
|
|
2003-07-15 04:08:27 +08:00
|
|
|
/*-------------------------------------------------------------------------
|
2017-11-18 07:21:49 +08:00
|
|
|
* Function: close_error
|
2003-07-15 04:08:27 +08:00
|
|
|
*
|
2017-11-18 07:21:49 +08:00
|
|
|
* Purpose: Closes error information.
|
2003-07-15 04:08:27 +08:00
|
|
|
*
|
2017-11-18 07:21:49 +08:00
|
|
|
* Return: Success: 0
|
|
|
|
* Failure: -1
|
2003-07-15 04:08:27 +08:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
2005-08-14 04:53:35 +08:00
|
|
|
static herr_t
|
2003-07-15 04:08:27 +08:00
|
|
|
close_error(void)
|
|
|
|
{
|
2003-07-22 09:32:27 +08:00
|
|
|
/* Close major errors, let H5Eunregister_class close minor errors */
|
2017-11-18 07:21:49 +08:00
|
|
|
if (H5Eclose_msg(ERR_MAJ_TEST) < 0)
|
2007-04-12 09:59:45 +08:00
|
|
|
TEST_ERROR;
|
2005-08-14 04:53:35 +08:00
|
|
|
|
2017-11-18 07:21:49 +08:00
|
|
|
if (H5Eclose_msg(ERR_MAJ_IO) < 0)
|
2007-04-12 09:59:45 +08:00
|
|
|
TEST_ERROR;
|
2005-08-14 04:53:35 +08:00
|
|
|
|
2017-11-18 07:21:49 +08:00
|
|
|
if (H5Eclose_msg(ERR_MAJ_API) < 0)
|
2007-04-12 09:59:45 +08:00
|
|
|
TEST_ERROR;
|
2005-08-14 04:53:35 +08:00
|
|
|
|
2017-11-18 07:21:49 +08:00
|
|
|
if (H5Eunregister_class(ERR_CLS) < 0)
|
2007-04-12 09:59:45 +08:00
|
|
|
TEST_ERROR;
|
2003-07-15 04:08:27 +08:00
|
|
|
|
2017-11-18 07:21:49 +08:00
|
|
|
if (H5Eunregister_class(ERR_CLS2) < 0)
|
2009-04-23 02:39:10 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
|
2003-07-11 04:15:46 +08:00
|
|
|
return 0;
|
|
|
|
|
2007-04-12 09:59:45 +08:00
|
|
|
error:
|
2003-07-11 04:15:46 +08:00
|
|
|
return -1;
|
2007-04-12 09:59:45 +08:00
|
|
|
} /* end close_error() */
|
2005-08-14 04:53:35 +08:00
|
|
|
|
2011-06-03 23:58:49 +08:00
|
|
|
/*-------------------------------------------------------------------------
|
2017-11-18 07:21:49 +08:00
|
|
|
* Function: test_filter_error
|
2011-06-03 23:58:49 +08:00
|
|
|
*
|
2017-11-18 07:21:49 +08:00
|
|
|
* Purpose: Make sure the error message prints out the filter name
|
2019-08-05 04:19:04 +08:00
|
|
|
* when the existent file is opened but the filter isn't
|
|
|
|
* registered. The existent file was created with
|
|
|
|
* gen_filters.c.
|
2011-06-03 23:58:49 +08:00
|
|
|
*
|
2017-11-18 07:21:49 +08:00
|
|
|
* Return: Success: 0
|
2019-08-05 04:19:04 +08:00
|
|
|
* Failure: -1
|
2011-06-03 23:58:49 +08:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static herr_t
|
2021-09-30 02:28:12 +08:00
|
|
|
test_filter_error(const char *fname, hid_t fapl)
|
2011-06-03 23:58:49 +08:00
|
|
|
{
|
|
|
|
const char *pathname = H5_get_srcdir_filename(fname); /* Corrected test file name */
|
2023-09-09 07:06:23 +08:00
|
|
|
hid_t file = H5I_INVALID_HID;
|
|
|
|
hid_t dataset = H5I_INVALID_HID;
|
2011-06-03 23:58:49 +08:00
|
|
|
int buf[20];
|
|
|
|
|
2023-06-28 23:31:32 +08:00
|
|
|
fprintf(stderr, "\nTesting error message during data reading when filter isn't registered\n");
|
2011-06-03 23:58:49 +08:00
|
|
|
|
|
|
|
/* Open the file */
|
2021-09-30 02:28:12 +08:00
|
|
|
if ((file = H5Fopen(pathname, H5F_ACC_RDONLY, fapl)) < 0)
|
2011-06-03 23:58:49 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* Open the regular dataset */
|
2017-11-18 07:21:49 +08:00
|
|
|
if ((dataset = H5Dopen2(file, DSET_FILTER_NAME, H5P_DEFAULT)) < 0)
|
2011-06-03 23:58:49 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
|
2017-11-18 07:21:49 +08:00
|
|
|
if (H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) >= 0)
|
|
|
|
TEST_ERROR;
|
2011-06-03 23:58:49 +08:00
|
|
|
|
|
|
|
/* Close/release resources */
|
2017-11-18 07:21:49 +08:00
|
|
|
if (H5Dclose(dataset) < 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
2011-06-03 23:58:49 +08:00
|
|
|
|
2017-11-18 07:21:49 +08:00
|
|
|
if (H5Fclose(file) < 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
2011-06-03 23:58:49 +08:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
error:
|
|
|
|
return -1;
|
2017-11-18 07:21:49 +08:00
|
|
|
} /* end test_filter_error() */
|
2011-06-03 23:58:49 +08:00
|
|
|
|
2003-07-11 04:15:46 +08:00
|
|
|
/*-------------------------------------------------------------------------
|
2017-11-18 07:21:49 +08:00
|
|
|
* Function: main
|
2003-07-11 04:15:46 +08:00
|
|
|
*
|
2017-11-18 07:21:49 +08:00
|
|
|
* Purpose: Test error API.
|
2003-07-11 04:15:46 +08:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
main(void)
|
|
|
|
{
|
2023-09-09 07:06:23 +08:00
|
|
|
hid_t file = H5I_INVALID_HID;
|
|
|
|
hid_t fapl = H5I_INVALID_HID;
|
|
|
|
hid_t estack_id = H5I_INVALID_HID;
|
2017-11-18 07:21:49 +08:00
|
|
|
char filename[1024];
|
2021-09-30 02:28:12 +08:00
|
|
|
const char *env_h5_drvr; /* File driver value from environment */
|
2020-09-30 22:27:10 +08:00
|
|
|
const char *FUNC_main = "main";
|
2020-01-16 01:32:01 +08:00
|
|
|
int i;
|
2003-07-16 06:17:09 +08:00
|
|
|
|
2021-09-30 02:28:12 +08:00
|
|
|
/* Get the VFD to use */
|
2023-09-27 04:11:22 +08:00
|
|
|
env_h5_drvr = getenv(HDF5_DRIVER);
|
2021-09-30 02:28:12 +08:00
|
|
|
if (env_h5_drvr == NULL)
|
|
|
|
env_h5_drvr = "nomatch";
|
|
|
|
|
2023-06-28 23:31:32 +08:00
|
|
|
fprintf(stderr, " This program tests the Error API. There're supposed to be some error messages\n");
|
2003-07-22 09:32:27 +08:00
|
|
|
|
|
|
|
/* Initialize errors */
|
2017-11-18 07:21:49 +08:00
|
|
|
if (init_error() < 0)
|
2007-04-12 09:59:45 +08:00
|
|
|
TEST_ERROR;
|
2005-08-14 04:53:35 +08:00
|
|
|
|
2017-11-18 07:21:49 +08:00
|
|
|
if ((fapl = h5_fileaccess()) < 0)
|
|
|
|
TEST_ERROR;
|
2005-08-14 04:53:35 +08:00
|
|
|
|
2020-01-16 01:32:01 +08:00
|
|
|
/* Set up data arrays */
|
2023-06-29 06:48:12 +08:00
|
|
|
if (NULL == (ipoints2_data = (int *)calloc(DIM0 * DIM1, sizeof(int))))
|
2020-01-16 01:32:01 +08:00
|
|
|
TEST_ERROR;
|
2023-06-29 06:48:12 +08:00
|
|
|
if (NULL == (ipoints2 = (int **)calloc(DIM0, sizeof(ipoints2_data))))
|
2020-01-16 01:32:01 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
for (i = 0; i < DIM0; i++)
|
|
|
|
ipoints2[i] = ipoints2_data + (i * DIM1);
|
|
|
|
|
2023-06-29 06:48:12 +08:00
|
|
|
if (NULL == (icheck2_data = (int *)calloc(DIM0 * DIM1, sizeof(int))))
|
2020-01-16 01:32:01 +08:00
|
|
|
TEST_ERROR;
|
2023-06-29 06:48:12 +08:00
|
|
|
if (NULL == (icheck2 = (int **)calloc(DIM0, sizeof(icheck2_data))))
|
2020-01-16 01:32:01 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
for (i = 0; i < DIM0; i++)
|
|
|
|
icheck2[i] = icheck2_data + (i * DIM1);
|
|
|
|
|
2017-11-18 07:21:49 +08:00
|
|
|
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
|
|
|
|
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
|
|
|
|
TEST_ERROR;
|
2003-07-26 10:55:47 +08:00
|
|
|
|
2005-08-14 04:53:35 +08:00
|
|
|
/* Test error stack */
|
2017-11-18 07:21:49 +08:00
|
|
|
if (error_stack() < 0) {
|
2003-07-22 09:32:27 +08:00
|
|
|
/* Push an error onto error stack */
|
2017-11-18 07:21:49 +08:00
|
|
|
if (H5Epush(ERR_STACK, __FILE__, FUNC_main, __LINE__, ERR_CLS, ERR_MAJ_TEST, ERR_MIN_ERRSTACK,
|
2020-09-30 22:27:10 +08:00
|
|
|
"Error stack test failed") < 0)
|
2017-11-18 07:21:49 +08:00
|
|
|
TEST_ERROR;
|
2005-08-14 04:53:35 +08:00
|
|
|
|
2003-07-22 09:32:27 +08:00
|
|
|
/* Delete an error from the top of error stack */
|
2003-07-18 09:46:40 +08:00
|
|
|
H5Epop(ERR_STACK, 1);
|
2005-08-14 04:53:35 +08:00
|
|
|
|
2010-01-30 12:29:13 +08:00
|
|
|
/* Make sure we can use other class's major or minor errors. */
|
2009-04-23 02:39:10 +08:00
|
|
|
H5Epush(ERR_STACK, __FILE__, FUNC_main, __LINE__, ERR_CLS2, ERR_MAJ_TEST, ERR_MIN_ERRSTACK,
|
|
|
|
"Error stack test failed");
|
|
|
|
|
2003-07-22 09:32:27 +08:00
|
|
|
/* Print out the errors on stack */
|
2003-07-18 09:46:40 +08:00
|
|
|
dump_error(ERR_STACK);
|
2003-07-22 09:32:27 +08:00
|
|
|
|
|
|
|
/* Empty error stack */
|
2007-04-12 09:59:45 +08:00
|
|
|
H5Eclear2(ERR_STACK);
|
2003-07-22 09:32:27 +08:00
|
|
|
|
|
|
|
/* Close error stack */
|
2003-07-18 09:46:40 +08:00
|
|
|
H5Eclose_stack(ERR_STACK);
|
2007-04-12 09:59:45 +08:00
|
|
|
} /* end if */
|
2003-07-11 04:15:46 +08:00
|
|
|
|
2003-07-22 09:32:27 +08:00
|
|
|
/* Test error API */
|
2017-11-18 07:21:49 +08:00
|
|
|
if (test_error(file) < 0) {
|
2007-08-22 05:08:27 +08:00
|
|
|
H5Epush(H5E_DEFAULT, __FILE__, FUNC_main, __LINE__, ERR_CLS, ERR_MAJ_TEST, ERR_MIN_SUBROUTINE,
|
2003-07-18 09:46:40 +08:00
|
|
|
"Error test failed, %s", "it's wrong");
|
2003-07-22 09:32:27 +08:00
|
|
|
estack_id = H5Eget_current_stack();
|
2007-04-12 09:59:45 +08:00
|
|
|
H5Eprint2(estack_id, stderr);
|
2003-07-22 09:32:27 +08:00
|
|
|
H5Eclose_stack(estack_id);
|
2017-11-18 07:21:49 +08:00
|
|
|
}
|
2005-01-15 03:36:01 +08:00
|
|
|
|
|
|
|
/* Test pushing a very long error description */
|
2017-11-18 07:21:49 +08:00
|
|
|
if (test_long_desc() < 0)
|
|
|
|
TEST_ERROR;
|
2005-08-14 04:53:35 +08:00
|
|
|
|
[svn-r14230] Description:
Add H5Ecreate_stack() API routine, to fill a minor gap in the error
routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-02 03:27:15 +08:00
|
|
|
/* Test creating a new error stack */
|
2017-11-18 07:21:49 +08:00
|
|
|
if (test_create() < 0)
|
|
|
|
TEST_ERROR;
|
[svn-r14230] Description:
Add H5Ecreate_stack() API routine, to fill a minor gap in the error
routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-02 03:27:15 +08:00
|
|
|
|
2010-09-07 23:41:55 +08:00
|
|
|
/* Test copying a new error stack */
|
2017-11-18 07:21:49 +08:00
|
|
|
if (test_copy() < 0)
|
|
|
|
TEST_ERROR;
|
2010-09-07 23:41:55 +08:00
|
|
|
|
2017-11-18 07:21:49 +08:00
|
|
|
if (H5Fclose(file) < 0)
|
|
|
|
TEST_ERROR;
|
2003-07-12 05:04:38 +08:00
|
|
|
|
Bring async branch to develop (#166)
* Add H5Fwait, H5Dwait, and other changes for async vol connector
* Revert temporary testing changes
* Add H5Fwait to header file
* Add H5VLreset_lib_state() routine.
* Correct VOL wrap context when retrieving library state for file open & create.
* Manage the API context's VOL connector state as part of the library state.
* Set the 'VOL connector property valid' flag when restoring the library state.
* Don't push new API context on stack when retrieving "current" one.
* Check for NULL VOL wrap context before decrementing refcount on it, when
freeing the API context state.
* Manage recount of underlying connector for VOL wrap context.
* Add H5TSmutex_acquire() and H5TSmutex_release() routines to acquire and
release the global lock on the HDF5 library.
* Update library with new functions related to library global lock
* Add asynchronous token API
* Add new lightweight FUNC_ENTER / LEAVE macros for helping to structure the
threadsafety (H5TS*) routines.
* Sync w/develop
* Initial event set code framework.
* Elaborate on the H5ES routines, starting to add API routines.
Update the "close ID" callbacks to allow asynchronous request tokens to be
passed in from an asynchronous close API call.
Refactor current asynchronous API routines (H5Fopen/H5Fclose and
H5Dread/H5Dread) to use event sets instead of directly working with request
tokens from the application.
Clean up a few other minor warnings & code style issues.
* Implement H5EScreate, H5ESget_count, and H5ESclose.
It should be possible to write a simple application that creates an event
set and uses it with H5Fopen_async, H5Dread_async, H5Dwrite_async, and
H5Fclose_async, then calls H5ESclose (which waits for all async events to
complete).
* Add source file for event set test.
* Refactor sync & async API routines to call common routine.
Move dataset API read / write routines to src/H5D.c, along with all the other
API routines.
Progress on "fake" async VOL connector, for testing.
* Modify async implementation to wrap async requests in a H5VL_object_t
struct so the VOL layer can find the connector when accessing the
request at a later point.
* Free the requests is H5ESclose. Remove comments implying that request
wait, notify, and cancel callbacks should free the request.
* Fix bug in error handling in H5Fclose.
* Fix bugs in async file routines. Rename H5VL_create_object_generic to
H5VL_create_object.
* Add explicit async version of H5Fcreate.
* Add more _async routines
* Correct typo for return value from H5Awrite changes
* Add H5EStest and H5ESwait routines
* Updated with API tracing info
* Fix NULL pointer dereference in H5ES__wait
* Add H5is_library_terminating() routine, so that VOL connectors can detect
when the library is shutting down.
* Fix typo
* Remove event from event set's linked list
* Move block of code so that vol_obj is valid
* Avoid setting properties in the DXPL when reseting the library state (and in
the test code).
* Refactor argument tracing to implement new capability for tracing arguments
of non-API routines, with the H5ARG_TRACE macro. This macro is updated
automatically with the bin/trace script that runs as part of the autogen.sh
process. Major changes were in src/H5trace.c and bin/trace, with the other
changes being cleanups to the argument lists, to improve their presentation
in the tracing output.
Also - added the "managed string" routines, which can dynamically allocate
strings, appending printf-formatted output to the string efficiently.
* Release memory for managed strings
* Fix printf() formats.
* More printf() format fixes.
* Add H5Eappend_stack routine and regression tests
* Clean up a few missed merge conflicts and update the error stacks.
* Remove unnecessary fork() operations and ten second sleep().
* Restore commented out attribute out, to better enable tracking down the previous failure
* Allow multiple H5ARG_TRACE macros within a routine to be updated
* Switch to using "new" H5ES_insert (which takes the arguments for the caller routine) for all event set operations. Renames H5ES_insert_new to H5ES_insert and removes the previous H5ES_insert.
* Merge "managed" string routines into "ref-counted" strings, and refactor code to use them.
* Add missing file.
* Add caller's name and arguments to event, for error reporting
* Refactor event set setup for "API common" internal routines
* Checkin async API routines for H5A* and H5G* modules as listed in ID-283.
Fix couple h5dump expected output files due to the changes.
* Add some of the error query routines needed for event sets.
* Refactor to make async setup / teardown and "common" routines cleaner
* (1) Add async APIs to H5L, H5F, and H5D modules
(2) Fix errors in previous checkins of async APIs in H5A and H5G modules
(3) h5dump expected output changes
* Enhance event info, for better error handling
* Change name of temporary vol_obj variable, to help reduce coding errors
* Fix oversight with vol_obj pointer
* Minor code cleanup
* Add missing \'valid\' flag for VOL wrapper context, when restoring the library\'s state
* Run source formatter
* Change H5TSmutex lock and release to include a lock count
* Update error reporting ideas
* Minor updates to improve sanity checking for retrieving / restoring library state
* Updated with feedback from h5py team members
* Refactor internal event set list and event handling, add implementation for H5ESget_err_info
* Change the VOL request subclass callbacks that switch from using "H5ES_status_t" to "H5VL_request_status_t", and also add a H5VL_request_status_t* parameter to the 'cancel' callback in the request subclass. Also more code quality cleanups to add iterator callbacks to internal event set routines.
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Fix missed merge marker, and reformatted line
* Clean up some warnings
* Correct level of indirection
* Relocate prototype (and doxygen info) for H5Aclose
* Change non-static function declarations to be static
* Ensure that H5TSpublic.h header gets installed (#129)
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
Co-authored-by: Houjun Tang <htang4@lbl.gov>
Co-authored-by: Neil Fortner <nfortne2@hdfgroup.org>
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
2020-12-14 08:02:17 +08:00
|
|
|
/* Test appending error stacks */
|
|
|
|
if (test_append() < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
2003-07-22 09:32:27 +08:00
|
|
|
/* Close error information */
|
2017-11-18 07:21:49 +08:00
|
|
|
if (close_error() < 0)
|
2007-04-12 09:59:45 +08:00
|
|
|
TEST_ERROR;
|
2003-07-22 09:32:27 +08:00
|
|
|
|
2019-08-05 04:19:04 +08:00
|
|
|
/* Test error message during data reading when filter isn't registered
|
2011-06-07 01:05:37 +08:00
|
|
|
* Use default FAPL to avoid some VFD drivers by the check-vfd test because
|
2017-11-18 07:21:49 +08:00
|
|
|
* the test file was pre-generated.
|
|
|
|
*/
|
2011-06-14 05:28:49 +08:00
|
|
|
h5_fixname(DATAFILE, H5P_DEFAULT, filename, sizeof filename);
|
2023-09-16 06:13:18 +08:00
|
|
|
if (!h5_using_default_driver(env_h5_drvr) && strcmp(env_h5_drvr, "stdio")) {
|
2021-09-30 02:28:12 +08:00
|
|
|
/* If not using the library's default VFD or the stdio VFD, force
|
|
|
|
* the library's default VFD here. The test file was pre-generated
|
|
|
|
* and can cause issues with many VFDs.
|
|
|
|
*/
|
|
|
|
if (H5Pset_driver(fapl, H5_DEFAULT_VFD, NULL) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
}
|
|
|
|
if (test_filter_error(filename, fapl) < 0)
|
2011-06-03 23:58:49 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
|
2015-09-14 11:58:59 +08:00
|
|
|
h5_clean_files(FILENAME, fapl);
|
2011-06-03 23:58:49 +08:00
|
|
|
|
2023-06-29 06:48:12 +08:00
|
|
|
free(ipoints2);
|
|
|
|
free(ipoints2_data);
|
|
|
|
free(icheck2);
|
|
|
|
free(icheck2_data);
|
2020-01-16 01:32:01 +08:00
|
|
|
|
2023-06-28 23:31:32 +08:00
|
|
|
fprintf(stderr, "\nAll error API tests passed.\n");
|
2003-07-11 04:15:46 +08:00
|
|
|
return 0;
|
|
|
|
|
2007-04-12 09:59:45 +08:00
|
|
|
error:
|
2023-06-29 06:48:12 +08:00
|
|
|
free(ipoints2);
|
|
|
|
free(ipoints2_data);
|
|
|
|
free(icheck2);
|
|
|
|
free(icheck2_data);
|
2020-01-16 01:32:01 +08:00
|
|
|
|
2023-06-28 23:31:32 +08:00
|
|
|
fprintf(stderr, "\n***** ERROR TEST FAILED (real problem)! *****\n");
|
2003-07-11 04:15:46 +08:00
|
|
|
return 1;
|
|
|
|
}
|
2008-10-31 04:49:08 +08:00
|
|
|
#endif /* H5_USE_16_API */
|