[PATCH] test-commandserver: use python instead of hg as the executable
Adrian Buehlmann
adrian at cadifra.com
Thu Jun 21 06:41:31 CDT 2012
On 2012-06-21 09:37, Pierre-Yves David wrote:
> On Thu, Jun 21, 2012 at 02:33:06AM +0200, Adrian Buehlmann wrote:
>> On 2012-06-21 00:42, Adrian Buehlmann wrote:
>>> On 2012-06-21 00:22, Matt Mackall wrote:
>>> diff --git a/tests/test-commandserver.py b/tests/test-commandserver.py
>>> --- a/tests/test-commandserver.py
>>> +++ b/tests/test-commandserver.py
>>> @@ -5,7 +5,7 @@
>>> if path:
>>> cmdline += ['-R', path]
>>>
>>> - server = subprocess.Popen(cmdline, stdin=subprocess.PIPE,
>>> + server = subprocess.Popen(cmdline, shell=True, stdin=subprocess.PIPE,
>>> stdout=subprocess.PIPE)
>>>
>>> return server
>>>
>>> would be an acceptable change, then test-commandserver.py passes here
>>> with a file hg.cmd in C:\Users\adi\hgrepos\hg-main containing:
>>
>> On Ubuntu Linux, test-commandserver.py crashes here with that patch:
>>
>> +Traceback (most recent call last):
>> + File "/home/adi/hgrepos/hg-main/tests/test-commandserver.py", line 242, in <module>
>> + check(hellomessage)
>> + File "/home/adi/hgrepos/hg-main/tests/test-commandserver.py", line 63, in check
>> + return func(server)
>> + File "/home/adi/hgrepos/hg-main/tests/test-commandserver.py", line 72, in hellomessage
>> + ch, data = readchannel(server)
>> + File "/home/adi/hgrepos/hg-main/tests/test-commandserver.py", line 26, in readchannel
>> + return channel, server.stdout.read(length)
>> +MemoryError
>
> They are tons of possible cause for a MemoryError, the most common one being
> "Firefox is eating your ram with a Ladle".
>
> I do not see why switching to shell=True should be the main suspect for such
> error. I just tried on linux (debian squeeze) and it works great.
Ok. Thanks for testing.
It can't be related to Firefox here, as I don't use that. This is a
32-bit Ubuntu in a VirtualBox VM here, which I only use for mercuial
testing. The most demanding application I use there is probably
TortoiseHg, but even if that's running, there is plenty of free RAM left
(~85% free).
This is a 32-bit Ubuntu 11.04 (natty), with Kernel Linux
2.6.38-15-generic, 1.4 GiB RAM, Python 2.7.1+ (r271:86832, Apr 11 2011,
18:05:24).
The MemoryError consistently shows up with the patch applied, and not
without the patch applied.
This is the first time I have such problem with that VM.
So I guess I'm tripping over some bug which might be unrelated to
mercurial, but that usage triggers the bug. :(
Perhaps I should ditch that VM and install a newer Ubuntu.
More information about the Mercurial-devel
mailing list