diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 42 | ||||
-rw-r--r-- | test/Makefile.am | 11 | ||||
-rw-r--r-- | test/accum.c | 2 | ||||
-rw-r--r-- | test/btree2.c | 32 | ||||
-rw-r--r-- | test/cache_api.c | 4 | ||||
-rw-r--r-- | test/cache_common.c | 10 | ||||
-rw-r--r-- | test/cache_tagging.c | 14 | ||||
-rw-r--r-- | test/dynlibvol1.c | 366 | ||||
-rw-r--r-- | test/dynlibvol2.c | 366 | ||||
-rw-r--r-- | test/earray.c | 14 | ||||
-rw-r--r-- | test/farray.c | 14 | ||||
-rw-r--r-- | test/fheap.c | 142 | ||||
-rw-r--r-- | test/freespace.c | 32 | ||||
-rw-r--r-- | test/gheap.c | 20 | ||||
-rw-r--r-- | test/lheap.c | 12 | ||||
-rw-r--r-- | test/mf.c | 142 | ||||
-rw-r--r-- | test/ohdr.c | 8 | ||||
-rw-r--r-- | test/test_vol_plugin.sh.in | 80 | ||||
-rw-r--r-- | test/testfiles/err_compat_1 | 20 | ||||
-rw-r--r-- | test/testfiles/error_test_1 | 16 | ||||
-rw-r--r-- | test/tfile.c | 56 | ||||
-rw-r--r-- | test/tmisc.c | 4 | ||||
-rw-r--r-- | test/ttsafe_error.c | 26 | ||||
-rw-r--r-- | test/vfd.c | 87 | ||||
-rw-r--r-- | test/vol_test.c | 136 |
25 files changed, 1387 insertions, 269 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index f9832f3..ac7278a 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -146,6 +146,48 @@ endif (BUILD_SHARED_LIBS) ) endforeach (test_lib ${TEST2_PLUGIN_LIBS}) + # make vol_plugins dir + file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/voltestdir") + + #----------------------------------------------------------------------------- + # Define Test Library Sources + #----------------------------------------------------------------------------- + set (TEST_VOL_PLUGIN_LIBS + dynlibvol1 + dynlibvol2 + ) + + foreach (test_vol_lib ${TEST_VOL_PLUGIN_LIBS}) + set (HDF5_TEST_VOL_PLUGIN_LIB_CORENAME "${test_vol_lib}") + set (HDF5_TEST_VOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_VOL_PLUGIN_LIB_CORENAME}") + set (HDF5_TEST_VOL_PLUGIN_LIB_TARGET ${HDF5_TEST_VOL_PLUGIN_LIB_CORENAME}) + add_definitions (${HDF_EXTRA_C_FLAGS}) + INCLUDE_DIRECTORIES (${HDF5_SRC_DIR}) + + add_library (${HDF5_TEST_VOL_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SOURCE_DIR}/${test_vol_lib}.c) + TARGET_C_PROPERTIES (${HDF5_TEST_VOL_PLUGIN_LIB_TARGET} SHARED " " " ") + target_link_libraries (${HDF5_TEST_VOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) + H5_SET_LIB_OPTIONS ( + ${HDF5_TEST_VOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_VOL_PLUGIN_LIB_NAME} + SHARED + HDF5_TEST_VOL_PLUGIN_LIB_NAME_RELEASE + HDF5_TEST_VOL_PLUGIN_LIB_NAME_DEBUG + ) + set_target_properties (${HDF5_TEST_VOL_PLUGIN_LIB_TARGET} PROPERTIES FOLDER libraries/TEST_VOL_PLUGIN) + + #----------------------------------------------------------------------------- + # Copy plugin library to a plugins folder + #----------------------------------------------------------------------------- + add_custom_command ( + TARGET ${HDF5_TEST_VOL_PLUGIN_LIB_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different + "$<TARGET_FILE:${HDF5_TEST_VOL_PLUGIN_LIB_TARGET}>" + "${CMAKE_BINARY_DIR}/voltestdir/$<TARGET_FILE_NAME:${HDF5_TEST_VOL_PLUGIN_LIB_TARGET}>" + ) + endforeach (test_vol_lib ${TEST_VOL_PLUGIN_LIBS}) + set (testhdf5_SRCS ${HDF5_TEST_SOURCE_DIR}/testhdf5.c ${HDF5_TEST_SOURCE_DIR}/tarray.c diff --git a/test/Makefile.am b/test/Makefile.am index d9c53d4..514317d 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -28,7 +28,9 @@ TEST_SCRIPT = testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh SCRIPT_DEPEND = error_test$(EXEEXT) err_compat$(EXEEXT) links_env$(EXEEXT) if HAVE_SHARED_CONDITIONAL TEST_SCRIPT += test_plugin.sh + TEST_SCRIPT += test_vol_plugin.sh SCRIPT_DEPEND += plugin$(EXEEXT) + SCRIPT_DEPEND += vol_test$(EXEEXT) endif check_SCRIPTS = $(TEST_SCRIPT) @@ -57,6 +59,7 @@ TEST_PROG= testhdf5 lheap ohdr stab gheap cache cache_api cache_tagging \ check_PROGRAMS=$(TEST_PROG) error_test err_compat tcheck_version testmeta links_env if HAVE_SHARED_CONDITIONAL check_PROGRAMS+= plugin + check_PROGRAMS+= vol_test endif # These programs generate test files for the tests. They don't need to be @@ -81,10 +84,13 @@ if HAVE_SHARED_CONDITIONAL # The libdynlib1 and libdynlib2 library for testing plugin module plugin.c. # Build it as shared library if configure is enabled for shared library. - lib_LTLIBRARIES=libdynlib1.la libdynlib2.la libdynlib3.la + lib_LTLIBRARIES=libdynlib1.la libdynlib2.la libdynlib3.la libdynlibvol1.la libdynlibvol2.la libdynlib1_la_SOURCES=dynlib1.c libdynlib2_la_SOURCES=dynlib2.c libdynlib3_la_SOURCES=dynlib3.c + libdynlibvol1_la_SOURCES=dynlibvol1.c + libdynlibvol2_la_SOURCES=dynlibvol2.c + install-exec-hook: $(RM) $(DESTDIR)$(libdir)/*dynlib* @@ -142,6 +148,7 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offse tmisc[0-9]*.h5 set_extent[1-5].h5 ext[12].bin \ getname.h5 getname[1-3].h5 sec2_file.h5 direct_file.h5 \ family_file000[0-3][0-9].h5 new_family_v16_000[0-3][0-9].h5 \ + log_file1.h5 log_file2.h5 \ multi_file-[rs].h5 core_file plugin.h5 \ new_move_[ab].h5 ntypes.h5 dangle.h5 error_test.h5 err_compat.h5 \ dtransform.h5 test_filters.h5 get_file_name.h5 tstint[1-2].h5 \ @@ -160,6 +167,6 @@ testhdf5_SOURCES=testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \ tvlstr.c tvltypes.c # Temporary files. -DISTCLEANFILES=testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh test_plugin.sh +DISTCLEANFILES=testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh test_plugin.sh test_vol_plugin.sh include $(top_srcdir)/config/conclude.am diff --git a/test/accum.c b/test/accum.c index 268b7e1..6561a8a 100644 --- a/test/accum.c +++ b/test/accum.c @@ -93,7 +93,7 @@ main(void) if((fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR /* Get H5F_t * to internal file structure */ - if(NULL == (f = (H5F_t *)H5I_object(fid))) FAIL_STACK_ERROR + if(NULL == (f = (H5F_t *)H5VL_object(fid))) FAIL_STACK_ERROR /* We'll be writing lots of garbage data, so extend the file a ways. 10MB should do. */ diff --git a/test/btree2.c b/test/btree2.c index 8f84135..c266b31 100644 --- a/test/btree2.c +++ b/test/btree2.c @@ -26,6 +26,14 @@ #define H5B2_TESTING #include "H5B2pkg.h" +/* + * This file needs to access private information from the H5F package. + * This file also needs to access the file testing code. + */ +#define H5F_FRIEND /*suppress error about including H5Fpkg */ +#define H5F_TESTING +#include "H5Fpkg.h" /* File access */ + /* Other private headers that this test requires */ #include "H5Iprivate.h" @@ -104,7 +112,7 @@ create_file(hid_t *file, H5F_t **f, hid_t fapl) TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (*f = (H5F_t *)H5I_object(*file))) + if(NULL == (*f = (H5F_t *)H5VL_object(*file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -2806,7 +2814,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time); TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -2845,7 +2853,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time); FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -6375,7 +6383,7 @@ gen_l4_btree2(const char *filename, hid_t fapl, const H5B2_create_t *cparam, STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -6531,7 +6539,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -6627,7 +6635,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -6716,7 +6724,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -6802,7 +6810,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -7153,7 +7161,7 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam) STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -7198,7 +7206,7 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam) STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -7256,7 +7264,7 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam) STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -7314,7 +7322,7 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam) STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ diff --git a/test/cache_api.c b/test/cache_api.c index bebb828..bb2f141 100644 --- a/test/cache_api.c +++ b/test/cache_api.c @@ -236,7 +236,7 @@ check_fapl_mdc_api_calls(void) /* get a pointer to the files internal data structure */ if ( pass ) { - file_ptr = (H5F_t *)H5I_object_verify(file_id, H5I_FILE); + file_ptr = (H5F_t *)H5VL_object_verify(file_id, H5I_FILE); if ( file_ptr == NULL ) { @@ -385,7 +385,7 @@ check_fapl_mdc_api_calls(void) /* get a pointer to the files internal data structure */ if ( pass ) { - file_ptr = (H5F_t *)H5I_object_verify(file_id, H5I_FILE); + file_ptr = (H5F_t *)H5VL_object_verify(file_id, H5I_FILE); if ( file_ptr == NULL ) { diff --git a/test/cache_common.c b/test/cache_common.c index a3287cf..33fa466 100644 --- a/test/cache_common.c +++ b/test/cache_common.c @@ -2963,7 +2963,7 @@ setup_cache(size_t max_cache_size, } else { - file_ptr = (H5F_t *)H5I_object_verify(fid, H5I_FILE); + file_ptr = (H5F_t *)H5VL_object_verify(fid, H5I_FILE); if ( file_ptr == NULL ) { @@ -3167,7 +3167,7 @@ takedown_cache(H5F_t * file_ptr, if ( H5F_addr_defined(saved_actual_base_addr) ) { if ( NULL == file_ptr ) { - file_ptr = (H5F_t *)H5I_object_verify(saved_fid, H5I_FILE); + file_ptr = (H5F_t *)H5VL_object_verify(saved_fid, H5I_FILE); HDassert ( file_ptr ); } @@ -5632,7 +5632,7 @@ check_and_validate_cache_hit_rate(hid_t file_id, /* get a pointer to the files internal data structure */ if ( pass ) { - file_ptr = (H5F_t *)H5I_object_verify(file_id, H5I_FILE); + file_ptr = (H5F_t *)H5VL_object_verify(file_id, H5I_FILE); if ( file_ptr == NULL ) { @@ -5769,7 +5769,7 @@ check_and_validate_cache_size(hid_t file_id, /* get a pointer to the files internal data structure */ if ( pass ) { - file_ptr = (H5F_t *)H5I_object_verify(file_id, H5I_FILE); + file_ptr = (H5F_t *)H5VL_object_verify(file_id, H5I_FILE); if ( file_ptr == NULL ) { @@ -5951,7 +5951,7 @@ validate_mdc_config(hid_t file_id, /* get a pointer to the files internal data structure */ if ( pass ) { - file_ptr = (H5F_t *)H5I_object_verify(file_id, H5I_FILE); + file_ptr = (H5F_t *)H5VL_object_verify(file_id, H5I_FILE); if ( file_ptr == NULL ) { diff --git a/test/cache_tagging.c b/test/cache_tagging.c index 2d22b5b..34c391f 100644 --- a/test/cache_tagging.c +++ b/test/cache_tagging.c @@ -237,7 +237,7 @@ static int print_index(hid_t fid) { H5C_cache_entry_t *next_entry_ptr = NULL; /* entry pointer */ /* Get Internal File / Cache Pointers */ - if ( NULL == (f = (H5F_t *)H5I_object(fid)) ) TEST_ERROR; + if ( NULL == (f = (H5F_t *)H5VL_object(fid)) ) TEST_ERROR; cache_ptr = f->shared->cache; /* Initial (debugging) loop */ @@ -294,7 +294,7 @@ static int verify_no_unknown_tags(hid_t fid) H5C_cache_entry_t *next_entry_ptr = NULL; /* entry pointer */ /* Get Internal File / Cache Pointers */ - if ( NULL == (f = (H5F_t *)H5I_object(fid)) ) TEST_ERROR; + if ( NULL == (f = (H5F_t *)H5VL_object(fid)) ) TEST_ERROR; cache_ptr = f->shared->cache; for (i = 0; i < H5C__HASH_TABLE_LEN; i++) { @@ -346,7 +346,7 @@ static int mark_all_entries_investigated(hid_t fid) H5C_cache_entry_t *next_entry_ptr = NULL; /* entry pointer */ /* Get Internal File / Cache Pointers */ - if ( NULL == (f = (H5F_t *)H5I_object(fid)) ) TEST_ERROR; + if ( NULL == (f = (H5F_t *)H5VL_object(fid)) ) TEST_ERROR; cache_ptr = f->shared->cache; for (i = 0; i < H5C__HASH_TABLE_LEN; i++) { @@ -403,7 +403,7 @@ static int verify_tag(hid_t fid, int id, haddr_t tag) H5C_cache_entry_t *next_entry_ptr = NULL; /* entry pointer */ /* Get Internal File / Cache Pointers */ - if ( NULL == (f = (H5F_t *)H5I_object(fid)) ) TEST_ERROR; + if ( NULL == (f = (H5F_t *)H5VL_object(fid)) ) TEST_ERROR; cache_ptr = f->shared->cache; for (i = 0; i < H5C__HASH_TABLE_LEN; i++) { @@ -449,7 +449,7 @@ static int evict_entries(hid_t fid) H5F_t * f = NULL; /* File Pointer */ /* Get Internal File / Cache Pointers */ - if ( NULL == (f = (H5F_t *)H5I_object(fid)) ) TEST_ERROR; + if ( NULL == (f = (H5F_t *)H5VL_object(fid)) ) TEST_ERROR; /* Mark all entries investigated */ mark_all_entries_investigated(fid); @@ -494,7 +494,7 @@ static int get_new_object_header_tag(hid_t fid, haddr_t *tag) int found = FALSE; /* If entry is found */ /* Get Internal File / Cache Pointers */ - if ( NULL == (f = (H5F_t *)H5I_object(fid)) ) TEST_ERROR; + if ( NULL == (f = (H5F_t *)H5VL_object(fid)) ) TEST_ERROR; cache_ptr = f->shared->cache; for (i = 0; i < H5C__HASH_TABLE_LEN; i++) { @@ -3856,7 +3856,7 @@ check_invalid_tag_application(void) if ( (fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0 ) TEST_ERROR; /* Get internal file pointer*/ - if ( NULL == (f = (H5F_t *)H5I_object(fid)) ) TEST_ERROR; + if ( NULL == (f = (H5F_t *)H5VL_object(fid)) ) TEST_ERROR; /* Create dxpl */ if ( (dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR; diff --git a/test/dynlibvol1.c b/test/dynlibvol1.c new file mode 100644 index 0000000..1f8ae0e --- /dev/null +++ b/test/dynlibvol1.c @@ -0,0 +1,366 @@ +
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include "H5PLextern.h"
+#include "hdf5.h"
+
+#define LOG 501
+
+static herr_t H5VL_log_init(hid_t vipl_id);
+static herr_t H5VL_log_term(hid_t vtpl_id);
+
+/* Datatype callbacks */
+static void *H5VL_log_datatype_commit(void *obj, H5VL_loc_params_t loc_params, const char *name, hid_t type_id, hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id, hid_t dxpl_id, void **req);
+static void *H5VL_log_datatype_open(void *obj, H5VL_loc_params_t loc_params, const char *name, hid_t tapl_id, hid_t dxpl_id, void **req);
+static herr_t H5VL_log_datatype_get(void *dt, H5VL_datatype_get_t get_type, hid_t dxpl_id, void **req, va_list arguments);
+static herr_t H5VL_log_datatype_close(void *dt, hid_t dxpl_id, void **req);
+
+/* Dataset callbacks */
+static void *H5VL_log_dataset_create(void *obj, H5VL_loc_params_t loc_params, const char *name, hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id, void **req);
+static void *H5VL_log_dataset_open(void *obj, H5VL_loc_params_t loc_params, const char *name, hid_t dapl_id, hid_t dxpl_id, void **req);
+static herr_t H5VL_log_dataset_read(void *dset, hid_t mem_type_id, hid_t mem_space_id,
+ hid_t file_space_id, hid_t plist_id, void *buf, void **req);
+static herr_t H5VL_log_dataset_write(void *dset, hid_t mem_type_id, hid_t mem_space_id,
+ hid_t file_space_id, hid_t plist_id, const void *buf, void **req);
+static herr_t H5VL_log_dataset_close(void *dset, hid_t dxpl_id, void **req);
+
+/* File callbacks */
+static void *H5VL_log_file_create(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id, void **req);
+static void *H5VL_log_file_open(const char *name, unsigned flags, hid_t fapl_id, hid_t dxpl_id, void **req);
+static herr_t H5VL_log_file_get(void *file, H5VL_file_get_t get_type, hid_t dxpl_id, void **req, va_list arguments);
+static herr_t H5VL_log_file_close(void *file, hid_t dxpl_id, void **req);
+
+/* Group callbacks */
+static void *H5VL_log_group_create(void *obj, H5VL_loc_params_t loc_params, const char *name, hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id, void **req);
+static herr_t H5VL_log_group_close(void *grp, hid_t dxpl_id, void **req);
+
+/* Link callbacks */
+
+/* Object callbacks */
+static void *H5VL_log_object_open(void *obj, H5VL_loc_params_t loc_params, H5I_type_t *opened_type, hid_t dxpl_id, void **req);
+static herr_t H5VL_log_object_specific(void *obj, H5VL_loc_params_t loc_params, H5VL_object_specific_t specific_type, hid_t dxpl_id, void **req, va_list arguments);
+
+hid_t native_plugin_id = -1;
+
+static const H5VL_class_t H5VL_log1_g = {
+ 0,
+ LOG,
+ "log1", /* name */
+ H5VL_log_init, /* initialize */
+ H5VL_log_term, /* terminate */
+ sizeof(hid_t),
+ NULL,
+ NULL,
+ { /* attribute_cls */
+ NULL, //H5VL_log_attr_create, /* create */
+ NULL, //H5VL_log_attr_open, /* open */
+ NULL, //H5VL_log_attr_read, /* read */
+ NULL, //H5VL_log_attr_write, /* write */
+ NULL, //H5VL_log_attr_get, /* get */
+ NULL, //H5VL_log_attr_specific, /* specific */
+ NULL, //H5VL_log_attr_optional, /* optional */
+ NULL //H5VL_log_attr_close /* close */
+ },
+ { /* dataset_cls */
+ H5VL_log_dataset_create, /* create */
+ H5VL_log_dataset_open, /* open */
+ H5VL_log_dataset_read, /* read */
+ H5VL_log_dataset_write, /* write */
+ NULL, //H5VL_log_dataset_get, /* get */
+ NULL, //H5VL_log_dataset_specific, /* specific */
+ NULL, //H5VL_log_dataset_optional, /* optional */
+ H5VL_log_dataset_close /* close */
+ },
+ { /* datatype_cls */
+ H5VL_log_datatype_commit, /* commit */
+ H5VL_log_datatype_open, /* open */
+ H5VL_log_datatype_get, /* get_size */
+ NULL, //H5VL_log_datatype_specific, /* specific */
+ NULL, //H5VL_log_datatype_optional, /* optional */
+ H5VL_log_datatype_close /* close */
+ },
+ { /* file_cls */
+ H5VL_log_file_create, /* create */
+ H5VL_log_file_open, /* open */
+ H5VL_log_file_get, /* get */
+ NULL, //H5VL_log_file_specific, /* specific */
+ NULL, //H5VL_log_file_optional, /* optional */
+ H5VL_log_file_close /* close */
+ },
+ { /* group_cls */
+ H5VL_log_group_create, /* create */
+ NULL, //H5VL_log_group_open, /* open */
+ NULL, //H5VL_log_group_get, /* get */
+ NULL, //H5VL_log_group_specific, /* specific */
+ NULL, //H5VL_log_group_optional, /* optional */
+ H5VL_log_group_close /* close */
+ },
+ { /* link_cls */
+ NULL, //H5VL_log_link_create, /* create */
+ NULL, //H5VL_log_link_copy, /* copy */
+ NULL, //H5VL_log_link_move, /* move */
+ NULL, //H5VL_log_link_get, /* get */
+ NULL, //H5VL_log_link_specific, /* specific */
+ NULL, //H5VL_log_link_optional, /* optional */
+ },
+ { /* object_cls */
+ H5VL_log_object_open, /* open */
+ NULL, //H5VL_log_object_copy, /* copy */
+ NULL, //H5VL_log_object_get, /* get */
+ H5VL_log_object_specific, /* specific */
+ NULL, //H5VL_log_object_optional, /* optional */
+ },
+ {
+ NULL,
+ NULL,
+ NULL
+ },
+ NULL
+};
+
+typedef struct H5VL_log_t {
+ void *under_object;
+} H5VL_log_t;
+
+H5PL_type_t H5PLget_plugin_type(void) {return H5PL_TYPE_VOL;}
+const void *H5PLget_plugin_info(void) {return &H5VL_log1_g;}
+
+static herr_t H5VL_log_init(hid_t vipl_id)
+{
+ printf("------- LOG INIT\n");
+ return 0;
+}
+
+static herr_t H5VL_log_term(hid_t vtpl_id)
+{
+ printf("------- LOG TERM\n");
+ return 0;
+}
+
+static void *
+H5VL_log_file_create(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id, void **req)
+{
+ hid_t under_fapl;
+ H5VL_log_t *file;
+
+ native_plugin_id = H5VLget_plugin_id("native");
+ assert(native_plugin_id > 0);
+
+ file = (H5VL_log_t *)calloc(1, sizeof(H5VL_log_t));
+
+ under_fapl = *((hid_t *)H5Pget_vol_info(fapl_id));
+ file->under_object = H5VLfile_create(name, flags, fcpl_id, under_fapl, dxpl_id, req);
+
+ printf("------- LOG H5Fcreate\n");
+ return (void *)file;
+}
+
+static void *
+H5VL_log_file_open(const char *name, unsigned flags, hid_t fapl_id, hid_t dxpl_id, void **req)
+{
+ hid_t under_fapl;
+ H5VL_log_t *file;
+
+ file = (H5VL_log_t *)calloc(1, sizeof(H5VL_log_t));
+
+ under_fapl = *((hid_t *)H5Pget_vol_info(fapl_id));
+ file->under_object = H5VLfile_open(name, flags, under_fapl, dxpl_id, req);
+
+ printf("------- LOG H5Fopen\n");
+ return (void *)file;
+}
+
+static herr_t
+H5VL_log_file_get(void *file, H5VL_file_get_t get_type, hid_t dxpl_id, void **req, va_list arguments)
+{
+ H5VL_log_t *f = (H5VL_log_t *)file;
+
+ H5VLfile_get(f->under_object, native_plugin_id, get_type, dxpl_id, req, arguments);
+
+ printf("------- LOG H5Fget %d\n", get_type);
+ return 1;
+}
+static herr_t
+H5VL_log_file_close(void *file, hid_t dxpl_id, void **req)
+{
+ H5VL_log_t *f = (H5VL_log_t *)file;
+
+ H5VLfile_close(f->under_object, native_plugin_id, dxpl_id, req);
+ free(f);
+
+ printf("------- LOG H5Fclose\n");
+ return 1;
+}
+
+static void *
+H5VL_log_group_create(void *obj, H5VL_loc_params_t loc_params, const char *name,
+ hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id, void **req)
+{
+ H5VL_log_t *group;
+ H5VL_log_t *o = (H5VL_log_t *)obj;
+
+ group = (H5VL_log_t *)calloc(1, sizeof(H5VL_log_t));
+
+ group->under_object = H5VLgroup_create(o->under_object, loc_params, native_plugin_id, name, gcpl_id, gapl_id, dxpl_id, req);
+
+ printf("------- LOG H5Gcreate\n");
+ return (void *)group;
+}
+
+static herr_t
+H5VL_log_group_close(void *grp, hid_t dxpl_id, void **req)
+{
+ H5VL_log_t *g = (H5VL_log_t *)grp;
+
+ H5VLgroup_close(g->under_object, native_plugin_id, dxpl_id, req);
+ free(g);
+
+ printf("------- LOG H5Gclose\n");
+ return 1;
+}
+
+static void *
+H5VL_log_datatype_commit(void *obj, H5VL_loc_params_t loc_params, const char *name,
+ hid_t type_id, hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id, hid_t dxpl_id, void **req)
+{
+ H5VL_log_t *dt;
+ H5VL_log_t *o = (H5VL_log_t *)obj;
+
+ dt = (H5VL_log_t *)calloc(1, sizeof(H5VL_log_t));
+
+ dt->under_object = H5VLdatatype_commit(o->under_object, loc_params, native_plugin_id, name,
+ type_id, lcpl_id, tcpl_id, tapl_id, dxpl_id, req);
+
+ printf("------- LOG H5Tcommit\n");
+ return dt;
+}
+static void *
+H5VL_log_datatype_open(void *obj, H5VL_loc_params_t loc_params, const char *name, hid_t tapl_id, hid_t dxpl_id, void **req)
+{
+ H5VL_log_t *dt;
+ H5VL_log_t *o = (H5VL_log_t *)obj;
+
+ dt = (H5VL_log_t *)calloc(1, sizeof(H5VL_log_t));
+
+ dt->under_object = H5VLdatatype_open(o->under_object, loc_params, native_plugin_id, name, tapl_id, dxpl_id, req);
+
+ printf("------- LOG H5Topen\n");
+ return (void *)dt;
+}
+
+static herr_t
+H5VL_log_datatype_get(void *dt, H5VL_datatype_get_t get_type, hid_t dxpl_id, void **req, va_list arguments)
+{
+ H5VL_log_t *o = (H5VL_log_t *)dt;
+ herr_t ret_value;
+
+ ret_value = H5VLdatatype_get(o->under_object, native_plugin_id, get_type, dxpl_id, req, arguments);
+
+ printf("------- LOG datatype get\n");
+ return ret_value;
+}
+
+static herr_t
+H5VL_log_datatype_close(void *dt, hid_t dxpl_id, void **req)
+{
+ H5VL_log_t *type = (H5VL_log_t *)dt;
+
+ assert(type->under_object);
+
+ H5VLdatatype_close(type->under_object, native_plugin_id, dxpl_id, req);
+ free(type);
+
+ printf("------- LOG H5Tclose\n");
+ return 1;
+}
+
+static void *
+H5VL_log_object_open(void *obj, H5VL_loc_params_t loc_params, H5I_type_t *opened_type, hid_t dxpl_id, void **req)
+{
+ H5VL_log_t *new_obj;
+ H5VL_log_t *o = (H5VL_log_t *)obj;
+
+ new_obj = (H5VL_log_t *)calloc(1, sizeof(H5VL_log_t));
+
+ new_obj->under_object = H5VLobject_open(o->under_object, loc_params, native_plugin_id, opened_type, dxpl_id, req);
+
+ printf("------- LOG H5Oopen\n");
+ return (void *)new_obj;
+}
+
+static herr_t
+H5VL_log_object_specific(void *obj, H5VL_loc_params_t loc_params, H5VL_object_specific_t specific_type,
+ hid_t dxpl_id, void **req, va_list arguments)
+{
+ H5VL_log_t *o = (H5VL_log_t *)obj;
+
+ H5VLobject_specific(o->under_object, loc_params, native_plugin_id, specific_type, dxpl_id, req, arguments);
+
+ printf("------- LOG Object specific\n");
+ return 1;
+}
+
+static void *
+H5VL_log_dataset_create(void *obj, H5VL_loc_params_t loc_params, const char *name, hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id, void **req)
+{
+ H5VL_log_t *dset;
+ H5VL_log_t *o = (H5VL_log_t *)obj;
+
+ dset = (H5VL_log_t *)calloc(1, sizeof(H5VL_log_t));
+
+ dset->under_object = H5VLdataset_create(o->under_object, loc_params, native_plugin_id, name, dcpl_id, dapl_id, dxpl_id, req);
+
+ printf("------- LOG H5Dcreate\n");
+ return (void *)dset;
+}
+
+static void *
+H5VL_log_dataset_open(void *obj, H5VL_loc_params_t loc_params, const char *name, hid_t dapl_id, hid_t dxpl_id, void **req)
+{
+ H5VL_log_t *dset;
+ H5VL_log_t *o = (H5VL_log_t *)obj;
+
+ dset = (H5VL_log_t *)calloc(1, sizeof(H5VL_log_t));
+
+ dset->under_object = H5VLdataset_open(o->under_object, loc_params, native_plugin_id, name, dapl_id, dxpl_id, req);
+
+ printf("------- LOG H5Dopen\n");
+ return (void *)dset;
+}
+
+static herr_t
+H5VL_log_dataset_read(void *dset, hid_t mem_type_id, hid_t mem_space_id,
+ hid_t file_space_id, hid_t plist_id, void *buf, void **req)
+{
+ H5VL_log_t *d = (H5VL_log_t *)dset;
+
+ H5VLdataset_read(d->under_object, native_plugin_id, mem_type_id, mem_space_id, file_space_id,
+ plist_id, buf, req);
+
+ printf("------- LOG H5Dread\n");
+ return 1;
+}
+static herr_t
+H5VL_log_dataset_write(void *dset, hid_t mem_type_id, hid_t mem_space_id,
+ hid_t file_space_id, hid_t plist_id, const void *buf, void **req)
+{
+ H5VL_log_t *d = (H5VL_log_t *)dset;
+
+ H5VLdataset_write(d->under_object, native_plugin_id, mem_type_id, mem_space_id, file_space_id,
+ plist_id, buf, req);
+
+ printf("------- LOG H5Dwrite\n");
+ return 1;
+}
+static herr_t
+H5VL_log_dataset_close(void *dset, hid_t dxpl_id, void **req)
+{
+ H5VL_log_t *d = (H5VL_log_t *)dset;
+
+ H5VLdataset_close(d->under_object, native_plugin_id, dxpl_id, req);
+ free(d);
+
+ printf("------- LOG H5Dclose\n");
+ return 1;
+}
diff --git a/test/dynlibvol2.c b/test/dynlibvol2.c new file mode 100644 index 0000000..1877c21 --- /dev/null +++ b/test/dynlibvol2.c @@ -0,0 +1,366 @@ +
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include "H5PLextern.h"
+#include "hdf5.h"
+
+#define LOG 502
+
+static herr_t H5VL_log_init(hid_t vipl_id);
+static herr_t H5VL_log_term(hid_t vtpl_id);
+
+/* Datatype callbacks */
+static void *H5VL_log_datatype_commit(void *obj, H5VL_loc_params_t loc_params, const char *name, hid_t type_id, hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id, hid_t dxpl_id, void **req);
+static void *H5VL_log_datatype_open(void *obj, H5VL_loc_params_t loc_params, const char *name, hid_t tapl_id, hid_t dxpl_id, void **req);
+static herr_t H5VL_log_datatype_get(void *dt, H5VL_datatype_get_t get_type, hid_t dxpl_id, void **req, va_list arguments);
+static herr_t H5VL_log_datatype_close(void *dt, hid_t dxpl_id, void **req);
+
+/* Dataset callbacks */
+static void *H5VL_log_dataset_create(void *obj, H5VL_loc_params_t loc_params, const char *name, hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id, void **req);
+static void *H5VL_log_dataset_open(void *obj, H5VL_loc_params_t loc_params, const char *name, hid_t dapl_id, hid_t dxpl_id, void **req);
+static herr_t H5VL_log_dataset_read(void *dset, hid_t mem_type_id, hid_t mem_space_id,
+ hid_t file_space_id, hid_t plist_id, void *buf, void **req);
+static herr_t H5VL_log_dataset_write(void *dset, hid_t mem_type_id, hid_t mem_space_id,
+ hid_t file_space_id, hid_t plist_id, const void *buf, void **req);
+static herr_t H5VL_log_dataset_close(void *dset, hid_t dxpl_id, void **req);
+
+/* File callbacks */
+static void *H5VL_log_file_create(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id, void **req);
+static void *H5VL_log_file_open(const char *name, unsigned flags, hid_t fapl_id, hid_t dxpl_id, void **req);
+static herr_t H5VL_log_file_get(void *file, H5VL_file_get_t get_type, hid_t dxpl_id, void **req, va_list arguments);
+static herr_t H5VL_log_file_close(void *file, hid_t dxpl_id, void **req);
+
+/* Group callbacks */
+static void *H5VL_log_group_create(void *obj, H5VL_loc_params_t loc_params, const char *name, hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id, void **req);
+static herr_t H5VL_log_group_close(void *grp, hid_t dxpl_id, void **req);
+
+/* Link callbacks */
+
+/* Object callbacks */
+static void *H5VL_log_object_open(void *obj, H5VL_loc_params_t loc_params, H5I_type_t *opened_type, hid_t dxpl_id, void **req);
+static herr_t H5VL_log_object_specific(void *obj, H5VL_loc_params_t loc_params, H5VL_object_specific_t specific_type, hid_t dxpl_id, void **req, va_list arguments);
+
+hid_t native_plugin_id = -1;
+
+static const H5VL_class_t H5VL_log2_g = {
+ 0,
+ LOG,
+ "log2", /* name */
+ H5VL_log_init, /* initialize */
+ H5VL_log_term, /* terminate */
+ sizeof(hid_t),
+ NULL,
+ NULL,
+ { /* attribute_cls */
+ NULL, //H5VL_log_attr_create, /* create */
+ NULL, //H5VL_log_attr_open, /* open */
+ NULL, //H5VL_log_attr_read, /* read */
+ NULL, //H5VL_log_attr_write, /* write */
+ NULL, //H5VL_log_attr_get, /* get */
+ NULL, //H5VL_log_attr_specific, /* specific */
+ NULL, //H5VL_log_attr_optional, /* optional */
+ NULL //H5VL_log_attr_close /* close */
+ },
+ { /* dataset_cls */
+ H5VL_log_dataset_create, /* create */
+ H5VL_log_dataset_open, /* open */
+ H5VL_log_dataset_read, /* read */
+ H5VL_log_dataset_write, /* write */
+ NULL, //H5VL_log_dataset_get, /* get */
+ NULL, //H5VL_log_dataset_specific, /* specific */
+ NULL, //H5VL_log_dataset_optional, /* optional */
+ H5VL_log_dataset_close /* close */
+ },
+ { /* datatype_cls */
+ H5VL_log_datatype_commit, /* commit */
+ H5VL_log_datatype_open, /* open */
+ H5VL_log_datatype_get, /* get_size */
+ NULL, //H5VL_log_datatype_specific, /* specific */
+ NULL, //H5VL_log_datatype_optional, /* optional */
+ H5VL_log_datatype_close /* close */
+ },
+ { /* file_cls */
+ H5VL_log_file_create, /* create */
+ H5VL_log_file_open, /* open */
+ H5VL_log_file_get, /* get */
+ NULL, //H5VL_log_file_specific, /* specific */
+ NULL, //H5VL_log_file_optional, /* optional */
+ H5VL_log_file_close /* close */
+ },
+ { /* group_cls */
+ H5VL_log_group_create, /* create */
+ NULL, //H5VL_log_group_open, /* open */
+ NULL, //H5VL_log_group_get, /* get */
+ NULL, //H5VL_log_group_specific, /* specific */
+ NULL, //H5VL_log_group_optional, /* optional */
+ H5VL_log_group_close /* close */
+ },
+ { /* link_cls */
+ NULL, //H5VL_log_link_create, /* create */
+ NULL, //H5VL_log_link_copy, /* copy */
+ NULL, //H5VL_log_link_move, /* move */
+ NULL, //H5VL_log_link_get, /* get */
+ NULL, //H5VL_log_link_specific, /* specific */
+ NULL, //H5VL_log_link_optional, /* optional */
+ },
+ { /* object_cls */
+ H5VL_log_object_open, /* open */
+ NULL, //H5VL_log_object_copy, /* copy */
+ NULL, //H5VL_log_object_get, /* get */
+ H5VL_log_object_specific, /* specific */
+ NULL, //H5VL_log_object_optional, /* optional */
+ },
+ {
+ NULL,
+ NULL,
+ NULL
+ },
+ NULL
+};
+
+typedef struct H5VL_log_t {
+ void *under_object;
+} H5VL_log_t;
+
+H5PL_type_t H5PLget_plugin_type(void) {return H5PL_TYPE_VOL;}
+const void *H5PLget_plugin_info(void) {return &H5VL_log2_g;}
+
+static herr_t H5VL_log_init(hid_t vipl_id)
+{
+ printf("------- LOG INIT\n");
+ return 0;
+}
+
+static herr_t H5VL_log_term(hid_t vtpl_id)
+{
+ printf("------- LOG TERM\n");
+ return 0;
+}
+
+static void *
+H5VL_log_file_create(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id, void **req)
+{
+ hid_t under_fapl;
+ H5VL_log_t *file;
+
+ native_plugin_id = H5VLget_plugin_id("native");
+ assert(native_plugin_id > 0);
+
+ file = (H5VL_log_t *)calloc(1, sizeof(H5VL_log_t));
+
+ under_fapl = *((hid_t *)H5Pget_vol_info(fapl_id));
+ file->under_object = H5VLfile_create(name, flags, fcpl_id, under_fapl, dxpl_id, req);
+
+ printf("------- LOG H5Fcreate\n");
+ return (void *)file;
+}
+
+static void *
+H5VL_log_file_open(const char *name, unsigned flags, hid_t fapl_id, hid_t dxpl_id, void **req)
+{
+ hid_t under_fapl;
+ H5VL_log_t *file;
+
+ file = (H5VL_log_t *)calloc(1, sizeof(H5VL_log_t));
+
+ under_fapl = *((hid_t *)H5Pget_vol_info(fapl_id));
+ file->under_object = H5VLfile_open(name, flags, under_fapl, dxpl_id, req);
+
+ printf("------- LOG H5Fopen\n");
+ return (void *)file;
+}
+
+static herr_t
+H5VL_log_file_get(void *file, H5VL_file_get_t get_type, hid_t dxpl_id, void **req, va_list arguments)
+{
+ H5VL_log_t *f = (H5VL_log_t *)file;
+
+ H5VLfile_get(f->under_object, native_plugin_id, get_type, dxpl_id, req, arguments);
+
+ printf("------- LOG H5Fget %d\n", get_type);
+ return 1;
+}
+static herr_t
+H5VL_log_file_close(void *file, hid_t dxpl_id, void **req)
+{
+ H5VL_log_t *f = (H5VL_log_t *)file;
+
+ H5VLfile_close(f->under_object, native_plugin_id, dxpl_id, req);
+ free(f);
+
+ printf("------- LOG H5Fclose\n");
+ return 1;
+}
+
+static void *
+H5VL_log_group_create(void *obj, H5VL_loc_params_t loc_params, const char *name,
+ hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id, void **req)
+{
+ H5VL_log_t *group;
+ H5VL_log_t *o = (H5VL_log_t *)obj;
+
+ group = (H5VL_log_t *)calloc(1, sizeof(H5VL_log_t));
+
+ group->under_object = H5VLgroup_create(o->under_object, loc_params, native_plugin_id, name, gcpl_id, gapl_id, dxpl_id, req);
+
+ printf("------- LOG H5Gcreate\n");
+ return (void *)group;
+}
+
+static herr_t
+H5VL_log_group_close(void *grp, hid_t dxpl_id, void **req)
+{
+ H5VL_log_t *g = (H5VL_log_t *)grp;
+
+ H5VLgroup_close(g->under_object, native_plugin_id, dxpl_id, req);
+ free(g);
+
+ printf("------- LOG H5Gclose\n");
+ return 1;
+}
+
+static void *
+H5VL_log_datatype_commit(void *obj, H5VL_loc_params_t loc_params, const char *name,
+ hid_t type_id, hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id, hid_t dxpl_id, void **req)
+{
+ H5VL_log_t *dt;
+ H5VL_log_t *o = (H5VL_log_t *)obj;
+
+ dt = (H5VL_log_t *)calloc(1, sizeof(H5VL_log_t));
+
+ dt->under_object = H5VLdatatype_commit(o->under_object, loc_params, native_plugin_id, name,
+ type_id, lcpl_id, tcpl_id, tapl_id, dxpl_id, req);
+
+ printf("------- LOG H5Tcommit\n");
+ return dt;
+}
+static void *
+H5VL_log_datatype_open(void *obj, H5VL_loc_params_t loc_params, const char *name, hid_t tapl_id, hid_t dxpl_id, void **req)
+{
+ H5VL_log_t *dt;
+ H5VL_log_t *o = (H5VL_log_t *)obj;
+
+ dt = (H5VL_log_t *)calloc(1, sizeof(H5VL_log_t));
+
+ dt->under_object = H5VLdatatype_open(o->under_object, loc_params, native_plugin_id, name, tapl_id, dxpl_id, req);
+
+ printf("------- LOG H5Topen\n");
+ return (void *)dt;
+}
+
+static herr_t
+H5VL_log_datatype_get(void *dt, H5VL_datatype_get_t get_type, hid_t dxpl_id, void **req, va_list arguments)
+{
+ H5VL_log_t *o = (H5VL_log_t *)dt;
+ herr_t ret_value;
+
+ ret_value = H5VLdatatype_get(o->under_object, native_plugin_id, get_type, dxpl_id, req, arguments);
+
+ printf("------- LOG datatype get\n");
+ return ret_value;
+}
+
+static herr_t
+H5VL_log_datatype_close(void *dt, hid_t dxpl_id, void **req)
+{
+ H5VL_log_t *type = (H5VL_log_t *)dt;
+
+ assert(type->under_object);
+
+ H5VLdatatype_close(type->under_object, native_plugin_id, dxpl_id, req);
+ free(type);
+
+ printf("------- LOG H5Tclose\n");
+ return 1;
+}
+
+static void *
+H5VL_log_object_open(void *obj, H5VL_loc_params_t loc_params, H5I_type_t *opened_type, hid_t dxpl_id, void **req)
+{
+ H5VL_log_t *new_obj;
+ H5VL_log_t *o = (H5VL_log_t *)obj;
+
+ new_obj = (H5VL_log_t *)calloc(1, sizeof(H5VL_log_t));
+
+ new_obj->under_object = H5VLobject_open(o->under_object, loc_params, native_plugin_id, opened_type, dxpl_id, req);
+
+ printf("------- LOG H5Oopen\n");
+ return (void *)new_obj;
+}
+
+static herr_t
+H5VL_log_object_specific(void *obj, H5VL_loc_params_t loc_params, H5VL_object_specific_t specific_type,
+ hid_t dxpl_id, void **req, va_list arguments)
+{
+ H5VL_log_t *o = (H5VL_log_t *)obj;
+
+ H5VLobject_specific(o->under_object, loc_params, native_plugin_id, specific_type, dxpl_id, req, arguments);
+
+ printf("------- LOG Object specific\n");
+ return 1;
+}
+
+static void *
+H5VL_log_dataset_create(void *obj, H5VL_loc_params_t loc_params, const char *name, hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id, void **req)
+{
+ H5VL_log_t *dset;
+ H5VL_log_t *o = (H5VL_log_t *)obj;
+
+ dset = (H5VL_log_t *)calloc(1, sizeof(H5VL_log_t));
+
+ dset->under_object = H5VLdataset_create(o->under_object, loc_params, native_plugin_id, name, dcpl_id, dapl_id, dxpl_id, req);
+
+ printf("------- LOG H5Dcreate\n");
+ return (void *)dset;
+}
+
+static void *
+H5VL_log_dataset_open(void *obj, H5VL_loc_params_t loc_params, const char *name, hid_t dapl_id, hid_t dxpl_id, void **req)
+{
+ H5VL_log_t *dset;
+ H5VL_log_t *o = (H5VL_log_t *)obj;
+
+ dset = (H5VL_log_t *)calloc(1, sizeof(H5VL_log_t));
+
+ dset->under_object = H5VLdataset_open(o->under_object, loc_params, native_plugin_id, name, dapl_id, dxpl_id, req);
+
+ printf("------- LOG H5Dopen\n");
+ return (void *)dset;
+}
+
+static herr_t
+H5VL_log_dataset_read(void *dset, hid_t mem_type_id, hid_t mem_space_id,
+ hid_t file_space_id, hid_t plist_id, void *buf, void **req)
+{
+ H5VL_log_t *d = (H5VL_log_t *)dset;
+
+ H5VLdataset_read(d->under_object, native_plugin_id, mem_type_id, mem_space_id, file_space_id,
+ plist_id, buf, req);
+
+ printf("------- LOG H5Dread\n");
+ return 1;
+}
+static herr_t
+H5VL_log_dataset_write(void *dset, hid_t mem_type_id, hid_t mem_space_id,
+ hid_t file_space_id, hid_t plist_id, const void *buf, void **req)
+{
+ H5VL_log_t *d = (H5VL_log_t *)dset;
+
+ H5VLdataset_write(d->under_object, native_plugin_id, mem_type_id, mem_space_id, file_space_id,
+ plist_id, buf, req);
+
+ printf("------- LOG H5Dwrite\n");
+ return 1;
+}
+static herr_t
+H5VL_log_dataset_close(void *dset, hid_t dxpl_id, void **req)
+{
+ H5VL_log_t *d = (H5VL_log_t *)dset;
+
+ H5VLdataset_close(d->under_object, native_plugin_id, dxpl_id, req);
+ free(d);
+
+ printf("------- LOG H5Dclose\n");
+ return 1;
+}
diff --git a/test/earray.c b/test/earray.c index 368ee42..c71e53b 100644 --- a/test/earray.c +++ b/test/earray.c @@ -26,6 +26,14 @@ #define H5EA_TESTING #include "H5EApkg.h" /* Extensible Arrays */ +/* + * This file needs to access private information from the H5F package. + * This file also needs to access the file testing code. + */ +#define H5F_FRIEND /*suppress error about including H5Fpkg */ +#define H5F_TESTING +#include "H5Fpkg.h" /* File access */ + /* Other private headers that this test requires */ #include "H5Iprivate.h" /* IDs */ #include "H5VMprivate.h" /* Vectors and arrays */ @@ -339,7 +347,7 @@ create_file(hid_t fapl, hid_t *file, H5F_t **f) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (*f = (H5F_t *)H5I_object(*file))) + if(NULL == (*f = (H5F_t *)H5VL_object(*file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -471,7 +479,7 @@ reopen_file(hid_t *file, H5F_t **f, hid_t fapl, hid_t dxpl, FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (*f = (H5F_t *)H5I_object(*file))) + if(NULL == (*f = (H5F_t *)H5VL_object(*file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -1224,7 +1232,7 @@ test_open_twice(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f2 = (H5F_t *)H5I_object(file2))) + if(NULL == (f2 = (H5F_t *)H5VL_object(file2))) FAIL_STACK_ERROR /* Open the extensible array through the second file handle */ diff --git a/test/farray.c b/test/farray.c index e3e59da..440dd82 100644 --- a/test/farray.c +++ b/test/farray.c @@ -26,6 +26,14 @@ #define H5FA_TESTING #include "H5FApkg.h" /* Fixed Arrays */ +/* + * This file needs to access private information from the H5F package. + * This file also needs to access the file testing code. + */ +#define H5F_FRIEND /*suppress error about including H5Fpkg */ +#define H5F_TESTING +#include "H5Fpkg.h" /* File access */ + /* Other private headers that this test requires */ #include "H5Iprivate.h" /* IDs */ #include "H5VMprivate.h" /* Vectors and arrays */ @@ -155,7 +163,7 @@ create_file(hid_t fapl, hid_t *file, H5F_t **f) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (*f = (H5F_t *)H5I_object(*file))) + if(NULL == (*f = (H5F_t *)H5VL_object(*file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -291,7 +299,7 @@ reopen_file(hid_t *file, H5F_t **f, hid_t fapl, hid_t dxpl, FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (*f = (H5F_t *)H5I_object(*file))) + if(NULL == (*f = (H5F_t *)H5VL_object(*file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -675,7 +683,7 @@ test_open_twice(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f2 = (H5F_t *)H5I_object(file2))) + if(NULL == (f2 = (H5F_t *)H5VL_object(file2))) FAIL_STACK_ERROR /* Open the fixed array through the second file handle */ diff --git a/test/fheap.c b/test/fheap.c index 25784a9..4df25db 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -597,7 +597,7 @@ reopen_file(hid_t *file, H5F_t **f, const char *filename, hid_t fapl, hid_t dxpl FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (*f = (H5F_t *)H5I_object(*file))) + if(NULL == (*f = (H5F_t *)H5VL_object(*file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -648,7 +648,7 @@ open_heap(char *filename, hid_t fapl, hid_t dxpl, const H5HF_create_t *cparam, /* Check for deleting the entire heap */ if(tparam->del_dir != FHEAP_DEL_HEAP) { /* Get a pointer to the internal file object */ - if(NULL == (*f = (H5F_t *)H5I_object(*file))) + if(NULL == (*f = (H5F_t *)H5VL_object(*file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -690,7 +690,7 @@ open_heap(char *filename, hid_t fapl, hid_t dxpl, const H5HF_create_t *cparam, FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (*f = (H5F_t *)H5I_object(*file))) + if(NULL == (*f = (H5F_t *)H5VL_object(*file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -1860,7 +1860,7 @@ test_create(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_UNUSED FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -1977,7 +1977,7 @@ test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_UNUSED FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -2020,7 +2020,7 @@ test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_UNUSED FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -2126,7 +2126,7 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_UN FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -2178,7 +2178,7 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_UN FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f2 = (H5F_t *)H5I_object(file2))) + if(NULL == (f2 = (H5F_t *)H5VL_object(file2))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -2296,7 +2296,7 @@ test_delete_open(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_U FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -2369,7 +2369,7 @@ test_delete_open(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_U FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -2455,7 +2455,7 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -2798,7 +2798,7 @@ test_filtered_create(hid_t fapl, H5HF_create_t *cparam) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -2841,7 +2841,7 @@ test_filtered_create(hid_t fapl, H5HF_create_t *cparam) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -2921,7 +2921,7 @@ test_size(hid_t fapl, H5HF_create_t *cparam) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -2975,7 +2975,7 @@ test_size(hid_t fapl, H5HF_create_t *cparam) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -3064,7 +3064,7 @@ test_reopen_hdr(hid_t fapl, H5HF_create_t *cparam) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file1))) + if(NULL == (f = (H5F_t *)H5VL_object(file1))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -3108,7 +3108,7 @@ test_reopen_hdr(hid_t fapl, H5HF_create_t *cparam) FAIL_STACK_ERROR /* Get a pointer to the internal file object (file1) */ - if(NULL == (f = (H5F_t *)H5I_object(file1))) + if(NULL == (f = (H5F_t *)H5VL_object(file1))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -3130,7 +3130,7 @@ test_reopen_hdr(hid_t fapl, H5HF_create_t *cparam) /* Get a pointer to the internal file object (file2) */ - if(NULL == (f = (H5F_t *)H5I_object(file2))) + if(NULL == (f = (H5F_t *)H5VL_object(file2))) FAIL_STACK_ERROR /* Reopen the heap */ @@ -3203,7 +3203,7 @@ test_man_insert_weird(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -3313,7 +3313,7 @@ test_man_insert_first(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -3414,7 +3414,7 @@ test_man_insert_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -3511,7 +3511,7 @@ test_man_insert_root_mult(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -3610,7 +3610,7 @@ test_man_insert_force_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_par TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -3716,7 +3716,7 @@ test_man_insert_fill_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_ TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -3823,7 +3823,7 @@ test_man_insert_third_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -3934,7 +3934,7 @@ test_man_fill_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *t TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -4030,7 +4030,7 @@ test_man_start_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -4133,7 +4133,7 @@ test_man_fill_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t * TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -4234,7 +4234,7 @@ test_man_start_third_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t * TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -4345,7 +4345,7 @@ test_man_fill_fourth_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t * TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -4442,7 +4442,7 @@ test_man_fill_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -4538,7 +4538,7 @@ test_man_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_ TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -4640,7 +4640,7 @@ test_man_second_direct_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhe TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -4750,7 +4750,7 @@ test_man_fill_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_ TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -4853,7 +4853,7 @@ test_man_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -4964,7 +4964,7 @@ test_man_fill_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -5072,7 +5072,7 @@ test_man_fill_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_te TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Create absolute heap */ @@ -5170,7 +5170,7 @@ test_man_start_2nd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -5279,7 +5279,7 @@ test_man_recursive_indirect_two_deep(hid_t fapl, H5HF_create_t *cparam, fheap_te TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -5382,7 +5382,7 @@ test_man_start_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -5492,7 +5492,7 @@ test_man_fill_first_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fh TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -5603,7 +5603,7 @@ test_man_fill_3rd_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fhea TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -5710,7 +5710,7 @@ test_man_fill_all_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhea TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -5818,7 +5818,7 @@ test_man_start_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -5933,7 +5933,7 @@ test_man_fill_first_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fh TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -6053,7 +6053,7 @@ test_man_fill_4th_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fhea TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -6165,7 +6165,7 @@ test_man_fill_all_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhea TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -6280,7 +6280,7 @@ test_man_start_5th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -6414,7 +6414,7 @@ test_man_remove_bogus(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -6567,7 +6567,7 @@ test_man_remove_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -6608,7 +6608,7 @@ test_man_remove_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -6731,7 +6731,7 @@ test_man_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -6772,7 +6772,7 @@ test_man_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -6924,7 +6924,7 @@ test_man_remove_one_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -6965,7 +6965,7 @@ test_man_remove_one_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -7093,7 +7093,7 @@ test_man_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -7134,7 +7134,7 @@ test_man_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -7337,7 +7337,7 @@ test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -7378,7 +7378,7 @@ test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -7636,7 +7636,7 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_ FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -13839,7 +13839,7 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -15019,7 +15019,7 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -15205,7 +15205,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -15269,7 +15269,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -15305,7 +15305,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -15342,7 +15342,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -15378,7 +15378,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -16019,7 +16019,7 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -16086,7 +16086,7 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -16251,7 +16251,7 @@ test_bug1(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ @@ -16281,7 +16281,7 @@ test_bug1(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Ignore metadata tags in the file's cache */ diff --git a/test/freespace.c b/test/freespace.c index 1b87974..28cf1de 100644 --- a/test/freespace.c +++ b/test/freespace.c @@ -480,7 +480,7 @@ test_fs_create(hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* initialize creation parameters for free-space manager */ @@ -619,7 +619,7 @@ test_fs_sect_add(hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR init_cparam(&cparam); @@ -680,7 +680,7 @@ test_fs_sect_add(hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR init_cparam(&cparam); @@ -750,7 +750,7 @@ test_fs_sect_add(hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR TEST_set_eoa((haddr_t)TEST_SECT_ADDR150); /* set end of file address for shrinking */ @@ -819,7 +819,7 @@ test_fs_sect_add(hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR TEST_set_eoa((haddr_t)TEST_SECT_ADDR150); /* set end of file address for shrinking */ @@ -940,7 +940,7 @@ test_fs_sect_find(hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR init_cparam(&cparam); @@ -1324,7 +1324,7 @@ test_fs_sect_merge(hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR init_cparam(&cparam); @@ -1451,7 +1451,7 @@ test_fs_sect_merge(hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR init_cparam(&cparam); @@ -1553,7 +1553,7 @@ test_fs_sect_merge(hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR init_cparam(&cparam); @@ -1788,7 +1788,7 @@ test_fs_sect_shrink(hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR init_cparam(&cparam); @@ -1887,7 +1887,7 @@ test_fs_sect_shrink(hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR init_cparam(&cparam); @@ -1987,7 +1987,7 @@ test_fs_sect_shrink(hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR init_cparam(&cparam); @@ -2124,7 +2124,7 @@ test_fs_sect_change_class(hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR init_cparam(&cparam); @@ -2230,7 +2230,7 @@ test_fs_sect_change_class(hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR init_cparam(&cparam); @@ -2412,7 +2412,7 @@ test_fs_sect_extend(hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* @@ -2763,7 +2763,7 @@ test_fs_sect_iterate(hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR init_cparam(&cparam); diff --git a/test/gheap.c b/test/gheap.c index f30935a..e434a7b 100644 --- a/test/gheap.c +++ b/test/gheap.c @@ -30,6 +30,14 @@ #include "H5Iprivate.h" #include "H5Pprivate.h" +/* + * This file needs to access private information from the H5F package. + * This file also needs to access the file testing code. + */ +#define H5F_FRIEND /*suppress error about including H5Fpkg */ +#define H5F_TESTING +#include "H5Fpkg.h" /* File access */ + /* Macros for printing error messages in loops. These print up to * GHEAP_REPEATED_ERR_LIM errors, and suppress the rest */ #define GHEAP_REPEATED_ERR_LIM 20 @@ -92,7 +100,7 @@ test_1 (hid_t fapl) h5_fixname(FILENAME[0], fapl, filename, sizeof filename); if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) goto error; - if(NULL == (f = (H5F_t *)H5I_object(file))) { + if(NULL == (f = (H5F_t *)H5VL_object(file))) { H5_FAILED(); puts(" Unable to create file"); goto error; @@ -187,7 +195,7 @@ test_2 (hid_t fapl) h5_fixname(FILENAME[1], fapl, filename, sizeof filename); if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) goto error; - if(NULL == (f = (H5F_t *)H5I_object(file))) { + if(NULL == (f = (H5F_t *)H5VL_object(file))) { H5_FAILED(); puts(" Unable to create file"); goto error; @@ -274,7 +282,7 @@ test_3 (hid_t fapl) h5_fixname(FILENAME[2], fapl, filename, sizeof filename); if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) goto error; - if(NULL == (f = (H5F_t *)H5I_object(file))) { + if(NULL == (f = (H5F_t *)H5VL_object(file))) { H5_FAILED(); puts(" Unable to create file"); goto error; @@ -353,7 +361,7 @@ test_4 (hid_t fapl) h5_fixname(FILENAME[3], fapl, filename, sizeof filename); if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) goto error; - if(NULL == (f = (H5F_t *)H5I_object(file))) { + if(NULL == (f = (H5F_t *)H5VL_object(file))) { H5_FAILED(); puts(" Unable to create file"); goto error; @@ -440,7 +448,7 @@ test_ooo_indices(hid_t fapl) h5_fixname(FILENAME[4], fapl, filename, sizeof filename); if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) goto error; - if(NULL == (f = (H5F_t *)H5I_object(file))) { + if(NULL == (f = (H5F_t *)H5VL_object(file))) { H5_FAILED(); puts(" Unable to create file"); goto error; @@ -481,7 +489,7 @@ test_ooo_indices(hid_t fapl) if (H5Fclose(file)<0) goto error; if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) goto error; - if(NULL == (f = (H5F_t *)H5I_object(file))) { + if(NULL == (f = (H5F_t *)H5VL_object(file))) { H5_FAILED(); puts(" Unable to open file"); goto error; diff --git a/test/lheap.c b/test/lheap.c index 492316e..f1cad93 100644 --- a/test/lheap.c +++ b/test/lheap.c @@ -25,6 +25,14 @@ #include "H5HLprivate.h" #include "H5Iprivate.h" +/* + * This file needs to access private information from the H5F package. + * This file also needs to access the file testing code. + */ +#define H5F_FRIEND /*suppress error about including H5Fpkg */ +#define H5F_TESTING +#include "H5Fpkg.h" /* File access */ + const char *FILENAME[] = { "lheap", NULL @@ -79,7 +87,7 @@ main(void) h5_fixname(FILENAME[0], fapl, filename, sizeof filename); if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) goto error; - if(NULL == (f = (H5F_t *)H5I_object(file))) { + if(NULL == (f = (H5F_t *)H5VL_object(file))) { H5_FAILED(); H5Eprint2(H5E_DEFAULT, stdout); goto error; @@ -127,7 +135,7 @@ main(void) TESTING("local heap read"); h5_fixname(FILENAME[0], fapl, filename, sizeof filename); if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) goto error; - if(NULL == (f = (H5F_t *)H5I_object(file))) { + if(NULL == (f = (H5F_t *)H5VL_object(file))) { H5_FAILED(); H5Eprint2(H5E_DEFAULT, stdout); goto error; @@ -228,7 +228,7 @@ test_mf_eoa(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); @@ -270,7 +270,7 @@ test_mf_eoa(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr1, (hsize_t)TEST_BLOCK_SIZE30); @@ -371,7 +371,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); @@ -403,7 +403,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); @@ -448,7 +448,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); @@ -497,7 +497,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); @@ -540,7 +540,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); @@ -650,7 +650,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); @@ -681,7 +681,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* should succeed */ @@ -728,7 +728,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl) TEST_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); @@ -847,7 +847,7 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Retrieve the file's maxaddr */ @@ -901,7 +901,7 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Allocate 1/3 of the file as temporary address space */ @@ -1008,7 +1008,7 @@ test_mf_fs_start(hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Start up free-space manager */ @@ -1126,7 +1126,7 @@ test_mf_fs_alloc_free(hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR type = H5FD_MEM_SUPER; @@ -1213,7 +1213,7 @@ test_mf_fs_alloc_free(hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR type = H5FD_MEM_SUPER; @@ -1298,7 +1298,7 @@ test_mf_fs_alloc_free(hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR type = H5FD_MEM_SUPER; @@ -1484,7 +1484,7 @@ test_mf_fs_extend(hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR type = H5FD_MEM_SUPER; @@ -1602,7 +1602,7 @@ test_mf_fs_extend(hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR type = H5FD_MEM_SUPER; @@ -1715,7 +1715,7 @@ test_mf_fs_extend(hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR type = H5FD_MEM_SUPER; @@ -1828,7 +1828,7 @@ test_mf_fs_extend(hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR type = H5FD_MEM_SUPER; @@ -2020,7 +2020,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR type = H5FD_MEM_SUPER; @@ -2090,7 +2090,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR type = H5FD_MEM_SUPER; @@ -2219,7 +2219,7 @@ test_mf_aggr_alloc1(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Allocate first block from meta_aggr */ @@ -2255,7 +2255,7 @@ test_mf_aggr_alloc1(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Free the two blocks */ @@ -2350,7 +2350,7 @@ test_mf_aggr_alloc2(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR type = H5FD_MEM_SUPER; @@ -2396,7 +2396,7 @@ test_mf_aggr_alloc2(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr1, (hsize_t)TEST_BLOCK_SIZE30+TEST_BLOCK_SIZE50+TEST_BLOCK_SIZE2058); @@ -2504,7 +2504,7 @@ test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Allocate first block from meta_aggr */ @@ -2665,7 +2665,7 @@ test_mf_aggr_alloc4(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Allocate first block from meta_aggr */ @@ -2811,7 +2811,7 @@ test_mf_aggr_alloc5(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Allocate first block from meta_aggr */ @@ -2943,7 +2943,7 @@ test_mf_aggr_alloc6(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR type = H5FD_MEM_SUPER; @@ -3108,7 +3108,7 @@ test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Allocate the first block from meta_aggr */ @@ -3269,7 +3269,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Allocate the first block from meta_aggr */ @@ -3360,7 +3360,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Allocate the first block from meta_aggr */ @@ -3430,7 +3430,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Allocate first block from meta_aggr */ @@ -3562,7 +3562,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Allocate block A from meta_aggr */ @@ -3609,7 +3609,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Allocate block A from meta_aggr */ @@ -3668,7 +3668,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Allocate block A from meta_aggr */ @@ -3815,7 +3815,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* calculate fragment for alignment of block 30 */ @@ -3897,7 +3897,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* allocate a block of 50 from meta_aggr */ @@ -3919,7 +3919,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* shrink the block */ @@ -3952,7 +3952,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* allocate a block of 50 */ @@ -3974,7 +3974,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* try to extend the block */ @@ -4078,7 +4078,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR type = H5FD_MEM_SUPER; @@ -4148,7 +4148,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR type = H5FD_MEM_SUPER; @@ -4238,7 +4238,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR type = H5FD_MEM_SUPER; @@ -4463,7 +4463,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* calculate fragment for alignment of block 30 */ @@ -4721,7 +4721,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* calculate fragment for alignment of block 30 */ @@ -5063,7 +5063,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* calculate fragment for alignment of block 30 */ @@ -5362,7 +5362,7 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* get alignment setting */ @@ -5575,7 +5575,7 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* get alignment setting */ @@ -5841,7 +5841,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* get alignment setting */ @@ -6018,7 +6018,7 @@ test_mf_fs_persist(hid_t fapl_new, hid_t fcpl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Allocate 6 blocks */ @@ -6052,7 +6052,7 @@ test_mf_fs_persist(hid_t fapl_new, hid_t fcpl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Verify that H5FD_MEM_SUPER free-space manager is there */ @@ -6094,7 +6094,7 @@ test_mf_fs_persist(hid_t fapl_new, hid_t fcpl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Verify that H5FD_MEM_SUPER free-space manager is there */ @@ -6144,7 +6144,7 @@ test_mf_fs_gone(hid_t fapl_new, hid_t fcpl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Allocate 4 blocks */ @@ -6178,7 +6178,7 @@ test_mf_fs_gone(hid_t fapl_new, hid_t fcpl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Verify that the H5FD_MEM_SUPER free-space manager is not there */ @@ -6197,7 +6197,7 @@ test_mf_fs_gone(hid_t fapl_new, hid_t fcpl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Verify that H5FD_MEM_SUPER free-space manager is there */ @@ -6231,7 +6231,7 @@ test_mf_fs_gone(hid_t fapl_new, hid_t fcpl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Verify that the H5FD_MEM_SUPER free-space manager is not there */ @@ -6279,7 +6279,7 @@ test_mf_fs_split(hid_t fapl_new, hid_t fcpl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Allocate 4 blocks of type H5FD_MEM_SUPER */ @@ -6324,7 +6324,7 @@ test_mf_fs_split(hid_t fapl_new, hid_t fcpl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Verify that the H5FD_MEM_SUPER free-space manager is there */ @@ -6408,7 +6408,7 @@ test_mf_fs_split(hid_t fapl_new, hid_t fcpl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Verify that the free-space manager for H5FD_MEM_DRAW is not there */ @@ -6452,7 +6452,7 @@ test_mf_fs_split(hid_t fapl_new, hid_t fcpl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Verify that the H5FD_MEM_SUPER free-space manager is there */ @@ -6514,7 +6514,7 @@ test_mf_fs_multi(hid_t fapl_new, hid_t fcpl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Allocate 4 blocks of type H5FD_MEM_SUPER */ @@ -6559,7 +6559,7 @@ test_mf_fs_multi(hid_t fapl_new, hid_t fcpl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Verify that the H5FD_MEM_SUPER free-space manager is there */ @@ -6641,7 +6641,7 @@ test_mf_fs_multi(hid_t fapl_new, hid_t fcpl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Verify that the free-space manager for H5FD_MEM_SUPER is there */ @@ -6707,7 +6707,7 @@ test_mf_fs_multi(hid_t fapl_new, hid_t fcpl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* If H5FD_MEM_SUPER is there, should not find block #1 & #3 */ @@ -6972,7 +6972,7 @@ test_filespace_strategy_threshold(hid_t fapl_new) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Allocate 6 blocks */ @@ -7016,7 +7016,7 @@ test_filespace_strategy_threshold(hid_t fapl_new) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR switch(fs_type) { @@ -7124,7 +7124,7 @@ test_filespace_gone(hid_t fapl_new) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Allocate 6 blocks */ @@ -7192,7 +7192,7 @@ test_filespace_gone(hid_t fapl_new) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* free-space manager should be empty */ @@ -7391,7 +7391,7 @@ test_dichotomy(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* Get a pointer to the internal file object */ - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR /* Allocate the first block of type H5FD_MEM_SUPER */ diff --git a/test/ohdr.c b/test/ohdr.c index 53aa18f..bcad826 100644 --- a/test/ohdr.c +++ b/test/ohdr.c @@ -73,7 +73,7 @@ test_cont(char *filename, hid_t fapl) /* Create the file to operate on */ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - if(NULL == (f = (H5F_t *)H5I_object(file))) FAIL_STACK_ERROR + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR if (H5AC_ignore_tags(f) < 0) { H5_FAILED(); H5Eprint2(H5E_DEFAULT, stdout); @@ -200,7 +200,7 @@ test_ohdr_cache(char *filename, hid_t fapl) FAIL_STACK_ERROR if(H5Pclose(my_fapl) < 0) FAIL_STACK_ERROR - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR if(H5AC_ignore_tags(f) < 0) FAIL_STACK_ERROR @@ -348,7 +348,7 @@ main(void) /* Create the file to operate on */ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR if (H5AC_ignore_tags(f) < 0) { H5_FAILED(); @@ -449,7 +449,7 @@ main(void) FAIL_STACK_ERROR if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) FAIL_STACK_ERROR - if(NULL == (f = (H5F_t *)H5I_object(file))) + if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR if (H5AC_ignore_tags(f) < 0) FAIL_STACK_ERROR diff --git a/test/test_vol_plugin.sh.in b/test/test_vol_plugin.sh.in new file mode 100644 index 0000000..ae6c768 --- /dev/null +++ b/test/test_vol_plugin.sh.in @@ -0,0 +1,80 @@ +#! /bin/sh +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the files COPYING and Copyright.html. COPYING can be found at the root +# of the source code distribution tree; Copyright.html can be found at the +# root level of an installed copy of the electronic document set and is +# linked from the top-level documents page. It can also be found at +# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access +# to either file, you may request a copy from help@hdfgroup.org. +# +srcdir=@srcdir@ +TOP_BUILDDIR=@top_builddir@ + +# Determine backward compatibility options enabled +DEPRECATED_SYMBOLS="@DEPRECATED_SYMBOLS@" + +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +nerrors=0 +verbose=yes +exit_code=$EXIT_SUCCESS + +TEST_NAME=vol_test +TEST_BIN=`pwd`/$TEST_NAME +FROM_DIR=`pwd`/.libs +PLUGIN_LIB="$FROM_DIR/libdynlibvol1.* $FROM_DIR/libdynlibvol2.*" +PLUGIN_LIBDIR=voltestdir +CP="cp -p" # Use -p to preserve mode,ownership,timestamps +RM="rm -rf" + +# Print a line-line message left justified in a field of 70 characters +# beginning with the word "Testing". +# +TESTING() { + SPACES=" " + echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' +} + +# Main Body +# Create test directories if not exists yet. +test -d $PLUGIN_LIBDIR || mkdir -p $PLUGIN_LIBDIR +if [ $? != 0 ]; then + echo "Failed to create test directory($PLUGIN_LIBDIR)" + exit $EXIT_FAILURE +fi + +# copy plugin library for test +$CP $PLUGIN_LIB $PLUGIN_LIBDIR +if [ $? != 0 ]; then + echo "Failed to copy plugin library ($PLUGIN_LIB) for test." + exit $EXIT_FAILURE +fi + +# setup plugin path +ENVCMD="env HDF5_PLUGIN_PATH=${PLUGIN_LIBDIR}" + +# Run the test +$ENVCMD $TEST_BIN +if [ $? != 0 ]; then + nerrors=`expr $nerrors + 1` +fi + +# print results +if test $nerrors -ne 0 ; then + echo "$nerrors errors encountered" + exit_code=$EXIT_FAILURE +else + echo "All VOL Plugin API tests passed." + exit_code=$EXIT_SUCCESS +fi + +# Clean up temporary files/directories and leave +$RM $PLUGIN_LIBDIR + +exit $exit_code diff --git a/test/testfiles/err_compat_1 b/test/testfiles/err_compat_1 index d471e13..cea08f7 100644 --- a/test/testfiles/err_compat_1 +++ b/test/testfiles/err_compat_1 @@ -12,18 +12,12 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): minor: Bad value HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #000: (file name) line (number) in H5Dcreate2(): not a location ID + #000: (file name) line (number) in H5Dcreate2(): invalid location identifier major: Invalid arguments to routine minor: Inappropriate type - #001: (file name) line (number) in H5G_loc(): invalid object ID - major: Invalid arguments to routine - minor: Bad value ********* Print error stack in customized way ********* - error #000: (file name) in H5G_loc(): line (number) - major: Invalid arguments to routine - minor: Bad value - error #001: (file name) in H5Dcreate2(): line (number) + error #000: (file name) in H5Dcreate2(): line (number) major: Invalid arguments to routine minor: Inappropriate type @@ -33,19 +27,13 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): minor: Can't get value ********* Print error stack in customized way ********* - error #000: (file name) in H5G_loc(): line (number) - major: Invalid arguments to routine - minor: Bad value - error #001: (file name) in H5Dcreate2(): line (number) + error #000: (file name) in H5Dcreate2(): line (number) major: Invalid arguments to routine minor: Inappropriate type HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #000: (file name) line (number) in H5Dcreate2(): not a location ID + #000: (file name) line (number) in H5Dcreate2(): invalid location identifier major: Invalid arguments to routine minor: Inappropriate type - #001: (file name) line (number) in H5G_loc(): invalid object ID - major: Invalid arguments to routine - minor: Bad value HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #000: (file name) line (number) in main(): Error test failed diff --git a/test/testfiles/error_test_1 b/test/testfiles/error_test_1 index 0acd288..0efab28 100644 --- a/test/testfiles/error_test_1 +++ b/test/testfiles/error_test_1 @@ -41,19 +41,25 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #000: (file name) line (number) in H5Dread(): can't read data major: Dataset minor: Read failed - #001: (file name) line (number) in H5D__read(): can't read data + #001: (file name) line (number) in H5VL_dataset_read(): read failed + major: Virtual Object Layer + minor: Read failed + #002: (file name) line (number) in H5VL_native_dataset_read(): can't read data + major: Dataset + minor: Read failed + #003: (file name) line (number) in H5D__read(): can't read data major: Dataset minor: Read failed - #002: (file name) line (number) in H5D__chunk_read(): unable to read raw data chunk + #004: (file name) line (number) in H5D__chunk_read(): unable to read raw data chunk major: Low-level I/O minor: Read failed - #003: (file name) line (number) in H5D__chunk_lock(): data pipeline read failed + #005: (file name) line (number) in H5D__chunk_lock(): data pipeline read failed major: Data filters minor: Filter operation failed - #004: (file name) line (number) in H5Z_pipeline(): required filter 'bogus' is not registered + #006: (file name) line (number) in H5Z_pipeline(): required filter 'bogus' is not registered major: Data filters minor: Read failed - #005: (file name) line (number) in H5PL_load(): required dynamically loaded plugin filter '305' is not available + #007: (file name) line (number) in H5PL_load(): required dynamically loaded plugin filter '305' is not available major: Plugin for dynamically loaded library minor: Unable to load metadata into cache diff --git a/test/tfile.c b/test/tfile.c index c36045b..f0c3930 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -1584,15 +1584,47 @@ test_file_freespace(void) VERIFY(mod_filesize, empty_filesize, "H5Fget_freespace"); } /* end test_file_freespace() */ +static void +test_file_isaccessible_helper(const char *filename, htri_t expected) +{ + htri_t status; /* Whether a file is an HDF5 file */ + hid_t fapl; /* File access property list */ + herr_t ret; + + fapl = H5Pcreate(H5P_FILE_ACCESS); + CHECK(fapl, FAIL, "H5Pcreate"); + + /* Verify that the file is an HDF5 file with the sec2 default driver*/ + status = H5Fis_accessible(filename, fapl); + VERIFY(status, expected, "H5Fis_accessible"); + + /* Verify that the file is an HDF5 file with the core VFD*/ + ret = H5Pset_fapl_core(fapl, (size_t)1024, 0); + CHECK(ret, FAIL, "H5Pset_fapl_core"); + status = H5Fis_accessible(filename, fapl); + VERIFY(status, expected, "H5Fis_accessible"); + +#ifdef H5_HAVE_DIRECT + /* Verify that the file is an HDF5 file with the direct VFD*/ + ret = H5Pset_fapl_direct(fapl, 1024, 4096, 8*4096); + CHECK(ret, FAIL, "H5Pset_fapl_direct"); + status = H5Fis_accessible(filename, fapl); + VERIFY(status, expected, "H5Fis_accessible"); +#endif + + ret = H5Pclose (fapl); + CHECK(ret, FAIL, "H5Pclose"); +} + /**************************************************************** ** -** test_file_ishdf5(): low-level file test routine. -** This test checks whether the H5Fis_hdf5() routine is working +** test_file_isaccessible(): low-level file test routine. +** This test checks whether the H5Fis_accessible() routine is working ** correctly in variuous situations. ** *****************************************************************/ static void -test_file_ishdf5(void) +test_file_isaccessible(void) { hid_t file; /* File opened with read-write permission */ hid_t fcpl; /* File creation property list */ @@ -1600,7 +1632,6 @@ test_file_ishdf5(void) ssize_t nbytes; /* Number of bytes written */ unsigned u; /* Local index variable */ unsigned char buf[1024]; /* Buffer of data to write */ - htri_t status; /* Whether a file is an HDF5 file */ herr_t ret; /* Output message about test being performed */ @@ -1615,9 +1646,7 @@ test_file_ishdf5(void) CHECK(ret, FAIL, "H5Fclose"); /* Verify that the file is an HDF5 file */ - status = H5Fis_hdf5(FILE1); - VERIFY(status, TRUE, "H5Fis_hdf5"); - + test_file_isaccessible_helper(FILE1, TRUE); /* Create a file creation property list with a non-default user block size */ fcpl = H5Pcreate(H5P_FILE_CREATE); @@ -1639,9 +1668,7 @@ test_file_ishdf5(void) CHECK(ret, FAIL, "H5Fclose"); /* Verify that the file is an HDF5 file */ - status = H5Fis_hdf5(FILE1); - VERIFY(status, TRUE, "H5Fis_hdf5"); - + test_file_isaccessible_helper(FILE1, TRUE); /* Create non-HDF5 file and check it */ fd=HDopen(FILE1, O_RDWR|O_CREAT|O_TRUNC, 0666); @@ -1659,11 +1686,10 @@ test_file_ishdf5(void) ret = HDclose(fd); CHECK(ret, FAIL, "HDclose"); - /* Verify that the file is not an HDF5 file */ - status = H5Fis_hdf5(FILE1); - VERIFY(status, FALSE, "H5Fis_hdf5"); + /* Verify that the file is NOT an HDF5 file */ + test_file_isaccessible_helper(FILE1, FALSE); -} /* end test_file_ishdf5() */ +} /* end test_file_isaccessible() */ /**************************************************************** ** @@ -3668,7 +3694,7 @@ test_file(void) test_file_perm(); /* Test file access permissions */ test_file_perm2(); /* Test file access permission again */ test_file_freespace(); /* Test file free space information */ - test_file_ishdf5(); /* Test detecting HDF5 files correctly */ + test_file_isaccessible(); /* Test detecting HDF5 files correctly */ test_file_open_dot(); /* Test opening objects with "." for a name */ test_file_open_overlap(); /* Test opening files in an overlapping manner */ test_file_getname(); /* Test basic H5Fget_name() functionality */ diff --git a/test/tmisc.c b/test/tmisc.c index 1298f6b..9ecc2be 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -2678,8 +2678,8 @@ test_misc15(void) CHECK(ret, FAIL, "H5Fclose"); /* Verify that the file is still OK */ - ret = H5Fis_hdf5(MISC15_FILE); - CHECK(ret, FAIL, "H5Fis_hdf5"); + ret = H5Fis_accessible(MISC15_FILE, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Fis_accessible"); file = H5Fopen(MISC15_FILE, H5F_ACC_RDONLY, H5P_DEFAULT); CHECK(file, FAIL, "H5Fopen"); diff --git a/test/ttsafe_error.c b/test/ttsafe_error.c index a2f25db..4bc2c3c 100644 --- a/test/ttsafe_error.c +++ b/test/ttsafe_error.c @@ -52,7 +52,7 @@ /* Having a common dataset name is an error */ #define DATASETNAME "commonname" -#define EXPECTED_ERROR_DEPTH 8 +#define EXPECTED_ERROR_DEPTH 9 #define WRITE_NUMBER 37 static herr_t error_callback(hid_t , void *); @@ -67,7 +67,7 @@ typedef struct err_num_struct { hid_t min_num; } err_num_t; -err_num_t expected[8]; +err_num_t expected[9]; int error_flag = 0; int error_count = 0; @@ -85,23 +85,29 @@ void tts_error(void) expected[0].maj_num = H5E_DATASET; expected[0].min_num = H5E_CANTINIT; - expected[1].maj_num = H5E_DATASET; + expected[1].maj_num = H5E_VOL; expected[1].min_num = H5E_CANTINIT; - expected[2].maj_num = H5E_LINK; + expected[2].maj_num = H5E_DATASET; expected[2].min_num = H5E_CANTINIT; - expected[3].maj_num = H5E_SYM; - expected[3].min_num = H5E_CANTINSERT; + expected[3].maj_num = H5E_DATASET; + expected[3].min_num = H5E_CANTINIT; - expected[4].maj_num = H5E_SYM; - expected[4].min_num = H5E_NOTFOUND; + expected[4].maj_num = H5E_LINK; + expected[4].min_num = H5E_CANTINIT; expected[5].maj_num = H5E_SYM; - expected[5].min_num = H5E_CALLBACK; + expected[5].min_num = H5E_CANTINSERT; expected[6].maj_num = H5E_SYM; - expected[6].min_num = H5E_EXISTS; + expected[6].min_num = H5E_NOTFOUND; + + expected[7].maj_num = H5E_SYM; + expected[7].min_num = H5E_CALLBACK; + + expected[8].maj_num = H5E_SYM; + expected[8].min_num = H5E_EXISTS; /* set up mutex for global count of errors */ H5TS_mutex_init(&error_mutex); @@ -108,10 +108,6 @@ test_sec2(void) if(H5FD_SEC2 != H5Pget_driver(access_fapl)) TEST_ERROR; - /* ...and close the property list */ - if(H5Pclose(access_fapl) < 0) - TEST_ERROR; - /* Check file handle API */ if(H5Fget_vfd_handle(file, H5P_DEFAULT, (void **)&fhandle) < 0) TEST_ERROR; @@ -131,6 +127,14 @@ test_sec2(void) if(H5Fclose(file) < 0) TEST_ERROR; + /* Verify that the file is an HDF5 file */ + if(H5Fis_accessible(filename, access_fapl) != TRUE) + TEST_ERROR; + + /* ...and close the property list */ + if(H5Pclose(access_fapl) < 0) + TEST_ERROR; + h5_cleanup(FILENAME, fapl); PASSED(); return 0; @@ -615,6 +619,12 @@ test_family_opens(char *fname, hid_t fa_pl) /* Case 1: reopen file with 1st member file name and default property list */ HDsnprintf(first_name, sizeof(first_name), fname, 0); + /* Verify that the file is not accessible */ + H5E_BEGIN_TRY { + if(H5Fis_accessible(first_name, H5P_DEFAULT) != FALSE) + TEST_ERROR; + } H5E_END_TRY; + H5E_BEGIN_TRY { file = H5Fopen(first_name, H5F_ACC_RDWR, H5P_DEFAULT); } H5E_END_TRY; @@ -622,6 +632,11 @@ test_family_opens(char *fname, hid_t fa_pl) TEST_ERROR /* Case 2: reopen file with correct name template but default property list */ + + /* Verify that the file is not accessible */ + if(H5Fis_accessible(fname, H5P_DEFAULT) != FALSE) + TEST_ERROR; + H5E_BEGIN_TRY { file = H5Fopen(fname, H5F_ACC_RDWR, H5P_DEFAULT); } H5E_END_TRY; @@ -632,6 +647,10 @@ test_family_opens(char *fname, hid_t fa_pl) if(H5Pset_fapl_family(fa_pl, (hsize_t)128, H5P_DEFAULT) < 0) TEST_ERROR; + /* Verify that the file is not accessible */ + if(H5Fis_accessible(fname, fa_pl) != FALSE) + TEST_ERROR; + H5E_BEGIN_TRY { file = H5Fopen(fname, H5F_ACC_RDWR, fa_pl); } H5E_END_TRY; @@ -649,6 +668,10 @@ test_family_opens(char *fname, hid_t fa_pl) if(H5Pset_fapl_family(fa_pl, (hsize_t)FAMILY_SIZE, H5P_DEFAULT) < 0) TEST_ERROR; + /* Verify that the file is not accessible */ + if(H5Fis_accessible(wrong_name, fa_pl) != FALSE) + TEST_ERROR; + H5E_BEGIN_TRY { file = H5Fopen(wrong_name, H5F_ACC_RDWR, fa_pl); } H5E_END_TRY; @@ -714,6 +737,10 @@ test_family(void) if(H5Pset_fapl_family(fapl, (hsize_t)H5F_FAMILY_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR; + /* Verify that the file is accessible with correct fapl */ + if(H5Fis_accessible(filename, fapl) != TRUE) + TEST_ERROR; + if((file=H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR; @@ -880,6 +907,10 @@ test_family_compat(void) HDsnprintf(pathname_individual, sizeof(pathname_individual), pathname, counter); } + /* Verify that the file is accessible */ + if(H5Fis_accessible(newname, fapl) != TRUE) + TEST_ERROR; + /* Make sure we can open the file. Use the read and write mode to flush the * superblock. */ if((file = H5Fopen(newname, H5F_ACC_RDWR, fapl)) < 0) @@ -948,6 +979,10 @@ test_multi_opens(char *fname) HDsnprintf(super_name, sizeof(super_name), "%%s-%c.h5", 's'); HDsnprintf(sf_name, sizeof(sf_name), super_name, fname); + /* Verify that the file is accessible */ + if(H5Fis_accessible(sf_name, H5P_DEFAULT) != FALSE) + return -1; + H5E_BEGIN_TRY { file = H5Fopen(sf_name, H5F_ACC_RDWR, H5P_DEFAULT); } H5E_END_TRY; @@ -1043,6 +1078,10 @@ test_multi(void) if(test_multi_opens(filename) < 0) TEST_ERROR; + /* Verify that the file is an HDF5 file */ + if(H5Fis_accessible(filename, fapl) != TRUE) + TEST_ERROR; + /* Reopen the file */ if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR; @@ -1246,6 +1285,10 @@ test_multi_compat(void) sprintf(newname_r, "%s-%c.h5", FILENAME[9], 'r'); h5_make_local_copy(filename_r, newname_r); + /* Verify that the file is accessible */ + if(H5Fis_accessible(newname, fapl) != TRUE) + TEST_ERROR; + /* Reopen the file for read only. Verify 1.8 library can open file * created with 1.6 library. */ if((file=H5Fopen(newname, H5F_ACC_RDONLY, fapl)) < 0) @@ -1383,10 +1426,6 @@ test_log(void) if(H5FD_LOG != H5Pget_driver(access_fapl)) TEST_ERROR; - /* ...and close the property list */ - if(H5Pclose(access_fapl) < 0) - TEST_ERROR; - /* Check file handle API */ if(H5Fget_vfd_handle(file, H5P_DEFAULT, (void **)&fhandle) < 0) TEST_ERROR; @@ -1406,6 +1445,14 @@ test_log(void) if(H5Fclose(file) < 0) TEST_ERROR; + /* Verify that the file is accessible with log vfd */ + if(H5Fis_accessible(filename, access_fapl) != TRUE) + TEST_ERROR; + + /* ...and close the property list */ + if(H5Pclose(access_fapl) < 0) + TEST_ERROR; + h5_cleanup(FILENAME, fapl); PASSED(); return 0; @@ -1463,10 +1510,6 @@ test_stdio(void) if(H5FD_STDIO != H5Pget_driver(access_fapl)) TEST_ERROR; - /* ...and close the property list */ - if(H5Pclose(access_fapl) < 0) - TEST_ERROR; - /* Check file handle API */ if(H5Fget_vfd_handle(file, H5P_DEFAULT, (void **)&fhandle) < 0) TEST_ERROR; @@ -1486,6 +1529,14 @@ test_stdio(void) if(H5Fclose(file) < 0) TEST_ERROR; + /* Verify that the file is accessible with stdio vfd */ + if(H5Fis_accessible(filename, access_fapl) != TRUE) + TEST_ERROR; + + /* ...and close the property list */ + if(H5Pclose(access_fapl) < 0) + TEST_ERROR; + h5_cleanup(FILENAME, fapl); PASSED(); return 0; @@ -1555,10 +1606,6 @@ test_windows(void) if(H5FD_WINDOWS!= H5Pget_driver(access_fapl)) TEST_ERROR; - /* ...and close the property list */ - if(H5Pclose(access_fapl) < 0) - TEST_ERROR; - /* Check file handle API */ if(H5Fget_vfd_handle(file, H5P_DEFAULT, (void **)&fhandle) < 0) TEST_ERROR; @@ -1578,6 +1625,14 @@ test_windows(void) if(H5Fclose(file) < 0) TEST_ERROR; + /* Verify that the file is accessible with windows vfd */ + if(H5Fis_accessible(filename, access_fapl) != TRUE) + TEST_ERROR; + + /* ...and close the property list */ + if(H5Pclose(access_fapl) < 0) + TEST_ERROR; + h5_cleanup(FILENAME, fapl); PASSED(); return 0; diff --git a/test/vol_test.c b/test/vol_test.c new file mode 100644 index 0000000..2d84066 --- /dev/null +++ b/test/vol_test.c @@ -0,0 +1,136 @@ +
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include "hdf5.h"
+
+hid_t native_plugin_id = -1;
+
+static herr_t
+visit_cb(hid_t oid, const char *name,
+ const H5O_info_t *oinfo, void *udata)
+{
+ ssize_t len;
+ char n[25];
+
+ if(H5Iget_type(oid) == H5I_GROUP) {
+ len = H5VLget_plugin_name(oid, n, 50);
+ printf ("Visiting GROUP VOL name = %s %zd\n", n, len);
+ }
+ if(H5Iget_type(oid) == H5I_DATASET)
+ printf("visiting dataset\n");
+ if(H5Iget_type(oid) == H5I_DATATYPE)
+ printf("visiting datatype\n");
+
+ return 1;
+}
+
+int main(int argc, char **argv) {
+ const char group_name[]="/Group";
+ const char dataset_name[]="Data";
+ char fullpath[500];
+ hid_t file_id;
+ hid_t group_id;
+ hid_t dataspaceId;
+ hid_t datasetId;
+ hid_t acc_tpl;
+ hid_t under_fapl;
+ hid_t vol_id, vol_id2;
+ hid_t int_id;
+ hid_t space;
+ const unsigned int nelem=60;
+ int *data;
+ int n;
+ unsigned int i;
+ hsize_t dims[1];
+ ssize_t len;
+ char name[25];
+ static hsize_t ds_size[2] = {10, 20};
+
+ for(n=1 ; n<3 ; n++) {
+ char pl_name[10];
+ char file_name[50];
+
+ sprintf(pl_name, "log%d", n);
+ sprintf(file_name, "log_file%d.h5", n);
+
+ vol_id = H5VLregister_by_name (pl_name);
+ assert(vol_id > 0);
+ assert(H5VLis_registered(pl_name) == 1);
+
+ under_fapl = H5Pcreate (H5P_FILE_ACCESS);
+ H5Pset_fapl_native(under_fapl);
+ assert(H5VLis_registered("native") == 1);
+
+ vol_id2 = H5VLget_plugin_id(pl_name);
+ H5VLinitialize(vol_id2, H5P_DEFAULT);
+ H5VLclose(vol_id2);
+
+ native_plugin_id = H5VLget_plugin_id("native");
+ assert(native_plugin_id > 0);
+
+ acc_tpl = H5Pcreate (H5P_FILE_ACCESS);
+ H5Pset_vol(acc_tpl, vol_id, &under_fapl);
+
+ file_id = H5Fcreate(file_name, H5F_ACC_TRUNC, H5P_DEFAULT, acc_tpl);
+ len = H5VLget_plugin_name(file_id, name, 25);
+ printf ("FILE VOL name = %s %zd\n", name, len);
+
+ group_id = H5Gcreate2(file_id, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ len = H5VLget_plugin_name(group_id, name, 50);
+ printf ("GROUP VOL name = %s %zd\n", name, len);
+
+ int_id = H5Tcopy(H5T_NATIVE_INT);
+ H5Tcommit2(file_id, "int", int_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ len = H5VLget_plugin_name(int_id, name, 50);
+ printf ("DT COMMIT name = %s %zd\n", name, len);
+ H5Tclose(int_id);
+
+ int_id = H5Topen2(file_id, "int", H5P_DEFAULT);
+ len = H5VLget_plugin_name(int_id, name, 50);
+ printf ("DT OPEN name = %s %zd\n", name, len);
+ H5Tclose(int_id);
+
+ int_id = H5Oopen(file_id,"int",H5P_DEFAULT);
+ len = H5VLget_plugin_name(int_id, name, 50);
+ printf ("DT OOPEN name = %s %zd\n", name, len);
+
+ len = H5Fget_name(file_id, name, 50);
+ printf("name = %zd %s\n", len, name);
+
+ data = (int *)malloc (sizeof(int)*nelem);
+ for(i=0;i<nelem;++i)
+ data[i]=i;
+
+ dims [0] = 60;
+ dataspaceId = H5Screate_simple(1, dims, NULL);
+ space = H5Screate_simple (2, ds_size, ds_size);
+
+ sprintf(fullpath,"%s/%s",group_name,dataset_name);
+ datasetId = H5Dcreate2(file_id,fullpath,H5T_NATIVE_INT,dataspaceId,H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT);
+ H5Sclose(dataspaceId);
+
+ len = H5VLget_plugin_name(datasetId, name, 50);
+ printf ("DSET name = %s %zd\n", name, len);
+
+ H5Dwrite(datasetId, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
+ H5Dclose(datasetId);
+
+ H5Ovisit(file_id, H5_INDEX_NAME, H5_ITER_NATIVE, visit_cb, NULL);
+
+ free (data);
+ H5Oclose(int_id);
+ H5Sclose (space);
+ H5Gclose(group_id);
+
+ H5Fclose(file_id);
+ H5Pclose(acc_tpl);
+ H5Pclose(under_fapl);
+
+ H5VLclose(native_plugin_id);
+ H5VLterminate(vol_id, H5P_DEFAULT);
+ H5VLunregister (vol_id);
+ assert(H5VLis_registered(pl_name) == 0);
+ }
+ return 0;
+}
|