On Wed, Sep 21, 2016 at 06:12:28AM +0300, Eugene Syromyatnikov wrote:
> * tests/init.sh (run_strace_match_diff): Add support for providing
>   arguments to program via the PROG_ARGS environment variable.
> ---
>  tests/init.sh |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/init.sh b/tests/init.sh
> index 46a08f9..e37fb20 100644
> --- a/tests/init.sh
> +++ b/tests/init.sh
> @@ -205,10 +205,12 @@ match_grep()
>  # Usage: run_strace_match_diff [args to run_strace]
>  run_strace_match_diff()
>  {
> +     local prog_cmdline=
>       args="$*"
>       [ -n "$args" -a -z "${args##*-e trace=*}" ] ||
>               set -- -e trace="$NAME" "$@"
> -     run_prog > /dev/null
> +     [ -n "$PROG_ARGS" ] && prog_cmdline="./$NAME $PROG_ARGS"
> +     run_prog $prog_cmdline > /dev/null
>       run_strace "$@" $args > "$EXP"
>       match_diff "$LOG" "$EXP"
>       rm -f "$EXP"

I don't think we really need it.  I prefer the approach taken by
tests/execve-v.c and similar tests/*-v.c tests.


-- 
ldv

Attachment: pgpRh0gP6y4bG.pgp
Description: PGP signature

------------------------------------------------------------------------------
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to