Skip to content

Fix error code being divided by 256 in testRelease script#27580

Merged
arifthpe merged 2 commits intochapel-lang:mainfrom
arifthpe:testRelease-fix-mod
Aug 5, 2025
Merged

Fix error code being divided by 256 in testRelease script#27580
arifthpe merged 2 commits intochapel-lang:mainfrom
arifthpe:testRelease-fix-mod

Conversation

@arifthpe
Copy link
Collaborator

@arifthpe arifthpe commented Jul 31, 2025

Remove an instance of a command status code being divided by 256 in util/buildRelease/testRelease.

I think this was likely intended to be modded to ensure the status code returned is in the typical 0-255 range. But even that may not be necessary since we just shouldn't be returning an out of range error code from whatever other script of ours this invokes anyways.

[reviewer info placeholder]

@arifthpe arifthpe requested a review from bradcray July 31, 2025 18:04
@bradcray
Copy link
Member

It's not entirely clear to me why anything would need to be done with the error code rather than just printing it out. Is it to you? That said, what you have here is no worse than what we had (and is arguably strictly better), so I'm OK with proceeding with it.

@arifthpe
Copy link
Collaborator Author

arifthpe commented Aug 1, 2025

This mod ensures that the status code is in the usual range [0,256) . I'm not sure if that range limitation comes from POSIX or Linux or bash or something else.

I'm pretty sure an out of range error code will just get modded like this by the invoking shell anyways. Not to mention we probably wouldn't have an out of range code returned by whatever other script of ours this invokes. I guess we might as well not do the mod and find out.

Copy link
Member

@bradcray bradcray left a comment

Choose a reason for hiding this comment

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

Works for me!

Signed-off-by: Anna Rift <anna.rift@hpe.com>
Signed-off-by: Anna Rift <anna.rift@hpe.com>
@arifthpe arifthpe force-pushed the testRelease-fix-mod branch from 3d4113c to fce97be Compare August 1, 2025 16:39
@arifthpe arifthpe merged commit 3ec744d into chapel-lang:main Aug 5, 2025
10 checks passed
@arifthpe arifthpe deleted the testRelease-fix-mod branch August 5, 2025 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.

2 participants