-
-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
H5fget_name_f len_trim fix #826
Changes from 5 commits
0f07e8b
4b5838b
d7a9c29
8c4bf97
bae6643
fcafa75
4ed79b8
bc27305
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -532,13 +532,24 @@ SUBROUTINE reopentest(cleanup, total_error) | |
! | ||
CALL h5dopen_f(reopen_id, dsetname, dset_id, error) | ||
CALL check("h5dopen_f",error,total_error) | ||
|
||
! Populate filename buffer with whitespace | ||
do i = 1,80 | ||
file_name(i:i) = " " | ||
end do | ||
|
||
! | ||
!Get file name from the dataset identifier | ||
! | ||
CALL h5fget_name_f(dset_id, file_name, name_size, error) | ||
CALL check("h5fget_name_f",error,total_error) | ||
IF(file_name(1:name_size) .NE. fix_filename(1:name_size)) THEN | ||
IF(name_size /= 9) THEN | ||
write(*,*) "file name obtained from the dataset id has wrong length" | ||
call check("h5fget_name_f",-1,total_error) | ||
END IF | ||
IF(file_name(1:name_size) /= fix_filename(1:name_size)) THEN | ||
write(*,*) "file name obtained from the dataset id is incorrect" | ||
call check("h5fget_name_f",-1,total_error) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would leave in the old test and add a new test:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The size should always be correct, just the filename would be wrong since the buffer size given was zero. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I pushed some changes reverting my edits to reopentest and adding a new test focusing on h5fget_name_f. |
||
END IF | ||
|
||
! | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, change the declaration (line 827):
CHARACTER(LEN=*), INTENT(OUT) :: buf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in new PR.