[igt-dev] [PATCH i-g-t] lib/igt_chamelium.c: Skip test if chamelium

Martin Peres martin.peres at linux.intel.com
Thu Dec 12 12:07:45 UTC 2019


On 12/12/2019 13:26, Kunal Joshi wrote:
> If chamelium is not present at the specified IP in the igtrc file,
> tests should be skipped instead of failing.
> Adding a change to skip tests on any network related issue and
> assert on any other issue.
> 
> Signed-off-by: Kunal Joshi <kunal1.joshi at intel.com>
> ---
>  lib/igt_chamelium.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
> index 9971f51..79eddde 100644
> --- a/lib/igt_chamelium.c
> +++ b/lib/igt_chamelium.c
> @@ -344,9 +344,12 @@ static xmlrpc_value *chamelium_rpc(struct chamelium *chamelium,
>  				 format_str, va_args);
>  	va_end(va_args);
>  
> -	igt_assert_f(!chamelium->env.fault_occurred,
> -		     "Chamelium RPC call failed: %s\n",
> -		     chamelium->env.fault_string);
> +	if (chamelium->env.fault_code == XMLRPC_NETWORK_ERROR)
> +		igt_skip("Chamelium not found at specified IP");

This message is misleading when the network just did not come back.

I prefer the fact that the test fails as it draws attention to either a
mis-configured igtrc, a network problem, or a chamelium problem.

What is your rationale for this change? Skips are considered as failure
anyway from our bug tracking point of view.

Martin

> +	else
> +		igt_assert_f(!chamelium->env.fault_occurred,
> +				"Chamelium RPC call failed: %s\n",
> +				chamelium->env.fault_string);
>  
>  	return res;
>  }
> 


More information about the igt-dev mailing list