Re: [igt-dev] [PATCH i-g-t v5] tests/kms_chamelium: skip if GetAudioFormat is not supported

Arkadiusz Hiler
2019-05-16T08:30:21Z

On Thu, May 16, 2019 at 10:27:57AM +0300, Simon Ser wrote:
> Skip audio tests in case GetAudioFormat is not supported by the Chamelium
> device (because it is outdated).
>
> A new __chamelium_rpc function has been introduced. The difference with
> chamelium_rpc is that it doesn't asserts that the XML-RPC succeeds.
>
> A new chamelium_supports_get_audio_format function has been introduced. It
> tries to call GetAudioFormats with abritrary parameters, and checks whether the
> call fails because the method doesn't exist. It is not possible to generalize
> it into chamelium_supports_method because some methods might have side-effects
> (and the only way to check whether a method exists is to try to call it).
>
> Signed-off-by: Simon Ser <simon.ser@intel.com>
> Cc: Petri Latvala <petri.latvala@intel.com>
> Cc: Arek <arkadiusz.hiler@intel.com>

Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>

> ---
>
> Changes from v4 to v5: don't expose chamelium_supports_get_audio_format
> directly, instead call it in chamelium_has_audio_support (Arek)

Traditionally we are keeping them in the commit message to have some
context on evolution of the patch.

--
Cheers,
Arek