[PATCH] tests: add strace-E.test

Dmitry V. Levin ldv at altlinux.org
Mon Jun 6 16:06:14 UTC 2016


On Fri, Jun 03, 2016 at 01:36:48PM +0800, Fei Jie wrote:
> * tests/strace-E.c: New file.
> * tests/strace-E.test: New test.
> * tests/.gitignore: Add strace-E.
> * tests/Makefile.am (check_PROGRAMS): Likewise.
> (MISC_TESTS): Add strace-E.test.
> ---
>  tests/.gitignore    |  1 +
>  tests/Makefile.am   |  2 ++
>  tests/strace-E.c    | 10 ++++++++++
>  tests/strace-E.test | 10 ++++++++++
>  4 files changed, 23 insertions(+)
>  create mode 100644 tests/strace-E.c
>  create mode 100755 tests/strace-E.test
> 
> diff --git a/tests/.gitignore b/tests/.gitignore
> index 8f4d6f0..b99ce77 100644
> --- a/tests/.gitignore
> +++ b/tests/.gitignore
> @@ -236,6 +236,7 @@ stat
>  stat64
>  statfs
>  statfs64
> +strace-E
>  swap
>  symlink
>  symlinkat
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index 9eba306..1764113 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -289,6 +289,7 @@ check_PROGRAMS = \
>  	stat64 \
>  	statfs \
>  	statfs64 \
> +	strace-E \
>  	swap \
>  	symlink \
>  	symlinkat \
> @@ -643,6 +644,7 @@ MISC_TESTS = \
>  	qual_syscall.test \
>  	redirect.test \
>  	restart_syscall.test \
> +	strace-E.test \
>  	strace-S.test \
>  	strace-T.test \
>  	strace-V.test \
> diff --git a/tests/strace-E.c b/tests/strace-E.c
> new file mode 100644
> index 0000000..e557913
> --- /dev/null
> +++ b/tests/strace-E.c
> @@ -0,0 +1,10 @@
> +#include <stdio.h>
> +
> +int
> +main()
> +{
> +	printf("execve\\(\"./strace-E\", \\[\"./strace-E\"\\], "
> +	       "\\[.*\"option_E_var=OPTION_E_VAL\".*\\) += 0\n");
> +
> +	return 0;
> +}

Why do you need an executable like this to print some static output?


-- 
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/20160606/e2e8334a/attachment.bin>


More information about the Strace-devel mailing list