public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [CI FAILURE] Re: [PATCH v4] Add test for UI_GET_NAME ioctl
Date: Tue, 24 Oct 2023 11:33:00 +0200	[thread overview]
Message-ID: <ZTePTBOKBQDK0v24@yuki> (raw)
In-Reply-To: <20231024091052.GA219060@pevik>

Hi!
> > I've adjusted the FAIL/PASS messages and pushed, thanks.
> 
> UI_GET_NAME() from include/uapi/linux/uinput.h is not on the old CentOS 7 we
> still support:
> 
> https://github.com/linux-test-project/ltp/actions/runs/6614554688/job/17964785134
> /__w/ltp/ltp/testcases/kernel/input/input_helper.c:194:2: error: implicit declaration of function 'UI_GET_SYSNAME' [-Werror=implicit-function-declaration]
>   SAFE_IOCTL(NULL, fd, UI_GET_SYSNAME(sizeof(sys_name)), sys_name, NULL);
>   ^
> 
> I'll have look later today for the fix. I suppose we need lapi/uinput.h with
> adds a fallback definition. It was added in kernel v3.15 in
> e3480a61fca7 ("Input: uinput - add UI_GET_SYSNAME ioctl to retrieve the sysfs path")
> 
> Also, there is also an API version change, we could use this if simple ifndef
> UI_GET_SYSNAME + fallback will not be enough (e.g. test fails because it
> requires newer kernel API).
> 
> -#define UINPUT_VERSION         3
> +#define UINPUT_VERSION         4

Given that UI_GET_SYSNAME is a macro we can do as well:

#ifndef UI_GET_SYSNAME
# define UI_GET_SYSNAME(len) ...
#endif

However at the same time we would need to actually check if the ioctl is
supported or not, because if the CentOS 7 kernel does not support
UI_GET_SYSNAME ioctl() the SAFE_IOCTL() will fail with EINVAL.

Also looking at the linux/uinput.h there are three more ioctls() added
in version 5 that should be tested as well. I suppose that we will need
add an issue for that.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      reply	other threads:[~2023-10-24  9:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-12 11:13 [LTP] [PATCH v1] Add test for UI_GET_NAME ioctl Wei Gao via ltp
2023-10-12 11:25 ` [LTP] [PATCH v2] " Wei Gao via ltp
2023-10-12 14:05   ` Cyril Hrubis
2023-10-14  3:36     ` Wei Gao via ltp
2023-10-16 15:49       ` Cyril Hrubis
2023-10-16 23:52         ` Wei Gao via ltp
2023-10-14  3:31   ` [LTP] [PATCH v3] " Wei Gao via ltp
2023-10-17 11:08     ` Cyril Hrubis
2023-10-17 13:16     ` [LTP] [PATCH v4] " Wei Gao via ltp
2023-10-23 14:16       ` Cyril Hrubis
2023-10-24  9:10         ` [LTP] [CI FAILURE] " Petr Vorel
2023-10-24  9:33           ` Cyril Hrubis [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZTePTBOKBQDK0v24@yuki \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox