public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [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

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