[issue678264] test_resource fails when file size is limited

2021-12-16 Thread Daniel Diniz


Change by Daniel Diniz :


--
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 
3.5

___
Python tracker 

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



[issue678264] test_resource fails when file size is limited

2019-02-24 Thread Mark Lawrence


Change by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue678264] test_resource fails when file size is limited

2015-09-28 Thread Arnon Yaari

Arnon Yaari added the comment:

This issue is still relevant and can be reproduced by running:

ulimit -Hf 1000
./python Lib/test/test_resource.py

(On AIX, the default hard limit is not RLIM_INFINITY so it reproduces on that 
operating system without the first line)

The patch is still relevant and fixes the issue.
It looks like it's doing the right thing, but it can't be committed until #9917 
will be fixed - otherwise the tests will break on Linux, where RLIM_INFINITY is 
-1 and not greater than 0.

--
nosy: +wiggin15

___
Python tracker 

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



[issue678264] test_resource fails when file size is limited

2015-08-07 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


--
nosy: +giampaolo.rodola

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



[issue678264] test_resource fails when file size is limited

2014-09-28 Thread Mark Lawrence

Mark Lawrence added the comment:

Can somebody take a look at this please.  See also #9917.

--

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



[issue678264] test_resource fails when file size is limited

2014-06-27 Thread Mark Lawrence

Mark Lawrence added the comment:

The inline patch in msg117130 has never been committed from what I can see.  
Can somebody review it please as I'm assuming that it's still valid.

--
nosy: +BreamoreBoy
versions: +Python 2.7, Python 3.4, Python 3.5 -Python 3.2

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



[issue678264] test_resource fails when file size is limited

2010-09-22 Thread Sébastien Sablé

Sébastien Sablé sa...@users.sourceforge.net added the comment:

The ideal would be to check that RLIMIT_FSIZE corresponds to the ulimit as it 
has been suggested by Neal Norwitz in msg14345, but since the value reported by 
ulimit has a different unit for each platform, that would be quite a lot of 
trouble.

All I can suggest is the following, which checks that both values are somewhat 
reasonable.

Index: Lib/test/test_resource.py
===
--- Lib/test/test_resource.py   (révision 84964)
+++ Lib/test/test_resource.py   (copie de travail)
@@ -20,12 +20,17 @@
 except AttributeError:
 pass
 else:
-# RLIMIT_FSIZE should be RLIM_INFINITY, which will be a really big
-# number on a platform with large file support.  On these 
platforms,
-# we need to test that the get/setrlimit functions properly convert
-# the number to a C long long and that the conversion doesn't raise
-# an error.
-self.assertEqual(resource.RLIM_INFINITY, max)
+# RLIMIT_FSIZE should be RLIM_INFINITY if 'ulimit -f' is
+# set to unlimited
+# RLIM_INFINITY will be a really big number on a platform
+# with large file support.  On these platforms, we need to
+# test that the get/setrlimit functions properly convert
+# the number to a C long long and that the conversion
+# doesn't raise an error.
+self.assertGreater(resource.RLIM_INFINITY, 0)
+self.assertLessEqual(cur, max)
+self.assertGreater(max, 0)
+self.assertLessEqual(max, resource.RLIM_INFINITY)
 resource.setrlimit(resource.RLIMIT_FSIZE, (cur, max))
 
 def test_fsize_enforced(self):

--

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



[issue678264] test_resource fails when file size is limited

2010-09-21 Thread Sébastien Sablé

Sébastien Sablé sa...@users.sourceforge.net added the comment:

For info:
this test fails on AIX 6.1 with py3k with the following error:

test test_resource failed -- Traceback (most recent call last):
  File 
/san_cis/home/cis/buildbot/buildbot-aix6/py3k-aix6-xlc/build/Lib/test/test_resource.py,
 line 28, in test_fsize_ismax
self.assertEqual(resource.RLIM_INFINITY, max)
AssertionError: 2147483647 != 1073741312

The same test works on AIX 5.3.

Is it related or should I open a new issue?

--

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



[issue678264] test_resource fails when file size is limited

2010-09-21 Thread Sébastien Sablé

Sébastien Sablé sa...@users.sourceforge.net added the comment:

I suppose the difference comes from the fact that I have:
on AIX 5.3: 
$ ulimit -f
unlimited

on AIX 6.1:
$ ulimit -f 
1048575

I think the test should be updated to not require ulimit -f is unlimited.

--

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



[issue678264] test_resource fails when file size is limited

2010-09-21 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

That's what the original report is about, as opposed to the linux repr issue 
that Martin wants to break out into a new ticket (which I will do).  Any ideas 
how to fix the test?  It didn't fail for me on linux, so I don't have a good 
test platform for trying to fix it.

I'm un-assigning Neal since the original report is no longer the cause of the 
test error.  (The test has obviously changed since we don't check print output 
any more.)

--
assignee: nnorwitz - 
components:  -Library (Lib)
nosy:  -BreamoreBoy
stage: unit test needed - needs patch
versions: +Python 3.2

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



[issue678264] test_resource fails when file size is limited

2010-09-16 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 As a point of information, on my gentoo linux system without
 largefile support in the kernel, any value 4294967295 or above
 results in getrlimit reporting -1.  Any smaller value is set and
 reported as itself.  (If a sufficiently large value is passed in to
 setrlimit, an OverflowError results.)

I think we really should create new issues for any remaining problems.

AFAICT, the remaining problems are:
- resource.RLIM_INFINITY is -1 on Linux, when it is meant to be
   a really large value
- (as you reported) getrlimit returns -1 to indicate RLIM_INFINITY.

I think the core of the problem is that the resource module considers
rlim_t to be a signed type (or at least representable in long long).
Using FromUnsignedLongLong in the appropriate place might solve the
issue.

--

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



[issue678264] test_resource fails when file size is limited

2010-09-15 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

The test does not fail if FSIZE is not max on linux/py3k, but max is still 
represented as -1 on linux.  So the reported bug is no longer valid, but 
Martin's concern has not been addressed.

--
nosy: +r.david.murray

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



[issue678264] test_resource fails when file size is limited

2010-09-15 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

As a point of information, on my gentoo linux system without largefile support 
in the kernel, any value 4294967295 or above results in getrlimit reporting -1. 
 Any smaller value is set and reported as itself.  (If a sufficiently large 
value is passed in to setrlimit, an OverflowError results.)

--

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



[issue678264] test_resource fails when file size is limited

2010-08-18 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

Closed as no response to msg81850.

--
nosy: +BreamoreBoy

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



[issue678264] test_resource fails when file size is limited

2009-02-12 Thread Daniel Diniz

Daniel Diniz aja...@gmail.com added the comment:

Is this still a problem?

--
components: +Tests
nosy: +ajaksu2
stage:  - test needed
type:  - behavior

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