[igt-dev] [V4 i-g-t 11/24] tests/i915/gem_close_race: Fix the double closure of fd

Kamil Konieczny kamil.konieczny at linux.intel.com
Mon Jun 26 17:41:31 UTC 2023


Hi Bhanuprakash,
On 2023-06-26 at 10:40:18 +0530, Bhanuprakash Modem wrote:
> Don't close the fd in each thread, instead leave it to be
> closed by process termination
> 
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>

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

> ---
>  tests/i915/gem_close_race.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/i915/gem_close_race.c b/tests/i915/gem_close_race.c
> index 1a2efeab2..22cdc5874 100644
> --- a/tests/i915/gem_close_race.c
> +++ b/tests/i915/gem_close_race.c
> @@ -303,7 +303,7 @@ static void thread(int fd, struct drm_gem_open name,
>  			n++;
>  		} while (1);
>  
> -		close(crashme.fd);
> +		/* leave fd to be closed by process termination */
>  	}
>  
>  	timer_delete(timer);
> -- 
> 2.40.0
> 


More information about the igt-dev mailing list