[RFC PATCH 01/12] kcmp.c: fix path decoding

Dmitry V. Levin ldv at altlinux.org
Fri Jun 12 16:03:45 UTC 2020


On Fri, Jun 12, 2020 at 04:33:45PM +0200, Ákos Uzonyi wrote:
> * kcmp.c SYS_FUNC(kcmp): Fix some pid arguments.
> * tests/kcmp.c (printpidfd): Print path if VERBOSE_FD
> (main): Use our real pid if real fds are used.
> ---
>  kcmp.c       |  6 +++---
>  tests/kcmp.c | 21 +++++++++++++++++++--
>  2 files changed, 22 insertions(+), 5 deletions(-)
> 
> diff --git a/kcmp.c b/kcmp.c
> index 6819265b..ef46455c 100644
> --- a/kcmp.c
> +++ b/kcmp.c
> @@ -38,7 +38,7 @@ SYS_FUNC(kcmp)
>  			tprints(", ");
>  			printfd_pid_tracee_ns(tcp, pid1, idx1);
>  			tprints(", ");
> -			printfd_pid_tracee_ns(tcp, pid1, idx2);
> +			printfd_pid_tracee_ns(tcp, pid2, idx2);
>  
>  			break;
>  
> @@ -52,8 +52,8 @@ SYS_FUNC(kcmp)
>  			if (umove_or_printaddr(tcp, idx2, &slot))
>  				break;
>  
> -			PRINT_FIELD_PIDFD("{",  slot, efd, tcp, pid2);
> -			PRINT_FIELD_PIDFD(", ", slot, tfd, tcp, pid2);
> +			PRINT_FIELD_PIDFD("{",  slot, efd, tcp, pid1);
> +			PRINT_FIELD_PIDFD(", ", slot, tfd, tcp, pid1);
>  			PRINT_FIELD_U(", ", slot, toff);
>  			tprints("}");
>  

I'm not sure about the last hunk that changes KCMP_EPOLL_TFD decoder.


-- 
ldv


More information about the Strace-devel mailing list