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

nohup: write unit tests to improve coverage #1857

Open
sylvestre opened this issue Mar 21, 2021 · 4 comments
Open

nohup: write unit tests to improve coverage #1857

sylvestre opened this issue Mar 21, 2021 · 4 comments
Labels

Comments

@sylvestre
Copy link
Sponsor Contributor

We almost don't have tests for nohup. We should have more:
https://codecov.io/gh/uutils/coreutils/tree/master/src/uu/nohup/src

Should be added here:
https://github.com/uutils/coreutils/blob/master/tests/by-util/test_nohup.rs

@sylvestre sylvestre added the good first issue For newcomers! label Mar 21, 2021
@sivachandran
Copy link
Contributor

The implementation gets exercised only if stdin, stdout and stderr are connected with interactive terminals. I can't think of a straightforward way to do this from tests.

I'm thinking of using pty crate to fork a child with pseudo-terminal(pty) and invoke the implementation. I haven't tried this but it looks doable.

@sylvestre Let me know if this approach is fine or if there is a better approach.

@stale
Copy link

stale bot commented Jan 20, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jan 20, 2023
@fabracht
Copy link

fabracht commented Apr 3, 2023

This is the oldest beginner friendly issue. I would like to tackle it. Would this be ok? This is my first time on opensource, so I would appreciate some tips along the process, if you guys don't mind. I'll start looking at the code today to understand a little bit better.

@stale stale bot removed the wontfix label Apr 3, 2023
@sylvestre
Copy link
Sponsor Contributor Author

sure, please give it a try :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants