* [LTP] [PATCH] input: add kernel version check
@ 2016-02-19 9:38 Xiao Yang
2016-02-22 11:18 ` Cyril Hrubis
0 siblings, 1 reply; 5+ messages in thread
From: Xiao Yang @ 2016-02-19 9:38 UTC (permalink / raw)
To: ltp
In this test case, the functionality of input has been improved by
following patch:
'commit 4369c64c79a2 ("Input: Send events one packet at a time")'.
So it's not appropriate for testing on kernels that are lower than
3.7.0 anymore.
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
testcases/kernel/input/input04.c | 5 +++++
testcases/kernel/input/input05.c | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/testcases/kernel/input/input04.c b/testcases/kernel/input/input04.c
index 4b16ca7..153a47f 100644
--- a/testcases/kernel/input/input04.c
+++ b/testcases/kernel/input/input04.c
@@ -75,6 +75,11 @@ int main(int ac, char **av)
static void setup(void)
{
+ if ((tst_kvercmp(3, 7, 0)) < 0) {
+ tst_brkm(TCONF, NULL, "This test can run successfully on "
+ "kernels that are 3.7.0 and higher");
+ }
+
tst_require_root();
fd = open_uinput();
diff --git a/testcases/kernel/input/input05.c b/testcases/kernel/input/input05.c
index 5ca01d8..6769e95 100644
--- a/testcases/kernel/input/input05.c
+++ b/testcases/kernel/input/input05.c
@@ -79,6 +79,11 @@ int main(int ac, char **av)
static void setup(void)
{
+ if ((tst_kvercmp(3, 7, 0)) < 0) {
+ tst_brkm(TCONF, NULL, "This test can run successfully on "
+ "kernels that are 3.7.0 and higher");
+ }
+
tst_require_root();
fd = open_uinput();
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [LTP] [PATCH] input: add kernel version check
2016-02-19 9:38 [LTP] [PATCH] input: add kernel version check Xiao Yang
@ 2016-02-22 11:18 ` Cyril Hrubis
2016-02-23 9:50 ` Xiao Yang
2016-03-18 9:18 ` Xiao Yang
0 siblings, 2 replies; 5+ messages in thread
From: Cyril Hrubis @ 2016-02-22 11:18 UTC (permalink / raw)
To: ltp
Hi!
> In this test case, the functionality of input has been improved by
> following patch:
> 'commit 4369c64c79a2 ("Input: Send events one packet at a time")'.
> So it's not appropriate for testing on kernels that are lower than
> 3.7.0 anymore.
Are you sure that you have pointed out right commit? The commit
description does not seem relevant.
Also can you please describe why the testcases fail before 3.7.0 and
how? Does kernel send empty sync events?
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 5+ messages in thread* [LTP] [PATCH] input: add kernel version check
2016-02-22 11:18 ` Cyril Hrubis
@ 2016-02-23 9:50 ` Xiao Yang
2016-03-18 9:18 ` Xiao Yang
1 sibling, 0 replies; 5+ messages in thread
From: Xiao Yang @ 2016-02-23 9:50 UTC (permalink / raw)
To: ltp
to 2016/02/22 19:18, Cyril Hrubis wrote:
> Hi!
>> In this test case, the functionality of input has been improved by
>> following patch:
>> 'commit 4369c64c79a2 ("Input: Send events one packet at a time")'.
>> So it's not appropriate for testing on kernels that are lower than
>> 3.7.0 anymore.
> Are you sure that you have pointed out right commit? The commit
> description does not seem relevant.
>
> Also can you please describe why the testcases fail before 3.7.0 and
> how? Does kernel send empty sync events?
>
Hi !
I'm so sorry to reply this email late.
kernel will send empty sync evnets when there are no new events, because
sync(boolean type)
is set ture when there are no new events. if mouse isn't moving, i think
that nothing is received
in /dev/input/eventX. this patch imporved this function. that's right?
^ permalink raw reply [flat|nested] 5+ messages in thread* [LTP] [PATCH] input: add kernel version check
2016-02-22 11:18 ` Cyril Hrubis
2016-02-23 9:50 ` Xiao Yang
@ 2016-03-18 9:18 ` Xiao Yang
2016-03-31 18:13 ` Cyril Hrubis
1 sibling, 1 reply; 5+ messages in thread
From: Xiao Yang @ 2016-03-18 9:18 UTC (permalink / raw)
To: ltp
于 2016/02/22 19:18, Cyril Hrubis 写道:
> Hi!
>> In this test case, the functionality of input has been improved by
>> following patch:
>> 'commit 4369c64c79a2 ("Input: Send events one packet at a time")'.
>> So it's not appropriate for testing on kernels that are lower than
>> 3.7.0 anymore.
> Are you sure that you have pointed out right commit? The commit
> description does not seem relevant.
>
> Also can you please describe why the testcases fail before 3.7.0 and
> how? Does kernel send empty sync events?
>
Hi!
When we run input04 on RHEL 5.11GA and 6.7GA, it still fails. It gives
error message like this:
input04 0 TINFO : Found uinput dev at /dev/uinput
input04 0 TINFO : Unexpected ev type=0 code=0 value=0
input04 1 TFAIL : input04.c:65: Data received /dev/inputX
This failure is because kernel sends empty events. i.e
If we only send EV_SYN to input device, nothing should be received in
/dev/input/eventX.
Actually, data is received in /dev/input/eventX. This investigation
shows that it may be
improved by following patch:
'commit 4369c64c79a2 ("Input: Send events one packet at a time")'.
Do you think so ?
Regards,
Xiao Yang
^ permalink raw reply [flat|nested] 5+ messages in thread* [LTP] [PATCH] input: add kernel version check
2016-03-18 9:18 ` Xiao Yang
@ 2016-03-31 18:13 ` Cyril Hrubis
0 siblings, 0 replies; 5+ messages in thread
From: Cyril Hrubis @ 2016-03-31 18:13 UTC (permalink / raw)
To: ltp
Hi!
> >> In this test case, the functionality of input has been improved by
> >> following patch:
> >> 'commit 4369c64c79a2 ("Input: Send events one packet at a time")'.
> >> So it's not appropriate for testing on kernels that are lower than
> >> 3.7.0 anymore.
> > Are you sure that you have pointed out right commit? The commit
> > description does not seem relevant.
> >
> > Also can you please describe why the testcases fail before 3.7.0 and
> > how? Does kernel send empty sync events?
> >
> Hi!
> When we run input04 on RHEL 5.11GA and 6.7GA, it still fails. It gives
> error message like this:
>
> input04 0 TINFO : Found uinput dev at /dev/uinput
> input04 0 TINFO : Unexpected ev type=0 code=0 value=0
> input04 1 TFAIL : input04.c:65: Data received /dev/inputX
>
> This failure is because kernel sends empty events. i.e
> If we only send EV_SYN to input device, nothing should be received in
> /dev/input/eventX.
> Actually, data is received in /dev/input/eventX. This investigation
> shows that it may be
> improved by following patch:
> 'commit 4369c64c79a2 ("Input: Send events one packet at a time")'.
>
> Do you think so ?
How did you figured out that this exact commit changes the behavior?
Have you bisected it? Have you asked kernel developers?
I've looked at the input core for a while now and at the patch as well
but it's not clear to me that this commit changed the behavior in this
way. It may have, but I'm just not familiar enough with the code to say
it for certain.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-03-31 18:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-19 9:38 [LTP] [PATCH] input: add kernel version check Xiao Yang
2016-02-22 11:18 ` Cyril Hrubis
2016-02-23 9:50 ` Xiao Yang
2016-03-18 9:18 ` Xiao Yang
2016-03-31 18:13 ` Cyril Hrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox