Skip to content

qa/standalone: parenthesize expression in calc() - #72822

Merged
ljflores merged 1 commit into
ceph:mainfrom
wjwithagen:wip-wjw-qa-calc-awk
Nov 12, 2026
Merged

ljflores merged 1 commit into
ceph:mainfrom
wjwithagen:wip-wjw-qa-calc-awk

Conversation

@wjwithagen

@wjwithagen wjwithagen commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

calc() expands to "BEGIN{print }". When contains a relational operator, as in the delays() callers, gawk rejects the unparenthesized '<' in the print list with a syntax error. Wrapping the expression in parentheses makes comparisons evaluate to 1/0 and leaves arithmetic callers unchanged.

Fixes: https://tracker.ceph.com/issues/81893
Signed-off-by: Willem Jan Withagen [email protected]

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@wjwithagen
wjwithagen requested a review from a team as a code owner October 19, 2026 11:41

@tchaikov tchaikov left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

might want to drop Claude-Session: https://claude.ai/code/session_01Y5rP5Sdw4CTBdJgdspuCyN from the commit message, as, IMHO, it does not provide values to reviewers or our posterity.

@ljflores

Copy link
Copy Markdown
Member

might want to drop Claude-Session: https://claude.ai/code/session_01Y5rP5Sdw4CTBdJgdspuCyN from the commit message, as, IMHO, it does not provide values to reviewers or our posterity.

Agreed. Feel free to add "needs-qa" when this has been addressed.

calc() expands to "BEGIN{print <expr>}". When <expr> contains a
relational operator, as in the delays() callers, gawk rejects the
unparenthesized '<' in the print list with a syntax error.
Wrapping the expression in parentheses makes comparisons evaluate
to 1/0 and leaves arithmetic callers unchanged.

Fixes: https://tracker.ceph.com/issues/81893
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Willem Jan Withagen <[email protected]>
@SrinivasaBharath

Copy link
Copy Markdown
Contributor

This PR has been added to wip-bharath1-testing-20261027.065658-main.

@kamoltat kamoltat added the needs-umbrella-backport This PR should be backported to Umbrella label Oct 29, 2026
@kamoltat

Copy link
Copy Markdown
Member

probably needs umbrella backport?

@wjwithagen

Copy link
Copy Markdown
Member Author

probably needs umbrella backport?

Questionable.
This bug is in there for already quite some time.
6 sept 2018
And the way things were constructed, it does not really harm the positive outcome of the tests.

I submitted this fix, to get ride of an error in logging out put.
Helps better diagnosing.

@adam-lj

adam-lj commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

@ljflores
ljflores merged commit 0e8efed into ceph:main Nov 12, 2026
17 checks passed
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.

7 participants