1. 02 Dec, 2011 7 commits
  2. 01 Dec, 2011 9 commits
  3. 30 Nov, 2011 10 commits
  4. 29 Nov, 2011 14 commits
    • Rusty Russell's avatar
    • Rusty Russell's avatar
      failtest: fix open in tests. · 36d54ff6
      Rusty Russell authored
      The argument is wrong, so the return was -1.  That currently works,
      but it will beak with the next patch.  Fix the typo.
      36d54ff6
    • Rusty Russell's avatar
      failtest: fix failpath on open. · eaff1465
      Rusty Russell authored
      And separate out the code which follows --failpath so failtest_close()
      can use it too.
      eaff1465
    • Rusty Russell's avatar
      failtest: report failpath problems correctly. · 2006aa03
      Rusty Russell authored
      It was the wrong way around, and also it's better to show the whole
      remaining failpath rather than the current letter.
      2006aa03
    • Rusty Russell's avatar
      failtest: stop when leak detected. · acb6106c
      Rusty Russell authored
      Don't continue when we report a leak: tell the parent it's a failure.
      acb6106c
    • Rusty Russell's avatar
      tdb2: suppress failtest more than once on mmap. · fbae37ba
      Rusty Russell authored
      Now we test failing mmap, ccanlint -v time has increased from 200 to
      330 seconds.  Worse, tests no time out on my laptop.
      
      Fix this, by preventing us from going down that particular rabbit hole.
      ccanlint -v now takes 201 seconds again.
      fbae37ba
    • Rusty Russell's avatar
      failtest: catch mmap. · e43dc84f
      Rusty Russell authored
      mmap can also fail on out-of-memory, and for the coming change to the
      way we save and restore files we want to know about them anyway.
      e43dc84f
    • Rusty Russell's avatar
      tdb2: simplify failtest helper. · 3d99c933
      Rusty Russell authored
      failtest now culls duplicates for itself (and more efficiently), so
      don't replicate the logic here.  It changes things a bit, because
      failtest uses backtraces rather than a simple call point to find
      duplicates.
      
      Also, fix one case (in run-11-simple-fetch.c) where we simply exited
      rather than using failtest_exit().  We got away with it before, because
      we never hit that particular failure pattern.
      3d99c933
    • Rusty Russell's avatar
      failtest: fix --debugpath · 931f1941
      Rusty Russell authored
      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.
      931f1941
    • Rusty Russell's avatar
      failtest: internally eliminate duplicate calls. · 57cc9494
      Rusty Russell authored
      If we can get a backtrace, we can automatically eliminate identical
      failures.  Surprisingly backtrace() is quite fast, but the savings for
      the (naively-written) rbtree tests are impressive.  ccanlint -v time
      drops from 43 seconds to 6 seconds.
      57cc9494
    • Rusty Russell's avatar
      configurator: HAVE_BACKTRACE · 53de95c6
      Rusty Russell authored
      53de95c6
    • Rusty Russell's avatar
      failtest: simplify FAIL_PROBE. · 15c6ce42
      Rusty Russell authored
      When a failtest_hook returns fail_probe(), we start a counter to
      continue for a little way.  Replace this hack with a simple flag,
      which disables further failures.
      
      Interestingly, this doesn't reduce coverage on the current modules
      which use failtest.
      15c6ce42
    • Rusty Russell's avatar
      failtest: report errors in children directly to original stderr. · 7859e954
      Rusty Russell authored
      This is useful for debugging failtest itself, as well as for things
      like tracing.
      7859e954
    • Rusty Russell's avatar
      failtest: use high-numbers file descriptors to stay out of the way. · 163daaf4
      Rusty Russell authored
      We use file descriptors inside failtest; use dup2 to try to avoid
      changing the file descriptor numbers used in the program (particularly
      when programs mess with invalid file descriptors, they're likely to
      still be invalid).
      163daaf4