This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2011年02月27日 21:20 by Arfrever, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (7) | |||
|---|---|---|---|
| msg129654 - (view) | Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) * (Python triager) | Date: 2011年02月27日 21:20 | |
$ nice -n20 python3.3 -m test.test_os ... test_set_get_priority (__main__.ProgramPriorityTests) ... FAIL ====================================================================== FAIL: test_set_get_priority (__main__.ProgramPriorityTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib64/python3.3/test/test_os.py", line 1280, in test_set_get_priority self.assertEqual(os.getpriority(os.PRIO_PROCESS, os.getpid()), base + 1) AssertionError: 19 != 20 |
|||
| msg129655 - (view) | Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) | Date: 2011年02月27日 21:27 | |
Of course the test fails: a process can't have a nice value higher than a certain limit, which I think can vary depending on the UNIX variant in use. The fix is not to use "nice -n20". |
|||
| msg129658 - (view) | Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) * (Python triager) | Date: 2011年02月27日 21:39 | |
I actually wanted to use 'nice -n19 python3.3 -m test.test_os', which also fails. Test suite of Python can be run be a package manager, which automatically sets high niceness. If niceness is high, then maybe this test could try to decrease it instead of increasing. |
|||
| msg129684 - (view) | Author: Charles-François Natali (neologix) * (Python committer) | Date: 2011年02月28日 07:39 | |
> If niceness is high, then maybe this test could try to decrease it instead of increasing. You must be root or have CAP_SYS_NICE to do that. |
|||
| msg129702 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2011年02月28日 13:26 | |
We could, however, raise SkipTest if getpriority returns 19 or higher with a message like "unable to reliably test setpriority at current nice level of NN". My guess is that no system we support has a lower upper limit on nice. If someone wants to customize the test/message per OS, that would probably be even better; but not, I think, required. |
|||
| msg129704 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2011年02月28日 13:32 | |
To be clear: raise SkipTest if prio is 19 or above *and* the increment fails. |
|||
| msg129719 - (view) | Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) | Date: 2011年02月28日 19:27 | |
Committed in r88680. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:13 | admin | set | github: 55557 |
| 2011年02月28日 19:27:40 | giampaolo.rodola | set | status: open -> closed messages: + msg129719 resolution: fixed nosy: giampaolo.rodola, Arfrever, r.david.murray, neologix |
| 2011年02月28日 13:32:59 | r.david.murray | set | nosy:
giampaolo.rodola, Arfrever, r.david.murray, neologix messages: + msg129704 |
| 2011年02月28日 13:26:56 | r.david.murray | set | nosy:
giampaolo.rodola, Arfrever, r.david.murray, neologix messages: + msg129702 |
| 2011年02月28日 07:39:15 | neologix | set | nosy:
+ neologix messages: + msg129684 |
| 2011年02月27日 21:55:00 | r.david.murray | set | nosy:
+ r.david.murray |
| 2011年02月27日 21:39:53 | Arfrever | set | nosy:
giampaolo.rodola, Arfrever messages: + msg129658 |
| 2011年02月27日 21:27:22 | giampaolo.rodola | set | nosy:
giampaolo.rodola, Arfrever messages: + msg129655 |
| 2011年02月27日 21:20:21 | Arfrever | create | |