Author vajrasky
Recipients Arfrever, christian.heimes, giampaolo.rodola, pitrou, vajrasky, vstinner
Date 2013-07-19.16:30:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1374251460.34.0.959590997372.issue16595@psf.upfronthosting.co.za>
In-reply-to
Content
Fedora 18, this is the result after applying your patch and execute your unit test:

[sky@localhost cpython]$ ./python Lib/test/test_resource.py 
test_args (__main__.ResourceTest) ... ok
test_fsize_enforced (__main__.ResourceTest) ... ok
test_fsize_ismax (__main__.ResourceTest) ... ok
test_fsize_toobig (__main__.ResourceTest) ... ok
test_getrusage (__main__.ResourceTest) ... ok
test_prlimit (__main__.ResourceTest) ... ERROR
test_setrusage_refcount (__main__.ResourceTest) ... ok

======================================================================
ERROR: test_prlimit (__main__.ResourceTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_resource.py", line 131, in test_prlimit
    1, resource.RLIMIT_AS)
  File "/home/sky/Code/python/programming_language/cpython/Lib/unittest/case.py", line 614, in assertRaises
    return context.handle('assertRaises', callableObj, args, kwargs)
  File "/home/sky/Code/python/programming_language/cpython/Lib/unittest/case.py", line 150, in handle
    callable_obj(*args, **kwargs)
PermissionError: [Errno 1] Operation not permitted

----------------------------------------------------------------------
Ran 7 tests in 0.990s

FAILED (errors=1)
Traceback (most recent call last):
  File "Lib/test/test_resource.py", line 143, in <module>
    test_main()
  File "Lib/test/test_resource.py", line 140, in test_main
    support.run_unittest(ResourceTest)
  File "/home/sky/Code/python/programming_language/cpython/Lib/test/support.py", line 1615, in run_unittest
    _run_suite(suite)
  File "/home/sky/Code/python/programming_language/cpython/Lib/test/support.py", line 1590, in _run_suite
    raise TestFailed(err)
test.support.TestFailed: Traceback (most recent call last):
  File "Lib/test/test_resource.py", line 131, in test_prlimit
    1, resource.RLIMIT_AS)
  File "/home/sky/Code/python/programming_language/cpython/Lib/unittest/case.py", line 614, in assertRaises
    return context.handle('assertRaises', callableObj, args, kwargs)
  File "/home/sky/Code/python/programming_language/cpython/Lib/unittest/case.py", line 150, in handle
    callable_obj(*args, **kwargs)
PermissionError: [Errno 1] Operation not permitted

With sudo, I got this:

[sky@localhost cpython]$ sudo ./python Lib/test/test_resource.py 
[sudo] password for sky: 
test_args (__main__.ResourceTest) ... ok
test_fsize_enforced (__main__.ResourceTest) ... ok
test_fsize_ismax (__main__.ResourceTest) ... ok
test_fsize_toobig (__main__.ResourceTest) ... ok
test_getrusage (__main__.ResourceTest) ... ok
test_prlimit (__main__.ResourceTest) ... FAIL
test_setrusage_refcount (__main__.ResourceTest) ... ok

======================================================================
FAIL: test_prlimit (__main__.ResourceTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_resource.py", line 131, in test_prlimit
    1, resource.RLIMIT_AS)
AssertionError: ValueError not raised by prlimit

----------------------------------------------------------------------
Ran 7 tests in 1.002s

FAILED (failures=1)
Traceback (most recent call last):
  File "Lib/test/test_resource.py", line 143, in <module>
    test_main()
  File "Lib/test/test_resource.py", line 140, in test_main
    support.run_unittest(ResourceTest)
  File "/home/sky/Code/python/programming_language/cpython/Lib/test/support.py", line 1615, in run_unittest
    _run_suite(suite)
  File "/home/sky/Code/python/programming_language/cpython/Lib/test/support.py", line 1590, in _run_suite
    raise TestFailed(err)
test.support.TestFailed: Traceback (most recent call last):
  File "Lib/test/test_resource.py", line 131, in test_prlimit
    1, resource.RLIMIT_AS)
AssertionError: ValueError not raised by prlimit
History
Date User Action Args
2013-07-19 16:31:00vajraskysetrecipients: + vajrasky, pitrou, vstinner, giampaolo.rodola, christian.heimes, Arfrever
2013-07-19 16:31:00vajraskysetmessageid: <1374251460.34.0.959590997372.issue16595@psf.upfronthosting.co.za>
2013-07-19 16:31:00vajraskylinkissue16595 messages
2013-07-19 16:30:59vajraskycreate