Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ChrisDryden
Copy link
Collaborator

@ChrisDryden ChrisDryden commented Dec 10, 2025

This is a bit of a bigger PR but the original goal was to try and add the support of always setting the umask of the output file and when running the tests against the GNU tests I found a few inconsistencies that I'm going to summarize below:

First is that the GNU implementation will always try to set umask of nohop.out to 600 which we werent doing in our tests, I added a wrapper to it to make it always set that way.

Second the error message is based on whether the input or/and the output terminal is a terminal, the current implementation printed the same error message for all use cases and I added error messages specific to each use case.

Third, the error code for failure is set based on the ENV variable POSIXLY_CORRECT which we were already doing in some cases but we need to do that for all cases where it would return a 125 failure

Lastly the show_error macro didn't work for this use case because its possible to fail the output to stdout and then its expected to give a different error code based on whether the stderr was written successfully.

I added rust integ tests for each of these scenarios too, the way the tests are set up in nohup is a bit all over the place, when this gets merged in I'd like to make them all use the same macros and reduce the verbosity a bit

This PR has been broken into some smaller PR's to make this PR easier to review: #9684 and #9685

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/misc/nohup is no longer failing!

@ChrisDryden ChrisDryden marked this pull request as ready for review December 10, 2025 17:55
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 10, 2025

CodSpeed Performance Report

Merging #9628 will not alter performance

Comparing ChrisDryden:nohup_gnu_fixes (0aeea3b) with main (2000af8)

Summary

βœ… 127 untouched
⏩ 6 skipped1

Footnotes

  1. 6 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/misc/nohup is no longer failing!

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/misc/nohup is no longer failing!

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/misc/nohup is no longer failing!

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/misc/nohup is no longer failing!

@ChrisDryden
Copy link
Collaborator Author

I'm going to try and split this up into many smaller PR's to make it easier to review.

@ChrisDryden
Copy link
Collaborator Author

Made two PR's from the code in here that are subsets of this original PR: #9684 and #9685

The other code in here relies on the ENV Variable code being merged in first so will wait on that before splitting the rest of the code up.

let exit_code = failure_code();

match open_nohup_file(Path::new(NOHUP_OUT)) {
Ok(t) => Ok((t, NOHUP_OUT.to_string())),
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe

Suggested change
Ok(t) => Ok((t, NOHUP_OUT.to_string())),
Ok(t) => Ok((t, NOHUP_OUT.to_owned())),

e2,
)
.into()),
let homeout_str = homeout.to_str().unwrap().to_string();
Copy link
Contributor

Choose a reason for hiding this comment

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

as ride along, maybe remove the unwrap()

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/misc/nohup is no longer failing!
Skip an intermittent issue tests/tail/inotify-dir-recreate (was skipped on 'main', now failing)

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