tuned icon indicating copy to clipboard operation
tuned copied to clipboard

`check_positive` has some contradictions

Open dufuhang opened this issue 1 year ago • 5 comments

When the value passed to --timeout is 0, the check_positive function will check the passed value and still prompt that the passed value needs to be greater than or equal to 0. As shown below:

ubuntu@VM-24-14-ubuntu:~/github/tuned$ tuned-adm --timeout 0
usage: tuned-adm [-h] [--version] [--debug] [--async] [--timeout TIMEOUT] [--loglevel LOGLEVEL] {list,active,off,profile,profile_info,recommend,verify,auto_profile,profile_mode} ...
tuned-adm: error: argument --timeout/-t: 0 has to be >= 0

You can also change if <= 0 to if < 0, but I am not sure whether the --timeout value can be 0, so I changed the error message instead of if <= 0.

dufuhang avatar Sep 04 '24 08:09 dufuhang

@yarda Hi! Could you please review this PR as soon as possible? Hope to get your feedback

dufuhang avatar Sep 05 '24 07:09 dufuhang

@superm1 Hi! Could you please review this PR as soon as possible? Hope to get your feedback

dufuhang avatar Sep 13 '24 01:09 dufuhang

@superm1 Hi! Could you please review this PR as soon as possible? Hope to get your feedback

I actually don't have review rights here. I've submitted some code, but one of the maintainers needs to do code review.

superm1 avatar Sep 13 '24 02:09 superm1

@superm1 Hi! Could you please review this PR as soon as possible? Hope to get your feedback

I actually don't have review rights here. I've submitted some code, but one of the maintainers needs to do code review.

OK! Thanks your reply.

dufuhang avatar Sep 13 '24 02:09 dufuhang

Thanks, @dufuhang. Looks good to me, but please update the commit message: commit descriptions (first lines) are usually written in imperative present tense, should be reasonably short, and should make it clear where the change is being made. More technical details can be added in the next lines if necessary.

You can get inspired by existing commit messages in the repository.

zacikpa avatar Sep 13 '24 07:09 zacikpa

Thanks, @dufuhang. Looks good to me, but please update the commit message: commit descriptions (first lines) are usually written in imperative present tense, should be reasonably short, and should make it clear where the change is being made. More technical details can be added in the next lines if necessary.

You can get inspired by existing commit messages in the repository.

@zacikpa Thanks your reply! I have updated the commit message. Please review it again. Thank you.

dufuhang avatar Sep 14 '24 02:09 dufuhang

@zacikpa May I ask why this PR has not been merged yet?

dufuhang avatar Nov 25 '24 03:11 dufuhang

@zacikpa May I ask why this PR has not been merged yet?

Sorry, that's my fault. It will be merged shortly. I count with it for the December release. Thanks for the contribution.

yarda avatar Nov 26 '24 18:11 yarda