[LTP] [PATCH 1/1] libs: Remove 'libltp' prefix from libs source directories

Petr Vorel pvorel@suse.cz
Fri Apr 19 13:02:30 CEST 2024


LTP internal libraries are located in libs/ directory. There is no need
to keep 'libltp' prefix in their own directories. NOTE: resulted
libraries (*.a) keep expected 'libltp' prefix.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Hi Li, Cyril,

I know renaming files is not optimal. But history will be kept, when
browsing with gitk or git gui.

Improvement: less typing when cd to the directory.

Tested:
https://github.com/pevik/ltp/actions/runs/8752048451

Kind regards,
Petr

 include/mk/testcases.mk                            | 6 +++---
 libs/{libltpipc => ipc}/Makefile                   | 0
 libs/{libltpipc => ipc}/libipc.c                   | 0
 libs/{libltpipc => ipc}/libmsgctl.c                | 0
 libs/{libltpnewipc => newipc}/Makefile             | 0
 libs/{libltpnewipc => newipc}/libnewipc.c          | 0
 libs/{libltpnuma => numa}/Makefile                 | 0
 libs/{libltpnuma => numa}/tst_numa.c               | 0
 libs/{libltpsigwait => sigwait}/Makefile           | 0
 libs/{libltpsigwait => sigwait}/sigwait.c          | 0
 libs/{libltpswap => swap}/Makefile                 | 0
 libs/{libltpswap => swap}/libswap.c                | 0
 libs/{libltpuinput => uinput}/Makefile             | 0
 libs/{libltpuinput => uinput}/tst_uinput.c         | 0
 libs/{libltpvdso => vdso}/Makefile                 | 0
 libs/{libltpvdso => vdso}/README                   | 0
 libs/{libltpvdso => vdso}/parse_vdso.c             | 0
 libs/{libltpvdso => vdso}/vdso_helpers.c           | 0
 testcases/kernel/mem/ksm/Makefile                  | 2 +-
 testcases/kernel/syscalls/clock_gettime/Makefile   | 2 +-
 testcases/kernel/syscalls/get_mempolicy/Makefile   | 2 +-
 testcases/kernel/syscalls/ipc/msgctl/Makefile      | 2 +-
 testcases/kernel/syscalls/ipc/msgget/Makefile      | 2 +-
 testcases/kernel/syscalls/ipc/msgrcv/Makefile      | 2 +-
 testcases/kernel/syscalls/ipc/msgsnd/Makefile      | 2 +-
 testcases/kernel/syscalls/ipc/msgstress/Makefile   | 2 +-
 testcases/kernel/syscalls/ipc/semctl/Makefile      | 2 +-
 testcases/kernel/syscalls/ipc/semget/Makefile      | 2 +-
 testcases/kernel/syscalls/ipc/semop/Makefile       | 2 +-
 testcases/kernel/syscalls/ipc/shmat/Makefile       | 2 +-
 testcases/kernel/syscalls/ipc/shmctl/Makefile      | 2 +-
 testcases/kernel/syscalls/ipc/shmdt/Makefile       | 2 +-
 testcases/kernel/syscalls/ipc/shmget/Makefile      | 2 +-
 testcases/kernel/syscalls/kill/Makefile            | 2 +-
 testcases/kernel/syscalls/mbind/Makefile           | 2 +-
 testcases/kernel/syscalls/mremap/Makefile          | 2 +-
 testcases/kernel/syscalls/rt_sigtimedwait/Makefile | 2 +-
 testcases/kernel/syscalls/set_mempolicy/Makefile   | 2 +-
 testcases/kernel/syscalls/sigtimedwait/Makefile    | 2 +-
 testcases/kernel/syscalls/sigwait/Makefile         | 2 +-
 testcases/kernel/syscalls/sigwaitinfo/Makefile     | 2 +-
 testcases/kernel/syscalls/swapoff/Makefile         | 2 +-
 testcases/kernel/syscalls/swapon/Makefile          | 2 +-
 testcases/kernel/uevents/Makefile                  | 2 +-
 44 files changed, 29 insertions(+), 29 deletions(-)
 rename libs/{libltpipc => ipc}/Makefile (100%)
 rename libs/{libltpipc => ipc}/libipc.c (100%)
 rename libs/{libltpipc => ipc}/libmsgctl.c (100%)
 rename libs/{libltpnewipc => newipc}/Makefile (100%)
 rename libs/{libltpnewipc => newipc}/libnewipc.c (100%)
 rename libs/{libltpnuma => numa}/Makefile (100%)
 rename libs/{libltpnuma => numa}/tst_numa.c (100%)
 rename libs/{libltpsigwait => sigwait}/Makefile (100%)
 rename libs/{libltpsigwait => sigwait}/sigwait.c (100%)
 rename libs/{libltpswap => swap}/Makefile (100%)
 rename libs/{libltpswap => swap}/libswap.c (100%)
 rename libs/{libltpuinput => uinput}/Makefile (100%)
 rename libs/{libltpuinput => uinput}/tst_uinput.c (100%)
 rename libs/{libltpvdso => vdso}/Makefile (100%)
 rename libs/{libltpvdso => vdso}/README (100%)
 rename libs/{libltpvdso => vdso}/parse_vdso.c (100%)
 rename libs/{libltpvdso => vdso}/vdso_helpers.c (100%)

diff --git a/include/mk/testcases.mk b/include/mk/testcases.mk
index 444020f16..bec8d8cc4 100644
--- a/include/mk/testcases.mk
+++ b/include/mk/testcases.mk
@@ -44,8 +44,8 @@ LDLIBS		+= -lltp
 
 ifdef LTPLIBS
 
-LTPLIBS_DIRS = $(addprefix $(abs_top_builddir)/libs/lib, $(LTPLIBS))
-LTPLIBS_FILES = $(addsuffix .a, $(addprefix $(abs_top_builddir)/libs/, $(foreach LIB,$(LTPLIBS),lib$(LIB)/lib$(LIB))))
+LTPLIBS_DIRS = $(addprefix $(abs_top_builddir)/libs/, $(LTPLIBS))
+LTPLIBS_FILES = $(addsuffix .a, $(addprefix $(abs_top_builddir)/libs/, $(foreach LIB,$(LTPLIBS),$(LIB)/lib$(LIB))))
 
 MAKE_DEPS += $(LTPLIBS_FILES)
 
@@ -61,7 +61,7 @@ else
 	@$(MAKE) --no-print-directory -C "$(dir $@)" -f "$(subst $(abs_top_builddir),$(abs_top_srcdir),$(dir $@))/Makefile" all
 endif
 
-LDFLAGS += $(addprefix -L$(top_builddir)/libs/lib, $(LTPLIBS))
+LDFLAGS += $(addprefix -L$(top_builddir)/libs/, $(LTPLIBS))
 
 endif
 
diff --git a/libs/libltpipc/Makefile b/libs/ipc/Makefile
similarity index 100%
rename from libs/libltpipc/Makefile
rename to libs/ipc/Makefile
diff --git a/libs/libltpipc/libipc.c b/libs/ipc/libipc.c
similarity index 100%
rename from libs/libltpipc/libipc.c
rename to libs/ipc/libipc.c
diff --git a/libs/libltpipc/libmsgctl.c b/libs/ipc/libmsgctl.c
similarity index 100%
rename from libs/libltpipc/libmsgctl.c
rename to libs/ipc/libmsgctl.c
diff --git a/libs/libltpnewipc/Makefile b/libs/newipc/Makefile
similarity index 100%
rename from libs/libltpnewipc/Makefile
rename to libs/newipc/Makefile
diff --git a/libs/libltpnewipc/libnewipc.c b/libs/newipc/libnewipc.c
similarity index 100%
rename from libs/libltpnewipc/libnewipc.c
rename to libs/newipc/libnewipc.c
diff --git a/libs/libltpnuma/Makefile b/libs/numa/Makefile
similarity index 100%
rename from libs/libltpnuma/Makefile
rename to libs/numa/Makefile
diff --git a/libs/libltpnuma/tst_numa.c b/libs/numa/tst_numa.c
similarity index 100%
rename from libs/libltpnuma/tst_numa.c
rename to libs/numa/tst_numa.c
diff --git a/libs/libltpsigwait/Makefile b/libs/sigwait/Makefile
similarity index 100%
rename from libs/libltpsigwait/Makefile
rename to libs/sigwait/Makefile
diff --git a/libs/libltpsigwait/sigwait.c b/libs/sigwait/sigwait.c
similarity index 100%
rename from libs/libltpsigwait/sigwait.c
rename to libs/sigwait/sigwait.c
diff --git a/libs/libltpswap/Makefile b/libs/swap/Makefile
similarity index 100%
rename from libs/libltpswap/Makefile
rename to libs/swap/Makefile
diff --git a/libs/libltpswap/libswap.c b/libs/swap/libswap.c
similarity index 100%
rename from libs/libltpswap/libswap.c
rename to libs/swap/libswap.c
diff --git a/libs/libltpuinput/Makefile b/libs/uinput/Makefile
similarity index 100%
rename from libs/libltpuinput/Makefile
rename to libs/uinput/Makefile
diff --git a/libs/libltpuinput/tst_uinput.c b/libs/uinput/tst_uinput.c
similarity index 100%
rename from libs/libltpuinput/tst_uinput.c
rename to libs/uinput/tst_uinput.c
diff --git a/libs/libltpvdso/Makefile b/libs/vdso/Makefile
similarity index 100%
rename from libs/libltpvdso/Makefile
rename to libs/vdso/Makefile
diff --git a/libs/libltpvdso/README b/libs/vdso/README
similarity index 100%
rename from libs/libltpvdso/README
rename to libs/vdso/README
diff --git a/libs/libltpvdso/parse_vdso.c b/libs/vdso/parse_vdso.c
similarity index 100%
rename from libs/libltpvdso/parse_vdso.c
rename to libs/vdso/parse_vdso.c
diff --git a/libs/libltpvdso/vdso_helpers.c b/libs/vdso/vdso_helpers.c
similarity index 100%
rename from libs/libltpvdso/vdso_helpers.c
rename to libs/vdso/vdso_helpers.c
diff --git a/testcases/kernel/mem/ksm/Makefile b/testcases/kernel/mem/ksm/Makefile
index 236625690..6aba73e61 100644
--- a/testcases/kernel/mem/ksm/Makefile
+++ b/testcases/kernel/mem/ksm/Makefile
@@ -3,7 +3,7 @@
 
 top_srcdir		?= ../../../..
 
-LTPLIBS = ltpnuma
+LTPLIBS = numa
 ksm06: LTPLDLIBS = -lltpnuma
 
 include $(top_srcdir)/include/mk/testcases.mk
diff --git a/testcases/kernel/syscalls/clock_gettime/Makefile b/testcases/kernel/syscalls/clock_gettime/Makefile
index e7f5e9e75..2d9144602 100644
--- a/testcases/kernel/syscalls/clock_gettime/Makefile
+++ b/testcases/kernel/syscalls/clock_gettime/Makefile
@@ -3,7 +3,7 @@
 
 top_srcdir		?= ../../../..
 
-LTPLIBS = ltpvdso
+LTPLIBS = vdso
 
 include $(top_srcdir)/include/mk/testcases.mk
 
diff --git a/testcases/kernel/syscalls/get_mempolicy/Makefile b/testcases/kernel/syscalls/get_mempolicy/Makefile
index a108d8209..517838f43 100644
--- a/testcases/kernel/syscalls/get_mempolicy/Makefile
+++ b/testcases/kernel/syscalls/get_mempolicy/Makefile
@@ -4,7 +4,7 @@
 
 top_srcdir		?= ../../../..
 
-LTPLIBS = ltpnuma
+LTPLIBS = numa
 
 include $(top_srcdir)/include/mk/testcases.mk
 
diff --git a/testcases/kernel/syscalls/ipc/msgctl/Makefile b/testcases/kernel/syscalls/ipc/msgctl/Makefile
index 6b2b26d05..baa2a48e6 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/Makefile
+++ b/testcases/kernel/syscalls/ipc/msgctl/Makefile
@@ -3,7 +3,7 @@
 
 top_srcdir              ?= ../../../../..
 
-LTPLIBS = ltpnewipc
+LTPLIBS = newipc
 
 include $(top_srcdir)/include/mk/testcases.mk
 
diff --git a/testcases/kernel/syscalls/ipc/msgget/Makefile b/testcases/kernel/syscalls/ipc/msgget/Makefile
index 6b2b26d05..baa2a48e6 100644
--- a/testcases/kernel/syscalls/ipc/msgget/Makefile
+++ b/testcases/kernel/syscalls/ipc/msgget/Makefile
@@ -3,7 +3,7 @@
 
 top_srcdir              ?= ../../../../..
 
-LTPLIBS = ltpnewipc
+LTPLIBS = newipc
 
 include $(top_srcdir)/include/mk/testcases.mk
 
diff --git a/testcases/kernel/syscalls/ipc/msgrcv/Makefile b/testcases/kernel/syscalls/ipc/msgrcv/Makefile
index 6b2b26d05..baa2a48e6 100644
--- a/testcases/kernel/syscalls/ipc/msgrcv/Makefile
+++ b/testcases/kernel/syscalls/ipc/msgrcv/Makefile
@@ -3,7 +3,7 @@
 
 top_srcdir              ?= ../../../../..
 
-LTPLIBS = ltpnewipc
+LTPLIBS = newipc
 
 include $(top_srcdir)/include/mk/testcases.mk
 
diff --git a/testcases/kernel/syscalls/ipc/msgsnd/Makefile b/testcases/kernel/syscalls/ipc/msgsnd/Makefile
index 85017fe90..365270802 100644
--- a/testcases/kernel/syscalls/ipc/msgsnd/Makefile
+++ b/testcases/kernel/syscalls/ipc/msgsnd/Makefile
@@ -3,7 +3,7 @@
 
 top_srcdir              ?= ../../../../..
 
-LTPLIBS = ltpnewipc
+LTPLIBS = newipc
 
 ifeq ($(UCLINUX),1)
 FILTER_OUT_MAKE_TARGETS += msgsnd05 msgsnd06
diff --git a/testcases/kernel/syscalls/ipc/msgstress/Makefile b/testcases/kernel/syscalls/ipc/msgstress/Makefile
index b821bda01..6fa163d5f 100644
--- a/testcases/kernel/syscalls/ipc/msgstress/Makefile
+++ b/testcases/kernel/syscalls/ipc/msgstress/Makefile
@@ -3,7 +3,7 @@
 
 top_srcdir              ?= ../../../../..
 
-LTPLIBS = ltpipc
+LTPLIBS = ipc
 
 include $(top_srcdir)/include/mk/testcases.mk
 
diff --git a/testcases/kernel/syscalls/ipc/semctl/Makefile b/testcases/kernel/syscalls/ipc/semctl/Makefile
index 42d00f1cd..aa11e7003 100644
--- a/testcases/kernel/syscalls/ipc/semctl/Makefile
+++ b/testcases/kernel/syscalls/ipc/semctl/Makefile
@@ -3,7 +3,7 @@
 
 top_srcdir              ?= ../../../../..
 
-LTPLIBS = ltpipc ltpnewipc
+LTPLIBS = ipc newipc
 
 include $(top_srcdir)/include/mk/testcases.mk
 
diff --git a/testcases/kernel/syscalls/ipc/semget/Makefile b/testcases/kernel/syscalls/ipc/semget/Makefile
index b1201281d..d1e778f98 100644
--- a/testcases/kernel/syscalls/ipc/semget/Makefile
+++ b/testcases/kernel/syscalls/ipc/semget/Makefile
@@ -3,7 +3,7 @@
 
 top_srcdir              ?= ../../../../..
 
-LTPLIBS = ltpnewipc
+LTPLIBS = newipc
 
 include $(top_srcdir)/include/mk/testcases.mk
 
diff --git a/testcases/kernel/syscalls/ipc/semop/Makefile b/testcases/kernel/syscalls/ipc/semop/Makefile
index 43afffb3f..5d082e912 100644
--- a/testcases/kernel/syscalls/ipc/semop/Makefile
+++ b/testcases/kernel/syscalls/ipc/semop/Makefile
@@ -3,7 +3,7 @@
 
 top_srcdir              ?= ../../../../..
 
-LTPLIBS = ltpnewipc
+LTPLIBS = newipc
 
 include $(top_srcdir)/include/mk/testcases.mk
 
diff --git a/testcases/kernel/syscalls/ipc/shmat/Makefile b/testcases/kernel/syscalls/ipc/shmat/Makefile
index 6b2b26d05..baa2a48e6 100644
--- a/testcases/kernel/syscalls/ipc/shmat/Makefile
+++ b/testcases/kernel/syscalls/ipc/shmat/Makefile
@@ -3,7 +3,7 @@
 
 top_srcdir              ?= ../../../../..
 
-LTPLIBS = ltpnewipc
+LTPLIBS = newipc
 
 include $(top_srcdir)/include/mk/testcases.mk
 
diff --git a/testcases/kernel/syscalls/ipc/shmctl/Makefile b/testcases/kernel/syscalls/ipc/shmctl/Makefile
index f79ffa6dc..d4278dcd7 100644
--- a/testcases/kernel/syscalls/ipc/shmctl/Makefile
+++ b/testcases/kernel/syscalls/ipc/shmctl/Makefile
@@ -3,7 +3,7 @@
 
 top_srcdir              ?= ../../../../..
 
-LTPLIBS = ltpnewipc
+LTPLIBS = newipc
 
 shmctl05: CFLAGS += -pthread
 shmctl05: LDLIBS += -lrt
diff --git a/testcases/kernel/syscalls/ipc/shmdt/Makefile b/testcases/kernel/syscalls/ipc/shmdt/Makefile
index b1201281d..d1e778f98 100644
--- a/testcases/kernel/syscalls/ipc/shmdt/Makefile
+++ b/testcases/kernel/syscalls/ipc/shmdt/Makefile
@@ -3,7 +3,7 @@
 
 top_srcdir              ?= ../../../../..
 
-LTPLIBS = ltpnewipc
+LTPLIBS = newipc
 
 include $(top_srcdir)/include/mk/testcases.mk
 
diff --git a/testcases/kernel/syscalls/ipc/shmget/Makefile b/testcases/kernel/syscalls/ipc/shmget/Makefile
index b1201281d..d1e778f98 100644
--- a/testcases/kernel/syscalls/ipc/shmget/Makefile
+++ b/testcases/kernel/syscalls/ipc/shmget/Makefile
@@ -3,7 +3,7 @@
 
 top_srcdir              ?= ../../../../..
 
-LTPLIBS = ltpnewipc
+LTPLIBS = newipc
 
 include $(top_srcdir)/include/mk/testcases.mk
 
diff --git a/testcases/kernel/syscalls/kill/Makefile b/testcases/kernel/syscalls/kill/Makefile
index 0cc064b32..369eec8f2 100644
--- a/testcases/kernel/syscalls/kill/Makefile
+++ b/testcases/kernel/syscalls/kill/Makefile
@@ -3,7 +3,7 @@
 
 top_srcdir		?= ../../../..
 
-LTPLIBS = ltpipc ltpnewipc
+LTPLIBS = ipc newipc
 
 include $(top_srcdir)/include/mk/testcases.mk
 
diff --git a/testcases/kernel/syscalls/mbind/Makefile b/testcases/kernel/syscalls/mbind/Makefile
index ed7d4375c..2a7d35693 100644
--- a/testcases/kernel/syscalls/mbind/Makefile
+++ b/testcases/kernel/syscalls/mbind/Makefile
@@ -3,7 +3,7 @@
 
 top_srcdir		?= ../../../..
 
-LTPLIBS=ltpnuma
+LTPLIBS = numa
 
 include $(top_srcdir)/include/mk/testcases.mk
 
diff --git a/testcases/kernel/syscalls/mremap/Makefile b/testcases/kernel/syscalls/mremap/Makefile
index 190b7659d..9f5aca9ec 100644
--- a/testcases/kernel/syscalls/mremap/Makefile
+++ b/testcases/kernel/syscalls/mremap/Makefile
@@ -3,7 +3,7 @@
 
 top_srcdir		?= ../../../..
 
-LTPLIBS = ltpipc
+LTPLIBS = ipc
 
 include $(top_srcdir)/include/mk/testcases.mk
 
diff --git a/testcases/kernel/syscalls/rt_sigtimedwait/Makefile b/testcases/kernel/syscalls/rt_sigtimedwait/Makefile
index 1ae50b32c..f96d5dc3a 100644
--- a/testcases/kernel/syscalls/rt_sigtimedwait/Makefile
+++ b/testcases/kernel/syscalls/rt_sigtimedwait/Makefile
@@ -3,7 +3,7 @@
 
 top_srcdir ?= ../../../..
 
-LTPLIBS = ltpsigwait
+LTPLIBS = sigwait
 
 include $(top_srcdir)/include/mk/testcases.mk
 
diff --git a/testcases/kernel/syscalls/set_mempolicy/Makefile b/testcases/kernel/syscalls/set_mempolicy/Makefile
index 100780dc3..f203aa216 100644
--- a/testcases/kernel/syscalls/set_mempolicy/Makefile
+++ b/testcases/kernel/syscalls/set_mempolicy/Makefile
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-or-later
 top_srcdir		?= ../../../..
 
-LTPLIBS = ltpnuma
+LTPLIBS = numa
 
 include $(top_srcdir)/include/mk/testcases.mk
 
diff --git a/testcases/kernel/syscalls/sigtimedwait/Makefile b/testcases/kernel/syscalls/sigtimedwait/Makefile
index 1ae50b32c..f96d5dc3a 100644
--- a/testcases/kernel/syscalls/sigtimedwait/Makefile
+++ b/testcases/kernel/syscalls/sigtimedwait/Makefile
@@ -3,7 +3,7 @@
 
 top_srcdir ?= ../../../..
 
-LTPLIBS = ltpsigwait
+LTPLIBS = sigwait
 
 include $(top_srcdir)/include/mk/testcases.mk
 
diff --git a/testcases/kernel/syscalls/sigwait/Makefile b/testcases/kernel/syscalls/sigwait/Makefile
index 1ae50b32c..f96d5dc3a 100644
--- a/testcases/kernel/syscalls/sigwait/Makefile
+++ b/testcases/kernel/syscalls/sigwait/Makefile
@@ -3,7 +3,7 @@
 
 top_srcdir ?= ../../../..
 
-LTPLIBS = ltpsigwait
+LTPLIBS = sigwait
 
 include $(top_srcdir)/include/mk/testcases.mk
 
diff --git a/testcases/kernel/syscalls/sigwaitinfo/Makefile b/testcases/kernel/syscalls/sigwaitinfo/Makefile
index 1ae50b32c..f96d5dc3a 100644
--- a/testcases/kernel/syscalls/sigwaitinfo/Makefile
+++ b/testcases/kernel/syscalls/sigwaitinfo/Makefile
@@ -3,7 +3,7 @@
 
 top_srcdir ?= ../../../..
 
-LTPLIBS = ltpsigwait
+LTPLIBS = sigwait
 
 include $(top_srcdir)/include/mk/testcases.mk
 
diff --git a/testcases/kernel/syscalls/swapoff/Makefile b/testcases/kernel/syscalls/swapoff/Makefile
index 6954112a8..c39c321ea 100644
--- a/testcases/kernel/syscalls/swapoff/Makefile
+++ b/testcases/kernel/syscalls/swapoff/Makefile
@@ -3,7 +3,7 @@
 
 top_srcdir		?= ../../../..
 
-LTPLIBS = ltpswap
+LTPLIBS = swap
 
 include $(top_srcdir)/include/mk/testcases.mk
 
diff --git a/testcases/kernel/syscalls/swapon/Makefile b/testcases/kernel/syscalls/swapon/Makefile
index 6954112a8..c39c321ea 100644
--- a/testcases/kernel/syscalls/swapon/Makefile
+++ b/testcases/kernel/syscalls/swapon/Makefile
@@ -3,7 +3,7 @@
 
 top_srcdir		?= ../../../..
 
-LTPLIBS = ltpswap
+LTPLIBS = swap
 
 include $(top_srcdir)/include/mk/testcases.mk
 
diff --git a/testcases/kernel/uevents/Makefile b/testcases/kernel/uevents/Makefile
index d5ceb0719..12fc57dff 100644
--- a/testcases/kernel/uevents/Makefile
+++ b/testcases/kernel/uevents/Makefile
@@ -2,7 +2,7 @@
 
 top_srcdir			?= ../../..
 
-LTPLIBS = ltpuinput
+LTPLIBS = uinput
 
 uevent03: LDLIBS += -lltpuinput
 
-- 
2.43.0



More information about the ltp mailing list