[PATCH v2] tests: add strace-E.test

Dmitry V. Levin ldv at altlinux.org
Tue Jun 7 09:26:28 UTC 2016


On Tue, Jun 07, 2016 at 10:38:21AM +0800, Fei Jie wrote:
> * tests/strace-E.test: New test.
> * tests/Makefile.am (MISC_TESTS): Add it.
> ---
>  tests/Makefile.am   |  1 +
>  tests/strace-E.test | 15 +++++++++++++++
>  2 files changed, 16 insertions(+)
>  create mode 100755 tests/strace-E.test
> 
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index dcc9323..092219c 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -651,6 +651,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.test b/tests/strace-E.test
> new file mode 100755
> index 0000000..e2ff240
> --- /dev/null
> +++ b/tests/strace-E.test
> @@ -0,0 +1,15 @@
> +#!/bin/sh
> +
> +# Check -E option.
> +
> +. "${srcdir=.}/init.sh"
> +
> +run_prog ./sleep 1 > /dev/null

"sleep 0" would be much faster than "sleep 1".

> +run_strace -E option_E_var=OPTION_E_VAL -v $args
> +{
> +printf 'execve\\(\"./sleep\", \\[\"./sleep\", \"1\"\\], '
> +printf '\\[.*\"option_E_var=OPTION_E_VAL\".*\\) = 0\n'
> +printf '\+\+\+ exited with 0 \+\+\+\n'
> +} > "$EXP"


Could you save the result of these printf statements into
strace-E.expected file and commit it along with strace-E.test?

See e.g. strace-T.test.


-- 
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/20160607/165dbb24/attachment.bin>


More information about the Strace-devel mailing list