From: Mark Wooding Date: Sat, 31 May 2014 22:05:19 +0000 (+0100) Subject: regress/r1test: Support a `$debug' prefix variable. X-Git-Tag: make-bug.2014-07-26~41 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=adns.git;a=commitdiff_plain;h=898afc783a7bd5947405b4fd828a34dfbd9b99a8 regress/r1test: Support a `$debug' prefix variable. 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 --- diff --git a/regress/r1test b/regress/r1test index d981b45..533fdab 100755 --- a/regress/r1test +++ b/regress/r1test @@ -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