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

Attachment: pgp6AuFOaFKXS.pgp
Description: PGP signature

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to