Skip to contentSkip to conversation

Fix CI for CentOS 7

PATCH In review Petr Vorel 2 participants 5 messages Oct 25, 2023

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

v2 cover Fix CI for CentOS 7

Changes v1->v2:
* Revert configure.ac change (no need to check for the header, it existed since kernel git history) (Cyril)

I also plan to suggest a raise of minimal kernel supported by LTP, but let's fix the CI first.

Kind regards,
Petr

Petr Vorel (2):
lapi: Add uinput.h
input_helper: Fix compilation on CentOS 7

 include/lapi/uinput.h                 | 15 +++++++++++++++
 testcases/kernel/input/input_helper.c |  1 +
 2 files changed, 16 insertions(+)
 create mode 100644 include/lapi/uinput.h
Signature · 5 lines
2.42.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
author
#1 lore raw

PATCH v2 1/2 lapi: Add uinput.h

With the only definition UI_GET_SYSNAME, which was added in kernel 3.15, but we 3.10 (CentOS 7).

---
 include/lapi/uinput.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 include/lapi/uinput.h
include/lapi/uinput.h new file +15 -0
new file mode 100644
index 000000000..bdd6f466f
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2023 Petr Vorel <[email protected]>
+ */
+
+#ifndef LAPI_UINPUT_H__
+#define LAPI_UINPUT_H__
+
+#include <linux/uinput.h>
+
+#ifndef UI_GET_SYSNAME
+# define UI_GET_SYSNAME(len)	_IOC(_IOC_READ, UINPUT_IOCTL_BASE, 44, len)
+#endif
+
+#endif	/* LAPI_UINPUT_H__ */
Signature · 5 lines
2.42.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
author
#2 lore raw

PATCH v2 2/2 input_helper: Fix compilation on CentOS 7

In reply to Petr Vorel

Include lapi/uinput.h to fix compilation on CentOS 7
(the oldest distro in our CI). The actual functionality of the test was not tested.

---
 testcases/kernel/input/input_helper.c | 1 +
 1 file changed, 1 insertion(+)
testcases/kernel/input/input_helper.c +1 -0
index 58bb9ee10..c929de6ba 100644
@@ -25,6 +25,7 @@
 #include "test.h"
 #include "safe_macros.h"
 #include "input_helper.h"
+#include "lapi/uinput.h"
 
 #define VIRTUAL_DEVICE "virtual-device-ltp"
 
Signature · 5 lines
2.42.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
author
#4 lore raw

Hi Cyril,

thanks, merged!

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp