summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2018-10-10 15:10:15 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2018-10-10 15:10:15 (GMT)
commite962df1591bc6eaee5b9e318de83b9c6698bc7b6 (patch)
treede3cb2001c62b76a89837ff1e90044574d71f19d /test
parent471150151d29eeb806333a8db41fefc9dfb452bb (diff)
downloadhdf5-e962df1591bc6eaee5b9e318de83b9c6698bc7b6.zip
hdf5-e962df1591bc6eaee5b9e318de83b9c6698bc7b6.tar.gz
hdf5-e962df1591bc6eaee5b9e318de83b9c6698bc7b6.tar.bz2
VOL FEATURE
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt33
-rw-r--r--test/CMakeTests.cmake15
-rw-r--r--test/Makefile.am13
-rw-r--r--test/accum.c5
-rw-r--r--test/accum_swmr_reader.c3
-rw-r--r--test/btree2.c32
-rw-r--r--test/cache_api.c4
-rw-r--r--test/cache_common.c10
-rw-r--r--test/cache_common.h1
-rw-r--r--test/cache_image.c8
-rw-r--r--test/cache_tagging.c14
-rw-r--r--test/dsets.c4
-rw-r--r--test/earray.c9
-rw-r--r--test/echo_vol.c116
-rw-r--r--test/enc_dec_plist_cross_platform.c4
-rw-r--r--test/evict_on_close.c11
-rw-r--r--test/farray.c157
-rw-r--r--test/fheap.c148
-rw-r--r--test/flushrefresh.c4
-rw-r--r--test/freespace.c33
-rw-r--r--test/gheap.c13
-rw-r--r--test/h5test.c43
-rw-r--r--test/h5test.h1
-rw-r--r--test/lheap.c5
-rw-r--r--test/links.c2
-rw-r--r--test/mf.c175
-rw-r--r--test/objcopy.c3
-rw-r--r--test/ohdr.c31
-rw-r--r--test/page_buffer.c17
-rw-r--r--test/swmr.c21
-rw-r--r--test/testfiles/err_compat_120
-rw-r--r--test/testfiles/error_test_116
-rw-r--r--test/tfile.c158
-rw-r--r--test/tmisc.c42
-rw-r--r--test/ttsafe_error.c28
-rw-r--r--test/vds_swmr_reader.c1
-rw-r--r--test/vol.c956
37 files changed, 1726 insertions, 430 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index c8119fe..959bac8 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -128,6 +128,38 @@ endif ()
)
endforeach ()
+ #-----------------------------------------------------------------------------
+ # Define VOL Plugin Test Sources
+ #-----------------------------------------------------------------------------
+ set (VOL_PLUGIN_LIBS
+ echo_vol
+ )
+
+ foreach (vol_lib ${VOL_PLUGIN_LIBS})
+ set (HDF5_VOL_PLUGIN_LIB_CORENAME "${vol_lib}")
+ set (HDF5_VOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_VOL_PLUGIN_LIB_CORENAME}")
+ set (HDF5_VOL_PLUGIN_LIB_TARGET ${HDF5_VOL_PLUGIN_LIB_CORENAME})
+
+ add_library (${HDF5_VOL_PLUGIN_LIB_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${vol_lib}.c)
+ target_include_directories(${HDF5_VOL_PLUGIN_LIB_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ TARGET_C_PROPERTIES (${HDF5_VOL_PLUGIN_LIB_TARGET} SHARED)
+ target_link_libraries (${HDF5_VOL_PLUGIN_LIB_TARGET} PUBLIC ${HDF5_TEST_LIB_TARGET})
+ H5_SET_LIB_OPTIONS (${HDF5_VOL_PLUGIN_LIB_TARGET} ${HDF5_VOL_PLUGIN_LIB_NAME} SHARED "LIB")
+ set_target_properties (${HDF5_VOL_PLUGIN_LIB_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN)
+
+ #-----------------------------------------------------------------------------
+ # Copy VOL plugin to a plugins folder
+ #-----------------------------------------------------------------------------
+ add_custom_command (
+ TARGET ${HDF5_VOL_PLUGIN_LIB_TARGET}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different
+ "$<TARGET_FILE:${HDF5_VOL_PLUGIN_LIB_TARGET}>"
+ "${CMAKE_BINARY_DIR}/vol/$<TARGET_FILE_NAME:${HDF5_VOL_PLUGIN_LIB_TARGET}>"
+ )
+ endforeach ()
+
#################################################################################
# Test program sources
#################################################################################
@@ -234,6 +266,7 @@ set (H5_TESTS
cache_logging
cork
swmr
+ vol
)
macro (ADD_H5_EXE file)
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index 8838c34..bc759ce 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -527,6 +527,7 @@ set (test_CLEANFILES
vds_swmr_src_*.h5
tmp/vds_src_2.h5
direct_chunk.h5
+ native_vol_test.h5
)
# Remove any output file left over from previous test run
@@ -1058,13 +1059,13 @@ if (TEST_SHELL_SCRIPTS)
endif()
if (ENABLE_EXTENDED_TESTS)
- ##############################################################################
- ### S W M R T E S T S
- ##############################################################################
- # testflushrefresh.sh: flushrefresh
- # test_usecases.sh: use_append_chunk, use_append_mchunks, use_disable_mdc_flushes
- # testswmr.sh: swmr*
- # testvdsswmr.sh: vds_swmr*
+##############################################################################
+### S W M R T E S T S
+##############################################################################
+# testflushrefresh.sh: flushrefresh
+# test_usecases.sh: use_append_chunk, use_append_mchunks, use_disable_mdc_flushes
+# testswmr.sh: swmr*
+# testvdsswmr.sh: vds_swmr*
# add_test (NAME H5Test-swmr_check_compat_vfd COMMAND $<TARGET_FILE:swmr_check_compat_vfd>)
diff --git a/test/Makefile.am b/test/Makefile.am
index d4db6d0..61dcda8 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -60,7 +60,7 @@ TEST_PROG= testhdf5 \
flush1 flush2 app_ref enum set_extent ttsafe enc_dec_plist \
enc_dec_plist_cross_platform getname vfd ntypes dangle dtransform \
reserved cross_read freespace mf vds file_image unregister \
- cache_logging cork swmr
+ cache_logging cork swmr vol
# List programs to be built when testing here.
# error_test and err_compat are built at the same time as the other tests, but executed by testerror.sh.
@@ -106,7 +106,9 @@ if HAVE_SHARED_CONDITIONAL
# The libh5test library provides common support code for the tests.
# The filter_plugin* libraries are for use in filter_plugin.c.
# Build them as shared libraries if that option was enabled in configure.
- noinst_LTLIBRARIES=libh5test.la libfilter_plugin1_dsets.la libfilter_plugin2_dsets.la libfilter_plugin3_dsets.la libfilter_plugin4_groups.la
+ #
+ # echo_vol is used for testing VOL plugin functionality.
+ noinst_LTLIBRARIES=libh5test.la libfilter_plugin1_dsets.la libfilter_plugin2_dsets.la libfilter_plugin3_dsets.la libfilter_plugin4_groups.la echo_vol.la
libfilter_plugin1_dsets_la_SOURCES=filter_plugin1_dsets.c
libfilter_plugin2_dsets_la_SOURCES=filter_plugin2_dsets.c
libfilter_plugin3_dsets_la_SOURCES=filter_plugin3_dsets.c
@@ -117,6 +119,11 @@ if HAVE_SHARED_CONDITIONAL
libfilter_plugin4_groups_la_LDFLAGS=$(AM_LDFLAGS) -avoid-version -module -shared -export-dynamic -rpath /nowhere
libfilter_plugin3_dsets_la_LIBADD=$(LIBHDF5)
libfilter_plugin4_groups_la_LIBADD=$(LIBHDF5)
+
+ # VOL plugin test libraries
+ echo_vol_la_SOURCES=echo_vol.c
+ echo_vol_la_LDFLAGS=$(AM_LDFLAGS) -avoid-version -module -shared -export-dynamic -rpath /nowhere
+
else
# The libh5test library provides common support code for the tests.
noinst_LTLIBRARIES=libh5test.la
@@ -193,7 +200,7 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offse
flushrefresh_VERIFICATION_DONE atomic_data accum_swmr_big.h5 ohdr_swmr.h5 \
test_swmr*.h5 cache_logging.h5 cache_logging.out vds_swmr.h5 vds_swmr_src_*.h5 \
swmr[0-2].h5 swmr_writer.out swmr_writer.log.* swmr_reader.out.* swmr_reader.log.* \
- tbogus.h5.copy cache_image_test.h5 direct_chunk.h5
+ tbogus.h5.copy cache_image_test.h5 direct_chunk.h5 native_vol_test.h5
# Sources for testhdf5 executable
testhdf5_SOURCES=testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \
diff --git a/test/accum.c b/test/accum.c
index 91786a9..40829f9 100644
--- a/test/accum.c
+++ b/test/accum.c
@@ -23,6 +23,7 @@
#include "H5CXprivate.h" /* API Contexts */
#include "H5Iprivate.h"
+#include "H5VLprivate.h" /* Virtual Object Layer */
/* Filename */
#define FILENAME "accum.h5"
@@ -104,7 +105,7 @@ main(void)
api_ctx_pushed = TRUE;
/* 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. */
@@ -1882,7 +1883,7 @@ test_swmr_write_big(hbool_t newest_format)
api_ctx_pushed = TRUE;
/* Get H5F_t * to internal file structure */
- if(NULL == (rf = (H5F_t *)H5I_object(fid))) FAIL_STACK_ERROR
+ if(NULL == (rf = (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/accum_swmr_reader.c b/test/accum_swmr_reader.c
index cf2616e..16e0ddc 100644
--- a/test/accum_swmr_reader.c
+++ b/test/accum_swmr_reader.c
@@ -20,6 +20,7 @@
#include "H5CXprivate.h" /* API Contexts */
#include "H5Iprivate.h"
+#include "H5VLprivate.h" /* Virtual Object Layer */
/* Filename: this is the same as the define in accum.c used by test_swmr_write_big() */
#define SWMR_FILENAME "accum_swmr_big.h5"
@@ -77,7 +78,7 @@ main(void)
api_ctx_pushed = TRUE;
/* Get H5F_t * to internal file structure */
- if(NULL == (f = (H5F_t *)H5I_object(fid)))
+ if(NULL == (f = (H5F_t *)H5VL_object(fid)))
FAIL_STACK_ERROR
/* Should read in [1024, 2024] with buf data */
diff --git a/test/btree2.c b/test/btree2.c
index d26fed5..8d77438 100644
--- a/test/btree2.c
+++ b/test/btree2.c
@@ -26,7 +26,7 @@
/* Other private headers that this test requires */
#include "H5CXprivate.h" /* API Contexts */
-#include "H5Iprivate.h"
+#include "H5VLprivate.h" /* Virtual Object Layer */
const char *FILENAME[] = {
"btree2",
@@ -117,7 +117,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 */
@@ -191,7 +191,7 @@ reopen_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 */
@@ -3017,7 +3017,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 */
@@ -3055,7 +3055,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 */
@@ -8568,7 +8568,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 */
@@ -8722,7 +8722,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 */
@@ -8817,7 +8817,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 */
@@ -8905,7 +8905,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 */
@@ -8990,7 +8990,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 */
@@ -9338,7 +9338,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 */
@@ -9382,7 +9382,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 */
@@ -9439,7 +9439,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 */
@@ -9496,7 +9496,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 */
@@ -9826,7 +9826,7 @@ test_open_twice_diff(hid_t fapl, const H5B2_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 */
@@ -9880,7 +9880,7 @@ test_open_twice_diff(hid_t fapl, const H5B2_create_t *cparam)
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 B-tree through the second file handle */
diff --git a/test/cache_api.c b/test/cache_api.c
index 7c0ffa3..4f29009 100644
--- a/test/cache_api.c
+++ b/test/cache_api.c
@@ -230,7 +230,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_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 ) {
@@ -378,7 +378,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_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_common.c b/test/cache_common.c
index b078964..94d3f59 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -3287,7 +3287,7 @@ setup_cache(size_t max_cache_size,
HDfprintf(stdout, "%s: H5Fflush() failed.\n", FUNC);
}
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) {
pass = FALSE;
failure_mssg = "Can't get file_ptr.";
@@ -3483,7 +3483,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 );
}
@@ -6033,7 +6033,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 ) {
@@ -6170,7 +6170,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 ) {
@@ -6352,7 +6352,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_common.h b/test/cache_common.h
index 9c66357..2604567 100644
--- a/test/cache_common.h
+++ b/test/cache_common.h
@@ -28,6 +28,7 @@
#include "H5Cpkg.h"
#include "H5Fpkg.h"
#include "H5Iprivate.h"
+#include "H5VLprivate.h" /* Virtual Object Layer */
/* Include test header files */
#include "h5test.h"
diff --git a/test/cache_image.c b/test/cache_image.c
index 5967ecc..4d6b065 100644
--- a/test/cache_image.c
+++ b/test/cache_image.c
@@ -720,7 +720,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected,
} else {
- file_ptr = (struct H5F_t *)H5I_object_verify(file_id, H5I_FILE);
+ file_ptr = (struct H5F_t *)H5VL_object_verify(file_id, H5I_FILE);
if ( file_ptr == NULL ) {
@@ -6732,7 +6732,7 @@ cache_image_api_error_check_4(void)
} else {
- file_ptr = (struct H5F_t *)H5I_object_verify(file_id, H5I_FILE);
+ file_ptr = (struct H5F_t *)H5VL_object_verify(file_id, H5I_FILE);
if ( file_ptr == NULL ) {
@@ -6882,7 +6882,7 @@ cache_image_api_error_check_4(void)
} else {
- file_ptr = (struct H5F_t *)H5I_object_verify(file_id, H5I_FILE);
+ file_ptr = (struct H5F_t *)H5VL_object_verify(file_id, H5I_FILE);
if ( file_ptr == NULL ) {
@@ -6960,7 +6960,7 @@ cache_image_api_error_check_4(void)
} else {
- file_ptr = (struct H5F_t *)H5I_object_verify(file_id, H5I_FILE);
+ file_ptr = (struct 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 0160607..8d90eb6 100644
--- a/test/cache_tagging.c
+++ b/test/cache_tagging.c
@@ -119,7 +119,7 @@ static int dump_cache(hid_t fid)
H5F_t *f; /* File Pointer */
/* Get Internal File / Cache Pointers */
- if(NULL == (f = (H5F_t *)H5I_object(fid)))
+ if(NULL == (f = (H5F_t *)H5VL_object(fid)))
TEST_ERROR;
/* Dump the cache */
@@ -159,7 +159,7 @@ verify_no_unknown_tags(hid_t fid)
int i; /* Iterator */
/* Get Internal File / Cache Pointers */
- if(NULL == (f = (H5F_t *)H5I_object(fid)))
+ if(NULL == (f = (H5F_t *)H5VL_object(fid)))
TEST_ERROR;
cache_ptr = f->shared->cache;
@@ -207,7 +207,7 @@ mark_all_entries_investigated(hid_t fid)
int i; /* Iterator */
/* Get Internal File / Cache Pointers */
- if(NULL == (f = (H5F_t *)H5I_object(fid)))
+ if(NULL == (f = (H5F_t *)H5VL_object(fid)))
TEST_ERROR;
cache_ptr = f->shared->cache;
@@ -253,7 +253,7 @@ reset_all_entries_investigated(hid_t fid)
int i; /* Iterator */
/* Get Internal File / Cache Pointers */
- if(NULL == (f = (H5F_t *)H5I_object(fid)))
+ if(NULL == (f = (H5F_t *)H5VL_object(fid)))
TEST_ERROR;
cache_ptr = f->shared->cache;
@@ -301,7 +301,7 @@ verify_tag(hid_t fid, int id, haddr_t tag)
int i; /* Iterator */
/* Get Internal File / Cache Pointers */
- if(NULL == (f = (H5F_t *)H5I_object(fid)))
+ if(NULL == (f = (H5F_t *)H5VL_object(fid)))
TEST_ERROR;
cache_ptr = f->shared->cache;
@@ -341,7 +341,7 @@ evict_entries(hid_t fid)
H5F_t *f; /* File Pointer */
/* Get Internal File / Cache Pointers */
- if(NULL == (f = (H5F_t *)H5I_object(fid)))
+ if(NULL == (f = (H5F_t *)H5VL_object(fid)))
TEST_ERROR;
/* Mark all entries investigated */
@@ -3653,7 +3653,7 @@ check_invalid_tag_application(void)
api_ctx_pushed = TRUE;
/* Get internal file pointer*/
- if ( NULL == (f = (H5F_t *)H5I_object(fid)) ) TEST_ERROR;
+ if ( NULL == (f = (H5F_t *)H5VL_object(fid)) ) TEST_ERROR;
/* Call H5HL_create, an internal function that calls H5AC_insert_entry without setting up a tag */
/* Ensure this returns FAILURE, as a tag has not been set up. */
diff --git a/test/dsets.c b/test/dsets.c
index faf2ad7..050bd8f 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -877,10 +877,10 @@ test_compact_io(hid_t fapl)
} /* end */
/* Get the internal file pointer */
- if((fp = (H5F_t *)H5I_object(verfile)) == NULL) TEST_ERROR
+ if((fp = (H5F_t *)H5VL_object(verfile)) == NULL) TEST_ERROR
/* Get the internal dataset pointer */
- if((dsetp = (H5D_t *)H5I_object(dataset)) == NULL) TEST_ERROR
+ if((dsetp = (H5D_t *)H5VL_object(dataset)) == NULL) TEST_ERROR
/* Verify the dataset's layout and fill message versions */
if(fp->shared->low_bound == H5F_LIBVER_EARLIEST) {
diff --git a/test/earray.c b/test/earray.c
index 02e4d85..bb258c7 100644
--- a/test/earray.c
+++ b/test/earray.c
@@ -27,6 +27,7 @@
/* Other private headers that this test requires */
#include "H5CXprivate.h" /* API Contexts */
#include "H5Iprivate.h" /* IDs */
+#include "H5VLprivate.h" /* Virtual Object Layer */
#include "H5VMprivate.h" /* Vectors and arrays */
@@ -300,7 +301,7 @@ create_file(unsigned flags, 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 */
@@ -433,7 +434,7 @@ reopen_file(hid_t *file, H5F_t **f, 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
/* Ignore metadata tags in the file's cache */
@@ -943,7 +944,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 */
@@ -1089,7 +1090,7 @@ test_open_twice_diff(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tpa
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/echo_vol.c b/test/echo_vol.c
new file mode 100644
index 0000000..02c0fb3
--- /dev/null
+++ b/test/echo_vol.c
@@ -0,0 +1,116 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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 COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Purpose: A simple virtual object layer (VOL) plugin that just echoes
+ * the name of the API call.
+ */
+
+#include "H5PLextern.h"
+
+/* The VOL class struct.
+ */
+static const H5VL_class_t echo_vol_g = {
+ 0, /* version */
+ (H5VL_class_value_t)501, /* value */
+ "echo", /* name */
+ NULL, /* initialize */
+ NULL, /* terminate */
+ (size_t)0, /* fapl size */
+ NULL, /* fapl copy */
+ NULL, /* fapl free */
+ { /* attribute_cls */
+ NULL, /* create */
+ NULL, /* open */
+ NULL, /* read */
+ NULL, /* write */
+ NULL, /* get */
+ NULL, /* specific */
+ NULL, /* optional */
+ NULL /* close */
+ },
+ { /* dataset_cls */
+ NULL, /* create */
+ NULL, /* open */
+ NULL, /* read */
+ NULL, /* write */
+ NULL, /* get */
+ NULL, /* specific */
+ NULL, /* optional */
+ NULL /* close */
+ },
+ { /* datatype_cls */
+ NULL, /* commit */
+ NULL, /* open */
+ NULL, /* get_size */
+ NULL, /* specific */
+ NULL, /* optional */
+ NULL /* close */
+ },
+ { /* file_cls */
+ NULL, /* create */
+ NULL, /* open */
+ NULL, /* get */
+ NULL, /* specific */
+ NULL, /* optional */
+ NULL /* close */
+ },
+ { /* group_cls */
+ NULL, /* create */
+ NULL, /* open */
+ NULL, /* get */
+ NULL, /* specific */
+ NULL, /* optional */
+ NULL /* close */
+ },
+ { /* link_cls */
+ NULL, /* create */
+ NULL, /* copy */
+ NULL, /* move */
+ NULL, /* get */
+ NULL, /* specific */
+ NULL /* optional */
+ },
+ { /* object_cls */
+ NULL, /* open */
+ NULL, /* copy */
+ NULL, /* get */
+ NULL, /* specific */
+ NULL /* optional */
+ },
+ { /* async_cls */
+ NULL, /* cancel */
+ NULL, /* test */
+ NULL /* wait */
+ },
+ NULL /* optional */
+};
+
+
+
+/* These two functions are necessary to load this plugin using
+ * the HDF5 library.
+ */
+
+H5PL_type_t
+H5PLget_plugin_type(void)
+{
+ return H5PL_TYPE_VOL;
+}
+
+
+const void*
+H5PLget_plugin_info(void)
+{
+ return &echo_vol_g;
+}
+
diff --git a/test/enc_dec_plist_cross_platform.c b/test/enc_dec_plist_cross_platform.c
index 1fbb41b..15c7391 100644
--- a/test/enc_dec_plist_cross_platform.c
+++ b/test/enc_dec_plist_cross_platform.c
@@ -28,7 +28,7 @@ int
main(void)
{
if(VERBOSE_MED)
- printf("Encode/Decode property list endianess\n");
+ HDprintf("Encode/Decode property list endianess\n");
/******* ENCODE/DECODE DCPLS *****/
TESTING("Default DCPL Encoding/Decoding");
@@ -227,7 +227,7 @@ test_plists(const char *filename_prefix)
return 1;
error:
- printf("***** Plist Encode/Decode tests FAILED! *****\n");
+ HDprintf("***** Plist Encode/Decode tests FAILED! *****\n");
return -1;
}
diff --git a/test/evict_on_close.c b/test/evict_on_close.c
index 9d23f2f..9918829 100644
--- a/test/evict_on_close.c
+++ b/test/evict_on_close.c
@@ -32,6 +32,7 @@
#include "H5Fpkg.h"
#include "H5Gpkg.h"
#include "H5Ipkg.h"
+#include "H5VLprivate.h" /* Virtual Object Layer */
/* Evict on close is not supported under parallel at this time.
* In the meantime, we just run a simple check that EoC can't be
@@ -598,7 +599,7 @@ check_group_layout(hid_t fid, const char *group_name)
/* NOTE: The TESTING() macro is called in main() */
/* Get a pointer to the file struct */
- if(NULL == (file_ptr = (H5F_t *)H5I_object_verify(fid, H5I_FILE)))
+ if(NULL == (file_ptr = (H5F_t *)H5VL_object_verify(fid, H5I_FILE)))
TEST_ERROR;
/* Record the number of cache entries */
@@ -614,7 +615,7 @@ check_group_layout(hid_t fid, const char *group_name)
/* Open the main group and get its tag */
if((gid1 = H5Gopen2(fid, group_name, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if(NULL == (grp_ptr = (H5G_t *)H5I_object_verify(gid1, H5I_GROUP)))
+ if(NULL == (grp_ptr = (H5G_t *)H5VL_object_verify(gid1, H5I_GROUP)))
TEST_ERROR;
tag1 = grp_ptr->oloc.addr;
@@ -631,7 +632,7 @@ check_group_layout(hid_t fid, const char *group_name)
if((gid2 = H5Gopen2(gid1, subgroup_name, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if(NULL == (grp_ptr = (H5G_t *)H5I_object_verify(gid2, H5I_GROUP)))
+ if(NULL == (grp_ptr = (H5G_t *)H5VL_object_verify(gid2, H5I_GROUP)))
TEST_ERROR;
tag2 = grp_ptr->oloc.addr;
@@ -712,7 +713,7 @@ check_dset_scheme(hid_t fid, const char *dset_name)
/* NOTE: The TESTING() macro is called in main() */
/* Get a pointer to the file struct */
- if(NULL == (file_ptr = (H5F_t *)H5I_object_verify(fid, H5I_FILE)))
+ if(NULL == (file_ptr = (H5F_t *)H5VL_object_verify(fid, H5I_FILE)))
TEST_ERROR;
/* Create the data buffer */
@@ -732,7 +733,7 @@ check_dset_scheme(hid_t fid, const char *dset_name)
/* Open dataset and get the metadata tag */
if((did = H5Dopen2(fid, dset_name, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if(NULL == (dset_ptr = (H5D_t *)H5I_object_verify(did, H5I_DATASET)))
+ if(NULL == (dset_ptr = (H5D_t *)H5VL_object_verify(did, H5I_DATASET)))
TEST_ERROR;
tag = dset_ptr->oloc.addr;
diff --git a/test/farray.c b/test/farray.c
index 21d3186..c9584b8 100644
--- a/test/farray.c
+++ b/test/farray.c
@@ -28,6 +28,7 @@
#include "H5CXprivate.h" /* API Contexts */
#include "H5Iprivate.h" /* IDs */
#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5VLprivate.h" /* Virtual Object Layer */
/* Local macros */
@@ -149,15 +150,15 @@ static herr_t
create_file(hid_t fapl_id, hid_t *fid, H5F_t **f)
{
/* Create the file to work on */
- if((*fid = H5Fcreate(filename_g, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
- FAIL_STACK_ERROR
+ if ((*fid = H5Fcreate(filename_g, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
+ FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
- if(NULL == (*f = (H5F_t *)H5I_object(*fid)))
+ if (NULL == (*f = (H5F_t *)H5VL_object(*fid)))
FAIL_STACK_ERROR;
/* Ignore metadata tags in the file's cache */
- if(H5AC_ignore_tags(*f) < 0)
+ if (H5AC_ignore_tags(*f) < 0)
FAIL_STACK_ERROR;
/* Success */
@@ -183,23 +184,23 @@ check_stats(const H5FA_t *fa, const farray_state_t *state)
H5FA_stat_t farray_stats; /* Statistics about the array */
/* Get statistics for fixed array and verify they are correct */
- if(H5FA_get_stats(fa, &farray_stats) < 0)
+ if (H5FA_get_stats(fa, &farray_stats) < 0)
FAIL_STACK_ERROR
/* Compare information */
- if(farray_stats.hdr_size != state->hdr_size) {
+ if (farray_stats.hdr_size != state->hdr_size) {
HDfprintf(stdout, "farray_stats.hdr_size = %Hu, state->hdr_size = %Hu\n",
farray_stats.hdr_size, state->hdr_size);
TEST_ERROR
}
- if(farray_stats.dblk_size != state->dblk_size) {
+ if (farray_stats.dblk_size != state->dblk_size) {
HDfprintf(stdout, "farray_stats.dblk_size = %Hu, state->dblk_size = %Hu\n",
farray_stats.dblk_size, state->dblk_size);
TEST_ERROR
}
- if(farray_stats.nelmts != state->nelmts) {
+ if (farray_stats.nelmts != state->nelmts) {
HDfprintf(stdout, "farray_stats.nelmts = %Hu, state->nelmts = %Hu\n",
farray_stats.nelmts, state->nelmts);
TEST_ERROR
@@ -236,7 +237,7 @@ set_fa_state(const H5FA_create_t *cparam, farray_state_t *state)
state->nelmts = cparam->nelmts;
dblk_page_nelmts = (size_t)1 << cparam->max_dblk_page_nelmts_bits;
- if(state->nelmts > dblk_page_nelmts) {
+ if (state->nelmts > dblk_page_nelmts) {
size_t npages = (size_t)(((state->nelmts + dblk_page_nelmts) - 1) / dblk_page_nelmts);
size_t dblk_page_init_size = (npages + 7) / 8;
hsize_t checksum_size = npages * 4;
@@ -266,38 +267,38 @@ reopen_file(hid_t *fid, H5F_t **f, hid_t fapl_id,
{
/* Check for closing & re-opening the array */
/* (actually will close & re-open the file as well) */
- if(tparam->reopen_array) {
+ if (tparam->reopen_array) {
/* Close array, if given */
- if(fa && *fa) {
- if(H5FA_close(*fa) < 0)
+ if (fa && *fa) {
+ if (H5FA_close(*fa) < 0)
FAIL_STACK_ERROR
*fa = NULL;
}
/* Close file */
- if(*fid) {
- if(H5Fclose(*fid) < 0)
+ if (*fid) {
+ if (H5Fclose(*fid) < 0)
FAIL_STACK_ERROR
*fid = H5I_INVALID_HID;
*f = NULL;
}
/* Re-open the file */
- if((*fid = H5Fopen(filename_g, H5F_ACC_RDWR, fapl_id)) < 0)
+ if ((*fid = H5Fopen(filename_g, H5F_ACC_RDWR, fapl_id)) < 0)
FAIL_STACK_ERROR
/* Get a pointer to the internal file object */
- if(NULL == (*f = (H5F_t *)H5I_object(*fid)))
- FAIL_STACK_ERROR
+ if (NULL == (*f = (H5F_t *)H5VL_object(*fid)))
+ FAIL_STACK_ERROR;
/* Ignore metadata tags in the file's cache */
- if(H5AC_ignore_tags(*f) < 0)
+ if (H5AC_ignore_tags(*f) < 0)
FAIL_STACK_ERROR
/* Re-open array, if given */
- if(fa)
- if(NULL == (*fa = H5FA_open(*f, fa_addr, NULL)))
+ if (fa)
+ if (NULL == (*fa = H5FA_open(*f, fa_addr, NULL)))
FAIL_STACK_ERROR
}
@@ -325,20 +326,20 @@ create_array(H5F_t *f, const H5FA_create_t *cparam,
farray_state_t state; /* State of extensible array */
/* Create array */
- if(NULL == (*fa = H5FA_create(f, cparam, NULL)))
+ if (NULL == (*fa = H5FA_create(f, cparam, NULL)))
FAIL_STACK_ERROR
/* Check status of array */
- if(H5FA_get_addr(*fa, fa_addr) < 0)
+ if (H5FA_get_addr(*fa, fa_addr) < 0)
FAIL_STACK_ERROR
- if(!H5F_addr_defined(*fa_addr))
+ if (!H5F_addr_defined(*fa_addr))
TEST_ERROR
/* Check array stats */
HDmemset(&state, 0, sizeof(state));
state.hdr_size = FA_HDR_SIZE;
state.nelmts = cparam->nelmts;
- if(check_stats(*fa, &state))
+ if (check_stats(*fa, &state))
TEST_ERROR
/* Success */
@@ -365,11 +366,11 @@ verify_cparam(const H5FA_t *fa, const H5FA_create_t *cparam)
/* Retrieve creation parameters */
HDmemset(&test_cparam, 0, sizeof(H5FA_create_t));
- if(H5FA__get_cparam_test(fa, &test_cparam) < 0)
+ if (H5FA__get_cparam_test(fa, &test_cparam) < 0)
FAIL_STACK_ERROR
/* Verify creation parameters */
- if(H5FA__cmp_cparam_test(cparam, &test_cparam))
+ if (H5FA__cmp_cparam_test(cparam, &test_cparam))
TEST_ERROR
/* Success */
@@ -396,23 +397,23 @@ finish(hid_t fid, hid_t fapl_id, H5F_t *f, H5FA_t *fa, haddr_t fa_addr)
h5_stat_size_t file_size; /* File size, after deleting array */
/* Close the fixed array */
- if(H5FA_close(fa) < 0)
+ if (H5FA_close(fa) < 0)
FAIL_STACK_ERROR
/* Delete array */
- if(H5FA_delete(f, fa_addr, NULL) < 0)
+ if (H5FA_delete(f, fa_addr, NULL) < 0)
FAIL_STACK_ERROR
/* Close the file */
- if(H5Fclose(fid) < 0)
+ if (H5Fclose(fid) < 0)
FAIL_STACK_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename_g, fapl_id)) < 0)
+ if ((file_size = h5_get_file_size(filename_g, fapl_id)) < 0)
TEST_ERROR
/* Verify the file is correct size */
- if(file_size != empty_size_g)
+ if (file_size != empty_size_g)
TEST_ERROR
/* Success */
@@ -625,61 +626,61 @@ static unsigned
test_open_twice(hid_t fapl_id, H5FA_create_t *cparam, farray_test_param_t *tparam)
{
hid_t fid = H5I_INVALID_HID; /* File ID */
- hid_t fid2 = H5I_INVALID_HID; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5F_t *f2 = NULL; /* Internal file object pointer */
+ hid_t fid2 = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5F_t *f2 = NULL; /* Internal file object pointer */
H5FA_t *fa = NULL; /* Fixed array wrapper */
H5FA_t *fa2 = NULL; /* Fixed array wrapper */
haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */
/* Create file & retrieve pointer to internal file object */
- if(create_file(fapl_id, &fid, &f) < 0)
+ if (create_file(fapl_id, &fid, &f) < 0)
TEST_ERROR
/* Display testing message */
TESTING("open fixed array twice");
/* Create array */
- if(create_array(f, cparam, &fa, &fa_addr) < 0)
+ if (create_array(f, cparam, &fa, &fa_addr) < 0)
TEST_ERROR
/* Open the array again, through the first file handle */
- if(NULL == (fa2 = H5FA_open(f, fa_addr, NULL)))
+ if (NULL == (fa2 = H5FA_open(f, fa_addr, NULL)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
- if(verify_cparam(fa, cparam) < 0)
+ if (verify_cparam(fa, cparam) < 0)
TEST_ERROR
- if(verify_cparam(fa2, cparam) < 0)
+ if (verify_cparam(fa2, cparam) < 0)
TEST_ERROR
/* Close the second fixed array wrapper */
- if(H5FA_close(fa2) < 0)
+ if (H5FA_close(fa2) < 0)
FAIL_STACK_ERROR
fa2 = NULL;
/* Check for closing & re-opening the file */
- if(reopen_file(&fid, &f, fapl_id, &fa, fa_addr, tparam) < 0)
+ if (reopen_file(&fid, &f, fapl_id, &fa, fa_addr, tparam) < 0)
TEST_ERROR
/* Re-open the file */
- if((fid2 = H5Freopen(fid)) < 0)
+ if ((fid2 = H5Freopen(fid)) < 0)
FAIL_STACK_ERROR
/* Get a pointer to the internal file object */
- if(NULL == (f2 = (H5F_t *)H5I_object(fid2)))
- FAIL_STACK_ERROR
+ if (NULL == (f2 = (H5F_t *)H5VL_object(fid2)))
+ FAIL_STACK_ERROR;
/* Open the fixed array through the second file handle */
- if(NULL == (fa2 = H5FA_open(f2, fa_addr, NULL)))
+ if (NULL == (fa2 = H5FA_open(f2, fa_addr, NULL)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
- if(verify_cparam(fa, cparam) < 0)
+ if (verify_cparam(fa, cparam) < 0)
TEST_ERROR
/* Close the first extensible array wrapper */
- if(H5FA_close(fa) < 0)
+ if (H5FA_close(fa) < 0)
FAIL_STACK_ERROR
fa = NULL;
@@ -687,11 +688,11 @@ test_open_twice(hid_t fapl_id, H5FA_create_t *cparam, farray_test_param_t *tpara
/* (close before second file, to detect error on internal array header's
* shared file information)
*/
- if(H5Fclose(fid) < 0)
+ if (H5Fclose(fid) < 0)
FAIL_STACK_ERROR
/* Close array, delete array, close file & verify file is empty */
- if(finish(fid2, fapl_id, f2, fa2, fa_addr) < 0)
+ if (finish(fid2, fapl_id, f2, fa2, fa_addr) < 0)
TEST_ERROR
/* All tests passed */
@@ -701,9 +702,9 @@ test_open_twice(hid_t fapl_id, H5FA_create_t *cparam, farray_test_param_t *tpara
error:
H5E_BEGIN_TRY {
- if(fa)
+ if (fa)
H5FA_close(fa);
- if(fa2)
+ if (fa2)
H5FA_close(fa2);
H5Fclose(fid);
H5Fclose(fid2);
@@ -732,12 +733,12 @@ static unsigned
test_open_twice_diff(hid_t fapl_id, H5FA_create_t *cparam, farray_test_param_t *tparam)
{
char filename_tmp[FARRAY_FILENAME_LEN]; /* Temporary file name */
- hid_t fid = H5I_INVALID_HID; /* File ID */
- hid_t fid2 = H5I_INVALID_HID; /* File ID */
- hid_t fid0 = H5I_INVALID_HID; /* File ID */
- hid_t fid00 = H5I_INVALID_HID; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5F_t *f2 = NULL; /* Internal file object pointer */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fid2 = H5I_INVALID_HID; /* File ID */
+ hid_t fid0 = H5I_INVALID_HID; /* File ID */
+ hid_t fid00 = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5F_t *f2 = NULL; /* Internal file object pointer */
H5FA_t *fa = NULL; /* Fixed array wrapper */
H5FA_t *fa2 = NULL; /* Fixed array wrapper */
haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */
@@ -746,25 +747,25 @@ test_open_twice_diff(hid_t fapl_id, H5FA_create_t *cparam, farray_test_param_t *
TESTING("open fixed array twice, through different file handles");
/* Create file & retrieve pointer to internal file object */
- if(create_file(fapl_id, &fid, &f) < 0)
+ if (create_file(fapl_id, &fid, &f) < 0)
TEST_ERROR
/* Create array */
- if(create_array(f, cparam, &fa, &fa_addr) < 0)
+ if (create_array(f, cparam, &fa, &fa_addr) < 0)
TEST_ERROR
/* Open the array again, through the first file handle */
- if(NULL == (fa2 = H5FA_open(f, fa_addr, NULL)))
+ if (NULL == (fa2 = H5FA_open(f, fa_addr, NULL)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
- if(verify_cparam(fa, cparam) < 0)
+ if (verify_cparam(fa, cparam) < 0)
TEST_ERROR
- if(verify_cparam(fa2, cparam) < 0)
+ if (verify_cparam(fa2, cparam) < 0)
TEST_ERROR
/* Close the second fixed array wrapper */
- if(H5FA_close(fa2) < 0)
+ if (H5FA_close(fa2) < 0)
FAIL_STACK_ERROR
fa2 = NULL;
@@ -772,15 +773,15 @@ test_open_twice_diff(hid_t fapl_id, H5FA_create_t *cparam, farray_test_param_t *
/* (So that there is something holding the file open when the extensible
* array is closed)
*/
- if((fid0 = H5Fopen(filename_g, H5F_ACC_RDWR, fapl_id)) < 0)
+ if ((fid0 = H5Fopen(filename_g, H5F_ACC_RDWR, fapl_id)) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the file */
- if(reopen_file(&fid, &f, fapl_id, &fa, fa_addr, tparam) < 0)
+ if (reopen_file(&fid, &f, fapl_id, &fa, fa_addr, tparam) < 0)
TEST_ERROR
/* Close the first fixed array wrapper */
- if(H5FA_close(fa) < 0)
+ if (H5FA_close(fa) < 0)
FAIL_STACK_ERROR
fa = NULL;
@@ -788,7 +789,7 @@ test_open_twice_diff(hid_t fapl_id, H5FA_create_t *cparam, farray_test_param_t *
/* (close before second file, to detect error on internal array header's
* shared file information)
*/
- if(H5Fclose(fid) < 0)
+ if (H5Fclose(fid) < 0)
FAIL_STACK_ERROR
fid = H5I_INVALID_HID;
@@ -798,33 +799,33 @@ test_open_twice_diff(hid_t fapl_id, H5FA_create_t *cparam, farray_test_param_t *
* header stale)
*/
h5_fixname(FILENAME[1], fapl_id, filename_tmp, sizeof(filename_tmp));
- if((fid00 = H5Fcreate(filename_tmp, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
+ if ((fid00 = H5Fcreate(filename_tmp, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
FAIL_STACK_ERROR
/* Re-open the file with the fixed array */
- if((fid2 = H5Fopen(filename_g, H5F_ACC_RDWR, fapl_id)) < 0)
+ if ((fid2 = H5Fopen(filename_g, H5F_ACC_RDWR, fapl_id)) < 0)
FAIL_STACK_ERROR
/* Get a pointer to the internal file object */
- if(NULL == (f2 = (H5F_t *)H5I_object(fid2)))
- FAIL_STACK_ERROR
+ if (NULL == (f2 = (H5F_t *)H5VL_object(fid2)))
+ FAIL_STACK_ERROR;
/* Open the fixed array through the second file handle */
- if(NULL == (fa2 = H5FA_open(f2, fa_addr, NULL)))
+ if (NULL == (fa2 = H5FA_open(f2, fa_addr, NULL)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
- if(verify_cparam(fa2, cparam) < 0)
+ if (verify_cparam(fa2, cparam) < 0)
TEST_ERROR
/* Close the extra file handles */
- if(H5Fclose(fid0) < 0)
+ if (H5Fclose(fid0) < 0)
FAIL_STACK_ERROR
- if(H5Fclose(fid00) < 0)
+ if (H5Fclose(fid00) < 0)
FAIL_STACK_ERROR
/* Close array, delete array, close file & verify file is empty */
- if(finish(fid2, fapl_id, f2, fa2, fa_addr) < 0)
+ if (finish(fid2, fapl_id, f2, fa2, fa_addr) < 0)
TEST_ERROR
/* All tests passed */
@@ -834,9 +835,9 @@ test_open_twice_diff(hid_t fapl_id, H5FA_create_t *cparam, farray_test_param_t *
error:
H5E_BEGIN_TRY {
- if(fa)
+ if (fa)
H5FA_close(fa);
- if(fa2)
+ if (fa2)
H5FA_close(fa2);
H5Fclose(fid);
H5Fclose(fid2);
diff --git a/test/fheap.c b/test/fheap.c
index 1af56a6..c7f6ff0 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -30,9 +30,9 @@
/* Other private headers that this test requires */
#include "H5CXprivate.h" /* API Contexts */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5VLprivate.h" /* Virtual Object Layer */
+#include "H5VMprivate.h" /* Vectors and arrays */
/* Max. testfile name length */
#define FHEAP_FILENAME_LEN 1024
@@ -605,7 +605,7 @@ reopen_file(hid_t *file, H5F_t **f, const char *filename, 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
/* Ignore metadata tags in the file's cache */
@@ -656,7 +656,7 @@ open_heap(char *filename, hid_t fapl, 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 */
@@ -698,7 +698,7 @@ open_heap(char *filename, hid_t fapl, 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 */
@@ -1868,7 +1868,7 @@ test_create(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 */
@@ -1986,7 +1986,7 @@ test_reopen(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)))
STACK_ERROR
if(f->shared->fs_strategy == H5F_FSPACE_STRATEGY_PAGE)
@@ -2032,7 +2032,7 @@ test_reopen(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 */
@@ -2140,7 +2140,7 @@ test_open_twice(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)))
STACK_ERROR
if(f->shared->fs_strategy == H5F_FSPACE_STRATEGY_PAGE)
@@ -2195,7 +2195,7 @@ test_open_twice(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 == (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 */
@@ -2314,7 +2314,7 @@ test_delete_open(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)))
STACK_ERROR
/* Ignore metadata tags in the file's cache */
@@ -2387,7 +2387,7 @@ test_delete_open(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 */
@@ -2472,7 +2472,7 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, 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
/* Ignore metadata tags in the file's cache */
@@ -2814,7 +2814,7 @@ test_filtered_create(hid_t fapl, H5HF_create_t *cparam, 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
/* Ignore metadata tags in the file's cache */
@@ -2857,7 +2857,7 @@ test_filtered_create(hid_t fapl, H5HF_create_t *cparam, 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
/* Ignore metadata tags in the file's cache */
@@ -2936,7 +2936,7 @@ test_size(hid_t fapl, H5HF_create_t *cparam, 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
/* Ignore metadata tags in the file's cache */
@@ -2990,7 +2990,7 @@ test_size(hid_t fapl, H5HF_create_t *cparam, 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
/* Ignore metadata tags in the file's cache */
@@ -3078,7 +3078,7 @@ test_reopen_hdr(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
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 */
@@ -3122,7 +3122,7 @@ test_reopen_hdr(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
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 */
@@ -3144,7 +3144,7 @@ test_reopen_hdr(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
/* 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 */
@@ -3216,7 +3216,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 */
@@ -3325,7 +3325,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 */
@@ -3425,7 +3425,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 */
@@ -3521,7 +3521,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 */
@@ -3619,7 +3619,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 */
@@ -3724,7 +3724,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 */
@@ -3830,7 +3830,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 */
@@ -3940,7 +3940,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 */
@@ -4035,7 +4035,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 */
@@ -4137,7 +4137,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 */
@@ -4237,7 +4237,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 */
@@ -4347,7 +4347,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 */
@@ -4443,7 +4443,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 */
@@ -4639,7 +4639,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 */
@@ -4748,7 +4748,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 */
@@ -4850,7 +4850,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 */
@@ -4960,7 +4960,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 */
@@ -5067,7 +5067,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 */
@@ -5164,7 +5164,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 */
@@ -5272,7 +5272,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 */
@@ -5374,7 +5374,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 */
@@ -5483,7 +5483,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 */
@@ -5593,7 +5593,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 */
@@ -5699,7 +5699,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 */
@@ -5806,7 +5806,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 */
@@ -5920,7 +5920,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 */
@@ -6039,7 +6039,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 */
@@ -6150,7 +6150,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 */
@@ -6264,7 +6264,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 */
@@ -6397,7 +6397,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 */
@@ -6549,7 +6549,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 */
@@ -6590,7 +6590,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 */
@@ -6712,7 +6712,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 */
@@ -6753,7 +6753,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 */
@@ -6904,7 +6904,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 */
@@ -6945,7 +6945,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 */
@@ -7072,7 +7072,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 */
@@ -7113,7 +7113,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 */
@@ -7315,7 +7315,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 */
@@ -7356,7 +7356,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 */
@@ -7613,7 +7613,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 */
@@ -13774,7 +13774,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 */
@@ -14950,7 +14950,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 */
@@ -15135,7 +15135,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 */
@@ -15199,7 +15199,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 */
@@ -15235,7 +15235,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 */
@@ -15272,7 +15272,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 */
@@ -15308,7 +15308,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 */
@@ -15946,7 +15946,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 */
@@ -16013,7 +16013,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 */
@@ -16177,7 +16177,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 */
@@ -16207,7 +16207,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/flushrefresh.c b/test/flushrefresh.c
index 42b5e43..92c9f87 100644
--- a/test/flushrefresh.c
+++ b/test/flushrefresh.c
@@ -698,7 +698,6 @@ herr_t test_refresh(void)
/* ================= */
/* Refresh Datatypes */
/* ================= */
-
TESTING("to ensure that H5Trefresh correctly refreshes single datatypes");
/* Verify First Committed Datatype can be refreshed with H5Trefresh */
@@ -718,7 +717,6 @@ herr_t test_refresh(void)
if(H5Oflush(tid2) < 0) TEST_ERROR;
if(end_refresh_verification_process() != 0) TEST_ERROR;
-
PASSED();
/* =============== */
@@ -998,7 +996,7 @@ herr_t refresh_verification(const char * obj_pathname)
check to ensure we didn't erroneously flush the attribute before
starting the verification. */
if(flushed_oinfo.num_attrs != 0)
- PROCESS_ERROR;
+ PROCESS_ERROR;
/* Send Signal to MAIN PROCESS indicating that it can go ahead and modify the
object. */
diff --git a/test/freespace.c b/test/freespace.c
index f397377..0011bd2 100644
--- a/test/freespace.c
+++ b/test/freespace.c
@@ -26,6 +26,7 @@
#include "H5CXprivate.h" /* API Contexts */
#include "H5Iprivate.h"
+#include "H5VLprivate.h" /* Virtual Object Layer */
#include "H5VMprivate.h"
#define FILENAME_LEN 1024
@@ -480,7 +481,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 */
@@ -622,7 +623,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);
@@ -686,7 +687,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);
@@ -756,7 +757,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 */
@@ -825,7 +826,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 */
@@ -946,7 +947,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);
@@ -1334,7 +1335,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);
@@ -1464,7 +1465,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);
@@ -1566,7 +1567,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);
@@ -1801,7 +1802,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);
@@ -1903,7 +1904,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);
@@ -2004,7 +2005,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);
@@ -2142,7 +2143,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);
@@ -2251,7 +2252,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);
@@ -2433,7 +2434,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
/* Tag with the global free space tag */
@@ -2787,7 +2788,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 4dc3fb0..5b51c0e 100644
--- a/test/gheap.c
+++ b/test/gheap.c
@@ -28,6 +28,7 @@
#include "H5HGprivate.h"
#include "H5Iprivate.h"
#include "H5Pprivate.h"
+#include "H5VLprivate.h"
/* Macros for printing error messages in loops. These print up to
* GHEAP_REPEATED_ERR_LIM errors, and suppress the rest */
@@ -96,7 +97,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();
HDputs(" Unable to create file");
goto error;
@@ -203,7 +204,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();
HDputs(" Unable to create file");
goto error;
@@ -302,7 +303,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();
HDputs(" Unable to create file");
goto error;
@@ -392,7 +393,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();
HDputs(" Unable to create file");
goto error;
@@ -485,7 +486,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();
HDputs(" Unable to create file");
goto error;
@@ -529,7 +530,7 @@ test_ooo_indices(hid_t fapl)
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();
HDputs(" Unable to open file");
goto error;
diff --git a/test/h5test.c b/test/h5test.c
index fb5b83d..888fded 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -1901,3 +1901,46 @@ error:
return NULL;
} /* h5_get_dummy_vfd_class */
+
+/*-------------------------------------------------------------------------
+ * Function: h5_get_dummy_vol_class()
+ *
+ * Purpose: Returns a disposable, generally non-functional,
+ * VOL class struct.
+ *
+ * In some of the test code, we need a disposable VOL driver
+ * but we don't want to mess with the real VFDs and we also
+ * don't have access to the internals of the real VOL drivers
+ * (which use static globals and functions) to easily duplicate
+ * them (e.g.: for testing VOL driver ID handling).
+ *
+ * This API call will return a pointer to a VOL class that
+ * can be used to construct a test VOL using H5VLregister().
+ *
+ * Return: Success: A pointer to a VOL class struct
+ * Failure: NULL
+ *
+ *-------------------------------------------------------------------------
+ */
+H5VL_class_t *
+h5_get_dummy_vol_class(void)
+{
+ H5VL_class_t *vol_class = NULL; /* Dummy VOL class that will be returned */
+
+ /* Create the class and initialize everything to zero/NULL */
+ if(NULL == (vol_class = (H5VL_class_t *)HDcalloc((size_t)1, sizeof(H5VL_class_t))))
+ TEST_ERROR;
+
+ /* Fill in the minimum parameters to make a VOL driver class that
+ * can be registered.
+ */
+ vol_class->name = "dummy";
+
+ return vol_class;
+
+error:
+ if(vol_class)
+ HDfree(vol_class);
+ return NULL;
+} /* h5_get_dummy_vol_class */
+
diff --git a/test/h5test.h b/test/h5test.h
index 8e87192..2fb0e0c 100644
--- a/test/h5test.h
+++ b/test/h5test.h
@@ -142,6 +142,7 @@ H5TEST_DLL int print_func(const char *format, ...);
H5TEST_DLL int h5_make_local_copy(const char *origfilename, const char *local_copy_name);
H5TEST_DLL herr_t h5_verify_cached_stabs(const char *base_name[], hid_t fapl);
H5TEST_DLL H5FD_class_t *h5_get_dummy_vfd_class(void);
+H5TEST_DLL H5VL_class_t *h5_get_dummy_vol_class(void);
/* Functions that will replace VFD-dependent functions that violate
* the single responsibility principle. Unlike their predecessors,
diff --git a/test/lheap.c b/test/lheap.c
index d309fb0..e9e626f 100644
--- a/test/lheap.c
+++ b/test/lheap.c
@@ -23,6 +23,7 @@
#include "H5CXprivate.h" /* API Contexts */
#include "H5HLprivate.h"
#include "H5Iprivate.h"
+#include "H5VLprivate.h" /* Virtual Object Layer */
const char *FILENAME[] = {
"lheap",
@@ -78,7 +79,7 @@ main(void)
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
if(FAIL == (file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)))
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;
@@ -128,7 +129,7 @@ main(void)
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
if(FAIL == (file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)))
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;
diff --git a/test/links.c b/test/links.c
index 786aa8f..e0dc39e 100644
--- a/test/links.c
+++ b/test/links.c
@@ -7745,6 +7745,7 @@ done:
case H5I_ATTR:
case H5I_REFERENCE:
case H5I_VFL:
+ case H5I_VOL:
case H5I_GENPROP_CLS:
case H5I_GENPROP_LST:
case H5I_ERROR_CLASS:
@@ -7833,6 +7834,7 @@ done:
case H5I_ATTR:
case H5I_REFERENCE:
case H5I_VFL:
+ case H5I_VOL:
case H5I_GENPROP_CLS:
case H5I_GENPROP_LST:
case H5I_ERROR_CLASS:
diff --git a/test/mf.c b/test/mf.c
index eefd2a1..4dccae6 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -36,6 +36,7 @@
#include "H5CXprivate.h" /* API Contexts */
#include "H5FLprivate.h"
#include "H5Iprivate.h"
+#include "H5VLprivate.h" /* Virtual Object Layer */
#include "H5VMprivate.h"
#define FILENAME_LEN 1024
@@ -255,7 +256,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);
@@ -297,7 +298,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, addr1, (hsize_t)TBLOCK_SIZE30);
@@ -400,7 +401,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);
@@ -432,7 +433,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);
@@ -477,7 +478,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);
@@ -526,7 +527,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);
@@ -569,7 +570,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);
@@ -681,7 +682,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);
@@ -712,7 +713,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 */
@@ -759,7 +760,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);
@@ -899,7 +900,7 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
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 */
@@ -953,7 +954,7 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
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 */
@@ -1061,7 +1062,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 H5FD_MEM_SUPER free-space manager */
@@ -1173,7 +1174,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
/* Start up H5FD_MEM_SUPER free-space manager */
@@ -1250,7 +1251,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
/* Start up H5FD_MEM_SUPER free-space manager */
@@ -1325,7 +1326,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
/* Start up H5FD_MEM_SUPER free-space manager */
@@ -1498,7 +1499,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
/* Start up H5FD_MEM_SUPER free-space manager */
@@ -1606,7 +1607,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
/* Start up H5FD_MEM_SUPER free-space manager */
@@ -1708,7 +1709,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
/* Start up H5FD_MEM_SUPER free-space manager */
@@ -1810,7 +1811,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
/* Start up H5FD_MEM_SUPER free-space manager */
@@ -1982,7 +1983,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
/* Start up H5FD_MEM_SUPER free-space manager */
@@ -2038,7 +2039,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
/* Start up H5FD_MEM_SUPER free-space manager */
@@ -2164,7 +2165,7 @@ test_mf_aggr_alloc1(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)))
TEST_ERROR
/* Allocate first block from meta_aggr */
@@ -2202,7 +2203,7 @@ test_mf_aggr_alloc1(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)))
TEST_ERROR
/* Free the two blocks: order matters because of H5F_FSPACE_STRATEGY_AGGR strategy */
@@ -2305,7 +2306,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;
@@ -2351,7 +2352,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, addr1, (hsize_t)TBLOCK_SIZE30+TBLOCK_SIZE50+TBLOCK_SIZE2058);
@@ -2461,7 +2462,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 */
@@ -2624,7 +2625,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 */
@@ -2772,7 +2773,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 */
@@ -2906,7 +2907,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;
@@ -3073,7 +3074,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 */
@@ -3236,7 +3237,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 */
@@ -3327,7 +3328,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 */
@@ -3397,7 +3398,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 */
@@ -3527,7 +3528,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 */
@@ -3574,7 +3575,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 */
@@ -3633,7 +3634,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 */
@@ -3782,7 +3783,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 */
@@ -3864,7 +3865,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 */
@@ -3886,7 +3887,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 */
@@ -3919,7 +3920,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 */
@@ -3941,7 +3942,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 */
@@ -4041,7 +4042,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
/* Start up H5FD_MEM_SUPER free-space manager */
@@ -4104,7 +4105,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
/* Start up H5FD_MEM_SUPER free-space manager */
@@ -4187,7 +4188,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
/* Start up H5FD_MEM_SUPER free-space manager */
@@ -4407,7 +4408,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 */
@@ -4663,7 +4664,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 */
@@ -5002,7 +5003,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 */
@@ -5303,7 +5304,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 */
@@ -5514,7 +5515,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 */
@@ -5778,7 +5779,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 */
@@ -6028,7 +6029,7 @@ test_mf_bug1(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)))
TEST_ERROR
/* Allocate a block of size align from meta_aggr. This should create an
@@ -6114,7 +6115,7 @@ test_mf_fs_persist_split(void)
TESTING("File's free-space managers are persistent for split-file");
- /* for now, we don't support persistent free space managers
+ /* for now, we don't support persistent free space managers
* with the split file driver.
*/
SKIPPED();
@@ -6124,7 +6125,7 @@ test_mf_fs_persist_split(void)
/* File creation property list template */
if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
- /* for now, we don't support persistent free space managers
+ /* for now, we don't support persistent free space managers
* with the split file driver.
*/
SKIPPED();
@@ -6156,7 +6157,7 @@ test_mf_fs_persist_split(void)
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 */
@@ -6201,7 +6202,7 @@ test_mf_fs_persist_split(void)
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 */
@@ -6286,7 +6287,7 @@ test_mf_fs_persist_split(void)
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 */
@@ -6330,7 +6331,7 @@ test_mf_fs_persist_split(void)
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 */
@@ -6436,14 +6437,14 @@ test_mf_fs_persist_multi(void)
TESTING("File's free-space managers are persistent for multi-file");
- /* for now, we don't support persistent free space managers
+ /* for now, we don't support persistent free space managers
* with the multi file driver.
*/
SKIPPED();
HDfprintf(stdout, " Persistent FSMs disabled in multi file driver.\n");
return 0; /* <========== note return */
- /* for now, we don't support persistent free space managers
+ /* for now, we don't support persistent free space managers
* with the multi file driver.
*/
SKIPPED();
@@ -6473,7 +6474,7 @@ test_mf_fs_persist_multi(void)
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 */
@@ -6518,7 +6519,7 @@ test_mf_fs_persist_multi(void)
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 */
@@ -6600,7 +6601,7 @@ test_mf_fs_persist_multi(void)
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 */
@@ -6666,7 +6667,7 @@ test_mf_fs_persist_multi(void)
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 */
@@ -6778,7 +6779,7 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
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 */
@@ -6812,7 +6813,7 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
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__alloc_to_fs_type(f, type, TBLOCK_SIZE6, (H5F_mem_page_t *)&tt);
@@ -6867,7 +6868,7 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
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 */
@@ -6959,7 +6960,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
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 */
@@ -6993,7 +6994,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
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__alloc_to_fs_type(f, type, TBLOCK_SIZE4, (H5F_mem_page_t *)&fs_type);
@@ -7014,7 +7015,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
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 */
@@ -7071,7 +7072,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
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 */
if(H5F_addr_defined(f->shared->fs_addr[fs_type]))
@@ -7169,7 +7170,7 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
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 */
@@ -7205,13 +7206,13 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
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__alloc_to_fs_type(f, type, TBLOCK_SIZE6, (H5F_mem_page_t *)&tt);
/* 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(f->shared->fs_persist) {
@@ -7341,7 +7342,7 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
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 */
@@ -7424,7 +7425,7 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
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 */
@@ -7498,7 +7499,7 @@ test_dichotomy(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 */
@@ -7658,7 +7659,7 @@ test_page_alloc_xfree(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(fid)))
+ if(NULL == (f = (H5F_t *)H5VL_object(fid)))
TEST_ERROR
/* Allocate 3 small metadata blocks: addr1, addr2, addr3 */
@@ -7727,7 +7728,7 @@ test_page_alloc_xfree(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(fid)))
+ if(NULL == (f = (H5F_t *)H5VL_object(fid)))
TEST_ERROR
/* Verify that the large generic manager is there */
@@ -7869,7 +7870,7 @@ test_page_try_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(fid)))
+ if(NULL == (f = (H5F_t *)H5VL_object(fid)))
FAIL_STACK_ERROR
/* Allocate a small metadata block with addr1 */
@@ -7990,7 +7991,7 @@ test_page_small_try_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(fid)))
+ if(NULL == (f = (H5F_t *)H5VL_object(fid)))
FAIL_STACK_ERROR
/* Allocate a small metadata block with addr1 */
@@ -8144,7 +8145,7 @@ test_page_large_try_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(fid)))
+ if(NULL == (f = (H5F_t *)H5VL_object(fid)))
FAIL_STACK_ERROR
/* Allocate a large data block with gaddr1 */
@@ -8286,7 +8287,7 @@ test_page_large(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(fid)))
+ if(NULL == (f = (H5F_t *)H5VL_object(fid)))
FAIL_STACK_ERROR
/* Allocate a large data block with gaddr1 */
@@ -8442,7 +8443,7 @@ test_page_small(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(fid)))
+ if(NULL == (f = (H5F_t *)H5VL_object(fid)))
FAIL_STACK_ERROR
/* Allocate 2 small metadata blocks: addr1, addr2 */
@@ -8686,7 +8687,7 @@ test_page_alignment(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(fid)))
+ if(NULL == (f = (H5F_t *)H5VL_object(fid)))
TEST_ERROR
/* Allocate 2 small raw data blocks */
@@ -8738,7 +8739,7 @@ test_page_alignment(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(fid)))
+ if(NULL == (f = (H5F_t *)H5VL_object(fid)))
TEST_ERROR
/* Allocate 2 small metadata blocks */
@@ -8799,7 +8800,7 @@ test_page_alignment(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(fid)))
+ if(NULL == (f = (H5F_t *)H5VL_object(fid)))
TEST_ERROR
/* Allocate 2 small raw data blocks */
diff --git a/test/objcopy.c b/test/objcopy.c
index 9aa2265..f13537e 100644
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -23,6 +23,7 @@
#include "H5Iprivate.h"
#include "H5Pprivate.h"
+#include "H5VLprivate.h" /* Virtual Object Layer */
#define H5F_FRIEND /*suppress error about including H5Fpkg */
#define H5F_TESTING
@@ -2179,7 +2180,7 @@ test_copy_dataset_versionbounds(hid_t fcpl_src, hid_t fapl_src)
if (ret < 0) TEST_ERROR
/* Get the internal dset ptr to get the fill version for verifying later */
- if ((dsetp = (H5D_t *)H5I_object(did_src)) == NULL) TEST_ERROR
+ if ((dsetp = (H5D_t *)H5VL_object(did_src)) == NULL) TEST_ERROR
srcdset_fillversion = dsetp->shared->dcpl_cache.fill.version;
/* Close dataspace */
diff --git a/test/ohdr.c b/test/ohdr.c
index ffede25..2b57ada 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -18,6 +18,7 @@
#include "H5CXprivate.h" /* API Contexts */
#include "H5Iprivate.h" /* Identifiers */
+#include "H5VLprivate.h" /* Virtual Object Layer */
/*
* This file needs to access private datatypes from the H5O package.
@@ -78,7 +79,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)
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) {
H5_FAILED();
@@ -200,7 +201,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
@@ -303,17 +304,17 @@ error:
static herr_t
test_ohdr_swmr(hbool_t new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property list */
- hid_t did = -1; /* Dataset ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t plist = -1; /* Dataset creation property list */
- size_t compact_size = 1024; /* The size of compact dataset */
- int *wbuf = NULL; /* Buffer for writing */
- hsize_t dims[1]; /* Dimension sizes */
- size_t u; /* Iterator */
- int n; /* Data variable */
- H5O_info_t obj_info; /* Information for the object */
+ hid_t fid = -1; /* File ID */
+ hid_t fapl = -1; /* File access property list */
+ hid_t did = -1; /* Dataset ID */
+ hid_t sid = -1; /* Dataspace ID */
+ hid_t plist = -1; /* Dataset creation property list */
+ size_t compact_size = 1024; /* The size of compact dataset */
+ int *wbuf = NULL; /* Buffer for writing */
+ hsize_t dims[1]; /* Dimension sizes */
+ size_t u; /* Iterator */
+ int n; /* Data variable */
+ H5O_info_t obj_info; /* Information for the object */
if(new_format) {
TESTING("exercise the coding for the re-read of the object header for SWMR access: latest-format");
@@ -840,7 +841,7 @@ main(void)
/* Create the file to operate on */
if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, 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) {
H5_FAILED();
@@ -938,7 +939,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/page_buffer.c b/test/page_buffer.c
index 79f110c..b9b31f8 100644
--- a/test/page_buffer.c
+++ b/test/page_buffer.c
@@ -24,6 +24,7 @@
#include "H5CXprivate.h" /* API Contexts */
#include "H5Iprivate.h"
#include "H5PBprivate.h"
+#include "H5VLprivate.h" /* Virtual Object Layer */
/*
* This file needs to access private information from the H5F package.
@@ -241,7 +242,7 @@ open_file(char *filename, hid_t fapl, hsize_t page_size,
FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
- if(NULL == (f = (H5F_t *)H5I_object(file_id)))
+ if(NULL == (f = (H5F_t *)H5VL_object(file_id)))
FAIL_STACK_ERROR;
if(f->shared->page_buf == NULL)
@@ -604,7 +605,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
- if(NULL == (f = (H5F_t *)H5I_object(file_id)))
+ if(NULL == (f = (H5F_t *)H5VL_object(file_id)))
FAIL_STACK_ERROR;
/* opening the file inserts one or more pages into the page buffer.
@@ -887,7 +888,7 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
- if(NULL == (f = (H5F_t *)H5I_object(file_id)))
+ if(NULL == (f = (H5F_t *)H5VL_object(file_id)))
FAIL_STACK_ERROR;
/* opening the file inserts one or more pages into the page buffer.
@@ -1146,7 +1147,7 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
- if(NULL == (f = (H5F_t *)H5I_object(file_id)))
+ if(NULL == (f = (H5F_t *)H5VL_object(file_id)))
FAIL_STACK_ERROR;
/* opening the file inserts one or more pages into the page buffer.
@@ -1281,7 +1282,7 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
- if(NULL == (f = (H5F_t *)H5I_object(file_id)))
+ if(NULL == (f = (H5F_t *)H5VL_object(file_id)))
FAIL_STACK_ERROR;
/* opening the file inserts one or more pages into the page buffer.
@@ -1411,7 +1412,7 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
- if(NULL == (f = (H5F_t *)H5I_object(file_id)))
+ if(NULL == (f = (H5F_t *)H5VL_object(file_id)))
FAIL_STACK_ERROR;
/* opening the file inserts one or more pages into the page buffer.
@@ -1552,7 +1553,7 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
if((file_id = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0)
FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
- if(NULL == (f = (H5F_t *)H5I_object(file_id)))
+ if(NULL == (f = (H5F_t *)H5VL_object(file_id)))
FAIL_STACK_ERROR;
page_buf = f->shared->page_buf;
@@ -1776,7 +1777,7 @@ test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
- if(NULL == (f = (H5F_t *)H5I_object(file_id)))
+ if(NULL == (f = (H5F_t *)H5VL_object(file_id)))
FAIL_STACK_ERROR;
/* opening the file inserts one or more pages into the page buffer.
diff --git a/test/swmr.c b/test/swmr.c
index 8f50123..3b2af4e 100644
--- a/test/swmr.c
+++ b/test/swmr.c
@@ -26,6 +26,7 @@
#include "h5test.h"
#include "H5Iprivate.h"
+#include "H5VLprivate.h" /* Virtual Object Layer */
/*
* This file needs to access private information from the H5F package.
@@ -1168,7 +1169,7 @@ test_metadata_read_retry_info(hid_t in_fapl)
TEST_ERROR
/* Get a pointer to the internal file object */
- if((f = (H5F_t *)H5I_object(fid)) == NULL)
+ if((f = (H5F_t *)H5VL_object(fid)) == NULL)
FAIL_STACK_ERROR
/*
@@ -1326,7 +1327,7 @@ test_metadata_read_retry_info(hid_t in_fapl)
FAIL_STACK_ERROR
/* Get a pointer to the internal file object */
- if((f = (H5F_t *)H5I_object(fid)) == NULL)
+ if((f = (H5F_t *)H5VL_object(fid)) == NULL)
FAIL_STACK_ERROR
/* File's superblock: log retry 1 for 1 time */
@@ -1430,7 +1431,7 @@ test_metadata_read_retry_info(hid_t in_fapl)
FAIL_STACK_ERROR
/* Get a pointer to the internal file object for fid */
- if((f = (H5F_t *)H5I_object(fid)) == NULL)
+ if((f = (H5F_t *)H5VL_object(fid)) == NULL)
FAIL_STACK_ERROR
/* Re-open fid */
@@ -1438,7 +1439,7 @@ test_metadata_read_retry_info(hid_t in_fapl)
FAIL_STACK_ERROR
/* Get a pointer to the internal file object for fid1 */
- if((f1 = (H5F_t *)H5I_object(fid1)) == NULL)
+ if((f1 = (H5F_t *)H5VL_object(fid1)) == NULL)
FAIL_STACK_ERROR
/* For fid: fixed array data block page--log retry 9 for 500 times */
@@ -6288,7 +6289,7 @@ test_bug_refresh(hid_t in_fapl)
FAIL_STACK_ERROR
/* Get a pointer to the internal file object */
- if(NULL == (f = (H5F_t *)H5I_object(fid)))
+ if(NULL == (f = (H5F_t *)H5VL_object(fid)))
FAIL_STACK_ERROR
/* Create groups: compact to dense storage */
@@ -6618,8 +6619,8 @@ test_refresh_concur(hid_t in_fapl, hbool_t new_format)
/* Wait for notification from child process */
while(notify != 2) {
- if(HDread(in_pdf[0], &notify, sizeof(int)) < 0)
- FAIL_STACK_ERROR;
+ if(HDread(in_pdf[0], &notify, sizeof(int)) < 0)
+ FAIL_STACK_ERROR;
}
/* Cork the metadata cache, to prevent the object header from being
@@ -7043,7 +7044,7 @@ main(void)
*/
driver = HDgetenv("HDF5_DRIVER");
if(!H5FD__supports_swmr_test(driver)) {
- printf("This VFD does not support SWMR I/O\n");
+ HDprintf("This VFD does not support SWMR I/O\n");
return EXIT_SUCCESS;
} /* end if */
@@ -7133,7 +7134,7 @@ main(void)
if(nerrors)
goto error;
- printf("All tests passed.\n");
+ HDprintf("All tests passed.\n");
h5_cleanup(FILENAME, fapl);
@@ -7141,7 +7142,7 @@ main(void)
error:
nerrors = MAX(1, nerrors);
- printf("***** %d SWMR TEST%s FAILED! *****\n",
+ HDprintf("***** %d SWMR TEST%s FAILED! *****\n",
nerrors, 1 == nerrors ? "" : "S");
return EXIT_FAILURE;
diff --git a/test/testfiles/err_compat_1 b/test/testfiles/err_compat_1
index d81dba1..fc99f77 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 location 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 location 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 02cfed8..473c53e 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: Dataset
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(): filter plugins disabled
+ #007: (file name) line (number) in H5PL_load(): filter plugins disabled
major: Plugin for dynamically loaded library
minor: Unable to load metadata into cache
diff --git a/test/tfile.c b/test/tfile.c
index 0db4c1b..12a0eca 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -24,6 +24,7 @@
#include "H5Iprivate.h"
#include "H5Pprivate.h"
+#include "H5VLprivate.h" /* Virtual Object Layer */
/*
* This file needs to access private information from the H5F package.
@@ -1431,6 +1432,7 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1,
case H5I_ATTR:
case H5I_REFERENCE:
case H5I_VFL:
+ case H5I_VOL:
case H5I_GENPROP_CLS:
case H5I_GENPROP_LST:
case H5I_ERROR_CLASS:
@@ -1586,6 +1588,87 @@ test_file_perm2(void)
} /* end test_file_perm2() */
+/****************************************************************
+**
+** test_file_is_accessible(): low-level file test routine.
+** Clone of test_file_ishdf5 but uses the newer VOL-enabled
+** H5Fis_accessible() API call.
+**
+*****************************************************************/
+static void
+test_file_is_accessible(void)
+{
+ hid_t fid; /* File opened with read-write permission */
+ hid_t fcpl_id; /* File creation property list */
+ int fd; /* POSIX file descriptor */
+ 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 */
+ MESSAGE(5, ("Testing Detection of HDF5 Files\n"));
+
+ /* Create a file */
+ fid = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(fid, FAIL, "H5Fcreate");
+
+ /* Close file */
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Verify that the file is an HDF5 file */
+ status = H5Fis_accessible(FILE1, H5P_DEFAULT);
+ VERIFY(status, TRUE, "H5Fis_accessible");
+
+
+ /* Create a file creation property list with a non-default user block size */
+ fcpl_id = H5Pcreate(H5P_FILE_CREATE);
+ CHECK(fcpl_id, FAIL, "H5Pcreate");
+
+ ret = H5Pset_userblock(fcpl_id, (hsize_t)2048);
+ CHECK(ret, FAIL, "H5Pset_userblock");
+
+ /* Create file with non-default user block */
+ fid = H5Fcreate(FILE1, H5F_ACC_TRUNC, fcpl_id, H5P_DEFAULT);
+ CHECK(fid, FAIL, "H5Fcreate");
+
+ /* Release file-creation property list */
+ ret = H5Pclose(fcpl_id);
+ CHECK(ret, FAIL, "H5Pclose");
+
+ /* Close file */
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Verify that the file is an HDF5 file */
+ status = H5Fis_accessible(FILE1, H5P_DEFAULT);
+ VERIFY(status, TRUE, "H5Fis_accessible");
+
+
+ /* Create non-HDF5 file and check it */
+ fd = HDopen(FILE1, O_RDWR|O_CREAT|O_TRUNC, H5_POSIX_CREATE_MODE_RW);
+ CHECK(fd, FAIL, "HDopen");
+
+ /* Initialize information to write */
+ for (u=0; u<1024; u++)
+ buf[u]=(unsigned char)u;
+
+ /* Write some information */
+ nbytes = HDwrite(fd, buf, (size_t)1024);
+ VERIFY(nbytes, 1024, "HDwrite");
+
+ /* Close the file */
+ ret = HDclose(fd);
+ CHECK(ret, FAIL, "HDclose");
+
+ /* Verify that the file is not an HDF5 file */
+ status = H5Fis_accessible(FILE1, H5P_DEFAULT);
+ VERIFY(status, FALSE, "H5Fis_accessible");
+
+} /* end test_file_is_accessible() */
+
/****************************************************************
**
@@ -1594,6 +1677,7 @@ test_file_perm2(void)
** correctly in variuous situations.
**
*****************************************************************/
+#ifndef H5_NO_DEPRECATED_SYMBOLS
static void
test_file_ishdf5(void)
{
@@ -1607,7 +1691,7 @@ test_file_ishdf5(void)
herr_t ret;
/* Output message about test being performed */
- MESSAGE(5, ("Testing Detection of HDF5 Files\n"));
+ MESSAGE(5, ("Testing Detection of HDF5 Files (using deprecated H5Fis_hdf5() call)\n"));
/* Create a file */
file = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -1667,6 +1751,7 @@ test_file_ishdf5(void)
VERIFY(status, FALSE, "H5Fis_hdf5");
} /* end test_file_ishdf5() */
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
/****************************************************************
**
@@ -5334,8 +5419,8 @@ test_libver_bounds_super_create(hid_t fapl, hid_t fcpl, htri_t is_swmr)
/* Get the internal file pointer if the create succeeds */
if((ok = fid >= 0)) {
- f = (H5F_t *)H5I_object(fid);
- CHECK(f, NULL, "H5I_object");
+ f = (H5F_t *)H5VL_object(fid);
+ CHECK(f, NULL, "H5VL_object");
}
/* Retrieve the low/high bounds */
@@ -5483,8 +5568,8 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr)
CHECK(fid, FAIL, "H5Fcreate");
/* Get the internal file pointer */
- f = (H5F_t *)H5I_object(fid);
- CHECK(f, NULL, "H5I_object");
+ f = (H5F_t *)H5VL_object(fid);
+ CHECK(f, NULL, "H5VL_object");
/* The file's superblock version */
super_vers = f->shared->sblock->super_vers;
@@ -5515,8 +5600,8 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr)
/* Get the internal file pointer if the open succeeds */
if((ok = fid >= 0)) {
- f = (H5F_t *)H5I_object(fid);
- CHECK(f, NULL, "H5I_object");
+ f = (H5F_t *)H5VL_object(fid);
+ CHECK(f, NULL, "H5VL_object");
}
/* Verify the file open succeeds or fails */
@@ -5687,8 +5772,8 @@ test_libver_bounds_obj(hid_t fapl)
if(fid >=0 ) { /* The file open succeeds */
/* Get the internal file pointer */
- f = (H5F_t *)H5I_object(fid);
- CHECK(f, NULL, "H5I_object");
+ f = (H5F_t *)H5VL_object(fid);
+ CHECK(f, NULL, "H5VL_object");
/* Create a group in the file */
gid = H5Gcreate2(fid, GRP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -5795,8 +5880,8 @@ test_libver_bounds_dataset(hid_t fapl)
CHECK(did, FAIL, "H5Dcreate");
/* Get the internal dataset pointer */
- dset = (H5D_t *)H5I_object(did);
- CHECK(dset, NULL, "H5I_object");
+ dset = (H5D_t *)H5VL_object(did);
+ CHECK(dset, NULL, "H5VL_object");
/* Verify version for layout and fill value messages */
if(low == H5F_LIBVER_EARLIEST) {
@@ -5840,8 +5925,8 @@ test_libver_bounds_dataset(hid_t fapl)
if(did >= 0) {
/* Get the internal dataset pointer */
- dset = (H5D_t *)H5I_object(did);
- CHECK(dset, NULL, "H5I_object");
+ dset = (H5D_t *)H5VL_object(did);
+ CHECK(dset, NULL, "H5VL_object");
/* Verify layout message version and chunk indexing type */
VERIFY(dset->shared->layout.version, H5O_LAYOUT_VERSION_4, "H5O_layout_ver_bounds");
@@ -5898,16 +5983,16 @@ test_libver_bounds_dataset(hid_t fapl)
if(fid >=0 ) { /* The file open succeeds */
/* Get the internal file pointer */
- f = (H5F_t *)H5I_object(fid);
- CHECK(f, NULL, "H5I_object");
+ f = (H5F_t *)H5VL_object(fid);
+ CHECK(f, NULL, "H5VL_object");
/* Create the chunked dataset */
did = H5Dcreate2(fid, DSETC, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
CHECK(did, FAIL, "H5Dcreate2");
/* Get the internal file pointer */
- dset = (H5D_t *)H5I_object(did);
- CHECK(dset, NULL, "H5I_object");
+ dset = (H5D_t *)H5VL_object(did);
+ CHECK(dset, NULL, "H5VL_object");
/* Verify the dataset's layout, fill value and filter pipeline message versions */
/* Also verify the chunk indexing type */
@@ -6114,8 +6199,8 @@ test_libver_bounds_dataspace(hid_t fapl)
if(fid >=0 ) { /* The file open succeeds */
/* Get the internal file pointer */
- f = (H5F_t *)H5I_object(fid);
- CHECK(f, NULL, "H5I_object");
+ f = (H5F_t *)H5VL_object(fid);
+ CHECK(f, NULL, "H5VL_object");
/* Create the chunked dataset */
did = H5Dcreate2(fid, DSETA, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
@@ -6436,14 +6521,14 @@ test_libver_bounds_datatype_check(hid_t fapl, hid_t tid)
if(fid >= 0 ) { /* The file open succeeds */
/* Get the internal file pointer */
- f = (H5F_t *)H5I_object(fid);
- CHECK(f, NULL, "H5I_object");
+ f = (H5F_t *)H5VL_object(fid);
+ CHECK(f, NULL, "H5VL_object");
/* Open the committed datatype */
str_tid = H5Topen2(fid, "datatype", H5P_DEFAULT);
CHECK(str_tid, FAIL, "H5Topen2");
- str_dtype = (H5T_t *)H5I_object(str_tid);
- CHECK(str_dtype, NULL, "H5I_object");
+ str_dtype = (H5T_t *)H5VL_object(str_tid);
+ CHECK(str_dtype, NULL, "H5VL_object");
/* Verify the committed datatype message version */
VERIFY(str_dtype->shared->version, H5O_dtype_ver_bounds[H5F_LIBVER_EARLIEST], "H5O_dtype_ver_bounds");
@@ -6594,8 +6679,8 @@ test_libver_bounds_attributes(hid_t fapl)
CHECK(aid, FAIL, "H5Acreate2");
/* Get the internal attribute pointer */
- attr = (H5A_t *)H5I_object(aid);
- CHECK(attr, NULL, "H5I_object");
+ attr = (H5A_t *)H5VL_object(aid);
+ CHECK(attr, NULL, "H5VL_object");
/* Verify the attribute version */
if(low == H5F_LIBVER_EARLIEST)
@@ -6613,8 +6698,8 @@ test_libver_bounds_attributes(hid_t fapl)
CHECK(aid, FAIL, "H5Acreate2");
/* Get the internal attribute pointer */
- attr = (H5A_t *)H5I_object(aid);
- CHECK(attr, NULL, "H5I_object");
+ attr = (H5A_t *)H5VL_object(aid);
+ CHECK(attr, NULL, "H5VL_object");
/* Verify attribute version */
VERIFY(attr->shared->version, H5O_attr_ver_bounds[low], "H5O_attr_ver_bounds");
@@ -6634,8 +6719,8 @@ test_libver_bounds_attributes(hid_t fapl)
CHECK(aid, FAIL, "H5Acreate2");
/* Get internal attribute pointer */
- attr = (H5A_t *)H5I_object(aid);
- CHECK(attr, NULL, "H5I_object");
+ attr = (H5A_t *)H5VL_object(aid);
+ CHECK(attr, NULL, "H5VL_object");
/* Verify attribute version */
if(low == H5F_LIBVER_EARLIEST)
@@ -6699,8 +6784,8 @@ test_libver_bounds_attributes(hid_t fapl)
CHECK(aid, FAIL, "H5Acreate2");
/* Get the internal attribute pointer */
- attr = (H5A_t *)H5I_object(aid);
- CHECK(attr, NULL, "H5I_object");
+ attr = (H5A_t *)H5VL_object(aid);
+ CHECK(attr, NULL, "H5VL_object");
/* Verify the attribute version */
if(low == H5F_LIBVER_EARLIEST)
@@ -6757,8 +6842,8 @@ test_libver_bounds_attributes(hid_t fapl)
if(fid >=0 ) { /* The file open succeeds */
/* Get the internal file pointer */
- f = (H5F_t *)H5I_object(fid);
- CHECK(f, NULL, "H5I_object");
+ f = (H5F_t *)H5VL_object(fid);
+ CHECK(f, NULL, "H5VL_object");
/* Open the group */
gid = H5Gopen2(fid, GRP_NAME, H5P_DEFAULT);
@@ -6769,8 +6854,8 @@ test_libver_bounds_attributes(hid_t fapl)
CHECK(aid, FAIL, "H5Acreate2");
/* Get the internal attribute pointer */
- attr = (H5A_t *)H5I_object(aid);
- CHECK(attr, NULL, "H5I_object");
+ attr = (H5A_t *)H5VL_object(aid);
+ CHECK(attr, NULL, "H5VL_object");
/* Verify the attribute message version */
VERIFY(attr->shared->version, H5O_attr_ver_bounds[f->shared->low_bound], "H5O_attr_ver_bounds");
@@ -7295,7 +7380,7 @@ test_file(void)
test_get_obj_ids(); /* Test H5Fget_obj_ids for Jira Issue 8528 */
test_file_perm(); /* Test file access permissions */
test_file_perm2(); /* Test file access permission again */
- test_file_ishdf5(); /* Test detecting HDF5 files correctly */
+ test_file_is_accessible(); /* 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 */
@@ -7330,6 +7415,7 @@ test_file(void)
test_libver_macros2(); /* Test the macros for library version comparison */
test_incr_filesize(); /* Test H5Fincrement_filesize() and H5Fget_eoa() */
#ifndef H5_NO_DEPRECATED_SYMBOLS
+ test_file_ishdf5(); /* Test detecting HDF5 files correctly */
test_deprec(); /* Test deprecated routines */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
} /* test_file() */
diff --git a/test/tmisc.c b/test/tmisc.c
index 47c0606..9eed5db 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -2717,7 +2717,7 @@ test_misc15(void)
CHECK(ret, FAIL, "H5Fclose");
/* Verify that the file is still OK */
- ret = H5Fis_hdf5(MISC15_FILE);
+ ret = H5Fis_accessible(MISC15_FILE, fapl);
CHECK(ret, FAIL, "H5Fis_hdf5");
ret = H5Pclose(fapl);
@@ -3028,7 +3028,9 @@ test_misc19(void)
hid_t emid = -1; /* Error Message ID */
hid_t esid = -1; /* Error Stack ID */
hid_t vfdid = -1; /* Virtual File Driver ID */
+ hid_t volid = -1; /* Virtual Object Layer ID */
H5FD_class_t *vfd_cls = NULL; /* VFD class */
+ H5VL_class_t *vol_cls = NULL; /* VOL class */
int rc; /* Reference count */
herr_t ret; /* Generic return value */
@@ -3479,6 +3481,44 @@ test_misc19(void)
HDfree(vfd_cls);
+/* Check H5I operations on virtual object drivers */
+
+ /* Get a VOL class to register */
+ vol_cls = h5_get_dummy_vol_class();
+ CHECK(vol_cls, NULL, "h5_get_dummy_vol_class");
+
+ /* Register a virtual object driver */
+ volid = H5VLregister(vol_cls);
+ CHECK(volid, FAIL, "H5VLregister");
+
+ /* Check the reference count */
+ rc = H5Iget_ref(volid);
+ VERIFY(rc, 1, "H5Iget_ref");
+
+ /* Increment the reference count */
+ rc = H5Iinc_ref(volid);
+ VERIFY(rc, 2, "H5Iinc_ref");
+
+ /* Unregister the VOL driver normally */
+ ret = H5VLunregister(volid);
+ CHECK(ret, FAIL, "H5VLunregister");
+
+ /* Check the reference count */
+ rc = H5Iget_ref(volid);
+ VERIFY(rc, 1, "H5Iget_ref");
+
+ /* Unregister the VOL driver by decrementing the reference count */
+ rc = H5Idec_ref(volid);
+ VERIFY(rc, 0, "H5Idec_ref");
+
+ /* Try unregistering the VOL driver again (should fail) */
+ H5E_BEGIN_TRY {
+ ret = H5VLunregister(volid);
+ } H5E_END_TRY;
+ VERIFY(ret, FAIL, "H5VLunregister");
+
+ HDfree(vol_cls);
+
} /* end test_misc19() */
/****************************************************************
diff --git a/test/ttsafe_error.c b/test/ttsafe_error.c
index 4160d3a..e04ddf3 100644
--- a/test/ttsafe_error.c
+++ b/test/ttsafe_error.c
@@ -38,7 +38,7 @@
/* Having a common dataset name is an error */
#define DATASETNAME "commonname"
-#define EXPECTED_ERROR_DEPTH 7
+#define EXPECTED_ERROR_DEPTH 9
#define WRITE_NUMBER 37
/* Typedefs */
@@ -73,23 +73,29 @@ tts_error(void)
expected_g[0].maj_num = H5E_DATASET;
expected_g[0].min_num = H5E_CANTINIT;
- expected_g[1].maj_num = H5E_DATASET;
+ expected_g[1].maj_num = H5E_VOL;
expected_g[1].min_num = H5E_CANTINIT;
- expected_g[2].maj_num = H5E_LINK;
+ expected_g[2].maj_num = H5E_DATASET;
expected_g[2].min_num = H5E_CANTINIT;
- expected_g[3].maj_num = H5E_LINK;
- expected_g[3].min_num = H5E_CANTINSERT;
+ expected_g[3].maj_num = H5E_DATASET;
+ expected_g[3].min_num = H5E_CANTINIT;
- expected_g[4].maj_num = H5E_SYM;
- expected_g[4].min_num = H5E_NOTFOUND;
+ expected_g[4].maj_num = H5E_LINK;
+ expected_g[4].min_num = H5E_CANTINIT;
- expected_g[5].maj_num = H5E_SYM;
- expected_g[5].min_num = H5E_CALLBACK;
+ expected_g[5].maj_num = H5E_LINK;
+ expected_g[5].min_num = H5E_CANTINSERT;
- expected_g[6].maj_num = H5E_LINK;
- expected_g[6].min_num = H5E_EXISTS;
+ expected_g[6].maj_num = H5E_SYM;
+ expected_g[6].min_num = H5E_NOTFOUND;
+
+ expected_g[7].maj_num = H5E_SYM;
+ expected_g[7].min_num = H5E_CALLBACK;
+
+ expected_g[8].maj_num = H5E_LINK;
+ expected_g[8].min_num = H5E_EXISTS;
/* set up mutex for global count of errors */
H5TS_mutex_init(&error_mutex_g);
diff --git a/test/vds_swmr_reader.c b/test/vds_swmr_reader.c
index 42721d5..16f3abe 100644
--- a/test/vds_swmr_reader.c
+++ b/test/vds_swmr_reader.c
@@ -97,7 +97,6 @@ main(void)
TEST_ERROR
if(H5Dread(did, H5T_NATIVE_INT, msid, fsid, H5P_DEFAULT, buffer) < 0)
TEST_ERROR
-
if(H5Sclose(fsid) < 0)
TEST_ERROR
diff --git a/test/vol.c b/test/vol.c
new file mode 100644
index 0000000..3152a93
--- /dev/null
+++ b/test/vol.c
@@ -0,0 +1,956 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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 COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Purpose: Tests the virtual object layer (H5VL)
+ *
+ * This is a minimal test to ensure VOL usage (setting a VOL, etc.)
+ * works as expected. Actual VOL functionality is tested using
+ * other mechanisms.
+ */
+
+#include "h5test.h"
+#include "H5VLnative.h"
+
+
+#define NATIVE_VOL_TEST_FILENAME "native_vol_test"
+#define NATIVE_VOL_TEST_GROUP_NAME "test_group"
+#define NATIVE_VOL_TEST_DATASET_NAME "test_dataset"
+#define NATIVE_VOL_TEST_ATTRIBUTE_NAME "test_dataset"
+#define NATIVE_VOL_TEST_HARD_LINK_NAME "test_hard_link"
+#define NATIVE_VOL_TEST_SOFT_LINK_NAME "test_soft_link"
+#define NATIVE_VOL_TEST_MOVE_LINK_NAME "test_move_link"
+#define NATIVE_VOL_TEST_COPY_LINK_NAME "test_copy_link"
+#define NATIVE_VOL_TEST_DATATYPE_NAME "test_datatype"
+
+#define N_ELEMENTS 10
+
+#define FAKE_VOL_NAME "fake"
+
+/* A VOL class struct that describes a VOL class with no
+ * functionality.
+ */
+static const H5VL_class_t fake_vol_g = {
+ 0, /* version */
+ (H5VL_class_value_t)999, /* value */
+ FAKE_VOL_NAME, /* name */
+ NULL, /* initialize */
+ NULL, /* terminate */
+ (size_t)0, /* fapl size */
+ NULL, /* fapl copy */
+ NULL, /* fapl free */
+ { /* attribute_cls */
+ NULL, /* create */
+ NULL, /* open */
+ NULL, /* read */
+ NULL, /* write */
+ NULL, /* get */
+ NULL, /* specific */
+ NULL, /* optional */
+ NULL /* close */
+ },
+ { /* dataset_cls */
+ NULL, /* create */
+ NULL, /* open */
+ NULL, /* read */
+ NULL, /* write */
+ NULL, /* get */
+ NULL, /* specific */
+ NULL, /* optional */
+ NULL /* close */
+ },
+ { /* datatype_cls */
+ NULL, /* commit */
+ NULL, /* open */
+ NULL, /* get_size */
+ NULL, /* specific */
+ NULL, /* optional */
+ NULL /* close */
+ },
+ { /* file_cls */
+ NULL, /* create */
+ NULL, /* open */
+ NULL, /* get */
+ NULL, /* specific */
+ NULL, /* optional */
+ NULL /* close */
+ },
+ { /* group_cls */
+ NULL, /* create */
+ NULL, /* open */
+ NULL, /* get */
+ NULL, /* specific */
+ NULL, /* optional */
+ NULL /* close */
+ },
+ { /* link_cls */
+ NULL, /* create */
+ NULL, /* copy */
+ NULL, /* move */
+ NULL, /* get */
+ NULL, /* specific */
+ NULL /* optional */
+ },
+ { /* object_cls */
+ NULL, /* open */
+ NULL, /* copy */
+ NULL, /* get */
+ NULL, /* specific */
+ NULL /* optional */
+ },
+ { /* async_cls */
+ NULL, /* cancel */
+ NULL, /* test */
+ NULL /* wait */
+ },
+ NULL /* optional */
+};
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_vol_registration()
+ *
+ * Purpose: Tests if we can load, register, and close a simple
+ * VOL driver.
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_vol_registration(void)
+{
+ htri_t is_registered;
+ hid_t vol_id = -1;
+
+ TESTING("VOL registration");
+
+ /* The test/fake VOL driver should not be registered at the start of the test */
+ if ((is_registered = H5VLis_registered(FAKE_VOL_NAME)) < 0)
+ FAIL_STACK_ERROR;
+ if (is_registered > 0)
+ FAIL_PUTS_ERROR("native VOL driver is inappropriately registered");
+
+ /* Load a VOL interface */
+ if ((vol_id = H5VLregister(&fake_vol_g)) < 0)
+ FAIL_STACK_ERROR;
+
+ /* The test/fake VOL driver should be registered now */
+ if ((is_registered = H5VLis_registered(FAKE_VOL_NAME)) < 0)
+ FAIL_STACK_ERROR;
+ if (0 == is_registered)
+ FAIL_PUTS_ERROR("native VOL driver is un-registered");
+
+ /* Close the VOL interface */
+ if (H5VLclose(vol_id) < 0)
+ FAIL_STACK_ERROR;
+
+ PASSED();
+ return SUCCEED;
+
+error:
+ H5E_BEGIN_TRY {
+ H5VLclose(vol_id);
+ } H5E_END_TRY;
+ return FAIL;
+
+} /* end test_vol_registration() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_native_vol_init()
+ *
+ * Purpose: Tests if the native VOL driver gets initialized.
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_native_vol_init(void)
+{
+ htri_t is_registered;
+
+ TESTING("Native VOL driver initialization");
+
+ /* The native VOL driver should always be registered */
+ if ((is_registered = H5VLis_registered(H5VL_NATIVE_NAME)) < 0)
+ FAIL_STACK_ERROR;
+ if (0 == is_registered)
+ FAIL_PUTS_ERROR("native VOL driver is un-registered");
+
+ PASSED();
+ return SUCCEED;
+
+error:
+ return FAIL;
+
+} /* end test_native_vol_init() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_basic_file_operation()
+ *
+ * Purpose: Uses the native VOL driver to test basic VOL file operations
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_basic_file_operation(void)
+{
+ hid_t fid = H5I_INVALID_HID;
+ hid_t fid_reopen = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t fcpl_id = H5I_INVALID_HID;
+
+ ssize_t obj_count;
+ hid_t obj_id_list[1];
+ hsize_t file_size;
+ unsigned intent;
+ void *os_file_handle = NULL;
+ H5F_info2_t finfo;
+ char name[32];
+
+ TESTING("Basic VOL file operations");
+
+ /* H5Fcreate */
+ if ((fid = H5Fcreate(NATIVE_VOL_TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* H5Fget_obj_count */
+ if ((obj_count = H5Fget_obj_count(fid, H5F_OBJ_FILE)) < 0)
+ TEST_ERROR;
+ if ((obj_count = H5Fget_obj_count(fid, H5F_OBJ_ALL)) < 0)
+ TEST_ERROR;
+ if ((obj_count = H5Fget_obj_count((hid_t)H5F_OBJ_ALL, H5F_OBJ_DATASET)) < 0)
+ TEST_ERROR;
+
+ /* H5Fget_obj_ids */
+ if ((obj_count = H5Fget_obj_ids(fid, H5F_OBJ_ALL, 2, obj_id_list)) < 0)
+ TEST_ERROR;
+ if ((obj_count = H5Fget_obj_ids((hid_t)H5F_OBJ_ALL, H5F_OBJ_DATASET, 2, obj_id_list)) < 0)
+ TEST_ERROR;
+
+ /* H5Fget_access_plist */
+ if ((fapl_id = H5Fget_access_plist(fid)) < 0)
+ TEST_ERROR;
+ if (H5Pclose(fapl_id) < 0)
+ TEST_ERROR;
+
+ /* H5Fget_create_plist */
+ if ((fcpl_id = H5Fget_create_plist(fid)) < 0)
+ TEST_ERROR;
+ if (H5Pclose(fcpl_id) < 0)
+ TEST_ERROR;
+
+ /* H5Fget_filesize */
+ if (H5Fget_filesize(fid, &file_size) < 0)
+ TEST_ERROR;
+
+ /* H5Fget_vfd_handle */
+ if (H5Fget_vfd_handle(fid, H5P_DEFAULT, &os_file_handle) < 0)
+ TEST_ERROR;
+
+ /* H5Fget_intent */
+ if (H5Fget_intent(fid, &intent) < 0)
+ TEST_ERROR;
+
+ /* H5Fget_info2 */
+ if (H5Fget_info2(fid, &finfo) < 0)
+ TEST_ERROR;
+
+ /* H5Fget_name */
+ if (H5Fget_name(fid, name, 32) < 0)
+ TEST_ERROR;
+
+ /* H5Fclear_elink_file_cache */
+ if (H5Fclear_elink_file_cache(fid) < 0)
+ TEST_ERROR;
+
+ /* H5Fflush */
+ if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0)
+ TEST_ERROR;
+
+ /* H5Fclose */
+ if (H5Fclose(fid) < 0)
+ TEST_ERROR;
+
+ /* H5Fis_accessible */
+ if (H5Fis_accessible(NATIVE_VOL_TEST_FILENAME, H5P_DEFAULT) < 0)
+ TEST_ERROR;
+
+ /* H5Fopen */
+ if ((fid = H5Fopen(NATIVE_VOL_TEST_FILENAME, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+ if ((fid_reopen = H5Freopen(fid)) < 0)
+ TEST_ERROR;
+ if (H5Fclose(fid) < 0)
+ TEST_ERROR;
+ if (H5Fclose(fid_reopen) < 0)
+ TEST_ERROR;
+
+ HDremove(NATIVE_VOL_TEST_FILENAME);
+
+ PASSED();
+ return SUCCEED;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Fclose(fid);
+ H5Fclose(fid_reopen);
+ H5Pclose(fapl_id);
+ H5Pclose(fcpl_id);
+ } H5E_END_TRY;
+
+ return FAIL;
+
+} /* end test_basic_file_operation() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_basic_group_operation()
+ *
+ * Purpose: Uses the native VOL driver to test basic VOL group operations
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_basic_group_operation(void)
+{
+ hid_t fid = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t gid_a = H5I_INVALID_HID;
+ hid_t gcpl_id = H5I_INVALID_HID;
+ H5G_info_t info;
+
+ TESTING("Basic VOL group operations");
+
+ if ((fid = H5Fcreate(NATIVE_VOL_TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* H5Gcreate */
+ if ((gid = H5Gcreate2(fid, NATIVE_VOL_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* H5Gget_create_plist */
+ if ((gcpl_id = H5Gget_create_plist(gid)) < 0)
+ TEST_ERROR;
+ if (H5Pclose(gcpl_id) < 0)
+ TEST_ERROR;
+
+ /* H5Gget_info */
+ if (H5Gget_info(gid, &info) < 0)
+ TEST_ERROR;
+ if (H5Gget_info(fid, &info) < 0)
+ TEST_ERROR;
+
+ /* H5Gget_info_by_name */
+ if (H5Gget_info_by_name(fid, NATIVE_VOL_TEST_GROUP_NAME, &info, H5P_DEFAULT) < 0)
+ TEST_ERROR;
+
+ /* H5Gget_info_by_idx */
+ if (H5Gget_info_by_idx(fid, "/", H5_INDEX_NAME, H5_ITER_NATIVE, 0, &info, H5P_DEFAULT) < 0)
+ TEST_ERROR;
+
+ /* H5Gflush */
+ if (H5Gflush(gid) < 0)
+ TEST_ERROR;
+
+ /* H5Gclose */
+ if (H5Gclose(gid) < 0)
+ TEST_ERROR;
+
+ /* H5Gopen */
+ if ((gid = H5Gopen2(fid, NATIVE_VOL_TEST_GROUP_NAME, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* H5Gcreate_anon */
+ if ((gid_a = H5Gcreate_anon(fid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* H5Grefresh */
+ if (H5Grefresh(gid) < 0)
+ TEST_ERROR;
+
+ if (H5Gclose(gid) < 0)
+ TEST_ERROR;
+ if (H5Gclose(gid_a) < 0)
+ TEST_ERROR;
+ if (H5Fclose(fid) < 0)
+ TEST_ERROR;
+
+ HDremove(NATIVE_VOL_TEST_FILENAME);
+
+ PASSED();
+ return SUCCEED;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Fclose(fid);
+ H5Gclose(gid);
+ H5Pclose(gcpl_id);
+ } H5E_END_TRY;
+
+ return FAIL;
+
+} /* end test_basic_group_operation() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_basic_dataset_operation()
+ *
+ * Purpose: Uses the native VOL driver to test basic VOL dataset operations
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_basic_dataset_operation(void)
+{
+ hid_t fid = H5I_INVALID_HID;
+ hid_t dcpl_id = H5I_INVALID_HID;
+ hid_t dapl_id = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t did_a = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+
+ hsize_t curr_dims = 0;
+ hsize_t max_dims = H5S_UNLIMITED;
+
+ hsize_t storage_size;
+ haddr_t offset;
+ H5D_space_status_t status;
+
+ int in_buf[N_ELEMENTS];
+ int out_buf[N_ELEMENTS];
+
+ int i;
+
+ TESTING("Basic VOL dataset operations");
+
+ if ((fid = H5Fcreate(NATIVE_VOL_TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+ for (i = 0; i < N_ELEMENTS; i++) {
+ in_buf[i] = i;
+ out_buf[i] = 0;
+ }
+
+ /* H5Dcreate */
+ curr_dims = 0;
+ if ((sid = H5Screate_simple(1, &curr_dims, &max_dims)) < 0)
+ TEST_ERROR;
+ curr_dims = N_ELEMENTS;
+ if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ TEST_ERROR;
+ if (H5Pset_chunk(dcpl_id, 1, &curr_dims) < 0)
+ TEST_ERROR;
+ if ((did = H5Dcreate2(fid, NATIVE_VOL_TEST_DATASET_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* H5Dcreate_anon */
+ if ((did_a = H5Dcreate_anon(fid, H5T_NATIVE_INT, sid, dcpl_id, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ if (H5Sclose(sid) < 0)
+ TEST_ERROR;
+ if (H5Pclose(dcpl_id) < 0)
+ TEST_ERROR;
+
+ /* H5Dset_extent */
+ curr_dims = N_ELEMENTS;
+ if (H5Dset_extent(did, &curr_dims) < 0)
+ TEST_ERROR;
+
+ /* H5Dflush */
+ if (H5Dflush(did) < 0)
+ TEST_ERROR;
+
+ /* H5Dwrite */
+ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, in_buf) < 0)
+ TEST_ERROR;
+
+ /* H5Drefresh */
+ if (H5Drefresh(did) < 0)
+ TEST_ERROR;
+
+ /* H5Dclose */
+ if (H5Dclose(did) < 0)
+ TEST_ERROR;
+ if (H5Dclose(did_a) < 0)
+ TEST_ERROR;
+
+ /* H5Dopen */
+ if ((did = H5Dopen2(fid, NATIVE_VOL_TEST_DATASET_NAME, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* H5Dget_space */
+ if ((sid = H5Dget_space(did)) < 0)
+ TEST_ERROR;
+ if (H5Sclose(sid) < 0)
+ TEST_ERROR;
+
+ /* H5Dget_space_status */
+ if (H5Dget_space_status(did, &status) < 0)
+ TEST_ERROR;
+
+ /* H5Dget_type */
+ if ((tid = H5Dget_type(did)) < 0)
+ TEST_ERROR;
+ if (H5Tclose(tid) < 0)
+ TEST_ERROR;
+
+ /* H5Tcopy (when used w/ a dataset, it gets an H5VL struct */
+ if ((tid = H5Tcopy(did)) < 0)
+ TEST_ERROR;
+ if (H5Tclose(tid) < 0)
+ TEST_ERROR;
+
+ /* H5Dget_create_plist */
+ if ((dcpl_id = H5Dget_create_plist(did)) < 0)
+ TEST_ERROR;
+ if (H5Pclose(dcpl_id) < 0)
+ TEST_ERROR;
+
+ /* H5Dget_access_plist */
+ if ((dapl_id = H5Dget_access_plist(did)) < 0)
+ TEST_ERROR;
+ if (H5Pclose(dapl_id) < 0)
+ TEST_ERROR;
+
+ /* H5Dget_storage_size */
+ /* XXX: This is a terrible API call that can't truly indicate failure */
+ if (0 == (storage_size = H5Dget_storage_size(did)))
+ TEST_ERROR;
+
+ /* H5Dget_offset */
+ /* XXX: Another bad API call that can't flag error values. Also, this
+ * returns HADDR_UNDEF for chunked datasets, which is bizarre.
+ */
+ if (HADDR_UNDEF != (offset = H5Dget_offset(did)))
+ TEST_ERROR;
+
+ /* H5Dread */
+ if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, out_buf) < 0)
+ TEST_ERROR;
+
+ for (i = 0; i < N_ELEMENTS; i++)
+ if (in_buf[i] != out_buf[i])
+ TEST_ERROR;
+
+ if (H5Dclose(did) < 0)
+ TEST_ERROR;
+ if (H5Fclose(fid) < 0)
+ TEST_ERROR;
+
+ HDremove(NATIVE_VOL_TEST_FILENAME);
+
+ PASSED();
+ return SUCCEED;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Fclose(fid);
+ H5Dclose(did);
+ H5Dclose(did_a);
+ H5Sclose(sid);
+ H5Tclose(tid);
+ H5Pclose(dapl_id);
+ H5Pclose(dcpl_id);
+ } H5E_END_TRY;
+
+ return FAIL;
+
+} /* end test_basic_dataset_operation() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_basic_attribute_operation()
+ *
+ * Purpose: Uses the native VOL driver to test basic VOL attribute operations
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_basic_attribute_operation(void)
+{
+ hid_t fid = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t aid = H5I_INVALID_HID;
+ hid_t aid_name = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+
+ hsize_t dims = 1;
+
+ int data_in = 42;
+ int data_out = 0;
+
+ TESTING("Basic VOL attribute operations");
+
+ if ((fid = H5Fcreate(NATIVE_VOL_TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+ if ((gid = H5Gcreate2(fid, NATIVE_VOL_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+ dims = 1;
+ if ((sid = H5Screate_simple(1, &dims, &dims)) < 0)
+ TEST_ERROR;
+
+ /* H5Acreate */
+ if ((aid = H5Acreate2(fid, NATIVE_VOL_TEST_ATTRIBUTE_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* H5Awrite */
+ if (H5Awrite(aid, H5T_NATIVE_INT, &data_in) < 0)
+ TEST_ERROR;
+
+ /* H5Aread */
+ if (H5Aread(aid, H5T_NATIVE_INT, &data_out) < 0)
+ TEST_ERROR;
+ if (data_in != data_out)
+ TEST_ERROR;
+
+ /* H5Aclose */
+ if (H5Aclose(aid) < 0)
+ TEST_ERROR;
+
+ /* H5Aopen */
+ if ((aid = H5Aopen(fid, NATIVE_VOL_TEST_ATTRIBUTE_NAME, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+ if (H5Aclose(aid) < 0)
+ TEST_ERROR;
+
+ /* H5Adelete */
+ if (H5Adelete(fid, NATIVE_VOL_TEST_ATTRIBUTE_NAME) < 0)
+ TEST_ERROR;
+
+ /* H5Acreate_by_name */
+ if ((aid_name = H5Acreate_by_name(fid, NATIVE_VOL_TEST_GROUP_NAME, NATIVE_VOL_TEST_ATTRIBUTE_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+ /* H5Aclose */
+ if (H5Aclose(aid_name) < 0)
+ TEST_ERROR;
+
+ /* H5Adelete_by_name */
+ if (H5Adelete_by_name(fid, NATIVE_VOL_TEST_GROUP_NAME, NATIVE_VOL_TEST_ATTRIBUTE_NAME, H5P_DEFAULT) < 0)
+ TEST_ERROR;
+
+ if (H5Sclose(sid) < 0)
+ TEST_ERROR;
+ if (H5Gclose(gid) < 0)
+ TEST_ERROR;
+ if (H5Fclose(fid) < 0)
+ TEST_ERROR;
+
+ HDremove(NATIVE_VOL_TEST_FILENAME);
+
+ PASSED();
+ return SUCCEED;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Fclose(fid);
+ H5Gclose(gid);
+ H5Sclose(sid);
+ H5Aclose(aid);
+ H5Aclose(aid_name);
+ } H5E_END_TRY;
+
+ return FAIL;
+
+} /* end test_basic_attribute_operation() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_basic_object_operation()
+ *
+ * Purpose: Uses the native VOL driver to test basic VOL object operations
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_basic_object_operation(void)
+{
+ hid_t fid = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t oid = H5I_INVALID_HID;
+
+ H5O_info_t object_info;
+
+ TESTING("Basic VOL object operations");
+
+ if ((fid = H5Fcreate(NATIVE_VOL_TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+ if ((gid = H5Gcreate2(fid, NATIVE_VOL_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* H5Oget_info */
+ if (H5Oget_info2(fid, &object_info, H5O_INFO_ALL) < 0)
+ TEST_ERROR;
+
+ /* H5Oget_info_by_name */
+ if (H5Oget_info_by_name2(fid, NATIVE_VOL_TEST_GROUP_NAME, &object_info, H5O_INFO_ALL, H5P_DEFAULT) < 0)
+ TEST_ERROR;
+
+ /* H5Oexists_by_name */
+ if (H5Oexists_by_name(fid, NATIVE_VOL_TEST_GROUP_NAME, H5P_DEFAULT) != TRUE)
+ TEST_ERROR;
+
+ /* H5Oopen/close */
+ if ((oid = H5Oopen(fid, NATIVE_VOL_TEST_GROUP_NAME, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+ if (H5Oclose(oid) < 0)
+ TEST_ERROR;
+
+ if (H5Fclose(fid) < 0)
+ TEST_ERROR;
+ if (H5Gclose(gid) < 0)
+ TEST_ERROR;
+
+ HDremove(NATIVE_VOL_TEST_FILENAME);
+
+ PASSED();
+ return SUCCEED;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Fclose(fid);
+ H5Gclose(gid);
+ } H5E_END_TRY;
+
+ return FAIL;
+
+} /* end test_basic_object_operation() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_basic_link_operation()
+ *
+ * Purpose: Uses the native VOL driver to test basic VOL link operations
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_basic_link_operation(void)
+{
+ hid_t fid = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID;
+
+ TESTING("Basic VOL link operations");
+
+ if ((fid = H5Fcreate(NATIVE_VOL_TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+ if ((gid = H5Gcreate2(fid, NATIVE_VOL_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* H5Lcreate_hard */
+ if (H5Lcreate_hard(fid, "/", gid, NATIVE_VOL_TEST_HARD_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ TEST_ERROR;
+
+ /* H5Lcreate_soft (to itself) */
+ if (H5Lcreate_soft("/", fid, NATIVE_VOL_TEST_SOFT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ TEST_ERROR;
+
+ /* H5Lexists */
+ if (H5Lexists(gid, NATIVE_VOL_TEST_HARD_LINK_NAME, H5P_DEFAULT) < 0)
+ TEST_ERROR;
+ if (H5Lexists(fid, NATIVE_VOL_TEST_SOFT_LINK_NAME, H5P_DEFAULT) < 0)
+ TEST_ERROR;
+
+ /* H5Lcopy */
+ if (H5Lcopy(gid, NATIVE_VOL_TEST_HARD_LINK_NAME, fid, NATIVE_VOL_TEST_COPY_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ TEST_ERROR;
+
+ /* H5Lmove */
+ if (H5Lmove(fid, NATIVE_VOL_TEST_COPY_LINK_NAME, gid, NATIVE_VOL_TEST_MOVE_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ TEST_ERROR;
+
+ if (H5Fclose(fid) < 0)
+ TEST_ERROR;
+ if (H5Gclose(gid) < 0)
+ TEST_ERROR;
+
+ HDremove(NATIVE_VOL_TEST_FILENAME);
+
+ PASSED();
+ return SUCCEED;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Fclose(fid);
+ H5Fclose(gid);
+ } H5E_END_TRY;
+
+ return FAIL;
+
+} /* end test_basic_link_operation() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_basic_datatype_operation()
+ *
+ * Purpose: Uses the native VOL driver to test basic VOL datatype operations
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_basic_datatype_operation(void)
+{
+ hid_t fid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t tid_anon = H5I_INVALID_HID;
+ hid_t tcpl_id = H5I_INVALID_HID;
+
+ TESTING("Basic VOL datatype operations");
+
+ if ((fid = H5Fcreate(NATIVE_VOL_TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0)
+ TEST_ERROR;
+
+ /* H5Tcommit */
+ if (H5Tcommit2(fid, NATIVE_VOL_TEST_DATATYPE_NAME, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ TEST_ERROR;
+
+ /* H5Tflush */
+ if (H5Tflush(tid) < 0)
+ TEST_ERROR;
+
+ /* H5Trefresh */
+ if (H5Trefresh(tid) < 0)
+ TEST_ERROR;
+
+ /* H5Tclose */
+ if (H5Tclose(tid) < 0)
+ TEST_ERROR;
+
+ /* H5Topen */
+ if ((tid = H5Topen2(fid, NATIVE_VOL_TEST_DATATYPE_NAME, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* H5Tget_create_plist */
+ if ((tcpl_id = H5Tget_create_plist(tid)) < 0)
+ TEST_ERROR;
+
+ /* H5Tcommit_anon */
+ if ((tid_anon = H5Tcopy(H5T_NATIVE_INT)) < 0)
+ TEST_ERROR;
+ if (H5Tcommit_anon(fid, tid_anon, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ TEST_ERROR;
+
+ if (H5Pclose(tcpl_id) < 0)
+ TEST_ERROR;
+ if (H5Tclose(tid) < 0)
+ TEST_ERROR;
+ if (H5Tclose(tid_anon) < 0)
+ TEST_ERROR;
+ if (H5Fclose(fid) < 0)
+ TEST_ERROR;
+
+ HDremove(NATIVE_VOL_TEST_FILENAME);
+
+ PASSED();
+ return SUCCEED;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Pclose(tcpl_id);
+ H5Fclose(fid);
+ H5Tclose(tid);
+ H5Tclose(tid_anon);
+ } H5E_END_TRY;
+
+ return FAIL;
+
+} /* end test_basic_datatype_operation() */
+
+#if 0
+
+/*-------------------------------------------------------------------------
+ * Function: test_echo_vol_operation()
+ *
+ * Purpose: Uses the echo VOL driver to test basic VOL operations
+ * via the H5VL public API.
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_echo_vol_operation(void)
+{
+ char name[25];
+
+ TESTING("Echo VOL operations");
+
+ PASSED();
+ return SUCCEED;
+
+error:
+ return FAIL;
+
+} /* end test_basic_vol_operation() */
+#endif
+
+
+/*-------------------------------------------------------------------------
+ * Function: main
+ *
+ * Purpose: Tests the virtual object layer interface (H5VL)
+ *
+ * Return: EXIT_SUCCESS/EXIT_FAILURE
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+main(void)
+{
+ int nerrors = 0;
+
+ h5_reset();
+
+ HDputs("Testing basic Virtual Object Layer (VOL) functionality.");
+
+ nerrors += test_vol_registration() < 0 ? 1 : 0;
+ nerrors += test_native_vol_init() < 0 ? 1 : 0;
+ nerrors += test_basic_file_operation() < 0 ? 1 : 0;
+ nerrors += test_basic_group_operation() < 0 ? 1 : 0;
+ nerrors += test_basic_dataset_operation() < 0 ? 1 : 0;
+ nerrors += test_basic_attribute_operation() < 0 ? 1 : 0;
+ nerrors += test_basic_object_operation() < 0 ? 1 : 0;
+ nerrors += test_basic_link_operation() < 0 ? 1 : 0;
+ nerrors += test_basic_datatype_operation() < 0 ? 1 : 0;
+
+ if (nerrors) {
+ HDprintf("***** %d Virtual Object Layer TEST%s FAILED! *****\n",
+ nerrors, nerrors > 1 ? "S" : "");
+ HDexit(EXIT_FAILURE);
+ }
+
+ HDputs("All Virtual Object Layer (VOL) tests passed.");
+
+ HDexit(EXIT_SUCCESS);
+
+} /* end main() */
+