]> git.ozlabs.org Git - ccan/commit
failtest: fix --debugpath
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 29 Nov 2011 22:40:11 +0000 (09:10 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 29 Nov 2011 22:40:11 +0000 (09:10 +1030)
commit931f1941d3000b38ee1c45a987c219e7e25f125c
treeb76ca7287c1b6d6d4c8a33a271036a70c75ae5d2
parent57cc9494b0daacd23372cdbdefcd31fe9320c836
failtest: fix --debugpath

Calling failpath_string() here leaves the final letter randomly upper or
lower-cased, since call->fail is uninitialized.  This means we sometimes
don't match the debug string.

1) Initialize call->fail here so it will match the debug string.
2) If our calls don't match --debugpath, abort.
3) Don't match the final letter (which may be upper or lower case)
   when checking we're still on the path.  We could do better, but this is
   only a sanity-check anyway.
ccan/failtest/failtest.c