[PATCH] tests: filter strace output in uname test

Dmitry V. Levin ldv at altlinux.org
Fri Mar 11 03:10:48 UTC 2016


On Fri, Mar 11, 2016 at 10:43:02AM +0800, Fei Jie wrote:
> * tests/uname.test: Use uniq to filter strace output.
> ---
>  tests/uname.test | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/uname.test b/tests/uname.test
> index d11af15..500fbfe 100755
> --- a/tests/uname.test
> +++ b/tests/uname.test
> @@ -4,8 +4,12 @@
>  
>  . "${srcdir=.}/init.sh"
>  
> +check_prog uniq
> +
>  run_prog > /dev/null
>  OUT="$LOG.out"
> +EXP="$LOG.exp"
>  run_strace -v -euname $args >"$OUT"
> -match_diff "$LOG" "$OUT"
> -rm -f "$OUT"
> +uniq "$LOG" "$EXP"
> +match_diff "$EXP" "$OUT"
> +rm -f "$EXP" "$OUT"

Applied with two corrections: swapped names for OUT and EXP
(so that $EXP contains expected output and $OUT - filtered output),
and changed uniq usage to more traditional.


-- 
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/20160311/be41cb5e/attachment.bin>


More information about the Strace-devel mailing list