Skip to content
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

added more CI testing #456

Merged
merged 1 commit into from
Apr 24, 2023
Merged

added more CI testing #456

merged 1 commit into from
Apr 24, 2023

Conversation

jbathegit
Copy link
Collaborator

@jbathegit jbathegit commented Apr 22, 2023

Part of #445
Part of #349
Part of #33

This increases total test coverage to 83.7% (lines) and 66.1% (branches), by filling in some missing testing gaps in copysb, cpyupd, iok2cpy, ipkm, lmsg, mesgbc, msgupd, nmwrd, and ufbcpy.

The i8bm (8-byte integer wrapper) is now also fully tested for ipkm, lmsg, mesgbc, and nmwrd.

@@ -81,8 +72,17 @@ RECURSIVE SUBROUTINE STATUS(LUNIT,LUN,IL,IM)
C SEE IF UNIT IS ALREADY CONNECTED TO BUFR ARCHIVE LIBRARY SOFTWARE
C -----------------------------------------------------------------

IF ( .NOT. ALLOCATED(IOLUN) ) THEN
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should call bort().

I don't see how the user can proceed with any function which tries to call status() before initialization of the internal arrays. So even if status() issues a warning and returns, there will still be a segfault when the function calling status tries to use internal memory.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since status returns lun=0 in this case, the program will know that openbf has not been called yet and could then do that. In other words it could be asking that question. But there is ambiguity because lun returned as zero could also mean there is no more table space to open a file, which is a different matter with a different solution. Lun could return -1 in one case to clear that up. Plus there should also be at least an errwrt if there's no more file table space. Thanks @edwardhartnett for pointing out the contradiction. And certainly borting is also a reasonable alternative for either problem.

@jbathegit jbathegit merged commit bba469b into develop Apr 24, 2023
@jbathegit jbathegit deleted the jba-moretests branch April 24, 2023 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants