chiark / gitweb /
regress/r1test: Support a `$debug' prefix variable.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 31 May 2014 22:05:19 +0000 (23:05 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 13 Jun 2014 08:57:41 +0000 (09:57 +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:

$ 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>
regress/r1test

index d981b450e0831428a353055177ad0bb1bde623b9..533fdabd2d62fd97691d30c4bf9ed5b11bac0fc2 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
+ $debug $playback $initflags"$initstring" $queryargs
 rc=$?
 set -e