selftest prompts for ssh password ??

Martin Pool mbp at sourcefrog.net
Wed Jun 24 00:37:44 BST 2009


2009/6/23 Martin Pool <mbp at sourcefrog.net>:
> 2009/6/23 Maritza Mendez <martitzam at gmail.com>:
>> What is not reproducible is that on stderr (still attached to the console) I
>> got this:
>>
>> SSH: bzr jim at bar.org password: SSH: bzr jim at bar.org password:
>>
>> Several attempts to reproduce this prompt under various circumstances
>> (stdout redirected or not, stderr redirected or not) have all failed.
>>
>> Digging into test_config.py suggests that bzr is waiting for an interactive
>> response like 'jimpass'
>>
>> But as I say I have not been able to repeat this...
>>
>> I do notice some advisements that pycurl cannot prompt, but as you can see
>> this error appears to be related to urllib -- not pycurl.
>>
>> I say "appears" because I am assuming (without proof) that stdout and stdin
>> are in sync, and there's really no good reason to believe that.  So all I
>> can really say is "At a time when selftest has hung -- as confirmed by
>> strace -- the last messages flushed to stdout and stderr are such-and-such."
>>
>> Is selftest really prompting me to enter a password?  And if so, why have I
>> seen it only once in numerous selftest runs or test_http?
>
> Well, it certainly seems like it is prompting you for it, but it's not
> meant to.  The test suite is supposed to be (and is, when I run it)
> entirely non-interactive and automated.
>
> If this is coming from test_config it looks like it's just asking the
> configuration file object for the right password.  In a brief look it
> does not seem like that code should be asking the user for the
> password.  It's possible that what you saw was echoed to a trace file
> during the test and bzr printed it out when a test failed.

I looked into this a bit more -- as it happens it aligns with the UI
cleanup I'm trying to do -- and it's true that the config objects
configured here do ask the user for the setting if they can't find it.
 They're supposed to be run with stdin/out/err redirected to other
Python objects, and it's very strange to me that they would ever
intermittently go to the real stdio.  However, if something is failing
in the http server, which I think runs in a background thread, it's
just possible that it could interfere with them.

-- 
Martin <http://launchpad.net/~mbp/>



More information about the bazaar mailing list