[igt-dev] [PATCH i-g-t 2/2] i915/kms_chamelium: Pull chameleond logs for debugging

Arkadiusz Hiler arkadiusz.hiler at intel.com
Thu Feb 21 15:37:27 UTC 2019


On Thu, Feb 14, 2019 at 04:40:43PM -0800, Stuart Summers via igt-dev wrote:
> IGT currently logs some state information when passing commands
> to the Chamelium. There is a daemon running on the Chamelium itself,
> chameleond, which logs some additional information locally. Add
> a new set of libssh calls to extract those logs to be used in CI
> debug.
> 
> Signed-off-by: Stuart Summers <stuart.summers at intel.com>
> ---
>  Dockerfile.debian   |   1 +
>  Dockerfile.fedora   |   1 +
>  lib/igt_chamelium.c | 150 +++++++++++++++++++++++++++++++++++++++++++-
>  lib/meson.build     |   4 ++
>  meson.build         |   4 +-
>  5 files changed, 158 insertions(+), 2 deletions(-)
> 
> diff --git a/Dockerfile.debian b/Dockerfile.debian
> index b9c3be394..77928a9ef 100644
> --- a/Dockerfile.debian
> +++ b/Dockerfile.debian
> @@ -18,6 +18,7 @@ RUN apt-get install -y \
>  			libudev-dev \
>  			libgsl-dev \
>  			libasound2-dev \
> +			libssh-dev \
>  			libxmlrpc-core-c3-dev \
>  			libjson-c-dev \
>  			libcurl4-openssl-dev \
> diff --git a/Dockerfile.fedora b/Dockerfile.fedora
> index 08a4bd224..b041bf252 100644
> --- a/Dockerfile.fedora
> +++ b/Dockerfile.fedora
> @@ -16,6 +16,7 @@ RUN dnf install -y gcc \
>  		json-c-devel \
>  		libdrm-devel \
>  		libudev-devel \
> +		libssh-devel \
>  		xmlrpc-c-devel \
>  		elfutils-devel \
>  		libunwind-devel \
> diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
> index 32b859eac..61b563e08 100644
> --- a/lib/igt_chamelium.c
> +++ b/lib/igt_chamelium.c
> @@ -30,6 +30,7 @@
>  #include <errno.h>
>  #include <xmlrpc-c/base.h>
>  #include <xmlrpc-c/client.h>
> +#include <libssh/libssh.h>

The logs looks super useful to have, indeed!

Pulling ssh library and adding all the complexity, especially when we
already have another way of talking to chamelium, seems a little too
much though.

Have you looked into how complex it would be to add a XMLRPC call
to fetch them instead?

> diff --git a/lib/meson.build b/lib/meson.build
> index dd36f8180..40d1cb65e 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -97,6 +97,10 @@ if alsa.found()
>  	lib_sources += 'igt_alsa.c'
>  endif
>  
> +if libssh.found()
> +	lib_deps += libssh
> +endif
> +
>  if chamelium.found()
>  	lib_deps += chamelium
>  	lib_sources += 'igt_chamelium.c'
> diff --git a/meson.build b/meson.build
> index 356a54142..3b4e40ce5 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -166,6 +166,8 @@ cairo = dependency('cairo', version : '>1.12.0', required : true)
>  libudev = dependency('libudev', required : true)
>  glib = dependency('glib-2.0', required : true)
>  
> +libssh = dependency('libssh', required : true)

"required : true"  makes this dependency mandatory for the whole
project, making the build fail.

What you want to do here is to make it not-required. The check you have
below, 'libssh.found()' will make sure that the dependency is there for
just the Chamelium.

-- 
Cheers,
Arek


More information about the igt-dev mailing list