selftest prompts for ssh password ??

Vincent Ladeuil v.ladeuil+lp at free.fr
Mon Jun 29 14:31:18 BST 2009


>>>>> "Maritza" == Maritza Mendez <martitzam at gmail.com> writes:

<snip/>

    Maritza> What is *not* reproducible is that on stderr (still
    Maritza> attached to the console) I got this:

    Maritza> SSH: bzr jim at bar.org password: SSH: bzr jim at bar.org password:

GOTCHA !

Ha ha, I knew it couldn't resist coming back ;-)

Here is the backtrace:

(Pdb) bt
  /home/vila/src/bzr/experimental/cleanup-strict/bzr(142)<module>()
-> exit_val = bzrlib.commands.main()
  /home/vila/src/bzr/experimental/cleanup-strict/bzrlib/commands.py(1108)main()
-> ret = run_bzr_catch_errors(argv)
  /home/vila/src/bzr/experimental/cleanup-strict/bzrlib/commands.py(1120)run_bzr_catch_errors()
-> return exception_to_return_code(run_bzr, argv)
  /home/vila/src/bzr/experimental/cleanup-strict/bzrlib/commands.py(835)exception_to_return_code()
-> return the_callable(*args, **kwargs)
  /home/vila/src/bzr/experimental/cleanup-strict/bzrlib/commands.py(1030)run_bzr()
-> ret = run(*run_argv)
  /home/vila/src/bzr/experimental/cleanup-strict/bzrlib/commands.py(647)run_argv_aliases()
-> return self.run(**all_cmd_args)
  /home/vila/src/bzr/experimental/cleanup-strict/bzrlib/builtins.py(3404)run()
-> result = selftest(**selftest_kwargs)
  /home/vila/src/bzr/experimental/cleanup-strict/bzrlib/tests/__init__.py(3160)selftest()
-> suite_decorators=suite_decorators,
  /home/vila/src/bzr/experimental/cleanup-strict/bzrlib/tests/__init__.py(2743)run_suite()
-> result = runner.run(suite)
  /home/vila/src/bzr/experimental/cleanup-strict/bzrlib/tests/__init__.py(591)run()
-> test.run(result)
  /usr/lib/python2.6/unittest.py(460)run()
-> test(result)
  /usr/lib/python2.6/unittest.py(300)__call__()
-> return self.run(*args, **kwds)
  /home/vila/src/bzr/experimental/cleanup-strict/bzrlib/tests/__init__.py(1420)run()
-> testMethod()
  /home/vila/src/bzr/experimental/cleanup-strict/bzrlib/tests/test_config.py(1528)test_username_default_no_prompt()
-> conf.get_user('ftp', 'example.com', default="explicitdefault"))
  /home/vila/src/bzr/experimental/cleanup-strict/bzrlib/config.py(1156)get_user()
-> path=path, realm=realm)
  /home/vila/src/bzr/experimental/cleanup-strict/bzrlib/config.py(1085)get_credentials()
-> scheme, host, port, user, path, realm)
  /home/vila/src/bzr/experimental/cleanup-strict/bzrlib/config.py(1265)get_fallback_credentials()
-> path, realm)
  /home/vila/.bazaar/plugins/gtk/keyring.py(73)get_credentials()
-> gnomekeyring.ITEM_NETWORK_PASSWORD, attrs)
> /home/vila/src/bzr/experimental/cleanup-strict/bzrlib/breakin.py(33)_debug()
-> signal.signal(signal.SIGQUIT, _debug)
(Pdb) 

So clearly gtk is involved, and that's for the
GnomeKeyringCredentialStore which is queried as a fallback.

So there are several problems here:
- it is not reproducible, it occurred to me while working on
  config tests but only at the 10 or so run,
- the test is not properly isolated (the fallback credential
  store is installed by the plugin but the test suite should
  provides a clean state to tests),
- the test is querying a user for the 'ftp' scheme, so not for
  'ssh',
- the prompt is emitted twice (funny that one :)

Jelmer, can you shed some light on the last two points ?

  Vincent



More information about the bazaar mailing list