diff options
author | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2019-05-16 20:05:12 (GMT) |
---|---|---|
committer | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2019-05-16 20:05:12 (GMT) |
commit | 32c4900e89d845f0490bdbabddd2aab9c42165de (patch) | |
tree | 9696fb9367034965b4d9624c6277f2a5b61c9ec8 /fortran/test | |
parent | 1d6641ee3af65bdbe5e0f1f8fa56be8ea52dd5d7 (diff) | |
download | hdf5-32c4900e89d845f0490bdbabddd2aab9c42165de.zip hdf5-32c4900e89d845f0490bdbabddd2aab9c42165de.tar.gz hdf5-32c4900e89d845f0490bdbabddd2aab9c42165de.tar.bz2 |
removed VOLL NULL connector and replaced it with native VOL
Diffstat (limited to 'fortran/test')
-rw-r--r-- | fortran/test/Makefile.am | 23 | ||||
-rw-r--r-- | fortran/test/null_vol_connector.c | 2 | ||||
-rw-r--r-- | fortran/test/vol_connector.F90 | 49 |
3 files changed, 23 insertions, 51 deletions
diff --git a/fortran/test/Makefile.am b/fortran/test/Makefile.am index ef6cd7e..9e03996 100644 --- a/fortran/test/Makefile.am +++ b/fortran/test/Makefile.am @@ -30,8 +30,6 @@ noinst_LTLIBRARIES=libh5test_fortran.la # want to build a shared C library and a static Fortran library. If so, # pass the -static flag to the library linker. if FORTRAN_SHARED_CONDITIONAL - TEST_SCRIPT = test_vol_connector.sh - SCRIPT_DEPEND = vol_connector$(EXEEXT) else AM_LDFLAGS+=-static endif @@ -39,26 +37,9 @@ endif check_SCRIPTS = $(TEST_SCRIPT) # Our main targets, the tests themselves -TEST_PROG=fortranlib_test fflush1 fflush2 fortranlib_test_1_8 fortranlib_test_F03 +TEST_PROG=fortranlib_test fflush1 fflush2 fortranlib_test_1_8 fortranlib_test_F03 vol_connector check_PROGRAMS=$(TEST_PROG) -if FORTRAN_SHARED_CONDITIONAL - check_PROGRAMS+= vol_connector -endif - -if FORTRAN_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 += libnull_vol_connector.la - - # VOL plugin test libraries - # - # null_vol_connector is used for testing basic VOL plugin functionality. - libnull_vol_connector_la_SOURCES=null_vol_connector.c - libnull_vol_connector_la_LDFLAGS=$(AM_LDFLAGS) -avoid-version -module -shared -export-dynamic -rpath /nowhere -endif - libh5test_fortran_la_SOURCES = tf_gen.F90 tf.F90 t.c @@ -117,8 +98,6 @@ H5_test_buildiface_SOURCES = H5_test_buildiface.F90 H5_test_buildiface_LDADD = -DISTCLEANFILES=test_vol_connector.sh # TODO:CHECK IF WORKS MSB - # fflush2 depends on files created by fflush1 fflush2.chkexe_: fflush1.chkexe_ diff --git a/fortran/test/null_vol_connector.c b/fortran/test/null_vol_connector.c index 00a22b8..e30a659 100644 --- a/fortran/test/null_vol_connector.c +++ b/fortran/test/null_vol_connector.c @@ -127,6 +127,8 @@ H5VL_file_create(const char *name) { hid_t under_fapl; H5VL_t *file; + + printf(" H5VL_file_create \n"); file = (H5VL_t *)calloc(1, sizeof(H5VL_t)); diff --git a/fortran/test/vol_connector.F90 b/fortran/test/vol_connector.F90 index 7810c97..7f19d79 100644 --- a/fortran/test/vol_connector.F90 +++ b/fortran/test/vol_connector.F90 @@ -31,9 +31,8 @@ MODULE VOL_TMOD USE THDF5_F03 IMPLICIT NONE - - INTEGER, PARAMETER :: NULL_VOL_CONNECTOR_VALUE = 160 - CHARACTER(LEN=18), PARAMETER :: NULL_VOL_CONNECTOR_NAME = "null_vol_connector" + INTEGER, PARAMETER :: NATIVE_VOL_CONNECTOR_VALUE = 0 + CHARACTER(LEN=6), PARAMETER :: NATIVE_VOL_CONNECTOR_NAME = "native" CONTAINS @@ -57,50 +56,47 @@ CONTAINS INTEGER(hid_t) :: vol_id = 0, vol_id_out = 1 CHARACTER(LEN=64) :: name INTEGER(SIZE_T) :: name_len + INTEGER(hid_t) :: file_id INTEGER :: cmp = -1 -! CHARACTER(LEN=12) :: filename = "h5null.posix" -! INTEGER(HID_T) :: file_id ! The null VOL connector should not be registered at the start of the test - CALL H5VLis_connector_registered_f( NULL_VOL_CONNECTOR_NAME, is_registered, error) + CALL H5VLis_connector_registered_f( "FAKE_VOL_CONNECTOR_NAME", is_registered, error) CALL check("H5VLis_connector_registered_f",error,total_error) CALL VERIFY("H5VLis_connector_registered_f", is_registered, .FALSE., total_error) ! Register the connector by name - CALL H5VLregister_connector_by_name_f(NULL_VOL_CONNECTOR_NAME, vol_id, error) + CALL H5VLregister_connector_by_name_f(NATIVE_VOL_CONNECTOR_NAME, vol_id, error) CALL check("H5VLregister_connector_by_name_f",error,total_error) ! The connector should be registered now - CALL H5VLis_connector_registered_f(NULL_VOL_CONNECTOR_NAME, is_registered, error) + CALL H5VLis_connector_registered_f(NATIVE_VOL_CONNECTOR_NAME, is_registered, error) CALL check("H5VLis_connector_registered_f",error,total_error) CALL VERIFY("H5VLis_connector_registered_f", is_registered, .TRUE., total_error) - CALL H5VLget_connector_id_f(NULL_VOL_CONNECTOR_NAME, vol_id_out, error) + CALL H5VLget_connector_id_f(NATIVE_VOL_CONNECTOR_NAME, vol_id_out, error) CALL check("H5VLget_connector_id_f",error,total_error) - PRINT*,vol_id_out + CALL H5Fcreate_f("voltest.h5",H5F_ACC_TRUNC_F, file_id, error) + CALL check("H5F_create_f",error,total_error) - CALL H5VLget_connector_name_f(vol_id_out, name, error, name_len) + CALL H5VLget_connector_name_f(file_id, name, error, name_len) CALL check("H5VLget_connector_name_f",error,total_error) + CALL VERIFY("H5VLget_connector_name_f", INT(name_len), LEN_TRIM(NATIVE_VOL_CONNECTOR_NAME), total_error) - ! CALL H5VLget_connector_name_f(vol_id_out, name, error) - ! CALL check("H5VLget_connector_name_f",error,total_error) + CALL H5VLget_connector_name_f(file_id, name, error) + CALL check("H5VLget_connector_name_f",error,total_error) + CALL VERIFY("H5VLget_connector_name_f", name, NATIVE_VOL_CONNECTOR_NAME, total_error) - CALL H5VLcmp_connector_cls_f( cmp, vol_id_out, vol_id, error) - CALL check("H5VLcmp_connector_cls_f",error, total_error) - CALL VERIFY("H5VLcmp_connector_cls_f", cmp, 0, total_error) + CALL H5Fclose_f(file_id, error) + CALL check("H5Fclose_f",error,total_error) CALL H5VLclose_f(vol_id_out, error) + CALL check("H5VLclose_f",error, total_error) ! Unregister the connector CALL H5VLunregister_connector_f(vol_id, error) CALL check("H5VLunregister_connector_f", error, total_error) - ! The connector should not be registered now - CALL H5VLis_connector_registered_f( NULL_VOL_CONNECTOR_NAME, is_registered, error) - CALL check("H5VLis_connector_registered_f",error,total_error) - CALL VERIFY("H5VLis_connector_registered_f", is_registered, .FALSE., total_error) - END SUBROUTINE test_registration_by_name !------------------------------------------------------------------------- @@ -123,16 +119,16 @@ CONTAINS ! The null VOL connector should not be registered at the start of the test - CALL H5VLis_connector_registered_f( NULL_VOL_CONNECTOR_NAME, is_registered, error) + CALL H5VLis_connector_registered_f( "FAKE_VOL_CONNECTOR_NAME", is_registered, error) CALL check("H5VLis_connector_registered_f",error,total_error) CALL VERIFY("H5VLis_connector_registered_f", is_registered, .FALSE., total_error) ! Register the connector by value - CALL H5VLregister_connector_by_value_f(NULL_VOL_CONNECTOR_VALUE, vol_id, error) + CALL H5VLregister_connector_by_value_f(NATIVE_VOL_CONNECTOR_VALUE, vol_id, error) CALL check("H5VLregister_connector_by_value_f", error, total_error) ! The connector should be registered now - CALL H5VLis_connector_registered_f(NULL_VOL_CONNECTOR_NAME, is_registered, error) + CALL H5VLis_connector_registered_f(NATIVE_VOL_CONNECTOR_NAME, is_registered, error) CALL check("H5VLis_connector_registered_f",error,total_error) CALL VERIFY("H5VLis_connector_registered_f", is_registered, .TRUE., total_error) @@ -140,11 +136,6 @@ CONTAINS CALL H5VLunregister_connector_f(vol_id, error) CALL check("H5VLunregister_connector_f", error, total_error) - ! The connector should not be registered now - CALL H5VLis_connector_registered_f( NULL_VOL_CONNECTOR_NAME, is_registered, error) - CALL check("H5VLis_connector_registered_f",error,total_error) - CALL VERIFY("H5VLis_connector_registered_f", is_registered, .FALSE., total_error) - END SUBROUTINE test_registration_by_value END MODULE VOL_TMOD |