include/lapi: add leaf Makefile
PATCH 1/1 include/lapi: add leaf Makefile
include/lapi and include/lapi/syscalls lack Makefiles, so 'make check' does not work in these directories. Add minimal leaf Makefiles.
--- include/lapi/Makefile | 8 ++++++++ include/lapi/syscalls/Makefile | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 include/lapi/Makefile create mode 100644 include/lapi/syscalls/Makefile
include/lapi/Makefile new file +8 -0
@@ -0,0 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2026 Jinseok Kim <[email protected]> + +top_srcdir ?= ../../ + +include $(top_srcdir)/include/mk/env_pre.mk + +include $(top_srcdir)/include/mk/generic_leaf_target.mk
include/lapi/syscalls/Makefile new file +8 -0
@@ -0,0 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2026 Jinseok Kim <[email protected]> + +top_srcdir ?= ../../../ + +include $(top_srcdir)/include/mk/env_pre.mk + +include $(top_srcdir)/include/mk/generic_leaf_target.mk
--
2.43.0
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 6 lines · Jinseok Kim
include/lapiandinclude/lapi/syscallslack Makefiles, so 'make check' does not work in these directories. Add minimal leaf Makefiles.Signed-off-by Jinseok Kim <[email protected]>
Signature · 6 lines
Regards, Li Wang Email: [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Jinseok,
Thanks for fixing this!
Quoted 1 line
nit: Please next time avoid space before ':'.
Quoted 2 lines
include/lapiandinclude/lapi/syscallslack Makefiles, so 'make check' does not work in these directories. Add minimal leaf Makefiles.
nit: Also it'd go here.
Quoted 29 lines
Signed-off-by Jinseok Kim <[email protected]>--- include/lapi/Makefile | 8 ++++++++ include/lapi/syscalls/Makefile | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 include/lapi/Makefile create mode 100644 include/lapi/syscalls/Makefileinclude/lapi/Makefile new file +8
-0@@ -0,0 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2026 Jinseok Kim <[email protected]> + +top_srcdir ?= ../../ + +include $(top_srcdir)/include/mk/env_pre.mk + +include $(top_srcdir)/include/mk/generic_leaf_target.mkinclude/lapi/syscalls/Makefile +0
-0new file mode 100644
index 000000000..e46c90ef5
include/lapi/syscalls/Makefile line 8
Quoted 8 lines
include/lapi/syscalls/Makefile new file +8
-0@@ -0,0 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2026 Jinseok Kim <[email protected]> + +top_srcdir ?= ../../../ + +include $(top_srcdir)/include/mk/env_pre.mk + +include $(top_srcdir)/include/mk/generic_leaf_target.mk
Why do we need this file? This one should be deleted. Also, because make install works for include directory, it should work here as well.
I would just copy that header, update top_srcdir location and also include generic_trunk_target.mk to include/Makefile.
I think this is a better version.
Kind regards,
Petr
Makefile +1 -1
@@ -24,4 +24,4 @@ ac-maintainer-clean:: ac-clean vpath %.h $(abs_srcdir) -include $(top_srcdir)/include/mk/generic_leaf_target.mk +include $(top_srcdir)/include/mk/generic_trunk_target.mk
lapi/Makefile +22 -2
@@ -1,8 +1,28 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# Copyright (C) 2026 Jinseok Kim <[email protected]> +# Copyright (C) 2009, Cisco Systems Inc. +# Copyright (c) Linux Test Project, 2026 +# Ngie Cooper, July 2009 -top_srcdir ?= ../../ +top_srcdir ?= ../.. include $(top_srcdir)/include/mk/env_pre.mk +INSTALL_DIR := $(includedir)/lapi + +INSTALL_MODE := 00644 + +INSTALL_TARGETS := *.h + +MAKE_TARGETS := + +.PHONY: ac-clean ac-distclean ac-maintainer-clean distclean maintainer-clean +distclean:: clean ac-distclean +maintainer-clean:: distclean ac-maintainer-clean +ac-clean ac-distclean:: + $(RM) -f config.h lapi/syscalls.h stamp-h1 +ac-maintainer-clean:: ac-clean + $(RM) -f config.h.in + +vpath %.h $(abs_srcdir) + include $(top_srcdir)/include/mk/generic_leaf_target.mk
lapi/syscalls/Makefile deleted +0 -8
@@ -1,8 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-or-later -# Copyright (C) 2026 Jinseok Kim <[email protected]> - -top_srcdir ?= ../../../ - -include $(top_srcdir)/include/mk/env_pre.mk - -include $(top_srcdir)/include/mk/generic_leaf_target.mk
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 59 lines · Petr Vorel
Hi Jinseok,
Thanks for fixing this!
Quoted 1 line
nit: Please next time avoid space before ':'.
Quoted 2 lines
include/lapiandinclude/lapi/syscallslack Makefiles, so 'make check' does not work in these directories. Add minimal leaf Makefiles.nit: Also it'd go here.
Quoted 29 lines
Signed-off-by Jinseok Kim <[email protected]>--- include/lapi/Makefile | 8 ++++++++ include/lapi/syscalls/Makefile | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 include/lapi/Makefile create mode 100644 include/lapi/syscalls/Makefileinclude/lapi/Makefile new file +8
-0@@ -0,0 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2026 Jinseok Kim <[email protected]> + +top_srcdir ?= ../../ + +include $(top_srcdir)/include/mk/env_pre.mk + +include $(top_srcdir)/include/mk/generic_leaf_target.mkinclude/lapi/syscalls/Makefile +0
-0new file mode 100644
index 000000000..e46c90ef5include/lapi/syscalls/Makefile line 8
Quoted 8 lines
include/lapi/syscalls/Makefile new file +8
-0@@ -0,0 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2026 Jinseok Kim <[email protected]> + +top_srcdir ?= ../../../ + +include $(top_srcdir)/include/mk/env_pre.mk + +include $(top_srcdir)/include/mk/generic_leaf_target.mkWhy do we need this file? This one should be deleted. Also, because make install works for include directory, it should work here as well.
I would just copy that header, updatetop_srcdirlocation and also include generic_trunk_target.mk toinclude/Makefile.
Quoted 1 line
I think this is a better version.
Yes, this solution looks smarter, but tiny queries below.
Quoted 4 lines
...
include $(top_srcdir)/include/mk/env_pre.mk+INSTALL_DIR := $(includedir)/lapi
I'm doubting should we install the include/lapi/ local header files to the /opt/ltp/include?
lapi/syscalls/Makefile
Quoted 3 lines
...
lapi/syscalls/Makefile deleted +0
-0
Does the make check still work (inside include/lapi/syscalls/) without this Makefile?
Signature · 5 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/ltp
PATCH 1/1 include/lapi: add leaf Makefile
Hi,
Thanks for the review!
If we switch to generic_trunk, the current directory is not checked; only subdirectories are traversed.
For example, running make check in include/ will descend into include/lapi, and running make check in include/lapi will descend into include/lapi/syscalls.
Thanks,
Jinseok.
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Jinseok,
Quoted 3 lines
Hi,
Thanks for the review!
Yw.
Quoted 2 lines
If we switch to
generic_trunk, the current directory is not checked; only subdirectories are traversed.
FYI by this I meant this change (part of more changes stated previously):
Makefile +1 -1
@@ -24,4 +24,4 @@ ac-maintainer-clean:: ac-clean vpath %.h $(abs_srcdir) -include $(top_srcdir)/include/mk/generic_leaf_target.mk +include $(top_srcdir)/include/mk/generic_trunk_target.mk
Quoted 3 lines
For example, running
make checkininclude/will descend intoinclude/lapi, and runningmake checkininclude/lapiwill descend intoinclude/lapi/syscalls.
And with that change make check in include works:
ltp/include $ make check-tst_fs.h
CHECK include/tst_fs.h
tst_fs.h:83: CHECK: 'swtich' may be misspelled - perhaps 'switch'? tst_fs.h:157: WARNING: please, no spaces at the start of a line tst_fs.h:157: WARNING: Prefer __printf(1, 2) over __attribute__((format(printf, 1, 2)))
make: [../include/mk/rules.mk:69: check-tst_fs.h] Error 1 (ignored)
ltp/include/lapi $ make check-tls.h
CHECK include/lapi/tls.h
tls.h:1: WARNING: Improper SPDX comment style for 'tls.h', please use '/*' instead tls.h:1: WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 tls.h:35: WARNING: do not add new typedefs
tls.h:49: WARNING: Missing a blank line after declarations
tls.h:56: WARNING: Missing a blank line after declarations
make: [../../include/mk/rules.mk:69: check-tls.h] Error 1 (ignored)
Kind regards,
Petr
Quoted 2 lines
Thanks,
Jinseok.
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Li,
[ Cc Cyril if he wants to add his 2 cents ]
Quoted 64 lines · Petr Vorel
Quoted 59 lines
Hi Jinseok,
Thanks for fixing this!
Quoted 1 line
nit: Please next time avoid space before ':'.
Quoted 2 lines
include/lapiandinclude/lapi/syscallslack Makefiles, so 'make check' does not work in these directories. Add minimal leaf Makefiles.nit: Also it'd go here.
Quoted 29 lines
Signed-off-by Jinseok Kim <[email protected]>--- include/lapi/Makefile | 8 ++++++++ include/lapi/syscalls/Makefile | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 include/lapi/Makefile create mode 100644 include/lapi/syscalls/Makefileinclude/lapi/Makefile new file +8
-0@@ -0,0 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2026 Jinseok Kim <[email protected]> + +top_srcdir ?= ../../ + +include $(top_srcdir)/include/mk/env_pre.mk + +include $(top_srcdir)/include/mk/generic_leaf_target.mkinclude/lapi/syscalls/Makefile +0
-0new file mode 100644
index 000000000..e46c90ef5include/lapi/syscalls/Makefile line 8
Quoted 8 lines
include/lapi/syscalls/Makefile new file +8
-0@@ -0,0 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2026 Jinseok Kim <[email protected]> + +top_srcdir ?= ../../../ + +include $(top_srcdir)/include/mk/env_pre.mk + +include $(top_srcdir)/include/mk/generic_leaf_target.mkWhy do we need this file? This one should be deleted. Also, because make install works for include directory, it should work here as well.
I would just copy that header, updatetop_srcdirlocation and also include generic_trunk_target.mk toinclude/Makefile.Quoted 1 line
I think this is a better version.
Yes, this solution looks smarter, but tiny queries below.
Quoted 7 lines
Quoted 4 lines
...
include $(top_srcdir)/include/mk/env_pre.mk+INSTALL_DIR := $(includedir)/lapi
I'm doubting should we install the
include/lapi/local header files to the/opt/ltp/include?
Do you question *whether* install lapi/*.h or *where* to install them? We install include/*.h files. What is a difference with include/lapi/?
I'd say either install both or none. I would prefer to not install any, LTP library is not separated anyway (there is an old Andrea's effort, but that uses meson anyway). Installation was added in 2008 and I doubt anybody is using it.
Quoted 6 lines
lapi/syscalls/Makefile
Quoted 3 lines
...
lapi/syscalls/Makefile deleted +0
-0Does the
make checkstill work (insideinclude/lapi/syscalls/) without thisMakefile?
Sure not. Do we really want to check generate_arch.sh and generate_syscalls.sh in arch? If yes, sure it needs to be added, but that was not my intention when creating #1262. I really wanted to check C (and shell) library and tests code.
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 7 lines · Petr Vorel
Quoted 4 lines
Quoted 1 line
+INSTALL_DIR := $(includedir)/lapi
I'm doubting should we install the
include/lapi/local header files to the/opt/ltp/include?Do you question *whether* install lapi/*.h or *where* to install them? We install
include/*.hfiles. What is a difference withinclude/lapi/?
The former, I guess we don't need to install any.
Quoted 4 lines
I'd say either install both or none. I would prefer to not install any, LTP library is not separated anyway (there is an old Andrea's effort, but that uses meson anyway). Installation was added in 2008 and I doubt anybody is using it.
Yes, that was exactly my point, we'd better remove the INSTALL_* part from the Makefile you posted.
-INSTALL_DIR := $(includedir)/lapi
-
-INSTALL_MODE := 00644
-
-INSTALL_TARGETS := *.h
Quoted 9 lines
Quoted 5 lines
lapi/syscalls/Makefile
Quoted 2 lines
lapi/syscalls/Makefile deleted +0
-0Does the
make checkstill work (insideinclude/lapi/syscalls/) without thisMakefile?Sure not. Do we really want to check
generate_arch.shandgenerate_syscalls.shin arch? If yes, sure it needs to be added, but that was not my intention when creating #1262. I really wanted to check C (and shell) library and tests code.
I'm ok with both, so without that Makefile we could do make check in /include/lapi/.
Signature · 5 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/ltp
Review
Quoted 8 lines
Yes, that was exactly my point, we'd better remove the INSTALL_* part from the
Makefileyou posted.(quoted diff) +0
-5-INSTALL_DIR := $(includedir)/lapi - -INSTALL_MODE := 00644 - -INSTALL_TARGETS := *.h
And we even don't need the additional clean targets, for the make-check which just simply:
include/Makefile +1 -1
@@ -24,4 +24,4 @@ ac-maintainer-clean:: ac-clean vpath %.h $(abs_srcdir) -include $(top_srcdir)/include/mk/generic_leaf_target.mk +include $(top_srcdir)/include/mk/generic_trunk_target.mk
include/lapi/Makefile new file +8 -0
@@ -0,0 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2026 Jinseok Kim <[email protected]> + +top_srcdir ?= ../../ + +include $(top_srcdir)/include/mk/env_pre.mk + +include $(top_srcdir)/include/mk/generic_leaf_target.mk
Signature · 5 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Li,
Quoted 26 lines
Review
Quoted 8 lines
Yes, that was exactly my point, we'd better remove the INSTALL_* part from the
Makefileyou posted.(quoted diff) +0
-5-INSTALL_DIR := $(includedir)/lapi - -INSTALL_MODE := 00644 - -INSTALL_TARGETS := *.hAnd we even don't need the additional clean targets, for the make-check which just simply:
include/Makefile +1
-1@@ -24,4 +24,4 @@ ac-maintainer-clean:: ac-clean vpath %.h $(abs_srcdir) -include $(top_srcdir)/include/mk/generic_leaf_target.mk +include $(top_srcdir)/include/mk/generic_trunk_target.mkinclude/lapi/Makefile new file +0
-0
include/lapi/Makefile line 8
Quoted 8 lines
include/lapi/Makefile new file +8
-0@@ -0,0 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2026 Jinseok Kim <[email protected]> + +top_srcdir ?= ../../ + +include $(top_srcdir)/include/mk/env_pre.mk + +include $(top_srcdir)/include/mk/generic_leaf_target.mk
+1 (+ deleted that INSTALL_* variables).
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 11 lines
Quoted 7 lines · Petr Vorel
Quoted 4 lines
Quoted 1 line
+INSTALL_DIR := $(includedir)/lapi
I'm doubting should we install the
include/lapi/local header files to the/opt/ltp/include?Do you question *whether* install lapi/*.h or *where* to install them? We install
include/*.hfiles. What is a difference withinclude/lapi/?The former, I guess we don't need to install any.
+1
Review
Quoted 13 lines
Quoted 4 lines
I'd say either install both or none. I would prefer to not install any, LTP library is not separated anyway (there is an old Andrea's effort, but that uses meson anyway). Installation was added in 2008 and I doubt anybody is using it.
Yes, that was exactly my point, we'd better remove the INSTALL_* part from the
Makefileyou posted.(quoted diff) +0
-5-INSTALL_DIR := $(includedir)/lapi - -INSTALL_MODE := 00644 - -INSTALL_TARGETS := *.h
+1, let's drop it. Ideally as a separate patch in include/Makefile, so that include/lapi/Makefile can be based on it. Maybe we could even have a template in include/mk/ instead of copypasting (when now we will not have INSTALL_*, but I don't require it (it's just 2x Makefile, they can be copy pasted).
Quoted 6 lines
Quoted 5 lines
Quoted 5 lines
lapi/syscalls/Makefile
Quoted 2 lines
lapi/syscalls/Makefile deleted +0
-0Does the
make checkstill work (insideinclude/lapi/syscalls/) without thisMakefile?
Quoted 6 lines
Quoted 3 lines
Sure not. Do we really want to check
generate_arch.shandgenerate_syscalls.shin arch? If yes, sure it needs to be added, but that was not my intention when creating #1262. I really wanted to check C (and shell) library and tests code.I'm ok with both, so without that
Makefilewe could domake checkin /include/lapi/.
+1.
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
PATCH v2 1/1 include/lapi: add leaf Makefile
Convert include/Makefile to use generic_trunk_target.mk and add minimal leaf Makefile in include/lapi.
---
Changes in v2:
- Switch include/Makefile to trunk and remove lapi/syscalls/Makefile
- Link to v1 : https://lore.kernel.org/ltp/[email protected]
--- include/Makefile | 2 +- include/lapi/Makefile | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 include/lapi/Makefile
include/Makefile +1 -1
@@ -24,4 +24,4 @@ ac-maintainer-clean:: ac-clean vpath %.h $(abs_srcdir) -include $(top_srcdir)/include/mk/generic_leaf_target.mk +include $(top_srcdir)/include/mk/generic_trunk_target.mk
include/lapi/Makefile new file +10 -0
@@ -0,0 +1,10 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2009, Cisco Systems Inc. +# Copyright (c) Linux Test Project, 2026 +# Ngie Cooper, July 2009 + +top_srcdir ?= ../../ + +include $(top_srcdir)/include/mk/env_pre.mk + +include $(top_srcdir)/include/mk/generic_leaf_target.mk
--
2.43.0
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Jinseok,
Quoted 4 lines · Jinseok Kim
include/lapi: add leafMakefileConvert
include/Makefileto use generic_trunk_target.mk and add minimal leafMakefileininclude/lapi.
The commit body describes what the patch does but not why. Please add a sentence stating the problem, e.g.: "include/lapi/ had no Makefile of its own, so include/ was incorrectly treated as a leaf node and headers under lapi/ were not installed."
[...]
---
Note:
Our agent completed the review of the patch. The full review can be found at: https://github.com/linux-test-project/ltp-agent/actions/runs/24735550612
The agent can sometimes produce false positives although often its findings are genuine. If you find issues with the review, please comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Jinseok,
Quoted 2 lines
Convert
include/Makefileto use generic_trunk_target.mk and add minimal leafMakefileininclude/lapi.
add minimal leaf Makefile in include/lapi in order to have 'make check'.
FYI AI is correct it's better to describe the reason (although we have a ticket, one day might github disappear and we lost the reason in the ticket).
Wait little longer if Li has time to ack this.
Quoted 29 lines
Signed-off-by Jinseok Kim <[email protected]>---
Changes in v2:
- Switchinclude/Makefileto trunk and remove lapi/syscalls/Makefile
- Link to v1 : https://lore.kernel.org/ltp/[email protected]--- include/Makefile | 2 +- include/lapi/Makefile | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 include/lapi/Makefileinclude/Makefile +1
-1@@ -24,4 +24,4 @@ ac-maintainer-clean:: ac-clean vpath %.h $(abs_srcdir) -include $(top_srcdir)/include/mk/generic_leaf_target.mk +include $(top_srcdir)/include/mk/generic_trunk_target.mkinclude/lapi/Makefile new file +0
-0
include/lapi/Makefile line 2
Quoted 2 lines
include/lapi/Makefile new file +2
-0@@ -0,0 +1,10 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2009, Cisco Systems Inc.
I'll remove this line before merge. IMHO it's no longer Cisco work :). While this is related when code is significantly based on old code, I would not bother with 2 lines of Makefile.
include/lapi/Makefile line 4
Quoted 2 lines
include/lapi/Makefile new file +2
-0+# Copyright (c) Linux Test Project, 2026 +# Ngie Cooper, July 2009
And this one.
Kind regards,
Petr
Quoted 6 lines
include/lapi/Makefile new file +6
-0+ +top_srcdir ?= ../../ + +include $(top_srcdir)/include/mk/env_pre.mk + +include $(top_srcdir)/include/mk/generic_leaf_target.mk
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp