Fix filtering of <unavailable> syscalls

* syscall.c (trace_syscall_exiting): Skip filtered syscalls also in case
of get_regs or get_syscall_result failure.
* tests/filter-unavailable.c: New file.
* tests/filter-unavailable.expected: Likewise.
* tests/filter-unavailable.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add filter-unavailable.
(filter_unavailable_LDFLAGS): Add -pthread.
(TESTS): Add filter-unavailable.test.
(EXTRA_DIST): Add filter-unavailable.expected.
* tests/.gitignore: Add filter-unavailable.

Reported-by: Bryan Matsuo <bryan.matsuo@gmail.com>
6 files changed