Failing unit test

I see one test failing consistently one my Linux box (while it works
fine on Mac):

  language.when ... failed
  % 'btest-diff out' failed unexpectedly (exit code 1)
  % cat .diag
  == File ===============================
  lookup successful
  == Diff ===============================
  --- /tmp/test-diff.24485.out.baseline.tmp 2012-09-24 17:40:03.554905092 +0000
  +++ /tmp/test-diff.24485.out.tmp 2012-09-24 17:40:03.567905581 +0000
  @@ -1 +1,2 @@
  +lookup successful

language.when … failed

Is that a race condition with the DNS lookup?

Yeah, looks like the `when` condition should always get evaluated when Bro terminates, but just sometimes the lookup has finished and sometimes it hasn't. For the purpose of the test, maybe just run the bro instance with `btest-bg-run` and the listen script loaded so it blocks, then call `terminate()` in the body of the `when`.