Skip to content

v5.0.x: configury: remove whitespace from "conftestval"-style tests #13289

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

Open
wants to merge 2 commits into
base: v5.0.x
Choose a base branch
from

Conversation

jsquyres
Copy link
Member

@jsquyres jsquyres commented Jun 4, 2025

Several configure tests write integer result values to files and then do something like foo=$(cat conftestval). However, if the conftestval file contains whitespace around the integer value (e.g., if conftestval was written by a Fortran test code), then $foo will still contain that whitespace, too -- which then propagates throughout the configury and elsewhere.

This commit uses xargs to strip off the whitespace. There's really only one place where this is happening that is a problem, but let's do it in all places where we foo=$(cat conftestval) with integer results, just as a matter of consistency and defensive programming.

Thanks to Lisandro Dalcin (@dalcinl) for raising the issue.

Fixes #13285.

This is the v5.0.x PR corresponding to main PR #13286

jsquyres added 2 commits June 4, 2025 11:54
No code or logic changes.

Signed-off-by: Jeff Squyres <[email protected]>
(cherry picked from commit 1a58617)
Several configure tests write integer result values to files and then
do something like foo=$(cat conftestval).  However, if the conftestval
file contains whitespace around the integer value (e.g., if
conftestval was written by a Fortran test code), then $foo will still
contain that whitespace, too -- which then propagates throughout the
configury and elsewhere.

This commit uses xargs to strip off the whitespace.  There's really
only one place where this is happening that is a problem, but let's do
it in all places where we foo=$(cat conftestval) with integer results,
just as a matter of consistency and defensive programming.

Thanks to Lisandro Dalcin for raising the issue.

Signed-off-by: Jeff Squyres <[email protected]>
(cherry picked from commit 122eae5)
@jsquyres jsquyres requested a review from janjust June 4, 2025 15:56
@jsquyres jsquyres changed the title configury: remove whitespace from "conftestval"-style tests#13286 v5.0.x: configury: remove whitespace from "conftestval"-style tests Jun 4, 2025
@github-actions github-actions bot added this to the v5.0.8 milestone Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[5.0.8] configure generates ompi_cv_fortran_common_alignment=<string>
1 participant