chiark / gitweb /
regress/r1test: Support an `ADNS_TEST_DEBUG' env var.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 31 May 2014 22:05:19 +0000 (23:05 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 12 Oct 2014 19:38:25 +0000 (20:38 +0100)
Amazingly, sometimes the tests don't pass.  When that happens, it's
handy to be able to debug the library and find out why.

It's a little tricky to attach GDB to the running process directly.  I
used the following:

$ ADNS_TEST_DEBUG"noip gdbserver localhost:666" ./r1test CASE

and then, in another terminal, something like

$ noip gdb adnstest_s
(gdb) target remote localhost:666

to debug the program.

Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
regress/r1test

index d981b45..b2549e7 100755 (executable)
@@ -67,7 +67,7 @@ fi
 set +e
 ADNS_TEST_REPORT_FD=3 ADNS_TEST_IN_FD=4 \
  3>>"$ocase.report" 4<&4 >"$ocase.out" 2>"$ocase.err" \
- $playback $initflags"$initstring" $queryargs
+ $ADNS_TEST_DEBUG $playback $initflags"$initstring" $queryargs
 rc=$?
 set -e