monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Merging nvm.ssh-agent to mainline


From: Matthew Gregan
Subject: Re: [Monotone-devel] Merging nvm.ssh-agent to mainline
Date: Tue, 27 Feb 2007 22:32:26 +1300
User-agent: Mutt/1.5.13 (2006-08-11)

At 2007-02-26T20:14:27-0800, Justin Patrin wrote:

> key...
> unknown location(0): fatal error in "signature_round_trip":
> std::exception: boost::filesystem::path: invalid name ".monotone" in
> path: "/Users/jpatrin/.monotone/keys"

You can fix that with the attached patch.

I suspect that we only hit this in unit_tests because the normal monotone
runtime calls save_initial_path(), which results
fs::path::default_name_check(fs::native) being called.

With this patch, the unit tests are still dying:
key...
unknown location(0): fatal error in "signature_round_trip":
std::logic_error: key_store.cc:171: invariant 'I(i != keys.end())' violated
keys.cc(719): last checkpoint: signing plaintext

This is because app.get_key_pair() (called via make_signature() in the test)
goes looking for the key with ID 'address@hidden' in the key store and
fails to find it.

It seems wrong to me that unit tests end up inside code that looks in
~/.monotone/keys (or cares about anything to do with the environment the
test is run in that is not explicitly set up for the test), so something
probably needs to be done to either change the test to avoid this, or
refactor the key handling/key store code to be more unit testable.

Cheers,
-mjg
-- 
Matthew Gregan                     |/
                                  /|                    address@hidden

Attachment: nvm.ssh-agent_file_io.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]