Skip to content

Commit

Permalink
Merge branch 'HDFGroup:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoklee authored Mar 15, 2024
2 parents c1cdde7 + c7c8b93 commit 847aeb2
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 15 deletions.
6 changes: 4 additions & 2 deletions config/conclude.am
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,12 @@ if MIRROR_VFD_CONDITIONAL
# VFD_LIST += mirror
endif
if ROS3_VFD_CONDITIONAL
VFD_LIST += ros3
# This would require a custom test suite
# VFD_LIST += ros3
endif
if HDFS_VFD_CONDITIONAL
VFD_LIST += hdfs
# This would require a custom test suite
# VFD_LIST += hdfs
endif
if SUBFILING_VFD_CONDITIONAL
# Several VFD tests fail with Subfiling since it
Expand Down
25 changes: 19 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,25 @@ saved_user_LDFLAGS="$LDFLAGS"
saved_user_CPPFLAGS="$CPPFLAGS"

## Strip out -Werror from CFLAGS since that can cause checks to fail when
## compiling the test program fails due to warnings
CFLAGS="`echo $CFLAGS | sed -e 's/-Werror//g'`"
CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-Werror//g'`"
FCFLAGS="`echo $FCFLAGS | sed -e 's/-Werror//g'`"
JAVACFLAGS="`echo $JAVACFLAGS | sed -e 's/-Werror//g'`"
CPPFLAGS="`echo $CPPFLAGS | sed -e 's/-Werror//g'`"
## compiling test programs fails due to warnings
##
## Regex:
##
## -Werror Literal -Werror
## \( Start optional capturing group
## = Literal equals sign
## [^[:space:]-] Non-space characters
## \+ 1 or more of the above
## \) End optional capturing group
## \? 0 or 1 capturing group matches
##
WERROR_SED= "sed -e 's/-Werror\(=[^[:space:]]\+\)\?//g'"

CFLAGS="`echo $CFLAGS | $WERROR_SED`"
CXXFLAGS="`echo $CXXFLAGS | $WERROR_SED`"
FCFLAGS="`echo $FCFLAGS | $WERROR_SED`"
JAVACFLAGS="`echo $JAVACFLAGS | $WERROR_SED`"
CPPFLAGS="`echo $CPPFLAGS | $WERROR_SED`"

## Support F9X variable to define Fortran compiler if FC variable is
## not used. This should be deprecated in the future.
Expand Down
2 changes: 1 addition & 1 deletion fortran/test/fortranlib_test_F03.F90
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ PROGRAM fortranlibtest_F03

ret_total_error = 0
CALL test_error(ret_total_error)
CALL write_test_status(ret_total_error, ' Test error API based on data I/O', total_error)
CALL write_test_status(ret_total_error, ' Testing error API based on data I/O', total_error)

ret_total_error = 0
CALL test_array_compound_atomic(ret_total_error)
Expand Down
23 changes: 18 additions & 5 deletions fortran/test/tH5E_F03.F90
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ SUBROUTINE test_error(total_error)
TYPE(C_FUNPTR) :: func
CHARACTER(LEN=180) :: chr180
INTEGER :: idx
INTEGER(HID_T) :: fapl

LOGICAL :: status

Expand All @@ -209,8 +210,14 @@ SUBROUTINE test_error(total_error)
CALL H5Eset_auto_f(1, error, H5E_DEFAULT_F, func, f_ptr)
CALL check("H5Eset_auto_f", error, total_error)

CALL h5fopen_f("DOESNOTEXIST", H5F_ACC_RDONLY_F, file, error)
! If a fapl is not created, then the test will fail when using
! check-passthrough-vol because the callback function is called twice, gh #4137.
CALL h5pcreate_f(H5P_DATASET_ACCESS_F, fapl, error)
CALL check("h5pcreate_f", error, total_error)
CALL h5fopen_f("DOESNOTEXIST", H5F_ACC_RDONLY_F, file, error, fapl)
CALL VERIFY("h5fopen_f", error, -1, total_error)
CALL h5pclose_f(fapl,error)
CALL check("h5pclose_f", error, total_error)

CLOSE(iunit)

Expand Down Expand Up @@ -247,7 +254,7 @@ SUBROUTINE test_error_stack(total_error)
INTEGER(HID_T) :: cls_id, major, minor, estack_id, estack_id1, estack_id2
CHARACTER(LEN=18), TARGET :: file
CHARACTER(LEN=18), TARGET :: func
INTEGER , TARGET :: line
INTEGER(C_INT) , TARGET :: line
TYPE(C_PTR) :: ptr1, ptr2, ptr3, ptr4

INTEGER :: msg_type
Expand Down Expand Up @@ -288,9 +295,9 @@ SUBROUTINE test_error_stack(total_error)
CALL check("h5ecreate_stack_f", error, total_error)

! push a custom error message onto the stack
CALL H5Epush_f(estack_id, cls_id, major, minor, "%s ERROR TEXT %s"//C_NEW_LINE, error, &
CALL H5Epush_f(estack_id, cls_id, major, minor, "%s ERROR TEXT %s %s", error, &
ptr1, ptr2, ptr3, &
arg1=ACHAR(27)//"[31m", arg2=ACHAR(27)//"[0m" )
arg1=ACHAR(27)//"[31m", arg2=ACHAR(27)//"[0m", arg3=ACHAR(10) )
CALL check("H5Epush_f", error, total_error)

CALL h5eget_num_f(estack_id, count, error)
Expand Down Expand Up @@ -374,6 +381,12 @@ SUBROUTINE test_error_stack(total_error)
IF(.NOT.status)THEN
CALL check("h5eprint_f", -1, total_error)
ELSE
! The contents of the file should be:
! Custom error class-DIAG: Error detected in H5E_F03 (0.1) thread 0:
! #000: FILE line 99 in FUNC(): ERROR TEXT
!
! major: MAJOR MSG
! minor: MIN MSG
OPEN(UNIT=12, FILE="H5Etest.txt", status='old')

READ(12,'(A)') chr180
Expand Down Expand Up @@ -461,7 +474,7 @@ SUBROUTINE test_error_stack(total_error)
CALL check("h5eget_num_f", error, total_error)
CALL VERIFY("h5eget_num_f", count, 1_SIZE_T, total_error)

CALL h5epop_f(H5E_DEFAULT_F, 1_size_t, total_error)
CALL h5epop_f(H5E_DEFAULT_F, 1_size_t, error)
CALL check("h5epop_f", error, total_error)

CALL h5eget_num_f(H5E_DEFAULT_F, count, error)
Expand Down
2 changes: 1 addition & 1 deletion fortran/test/tH5T_F03.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1441,7 +1441,7 @@ SUBROUTINE t_enum(total_error)
!
! Create dataspace. Setting maximum size to be the current size.
!
CALL h5screate_simple_f(2, dims, space, total_error)
CALL h5screate_simple_f(2, dims, space, error)
CALL check("h5screate_simple_f",error, total_error)
!
! Create the dataset and write the enumerated data to it.
Expand Down
14 changes: 14 additions & 0 deletions release_docs/RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,20 @@ Support for new platforms, languages and compilers

Bug Fixes since HDF5-1.14.0 release
===================================
Configuration:
-------------
- Fix Autotools -Werror cleanup

The Autotools temporarily scrub -Werror(=whatever) from CFLAGS, etc.
so configure checks don't trip over warnings generated by configure
check programs. The sed line originally only scrubbed -Werror but not
-Werror=something, which would cause errors when the '=something' was
left behind in CFLAGS.

The sed line has been updated to handle -Werror=something lines.

Fixes one issue raised in #3872

Library
-------
- Fixed asserts raised by large values of H5Pset_est_link_info() parameters
Expand Down
9 changes: 9 additions & 0 deletions test/dsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -5899,6 +5899,14 @@ test_floattypes(hid_t file)
if ((datatype = H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0)
goto error;

/* Skip creating a custom floating-point type when long double
* is the IBM long double. The library detects different formats
* for the type on big-endian vs. little-endian systems and will
* cause this to fail on little-endian systems while passing on
* big-endian systems. The library needs proper support for the
* IBM long double type before we can test this.
*/
#if LDBL_MANT_DIG != 106
/* Get the layout of the native long double type */
if (H5Tget_fields(datatype, &ld_spos, &ld_epos, &ld_esize, &ld_mpos, &ld_msize) < 0)
goto error;
Expand All @@ -5919,6 +5927,7 @@ test_floattypes(hid_t file)
if (H5Tset_size(datatype, 16) < 0)
goto error;
}
#endif

/* Create the data space */
if ((space = H5Screate_simple(2, size, NULL)) < 0)
Expand Down

0 comments on commit 847aeb2

Please sign in to comment.