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

Fix output_yaml tests #1604

Merged
merged 1 commit into from
Oct 24, 2024
Merged

Fix output_yaml tests #1604

merged 1 commit into from
Oct 24, 2024

Conversation

J-Lentz
Copy link
Contributor

@J-Lentz J-Lentz commented Oct 23, 2024

Description
This fixes an issue where the filename argument of write_yaml_from_struct_3 is passed as a Fortran-style string, when a null-terminated string is expected. When the test is built with the Cray compiler, this issue causes test.yaml to be created with junk characters at the end of the filename, which causes a "file not found" error when the test subsequently attempts to read the file.

How Has This Been Tested?
output_yaml test builds, runs, and passes with CCE 18 on C5.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included
  • make distcheck passes

This fixes an issue where the filename argument of `write_yaml_from_struct_3` is
passed as a Fortran-style string, when a null-terminated string is expected.
When built with the Cray compiler, this issue causes `test.yaml` to be created
with junk characters at the end of the filename.
Copy link
Contributor

@uramirez8707 uramirez8707 left a comment

Choose a reason for hiding this comment

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

c_null_char strikes again!

@rem1776 rem1776 merged commit fd1b606 into NOAA-GFDL:main Oct 24, 2024
28 checks passed
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.

4 participants