[PATCH 2/4] tests: add ptrace.test
Dmitry V. Levin
ldv at altlinux.org
Wed May 11 16:01:57 UTC 2016
On Wed, May 11, 2016 at 03:07:27PM +0800, Fei Jie wrote:
> * tests/ptrace.c: New file.
> * tests/ptrace.test: New test.
> * tests/.gitignore: Add ptrace.
> * tests/Makefile.am (check_PROGRAMS): Likewise.
> (DECODER_TESTS): Add ptrace.test.
> ---
> tests/.gitignore | 1 +
> tests/Makefile.am | 2 ++
> tests/ptrace.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++
> tests/ptrace.test | 6 ++++++
> 4 files changed, 55 insertions(+)
> create mode 100644 tests/ptrace.c
> create mode 100755 tests/ptrace.test
>
> diff --git a/tests/.gitignore b/tests/.gitignore
> index 745b7a1..96533fb 100644
> --- a/tests/.gitignore
> +++ b/tests/.gitignore
> @@ -152,6 +152,7 @@ pread64-pwrite64
> preadv
> preadv-pwritev
> pselect6
> +ptrace
> pwritev
> read-write
> readdir
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index c836e49..ce26306 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -205,6 +205,7 @@ check_PROGRAMS = \
> preadv \
> preadv-pwritev \
> pselect6 \
> + ptrace \
> pwritev \
> read-write \
> readdir \
> @@ -484,6 +485,7 @@ DECODER_TESTS = \
> preadv-pwritev.test \
> preadv.test \
> pselect6.test \
> + ptrace.test \
> pwritev.test \
> read-write.test \
> readdir.test \
> diff --git a/tests/ptrace.c b/tests/ptrace.c
> new file mode 100644
> index 0000000..df7ae0e
> --- /dev/null
> +++ b/tests/ptrace.c
> @@ -0,0 +1,46 @@
> +#include "tests.h"
> +#include <sys/syscall.h>
> +
> +#ifdef __NR_ptrace
This is strace, and your are testing for __NR_ptrace.
I appreciate your sense of humour.
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20160511/abd7afdc/attachment.bin>
More information about the Strace-devel
mailing list