[issue11348] test_os: test_set_get_priority() fails when high niceness is set

2011-02-27 Thread Arfrever Frehtes Taifersar Arahesis

New submission from Arfrever Frehtes Taifersar Arahesis 
:

$ 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

--
components: Tests
messages: 129654
nosy: Arfrever, giampaolo.rodola
priority: normal
severity: normal
status: open
title: test_os: test_set_get_priority() fails when high niceness is set
versions: Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11348] test_os: test_set_get_priority() fails when high niceness is set

2011-02-27 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

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".

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11348] test_os: test_set_get_priority() fails when high niceness is set

2011-02-27 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis  added the comment:

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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11348] test_os: test_set_get_priority() fails when high niceness is set

2011-02-27 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11348] test_os: test_set_get_priority() fails when high niceness is set

2011-02-27 Thread Charles-Francois Natali

Charles-Francois Natali  added the comment:

> 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.

--
nosy: +neologix

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11348] test_os: test_set_get_priority() fails when high niceness is set

2011-02-28 Thread R. David Murray

R. David Murray  added the comment:

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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11348] test_os: test_set_get_priority() fails when high niceness is set

2011-02-28 Thread R. David Murray

R. David Murray  added the comment:

To be clear: raise SkipTest if prio is 19 or above *and* the increment fails.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11348] test_os: test_set_get_priority() fails when high niceness is set

2011-02-28 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

Committed in r88680.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com