diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ChangeLog | 6 | ||||
| -rw-r--r-- | tests/backtrace-dwarf.c | 6 | ||||
| -rw-r--r-- | tests/backtrace.c | 6 |
3 files changed, 18 insertions, 0 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index 23c5051d..5c80e9bf 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,9 @@ +2013-12-30 Mark Wielaard <[email protected]> + + * backtrace-dwarf.c (report_pid): Explicitly call + dwfl_linux_proc_attach and check for errors. + * backtrace.c (report_pid): Likewise. + 2013-12-21 Mark Wielaard <[email protected]> * backtrace.c (callback_verify): Only assert that case 5 is the last diff --git a/tests/backtrace-dwarf.c b/tests/backtrace-dwarf.c index aa12315a..3a3e7632 100644 --- a/tests/backtrace-dwarf.c +++ b/tests/backtrace-dwarf.c @@ -41,6 +41,12 @@ report_pid (Dwfl *dwfl, pid_t pid) if (dwfl_report_end (dwfl, NULL, NULL) != 0) error (2, 0, "dwfl_report_end: %s", dwfl_errmsg (-1)); + + result = dwfl_linux_proc_attach (dwfl, pid, false); + if (result < 0) + error (2, 0, "dwfl_linux_proc_attach: %s", dwfl_errmsg (-1)); + else if (result > 0) + error (2, result, "dwfl_linux_proc_attach"); } static Dwfl * diff --git a/tests/backtrace.c b/tests/backtrace.c index 8a7d6dfc..64f90c43 100644 --- a/tests/backtrace.c +++ b/tests/backtrace.c @@ -279,6 +279,12 @@ report_pid (Dwfl *dwfl, pid_t pid) if (dwfl_report_end (dwfl, NULL, NULL) != 0) error (2, 0, "dwfl_report_end: %s", dwfl_errmsg (-1)); + + result = dwfl_linux_proc_attach (dwfl, pid, false); + if (result < 0) + error (2, 0, "dwfl_linux_proc_attach: %s", dwfl_errmsg (-1)); + else if (result > 0) + error (2, result, "dwfl_linux_proc_attach"); } static Dwfl * |
