[igt-dev] [PATCH] lib/igt_aux: do not complain about dead processes

Kamil Konieczny kamil.konieczny at linux.intel.com
Thu Jul 14 15:33:29 UTC 2022


On 2022-07-14 at 16:38:05 +0200, Andrzej Hajda wrote:
> During process lookup some processes can be dead already, in such case
> opendir(proc_path) can fail with ENOENT. It is fine, we do not need to
> abort test.
> 
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6042
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6054
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6361
> Signed-off-by: Andrzej Hajda <andrzej.hajda at intel.com>

Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>

> ---
>  lib/igt_aux.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/lib/igt_aux.c b/lib/igt_aux.c
> index 35c67f103ba..b37bae87860 100644
> --- a/lib/igt_aux.c
> +++ b/lib/igt_aux.c
> @@ -1664,6 +1664,8 @@ __igt_lsof_audio_and_kill_proc(proc_t *proc_info, char *proc_path)
>  		return 0;
>  
>  	dp = opendir(proc_path);
> +	if (!dp && errno == ENOENT)
> +		return 0;
>  	igt_assert(dp);
>  
>  	while ((d = readdir(dp))) {
> -- 
> 2.25.1
> 


More information about the igt-dev mailing list