[igt-dev] [PATCH i-g-t 6/9] lib/chamelium: Clear error after checking if chamelium is reachable

Petri Latvala petri.latvala at intel.com
Fri Feb 14 12:17:53 UTC 2020


On Wed, Feb 12, 2020 at 03:22:54PM +0200, Arkadiusz Hiler wrote:
> Otherwise this may get us stuck in perpetual failure mode.
> 
> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler at intel.com>

Reviewed-by: Petri Latvala <petri.latvala at intel.com>

> ---
>  lib/igt_chamelium.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
> index aaf17d51..b347682d 100644
> --- a/lib/igt_chamelium.c
> +++ b/lib/igt_chamelium.c
> @@ -361,11 +361,17 @@ static bool __chamelium_is_reachable(struct chamelium *chamelium)
>  	if (res != NULL)
>  		xmlrpc_DECREF(res);
>  
> -	if (chamelium->env.fault_occurred)
> +	if (chamelium->env.fault_occurred) {
>  		igt_debug("Chamelium RPC call failed: %s\n",
>  			  chamelium->env.fault_string);
>  
> -	return !chamelium->env.fault_occurred;
> +		xmlrpc_env_clean(&chamelium->env);
> +		xmlrpc_env_init(&chamelium->env);
> +
> +		return false;
> +	}
> +
> +	return true;
>  }
>  
>  void chamelium_wait_reachable(struct chamelium *chamelium, int timeout)
> -- 
> 2.24.1
> 


More information about the igt-dev mailing list