Skip to content

Commit

Permalink
fixed promotion of integers and reals tests and check-passthrough-vol…
Browse files Browse the repository at this point in the history
… failure
  • Loading branch information
brtnfld committed Mar 14, 2024
1 parent 112f445 commit fd6d1ee
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
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
13 changes: 10 additions & 3 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 @@ -461,7 +468,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

0 comments on commit fd6d1ee

Please sign in to comment.