[LTP] [PATCH v2 1/2] libs: adopt tse_ prefix for extended (non-core) library

Li Wang liwang@redhat.com
Fri Jan 16 03:25:06 CET 2026


The intention of moving extended headers under include/ was to expose them as
global interfaces, but using the tst_* prefix there is misleading. Headers
corresponding to ltp/libs* code should follow the libs* naming to distinguish
them from the core tst_* API.

Now, define and enforce the following namespace split:

 tst_: core LTP library API (lib/)
 tse_: non‑core extended library (libs/)
 tso_: legacy/old library (no new features)

Rename the following headers/sources to use a tse_ prefix and update all
includes accordingly:

 include/{ipcmsg.h => tse_ipcmsg.h}
 include/{ipcsem.h => tse_ipcsem.h}
 include/{libmsgctl.h => tse_msgctl.h}
 include/{libnewipc.h => tse_newipc.h}
 include/{tst_numa.h => tse_numa.h}
 include/{parse_vdso.h => tse_parse_vdso.h}
 include/{libsigwait.h => tse_sigwait.h}
 include/{libswap.h => tse_swap.h}
 include/{tst_uinput.h => tse_uinput.h}
 libs/ipc/{libipc.c => tse_ipc.c}
 libs/ipc/{libmsgctl.c => tse_msgctl.c}
 libs/newipc/{libnewipc.c => tse_newipc.c}
 libs/numa/{tst_numa.c => tse_numa.c}
 libs/sigwait/{sigwait.c => tse_sigwait.c}
 libs/swap/{libswap.c => tse_swap.c}
 libs/uinput/{tst_uinput.c => tse_uinput.c}
 libs/vdso/{parse_vdso.c => tse_parse_vdso.c}

Also, rename tst_* to tse_* in the global non-core libs.

No functional changes intended.

==== NOTE ====
>From Petr Vorel:

  "Although lib/ vs libs/ is a bit strange, kept these libraries separate
  (i.e. no move libs/*/ into lib/), because these libraries are built only when
  they are needed. I.e. for testing random test one does not need to wait for
  building these additional libraries (although building them does not take long,
  building LTP main library and tests takes much longer)."

Signed-off-by: Li Wang <liwang@redhat.com>
Cc: Pradeep Susarla <pradeep.susarla@gmail.com>
---
 doc/developers/api_c_tests.rst                |  2 +-
 include/ipcsem.h                              | 55 -------------------
 include/libmsgctl.h                           | 39 -------------
 include/{ipcmsg.h => tse_ipcmsg.h}            | 27 +++------
 include/tse_ipcsem.h                          | 42 ++++++++++++++
 include/tse_msgctl.h                          | 27 +++++++++
 include/{libnewipc.h => tse_newipc.h}         | 21 ++-----
 include/{tst_numa.h => tse_numa.h}            | 52 +++++++++---------
 include/{parse_vdso.h => tse_parse_vdso.h}    |  6 +-
 include/{libsigwait.h => tse_sigwait.h}       | 28 +++++-----
 include/{libswap.h => tse_swap.h}             | 10 ++--
 include/{tst_uinput.h => tse_uinput.h}        |  6 +-
 include/tst_uid.h                             |  6 +-
 include/ujson.h                               |  6 +-
 include/ujson_common.h                        |  6 +-
 include/ujson_reader.h                        |  6 +-
 include/ujson_utf.h                           |  6 +-
 libs/ipc/{libipc.c => tse_ipc.c}              | 25 ++-------
 libs/ipc/{libmsgctl.c => tse_msgctl.c}        | 20 ++-----
 libs/newipc/{libnewipc.c => tse_newipc.c}     |  2 +-
 libs/numa/{tst_numa.c => tse_numa.c}          | 22 ++++----
 libs/sigwait/{sigwait.c => tse_sigwait.c}     | 24 ++++----
 libs/swap/{libswap.c => tse_swap.c}           |  6 +-
 libs/uinput/{tst_uinput.c => tse_uinput.c}    |  2 +-
 libs/vdso/{parse_vdso.c => tse_parse_vdso.c}  |  2 +-
 libs/vdso/vdso_helpers.c                      |  2 +-
 testcases/kernel/input/input_common.h         |  2 +-
 testcases/kernel/mem/cpuset/cpuset02.c        |  6 +-
 testcases/kernel/mem/ksm/ksm06.c              |  6 +-
 testcases/kernel/mem/shmt/shmt02.c            |  2 +-
 testcases/kernel/mem/shmt/shmt03.c            |  2 +-
 testcases/kernel/mem/shmt/shmt04.c            |  2 +-
 testcases/kernel/mem/shmt/shmt05.c            |  2 +-
 testcases/kernel/mem/shmt/shmt07.c            |  2 +-
 testcases/kernel/mem/shmt/shmt08.c            |  2 +-
 testcases/kernel/mem/shmt/shmt09.c            |  2 +-
 testcases/kernel/mem/shmt/shmt10.c            |  2 +-
 .../syscalls/clock_gettime/clock_gettime04.c  |  2 +-
 .../syscalls/get_mempolicy/get_mempolicy01.c  |  8 +--
 .../syscalls/get_mempolicy/get_mempolicy02.c  |  8 +--
 .../kernel/syscalls/ipc/msgctl/msgctl01.c     |  2 +-
 .../kernel/syscalls/ipc/msgctl/msgctl02.c     |  2 +-
 .../kernel/syscalls/ipc/msgctl/msgctl03.c     |  2 +-
 .../kernel/syscalls/ipc/msgctl/msgctl04.c     |  2 +-
 .../kernel/syscalls/ipc/msgctl/msgctl05.c     |  2 +-
 .../kernel/syscalls/ipc/msgctl/msgctl06.c     |  2 +-
 .../kernel/syscalls/ipc/msgctl/msgctl12.c     |  2 +-
 .../kernel/syscalls/ipc/msgget/msgget01.c     |  2 +-
 .../kernel/syscalls/ipc/msgget/msgget02.c     |  2 +-
 .../kernel/syscalls/ipc/msgget/msgget03.c     |  2 +-
 .../kernel/syscalls/ipc/msgget/msgget04.c     |  2 +-
 .../kernel/syscalls/ipc/msgget/msgget05.c     |  2 +-
 .../kernel/syscalls/ipc/msgrcv/msgrcv01.c     |  2 +-
 .../kernel/syscalls/ipc/msgrcv/msgrcv02.c     |  2 +-
 .../kernel/syscalls/ipc/msgrcv/msgrcv03.c     |  2 +-
 .../kernel/syscalls/ipc/msgrcv/msgrcv05.c     |  2 +-
 .../kernel/syscalls/ipc/msgrcv/msgrcv06.c     |  2 +-
 .../kernel/syscalls/ipc/msgrcv/msgrcv07.c     |  2 +-
 .../kernel/syscalls/ipc/msgrcv/msgrcv08.c     |  2 +-
 .../kernel/syscalls/ipc/msgsnd/msgsnd01.c     |  2 +-
 .../kernel/syscalls/ipc/msgsnd/msgsnd02.c     |  2 +-
 .../kernel/syscalls/ipc/msgsnd/msgsnd05.c     |  2 +-
 .../kernel/syscalls/ipc/msgsnd/msgsnd06.c     |  2 +-
 .../kernel/syscalls/ipc/semctl/semctl01.c     |  2 +-
 .../kernel/syscalls/ipc/semctl/semctl02.c     |  2 +-
 .../kernel/syscalls/ipc/semctl/semctl03.c     |  2 +-
 .../kernel/syscalls/ipc/semctl/semctl04.c     |  2 +-
 .../kernel/syscalls/ipc/semctl/semctl05.c     |  2 +-
 .../kernel/syscalls/ipc/semctl/semctl06.c     |  2 +-
 .../kernel/syscalls/ipc/semctl/semctl07.c     |  2 +-
 .../kernel/syscalls/ipc/semctl/semctl08.c     |  2 +-
 .../kernel/syscalls/ipc/semctl/semctl09.c     |  2 +-
 .../kernel/syscalls/ipc/semget/semget01.c     |  2 +-
 .../kernel/syscalls/ipc/semget/semget02.c     |  2 +-
 .../kernel/syscalls/ipc/semget/semget05.c     |  2 +-
 testcases/kernel/syscalls/ipc/semop/semop01.c |  2 +-
 testcases/kernel/syscalls/ipc/semop/semop02.c |  2 +-
 testcases/kernel/syscalls/ipc/semop/semop03.c |  2 +-
 testcases/kernel/syscalls/ipc/shmat/shmat01.c |  2 +-
 testcases/kernel/syscalls/ipc/shmat/shmat02.c |  2 +-
 testcases/kernel/syscalls/ipc/shmat/shmat04.c |  2 +-
 .../kernel/syscalls/ipc/shmctl/shmctl01.c     |  2 +-
 .../kernel/syscalls/ipc/shmctl/shmctl02.c     |  2 +-
 .../kernel/syscalls/ipc/shmctl/shmctl03.c     |  2 +-
 .../kernel/syscalls/ipc/shmctl/shmctl04.c     |  2 +-
 .../kernel/syscalls/ipc/shmctl/shmctl06.c     |  2 +-
 .../kernel/syscalls/ipc/shmctl/shmctl07.c     |  2 +-
 .../kernel/syscalls/ipc/shmctl/shmctl08.c     |  2 +-
 testcases/kernel/syscalls/ipc/shmdt/shmdt01.c |  2 +-
 testcases/kernel/syscalls/ipc/shmdt/shmdt02.c |  2 +-
 .../kernel/syscalls/ipc/shmget/shmget02.c     |  2 +-
 .../kernel/syscalls/ipc/shmget/shmget03.c     |  2 +-
 .../kernel/syscalls/ipc/shmget/shmget04.c     |  2 +-
 .../kernel/syscalls/ipc/shmget/shmget05.c     |  2 +-
 .../kernel/syscalls/ipc/shmget/shmget06.c     |  2 +-
 testcases/kernel/syscalls/kill/kill05.c       |  2 +-
 testcases/kernel/syscalls/mbind/mbind01.c     |  8 +--
 testcases/kernel/syscalls/mbind/mbind02.c     | 26 ++++-----
 testcases/kernel/syscalls/mbind/mbind03.c     | 28 +++++-----
 testcases/kernel/syscalls/mbind/mbind04.c     | 24 ++++----
 .../rt_sigtimedwait/rt_sigtimedwait01.c       | 30 +++++-----
 .../syscalls/set_mempolicy/set_mempolicy.h    | 10 ++--
 .../syscalls/set_mempolicy/set_mempolicy01.c  | 16 +++---
 .../syscalls/set_mempolicy/set_mempolicy02.c  | 10 ++--
 .../syscalls/set_mempolicy/set_mempolicy03.c  | 14 ++---
 .../syscalls/set_mempolicy/set_mempolicy04.c  | 10 ++--
 .../syscalls/sigtimedwait/sigtimedwait01.c    | 22 ++++----
 testcases/kernel/syscalls/sigwait/sigwait01.c |  8 +--
 .../syscalls/sigwaitinfo/sigwaitinfo01.c      | 18 +++---
 testcases/kernel/syscalls/swapoff/swapoff01.c |  2 +-
 testcases/kernel/syscalls/swapoff/swapoff02.c |  2 +-
 testcases/kernel/syscalls/swapon/swapon01.c   |  2 +-
 testcases/kernel/syscalls/swapon/swapon02.c   |  2 +-
 testcases/kernel/syscalls/swapon/swapon03.c   |  4 +-
 testcases/kernel/uevents/uevent03.c           |  2 +-
 115 files changed, 387 insertions(+), 461 deletions(-)
 delete mode 100644 include/ipcsem.h
 delete mode 100644 include/libmsgctl.h
 rename include/{ipcmsg.h => tse_ipcmsg.h} (52%)
 create mode 100644 include/tse_ipcsem.h
 create mode 100644 include/tse_msgctl.h
 rename include/{libnewipc.h => tse_newipc.h} (62%)
 rename include/{tst_numa.h => tse_numa.h} (60%)
 rename include/{parse_vdso.h => tse_parse_vdso.h} (93%)
 rename include/{libsigwait.h => tse_sigwait.h} (55%)
 rename include/{libswap.h => tse_swap.h} (95%)
 rename include/{tst_uinput.h => tse_uinput.h} (93%)
 rename libs/ipc/{libipc.c => tse_ipc.c} (82%)
 rename libs/ipc/{libmsgctl.c => tse_msgctl.c} (77%)
 rename libs/newipc/{libnewipc.c => tse_newipc.c} (98%)
 rename libs/numa/{tst_numa.c => tse_numa.c} (87%)
 rename libs/sigwait/{sigwait.c => tse_sigwait.c} (92%)
 rename libs/swap/{libswap.c => tse_swap.c} (99%)
 rename libs/uinput/{tst_uinput.c => tse_uinput.c} (99%)
 rename libs/vdso/{parse_vdso.c => tse_parse_vdso.c} (99%)

diff --git a/doc/developers/api_c_tests.rst b/doc/developers/api_c_tests.rst
index be3baeaf0..8386798cd 100644
--- a/doc/developers/api_c_tests.rst
+++ b/doc/developers/api_c_tests.rst
@@ -62,4 +62,4 @@ Temporary directory
 
 LTP libraries
 -------------
-.. kernel-doc:: ../../include/libswap.h
+.. kernel-doc:: ../../include/tse_swap.h
diff --git a/include/ipcsem.h b/include/ipcsem.h
deleted file mode 100644
index 09a0b3cbe..000000000
--- a/include/ipcsem.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- *
- *   Copyright (c) International Business Machines  Corp., 2001
- *
- *   This program is free software;  you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY;  without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
- *   the GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program;  if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/*
- * ipcsem.h - common definitions for the IPC semaphore tests
- */
-
-#ifndef __IPCSEM_H
-#define __IPCSEM_H
-
-#include <errno.h>
-#include <sys/ipc.h>
-#include <sys/sem.h>
-
-#include "test.h"
-#include "lapi/sem.h"
-
-void cleanup(void);
-void setup(void);
-
-#define SEM_RD	0400
-#define SEM_ALT	0200
-#define SEM_RA	SEM_RD | SEM_ALT
-
-#define PSEMS	10		/* a reasonable value for the number of */
-				/* "primitive semaphores" per ID 	*/
-
-#ifdef LIBIPC
-key_t semkey;			/* an IPC key generated by ftok() */
-#else
-extern key_t semkey;	 	 /* an IPC key generated by ftok() */
-#endif
-
-void rm_sema(int sem_id);
-
-int getipckey();
-int getuserid(char *);
-
-#endif /* ipcsem.h */
diff --git a/include/libmsgctl.h b/include/libmsgctl.h
deleted file mode 100644
index e1afeab5f..000000000
--- a/include/libmsgctl.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) International Business Machines  Corp., 2002
- * Copyright (c) 2013 Oracle and/or its affiliates. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it would be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write the Free Software Foundation,
- * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifndef __LIBMSGCTL_H__
-#define __LIBMSGCTL_H__
-
-#define FAIL	1
-#define PASS	0
-
-struct mbuffer {
-	long type;
-	struct {
-		char len;
-		char pbytes[99];
-	} data;
-};
-
-int doreader(long key, int tid, long type, int child, int nreps);
-int dowriter(long key, int tid, long type, int child, int nreps);
-int fill_buffer(char *buf, char val, int size);
-int verify(char *buf, char val, int size, int child);
-
-#endif /*__LIBMSGCTL_H__ */
diff --git a/include/ipcmsg.h b/include/tse_ipcmsg.h
similarity index 52%
rename from include/ipcmsg.h
rename to include/tse_ipcmsg.h
index 3b3fa32c0..ff5286445 100644
--- a/include/ipcmsg.h
+++ b/include/tse_ipcmsg.h
@@ -1,28 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
- *
- *   Copyright (c) International Business Machines  Corp., 2001
- *
- *   This program is free software;  you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY;  without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
- *   the GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program;  if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * Copyright (c) International Business Machines  Corp., 2001
+ * Copyright (c) Linux Test Project, 2026
  */
 
 /*
- * ipcmsg.h - common definitions for the IPC message tests.
+ * tse_ipcmsg.h - common definitions for the IPC message tests.
  */
 
-#ifndef __IPCMSG_H
-#define __IPCMSG_H	1
+#ifndef TSE_IPCMSG_H__
+#define TSE_IPCMSG_H__	1
 
 #include <errno.h>
 #include <sys/ipc.h>
@@ -63,4 +50,4 @@ int getuserid(char *);
 int get_max_msgqueues(void);
 int get_used_msgqueues(void);
 
-#endif /* ipcmsg.h */
+#endif /* tse_ipcmsg.h */
diff --git a/include/tse_ipcsem.h b/include/tse_ipcsem.h
new file mode 100644
index 000000000..47e354ece
--- /dev/null
+++ b/include/tse_ipcsem.h
@@ -0,0 +1,42 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) International Business Machines  Corp., 2001
+ * Copyright (c) Linux Test Project, 2026
+ */
+
+/*
+ * tse_ipcsem.h - common definitions for the IPC semaphore tests
+ */
+
+#ifndef TSE_IPCSEM_H__
+#define TSE_IPCSEM_H__
+
+#include <errno.h>
+#include <sys/ipc.h>
+#include <sys/sem.h>
+
+#include "test.h"
+#include "lapi/sem.h"
+
+void cleanup(void);
+void setup(void);
+
+#define SEM_RD	0400
+#define SEM_ALT	0200
+#define SEM_RA	SEM_RD | SEM_ALT
+
+#define PSEMS	10		/* a reasonable value for the number of */
+				/* "primitive semaphores" per ID 	*/
+
+#ifdef LIBIPC
+key_t semkey;			/* an IPC key generated by ftok() */
+#else
+extern key_t semkey;	 	 /* an IPC key generated by ftok() */
+#endif
+
+void rm_sema(int sem_id);
+
+int getipckey();
+int getuserid(char *);
+
+#endif /* libipcsem.h */
diff --git a/include/tse_msgctl.h b/include/tse_msgctl.h
new file mode 100644
index 000000000..e3417f509
--- /dev/null
+++ b/include/tse_msgctl.h
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) International Business Machines  Corp., 2002
+ * Copyright (c) 2013 Oracle and/or its affiliates. All Rights Reserved.
+ * Copyright (c) Linux Test Project, 2026
+ */
+
+#ifndef TSE_MSGCTL_H__
+#define TSE_MSGCTL_H__
+
+#define FAIL	1
+#define PASS	0
+
+struct mbuffer {
+	long type;
+	struct {
+		char len;
+		char pbytes[99];
+	} data;
+};
+
+int doreader(long key, int tid, long type, int child, int nreps);
+int dowriter(long key, int tid, long type, int child, int nreps);
+int fill_buffer(char *buf, char val, int size);
+int verify(char *buf, char val, int size, int child);
+
+#endif /* TSE_MSGCTL_H__ */
diff --git a/include/libnewipc.h b/include/tse_newipc.h
similarity index 62%
rename from include/libnewipc.h
rename to include/tse_newipc.h
index 969c93292..1d3bbd129 100644
--- a/include/libnewipc.h
+++ b/include/tse_newipc.h
@@ -1,26 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Copyright (c) 2016 Xiao Yang <yangx.jy@cn.fujitsu.com>
- *
- * This program is free software;  you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY;  without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.
+ * Copyright (c) Linux Test Project, 2026
  */
 
 /*
  * common definitions for the IPC system calls.
  */
 
-#ifndef __LIBNEWIPC_H
-#define __LIBNEWIPC_H	1
+#ifndef TSE_NEWIPC_H__
+#define TSE_NEWIPC_H__	1
 
 #include <time.h>
 #include <sys/types.h>
@@ -60,4 +49,4 @@ void *probe_free_addr(const char *file, const int lineno);
 #define PROBE_FREE_ADDR() \
 	probe_free_addr(__FILE__, __LINE__)
 
-#endif /* newlibipc.h */
+#endif /* tse_newipc.h */
diff --git a/include/tst_numa.h b/include/tse_numa.h
similarity index 60%
rename from include/tst_numa.h
rename to include/tse_numa.h
index a1f961630..839512b2a 100644
--- a/include/tst_numa.h
+++ b/include/tse_numa.h
@@ -2,81 +2,81 @@
  * Copyright (c) 2018 Cyril Hrubis <chrubis@suse.cz>
  */
 
-#ifndef TST_NUMA_H__
-#define TST_NUMA_H__
+#ifndef TSE_NUMA_H__
+#define TSE_NUMA_H__
 
 #include <string.h>
 
 /**
- * struct tst_nodemap - Numa nodemap.
+ * struct tse_nodemap - Numa nodemap.
  *
  * @cnt: Number of nodes in map.
  * @counters: Page allocation counters.
  * @map: Array of numa ids.
  */
-struct tst_nodemap {
+struct tse_nodemap {
 	unsigned int cnt;
 	unsigned int *counters;
 	unsigned int map[];
 };
 
 /**
- * tst_nodemap_reset_counters() - Clears numa counters. The counters are lazy-allocated on first call of this function.
+ * tse_nodemap_reset_counters() - Clears numa counters. The counters are lazy-allocated on first call of this function.
  *
  * @nodes: Numa nodemap.
  */
-void tst_nodemap_reset_counters(struct tst_nodemap *nodes);
+void tse_nodemap_reset_counters(struct tse_nodemap *nodes);
 
 /**
- * tst_nodemap_print_counters() - Prints pages allocated per each node.
+ * tse_nodemap_print_counters() - Prints pages allocated per each node.
  *
  * @nodes: Numa nodemap.
  */
-void tst_nodemap_print_counters(struct tst_nodemap *nodes);
+void tse_nodemap_print_counters(struct tse_nodemap *nodes);
 
 /**
- * tst_mempolicy_mode_name() - Returns a name for a mempolicy/mbind mode.
+ * tse_mempolicy_mode_name() - Returns a name for a mempolicy/mbind mode.
  *
  * @mode: Numa mempolicy mode.
  *
  * return: a name for a mempolicy/mbind mode.
  */
-const char *tst_mempolicy_mode_name(int mode);
+const char *tse_mempolicy_mode_name(int mode);
 
 /**
- * tst_numa_map() - Maps pages into memory, if path is NULL the mapping is anonymous otherwise is backed by the file.
+ * tse_numa_map() - Maps pages into memory, if path is NULL the mapping is anonymous otherwise is backed by the file.
  *
  * @path: Path to a file, if not NULL mapping is file based.
  * @size: Mapping size.
  *
  * return: a pointer to a mapped file.
  */
-void *tst_numa_map(const char *path, size_t size);
+void *tse_numa_map(const char *path, size_t size);
 
 /**
- * tst_numa_fault() - Writes to memory in order to get the pages faulted.
+ * tse_numa_fault() - Writes to memory in order to get the pages faulted.
  *
  * @ptr: Start of the mapping.
  * @size: Size of the mapping.
  */
-static inline void tst_numa_fault(void *ptr, size_t size)
+static inline void tse_numa_fault(void *ptr, size_t size)
 {
 	memset(ptr, 'a', size);
 }
 
 /**
- * tst_numa_unmap() - Frees the memory.
+ * tse_numa_unmap() - Frees the memory.
  *
  * @ptr: Start of the mapping.
  * @size: Size of the mapping.
  */
-static inline void tst_numa_unmap(void *ptr, size_t size)
+static inline void tse_numa_unmap(void *ptr, size_t size)
 {
 	SAFE_MUNMAP(ptr, size);
 }
 
 /**
- * tst_nodemap_count_pages() - Check which numa node resides each page.
+ * tse_nodemap_count_pages() - Check which numa node resides each page.
  *
  * Check on which numa node resides each page of the mapping starting at ptr
  * and continuing pages long and increases nodemap counters accordingly.
@@ -85,28 +85,28 @@ static inline void tst_numa_unmap(void *ptr, size_t size)
  * @ptr:   Pointer to start of a mapping.
  * @size:  Size of the mapping.
  */
-void tst_nodemap_count_pages(struct tst_nodemap *nodes, void *ptr, size_t size);
+void tse_nodemap_count_pages(struct tse_nodemap *nodes, void *ptr, size_t size);
 
 /**
- * tst_nodemap_free() - Frees nodemap.
+ * tse_nodemap_free() - Frees nodemap.
  *
  * @nodes: Numa nodemap to be freed.
  */
-void tst_nodemap_free(struct tst_nodemap *nodes);
+void tse_nodemap_free(struct tse_nodemap *nodes);
 
 /**
- * enum tst_numa_types - Bitflags for tst_get_nodemap() function.
+ * enum tse_numa_types - Bitflags for tse_get_nodemap() function.
  *
  * @TST_NUMA_ANY: general NUMA node.
  * @TST_NUMA_MEM: NUMA memory node.
  */
-enum tst_numa_types {
+enum tse_numa_types {
 	TST_NUMA_ANY = 0x00,
 	TST_NUMA_MEM = 0x01,
 };
 
 /**
- * tst_get_nodemap() - Allocates and returns numa node map, which is an array of numa nodes which
+ * tse_get_nodemap() - Allocates and returns numa node map, which is an array of numa nodes which
  * contain desired resources e.g. memory.
  *
  * @type:       Bitflags of enum tst_numa_types specifying desired resources.
@@ -114,9 +114,9 @@ enum tst_numa_types {
  *             requested amount of free+buffers memory it's not included in
  *             the resulting list of nodes.
  *
- * return: On success returns allocated and initialized struct tst_nodemap which contains
+ * return: On success returns allocated and initialized struct tse_nodemap which contains
  *         array of numa node ids that contains desired resources.
  */
-struct tst_nodemap *tst_get_nodemap(int type, size_t min_mem_kb);
+struct tse_nodemap *tse_get_nodemap(int type, size_t min_mem_kb);
 
-#endif /* TST_NUMA_H__ */
+#endif /* TSE_NUMA_H__ */
diff --git a/include/parse_vdso.h b/include/tse_parse_vdso.h
similarity index 93%
rename from include/parse_vdso.h
rename to include/tse_parse_vdso.h
index 5212fc659..e2d906757 100644
--- a/include/parse_vdso.h
+++ b/include/tse_parse_vdso.h
@@ -4,8 +4,8 @@
  * Author: Viresh Kumar <viresh.kumar@linaro.org>
  */
 
-#ifndef PARSE_VDSO_H__
-#define PARSE_VDSO_H__
+#ifndef TSE_PARSE_VDSO_H__
+#define TSE_PARSE_VDSO_H__
 
 #include <stdint.h>
 
@@ -38,4 +38,4 @@ extern void *vdso_sym(const char *version, const char *name);
 typedef int (*gettime_t)(clockid_t clk_id, void *ts);
 void find_clock_gettime_vdso(gettime_t *ptr_vdso_gettime,
 			     gettime_t *ptr_vdso_gettime64);
-#endif /* PARSE_VDSO_H__ */
+#endif /* TSE_PARSE_VDSO_H__ */
diff --git a/include/libsigwait.h b/include/tse_sigwait.h
similarity index 55%
rename from include/libsigwait.h
rename to include/tse_sigwait.h
index 2fca578b1..6ea85c8bb 100644
--- a/include/libsigwait.h
+++ b/include/tse_sigwait.h
@@ -4,8 +4,8 @@
  * Author: Viresh Kumar <viresh.kumar@linaro.org>
  */
 
-#ifndef SIGWAIT_H__
-#define SIGWAIT_H__
+#ifndef TSE_SIGWAIT_H__
+#define TSE_SIGWAIT_H__
 
 #include "tst_test.h"
 #include "tst_timer.h"
@@ -21,24 +21,24 @@ struct sigwait_test_desc {
 	int signo;
 };
 
-void test_empty_set(swi_func sigwaitinfo, int signo,
+void tse_empty_set(swi_func sigwaitinfo, int signo,
 		    enum tst_ts_type type LTP_ATTRIBUTE_UNUSED);
-void test_timeout(swi_func sigwaitinfo, int signo, enum tst_ts_type type);
-void test_unmasked_matching(swi_func sigwaitinfo, int signo,
+void tse_timeout(swi_func sigwaitinfo, int signo, enum tst_ts_type type);
+void tse_unmasked_matching(swi_func sigwaitinfo, int signo,
 			    enum tst_ts_type type LTP_ATTRIBUTE_UNUSED);
-void test_unmasked_matching_noinfo(swi_func sigwaitinfo, int signo,
+void tse_unmasked_matching_noinfo(swi_func sigwaitinfo, int signo,
 				   enum tst_ts_type type LTP_ATTRIBUTE_UNUSED);
-void test_masked_matching(swi_func sigwaitinfo, int signo,
+void tse_masked_matching(swi_func sigwaitinfo, int signo,
 			  enum tst_ts_type type LTP_ATTRIBUTE_UNUSED);
-void test_masked_matching_rt(swi_func sigwaitinfo, int signo,
+void tse_masked_matching_rt(swi_func sigwaitinfo, int signo,
 			     enum tst_ts_type type LTP_ATTRIBUTE_UNUSED);
-void test_masked_matching_noinfo(swi_func sigwaitinfo, int signo,
+void tse_masked_matching_noinfo(swi_func sigwaitinfo, int signo,
 				 enum tst_ts_type type LTP_ATTRIBUTE_UNUSED);
-void test_bad_address(swi_func sigwaitinfo, int signo,
+void tse_bad_address(swi_func sigwaitinfo, int signo,
 		      enum tst_ts_type type LTP_ATTRIBUTE_UNUSED);
-void test_bad_address2(swi_func sigwaitinfo, int signo LTP_ATTRIBUTE_UNUSED,
+void tse_bad_address2(swi_func sigwaitinfo, int signo LTP_ATTRIBUTE_UNUSED,
 		       enum tst_ts_type type LTP_ATTRIBUTE_UNUSED);
-void test_bad_address3(swi_func sigwaitinfo, int signo LTP_ATTRIBUTE_UNUSED,
+void tse_bad_address3(swi_func sigwaitinfo, int signo LTP_ATTRIBUTE_UNUSED,
 		       enum tst_ts_type type LTP_ATTRIBUTE_UNUSED);
-void sigwait_setup(void);
-#endif /* SIGWAIT_H__ */
+void tse_sigwait_setup(void);
+#endif /* TSE_SIGWAIT_H__ */
diff --git a/include/libswap.h b/include/tse_swap.h
similarity index 95%
rename from include/libswap.h
rename to include/tse_swap.h
index b22b992ee..c4979b3e5 100644
--- a/include/libswap.h
+++ b/include/tse_swap.h
@@ -11,8 +11,8 @@
  * Contains common content for all swapon/swapoff tests.
  */
 
-#ifndef __LIBSWAP_H__
-#define __LIBSWAP_H__
+#ifndef TSE_SWAP_H__
+#define TSE_SWAP_H__
 
 enum swapfile_method {
     SWAPFILE_BY_SIZE,
@@ -110,10 +110,10 @@ int make_swapfile(const char *file, const int lineno,
 bool is_swap_supported(const char *filename);
 
 /**
- * tst_count_swaps() - Get the used swapfiles number.
+ * tse_count_swaps() - Get the used swapfiles number.
  *
  * Return: used swapfiles number.
  */
-int tst_count_swaps(void);
+int tse_count_swaps(void);
 
-#endif /* __LIBSWAP_H__ */
+#endif /* TSE_SWAP_H__ */
diff --git a/include/tst_uinput.h b/include/tse_uinput.h
similarity index 93%
rename from include/tst_uinput.h
rename to include/tse_uinput.h
index cf351cdfb..e336de780 100644
--- a/include/tst_uinput.h
+++ b/include/tse_uinput.h
@@ -3,8 +3,8 @@
  * Copyright (c) 2019 Cyril Hrubis <chrubis@suse.cz>
  */
 
-#ifndef TST_UINPUT_H__
-#define TST_UINPUT_H__
+#ifndef TSE_UINPUT_H__
+#define TSE_UINPUT_H__
 
 /**
  * Tries to open the uinput device.
@@ -44,4 +44,4 @@ void setup_mouse_events(int fd);
  */
 void destroy_input_device(int fd);
 
-#endif	/* TST_UINPUT_H__ */
+#endif	/* TSE_UINPUT_H__ */
diff --git a/include/tst_uid.h b/include/tst_uid.h
index e604effce..2237ddcbf 100644
--- a/include/tst_uid.h
+++ b/include/tst_uid.h
@@ -2,8 +2,8 @@
  * Copyright (c) 2021 Linux Test Project
  */
 
-#ifndef TST_UID_H_
-#define TST_UID_H_
+#ifndef TST_UID_H__
+#define TST_UID_H__
 
 #include <sys/types.h>
 
@@ -37,4 +37,4 @@ int tst_check_resgid_(const char *file, const int lineno, const char *callstr,
 #define tst_check_resgid(cstr, rgid, egid, sgid) \
 	tst_check_resgid_(__FILE__, __LINE__, (cstr), (rgid), (egid), (sgid))
 
-#endif /* TST_UID_H_ */
+#endif /* TST_UID_H__ */
diff --git a/include/ujson.h b/include/ujson.h
index 8faeb18f0..1a4bb6bd9 100644
--- a/include/ujson.h
+++ b/include/ujson.h
@@ -3,11 +3,11 @@
  * Copyright (C) 2021-2024 Cyril Hrubis <metan@ucw.cz>
  */
 
-#ifndef UJSON_H
-#define UJSON_H
+#ifndef UJSON_H__
+#define UJSON_H__
 
 #include <ujson_common.h>
 #include <ujson_reader.h>
 #include <ujson_writer.h>
 
-#endif /* UJSON_H */
+#endif /* UJSON_H__ */
diff --git a/include/ujson_common.h b/include/ujson_common.h
index ed31c090d..11382c4fb 100644
--- a/include/ujson_common.h
+++ b/include/ujson_common.h
@@ -8,8 +8,8 @@
  * @brief Common JSON reader/writer definitions.
  */
 
-#ifndef UJSON_COMMON_H
-#define UJSON_COMMON_H
+#ifndef UJSON_COMMON_H__
+#define UJSON_COMMON_H__
 
 /** @brief Maximal error message length. */
 #define UJSON_ERR_MAX 128
@@ -66,4 +66,4 @@ typedef struct ujson_val ujson_val;
 /** @brief An array size macro. */
 #define UJSON_ARRAY_SIZE(array) (sizeof(array) / sizeof(*array))
 
-#endif /* UJSON_COMMON_H */
+#endif /* UJSON_COMMON_H__ */
diff --git a/include/ujson_reader.h b/include/ujson_reader.h
index 273fe624a..8608b6c81 100644
--- a/include/ujson_reader.h
+++ b/include/ujson_reader.h
@@ -14,8 +14,8 @@
  * if error has happened at the end of the sequence.
  */
 
-#ifndef UJSON_READER_H
-#define UJSON_READER_H
+#ifndef UJSON_READER_H__
+#define UJSON_READER_H__
 
 #include <stdio.h>
 #include <ujson_common.h>
@@ -540,4 +540,4 @@ static inline int ujson_reader_consumed(ujson_reader *self)
 	return self->off >= self->len;
 }
 
-#endif /* UJSON_H */
+#endif /* UJSON_H__ */
diff --git a/include/ujson_utf.h b/include/ujson_utf.h
index f939fbe8c..313213d8e 100644
--- a/include/ujson_utf.h
+++ b/include/ujson_utf.h
@@ -8,8 +8,8 @@
  * @brief Unicode helper macros and functions.
  */
 
-#ifndef UJSON_UTF_H
-#define UJSON_UTF_H
+#ifndef UJSON_UTF_H__
+#define UJSON_UTF_H__
 
 #include <stdint.h>
 #include <stddef.h>
@@ -165,4 +165,4 @@ static inline int ujson_to_utf8(uint32_t unicode, char *buf)
 	return 4;
 }
 
-#endif /* UJSON_UTF_H */
+#endif /* UJSON_UTF_H__ */
diff --git a/libs/ipc/libipc.c b/libs/ipc/tse_ipc.c
similarity index 82%
rename from libs/ipc/libipc.c
rename to libs/ipc/tse_ipc.c
index c2ecbf02d..4fe4843d2 100644
--- a/libs/ipc/libipc.c
+++ b/libs/ipc/tse_ipc.c
@@ -1,25 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
- *
- *   Copyright (c) International Business Machines  Corp., 2001
- *
- *   This program is free software;  you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY;  without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
- *   the GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program;  if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * Copyright (c) International Business Machines  Corp., 2001
+ * Copyright (c) Linux Test Project, 2026
  */
 
 /*
  * NAME
- *	libmsg.c
+ *	tse_ipc.c
  *
  * DESCRIPTION
  *	common routines for the IPC system call tests.
@@ -35,8 +22,8 @@
  */
 
 #define LIBIPC
-#include "ipcmsg.h"
-#include "ipcsem.h"
+#include "tse_ipcmsg.h"
+#include "tse_ipcsem.h"
 
 #include <pwd.h>
 #include <sys/ipc.h>
diff --git a/libs/ipc/libmsgctl.c b/libs/ipc/tse_msgctl.c
similarity index 77%
rename from libs/ipc/libmsgctl.c
rename to libs/ipc/tse_msgctl.c
index ae459d480..dbf10dd6b 100644
--- a/libs/ipc/libmsgctl.c
+++ b/libs/ipc/tse_msgctl.c
@@ -1,20 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
- * Copyright (c) International Business Machines  Corp., 2002
+ * Copyright (c) International Business Machines  Corp., 2001
  * Copyright (c) 2013 Oracle and/or its affiliates. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it would be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write the Free Software Foundation,
- * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ * Copyright (c) Linux Test Project, 2026
  */
 
 #include <errno.h>
@@ -25,7 +13,7 @@
 #include <sys/types.h>
 #include <sys/ipc.h>
 #include <sys/msg.h>
-#include "libmsgctl.h"
+#include "tse_msgctl.h"
 
 int doreader(long key, int tid, long type, int child, int nreps)
 {
diff --git a/libs/newipc/libnewipc.c b/libs/newipc/tse_newipc.c
similarity index 98%
rename from libs/newipc/libnewipc.c
rename to libs/newipc/tse_newipc.c
index 331f1b1f5..f7edda6b5 100644
--- a/libs/newipc/libnewipc.c
+++ b/libs/newipc/tse_newipc.c
@@ -20,7 +20,7 @@
 #define	TST_NO_DEFAULT_MAIN
 
 #include "tst_test.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 #include "tst_safe_stdio.h"
 #include "tst_safe_sysv_ipc.h"
 
diff --git a/libs/numa/tst_numa.c b/libs/numa/tse_numa.c
similarity index 87%
rename from libs/numa/tst_numa.c
rename to libs/numa/tse_numa.c
index c3297013b..835b45883 100644
--- a/libs/numa/tst_numa.c
+++ b/libs/numa/tse_numa.c
@@ -14,10 +14,10 @@
 
 #define TST_NO_DEFAULT_MAIN
 #include "tst_test.h"
-#include "tst_numa.h"
+#include "tse_numa.h"
 #include "lapi/numaif.h"
 
-void tst_nodemap_print_counters(struct tst_nodemap *nodes)
+void tse_nodemap_print_counters(struct tse_nodemap *nodes)
 {
 	unsigned int i;
 
@@ -27,7 +27,7 @@ void tst_nodemap_print_counters(struct tst_nodemap *nodes)
 	}
 }
 
-void tst_nodemap_reset_counters(struct tst_nodemap *nodes)
+void tse_nodemap_reset_counters(struct tse_nodemap *nodes)
 {
 	size_t arr_size = sizeof(unsigned int) * nodes->cnt;
 
@@ -37,7 +37,7 @@ void tst_nodemap_reset_counters(struct tst_nodemap *nodes)
 	memset(nodes->counters, 0, arr_size);
 }
 
-void tst_nodemap_free(struct tst_nodemap *nodes)
+void tse_nodemap_free(struct tse_nodemap *nodes)
 {
 	free(nodes->counters);
 	free(nodes);
@@ -45,7 +45,7 @@ void tst_nodemap_free(struct tst_nodemap *nodes)
 
 #ifdef HAVE_NUMA_V2
 
-const char *tst_mempolicy_mode_name(int mode)
+const char *tse_mempolicy_mode_name(int mode)
 {
 	switch (mode) {
 	case MPOL_DEFAULT:
@@ -64,7 +64,7 @@ const char *tst_mempolicy_mode_name(int mode)
 }
 
 
-static void inc_counter(unsigned int node, struct tst_nodemap *nodes)
+static void inc_counter(unsigned int node, struct tse_nodemap *nodes)
 {
 	unsigned int i;
 
@@ -76,7 +76,7 @@ static void inc_counter(unsigned int node, struct tst_nodemap *nodes)
 	}
 }
 
-void tst_nodemap_count_pages(struct tst_nodemap *nodes,
+void tse_nodemap_count_pages(struct tse_nodemap *nodes,
                              void *ptr, size_t size)
 {
 	size_t page_size = getpagesize();
@@ -100,7 +100,7 @@ void tst_nodemap_count_pages(struct tst_nodemap *nodes,
 	}
 }
 
-void *tst_numa_map(const char *path, size_t size)
+void *tse_numa_map(const char *path, size_t size)
 {
 	char *ptr;
 	int fd = -1;
@@ -178,10 +178,10 @@ static int node_has_enough_memory(int node, size_t min_kb)
 	return 1;
 }
 
-struct tst_nodemap *tst_get_nodemap(int type, size_t min_mem_kb)
+struct tse_nodemap *tse_get_nodemap(int type, size_t min_mem_kb)
 {
 	struct bitmask *membind;
-	struct tst_nodemap *nodes;
+	struct tse_nodemap *nodes;
 	unsigned int i, cnt;
 
 	if (type & ~(TST_NUMA_MEM))
@@ -199,7 +199,7 @@ struct tst_nodemap *tst_get_nodemap(int type, size_t min_mem_kb)
 
 	tst_res(TINFO, "Found %u NUMA memory nodes", cnt);
 
-	nodes = SAFE_MALLOC(sizeof(struct tst_nodemap)
+	nodes = SAFE_MALLOC(sizeof(struct tse_nodemap)
 	                    + sizeof(unsigned int) * cnt);
 	nodes->cnt = cnt;
 	nodes->counters = NULL;
diff --git a/libs/sigwait/sigwait.c b/libs/sigwait/tse_sigwait.c
similarity index 92%
rename from libs/sigwait/sigwait.c
rename to libs/sigwait/tse_sigwait.c
index a9fd62d73..f6689d1a7 100644
--- a/libs/sigwait/sigwait.c
+++ b/libs/sigwait/tse_sigwait.c
@@ -5,11 +5,11 @@
 #include <errno.h>
 #include <stdlib.h>
 #include <limits.h>
-#include "libsigwait.h"
+#include "tse_sigwait.h"
 #include "tst_sig_proc.h"
 #include "lapi/syscalls.h"
 
-void test_empty_set(swi_func sigwaitinfo, int signo,
+void tse_empty_set(swi_func sigwaitinfo, int signo,
 		    enum tst_ts_type type LTP_ATTRIBUTE_UNUSED)
 {
 	sigset_t sigs;
@@ -35,7 +35,7 @@ void test_empty_set(swi_func sigwaitinfo, int signo,
 	SAFE_WAIT(NULL);
 }
 
-void test_timeout(swi_func sigwaitinfo, int signo, enum tst_ts_type type)
+void tse_timeout(swi_func sigwaitinfo, int signo, enum tst_ts_type type)
 {
 	sigset_t sigs;
 	siginfo_t si;
@@ -68,7 +68,7 @@ void test_timeout(swi_func sigwaitinfo, int signo, enum tst_ts_type type)
 /* Note: sigwait-ing for a signal that is not blocked is unspecified
  * by POSIX; but works for non-ignored signals under Linux
  */
-void test_unmasked_matching(swi_func sigwaitinfo, int signo,
+void tse_unmasked_matching(swi_func sigwaitinfo, int signo,
 			    enum tst_ts_type type LTP_ATTRIBUTE_UNUSED)
 {
 	sigset_t sigs;
@@ -96,7 +96,7 @@ void test_unmasked_matching(swi_func sigwaitinfo, int signo,
 	SAFE_WAIT(NULL);
 }
 
-void test_unmasked_matching_noinfo(swi_func sigwaitinfo, int signo,
+void tse_unmasked_matching_noinfo(swi_func sigwaitinfo, int signo,
 				   enum tst_ts_type type LTP_ATTRIBUTE_UNUSED)
 {
 	sigset_t sigs;
@@ -118,7 +118,7 @@ void test_unmasked_matching_noinfo(swi_func sigwaitinfo, int signo,
 	SAFE_WAIT(NULL);
 }
 
-void test_masked_matching(swi_func sigwaitinfo, int signo,
+void tse_masked_matching(swi_func sigwaitinfo, int signo,
 			  enum tst_ts_type type LTP_ATTRIBUTE_UNUSED)
 {
 	sigset_t sigs, oldmask;
@@ -166,7 +166,7 @@ void test_masked_matching(swi_func sigwaitinfo, int signo,
 	SAFE_WAIT(NULL);
 }
 
-void test_masked_matching_rt(swi_func sigwaitinfo, int signo,
+void tse_masked_matching_rt(swi_func sigwaitinfo, int signo,
 			     enum tst_ts_type type LTP_ATTRIBUTE_UNUSED)
 {
 	sigset_t sigs, oldmask;
@@ -232,7 +232,7 @@ void test_masked_matching_rt(swi_func sigwaitinfo, int signo,
 			 "sigwaitinfo failed to restore the original mask");
 }
 
-void test_masked_matching_noinfo(swi_func sigwaitinfo, int signo,
+void tse_masked_matching_noinfo(swi_func sigwaitinfo, int signo,
 				 enum tst_ts_type type LTP_ATTRIBUTE_UNUSED)
 {
 	sigset_t sigs, oldmask;
@@ -274,7 +274,7 @@ void test_masked_matching_noinfo(swi_func sigwaitinfo, int signo,
 	SAFE_WAIT(NULL);
 }
 
-void test_bad_address(swi_func sigwaitinfo, int signo,
+void tse_bad_address(swi_func sigwaitinfo, int signo,
 		      enum tst_ts_type type LTP_ATTRIBUTE_UNUSED)
 {
 	sigset_t sigs, oldmask;
@@ -301,7 +301,7 @@ void test_bad_address(swi_func sigwaitinfo, int signo,
 	SAFE_WAIT(NULL);
 }
 
-void test_bad_address2(swi_func sigwaitinfo, int signo LTP_ATTRIBUTE_UNUSED,
+void tse_bad_address2(swi_func sigwaitinfo, int signo LTP_ATTRIBUTE_UNUSED,
 		       enum tst_ts_type type LTP_ATTRIBUTE_UNUSED)
 {
 	pid_t pid;
@@ -342,7 +342,7 @@ void test_bad_address2(swi_func sigwaitinfo, int signo LTP_ATTRIBUTE_UNUSED,
 	}
 }
 
-void test_bad_address3(swi_func sigwaitinfo, int signo LTP_ATTRIBUTE_UNUSED,
+void tse_bad_address3(swi_func sigwaitinfo, int signo LTP_ATTRIBUTE_UNUSED,
 		       enum tst_ts_type type LTP_ATTRIBUTE_UNUSED)
 {
 	sigset_t sigs;
@@ -373,7 +373,7 @@ static void empty_handler(int sig LTP_ATTRIBUTE_UNUSED)
 {
 }
 
-void sigwait_setup(void)
+void tse_sigwait_setup(void)
 {
 	signal(SIGUSR1, empty_handler);
 	signal(SIGALRM, empty_handler);
diff --git a/libs/swap/libswap.c b/libs/swap/tse_swap.c
similarity index 99%
rename from libs/swap/libswap.c
rename to libs/swap/tse_swap.c
index 3eb589cdd..ae3c19313 100644
--- a/libs/swap/libswap.c
+++ b/libs/swap/tse_swap.c
@@ -17,7 +17,7 @@
 #define BUFSIZE 200
 
 #include "tst_test.h"
-#include "libswap.h"
+#include "tse_swap.h"
 #include "lapi/syscalls.h"
 #include "tst_kconfig.h"
 #include "tst_kvercmp.h"
@@ -157,7 +157,7 @@ int make_swapfile(const char *file, const int lineno,
 		blocks = num;
 		tst_res_(file, lineno, TINFO, "create a swapfile with %u block numbers", blocks);
 	} else {
-		tst_brk_(file, lineno, TBROK, "Invalid method, please see include/libswap.h");
+		tst_brk_(file, lineno, TBROK, "Invalid method, please see include/tse_swap.h");
 	}
 
 	/* To guarantee at least one page can be swapped out */
@@ -239,7 +239,7 @@ bool is_swap_supported(const char *filename)
 	return true;
 }
 
-int tst_count_swaps(void)
+int tse_count_swaps(void)
 {
 	FILE *fp;
 	int used = -1;
diff --git a/libs/uinput/tst_uinput.c b/libs/uinput/tse_uinput.c
similarity index 99%
rename from libs/uinput/tst_uinput.c
rename to libs/uinput/tse_uinput.c
index 16e689153..9bf7f1434 100644
--- a/libs/uinput/tst_uinput.c
+++ b/libs/uinput/tse_uinput.c
@@ -12,7 +12,7 @@
 #define TST_NO_DEFAULT_MAIN
 #include "tst_test.h"
 
-#include "tst_uinput.h"
+#include "tse_uinput.h"
 #include "tst_safe_stdio.h"
 
 #define VIRTUAL_DEVICE "virtual-device-ltp"
diff --git a/libs/vdso/parse_vdso.c b/libs/vdso/tse_parse_vdso.c
similarity index 99%
rename from libs/vdso/parse_vdso.c
rename to libs/vdso/tse_parse_vdso.c
index cd75a8945..7f5b663e5 100644
--- a/libs/vdso/parse_vdso.c
+++ b/libs/vdso/tse_parse_vdso.c
@@ -1,5 +1,5 @@
 /*
- * parse_vdso.c: Linux reference vDSO parser
+ * tse_parse_vdso.c: Linux reference vDSO parser
  * Written by Andrew Lutomirski, 2011-2014.
  *
  * This code is meant to be linked in to various programs that run on Linux.
diff --git a/libs/vdso/vdso_helpers.c b/libs/vdso/vdso_helpers.c
index 208c12f65..c9a60ef75 100644
--- a/libs/vdso/vdso_helpers.c
+++ b/libs/vdso/vdso_helpers.c
@@ -7,7 +7,7 @@
 #define TST_NO_DEFAULT_MAIN
 #include "tst_test.h"
 
-#include "parse_vdso.h"
+#include "tse_parse_vdso.h"
 #include "config.h"
 
 #ifdef HAVE_GETAUXVAL
diff --git a/testcases/kernel/input/input_common.h b/testcases/kernel/input/input_common.h
index 5b1755771..9acdb86be 100644
--- a/testcases/kernel/input/input_common.h
+++ b/testcases/kernel/input/input_common.h
@@ -10,7 +10,7 @@
 #include <poll.h>
 
 #include "tst_test.h"
-#include "tst_uinput.h"
+#include "tse_uinput.h"
 
 static inline int open_event_device(void)
 {
diff --git a/testcases/kernel/mem/cpuset/cpuset02.c b/testcases/kernel/mem/cpuset/cpuset02.c
index ccfddd6a2..d67dcbf6f 100644
--- a/testcases/kernel/mem/cpuset/cpuset02.c
+++ b/testcases/kernel/mem/cpuset/cpuset02.c
@@ -18,13 +18,13 @@
 
 #ifdef HAVE_NUMA_V2
 #include <numaif.h>
-#include "tst_numa.h"
+#include "tse_numa.h"
 
 #define MNTPOINT "hugetlbfs/"
 #define HUGE_PAGE_FILE MNTPOINT "hugepagefile"
 
 static long hpage_size;
-static struct tst_nodemap *node;
+static struct tse_nodemap *node;
 static int check_node_id;
 static struct tst_cg_group *cg_cpuset_0;
 
@@ -88,7 +88,7 @@ static void run_test(void)
 
 static void setup(void)
 {
-	node = tst_get_nodemap(TST_NUMA_MEM, getpagesize() / 1024);
+	node = tse_get_nodemap(TST_NUMA_MEM, getpagesize() / 1024);
 	if (node->cnt <= 1)
 		tst_brk(TCONF, "test requires at least 2 NUMA memory nodes");
 
diff --git a/testcases/kernel/mem/ksm/ksm06.c b/testcases/kernel/mem/ksm/ksm06.c
index a8e73275d..75872469d 100644
--- a/testcases/kernel/mem/ksm/ksm06.c
+++ b/testcases/kernel/mem/ksm/ksm06.c
@@ -32,7 +32,7 @@
 #include <limits.h>
 
 #include "tst_test.h"
-#include "tst_numa.h"
+#include "tse_numa.h"
 #include "ksm_helper.h"
 #include "ksm_test.h"
 
@@ -44,7 +44,7 @@ static unsigned long nr_pages = 100;
 static char *n_opt;
 
 static size_t page_size;
-static struct tst_nodemap *nodes;
+static struct tse_nodemap *nodes;
 
 static void test_ksm(void)
 {
@@ -124,7 +124,7 @@ static void setup(void)
 
 	page_size = getpagesize();
 
-	nodes = tst_get_nodemap(TST_NUMA_MEM, nr_pages * page_size / 1024);
+	nodes = tse_get_nodemap(TST_NUMA_MEM, nr_pages * page_size / 1024);
 	if (nodes->cnt <= 1)
 		tst_brk(TCONF, "Test requires at least two NUMA memory nodes");
 }
diff --git a/testcases/kernel/mem/shmt/shmt02.c b/testcases/kernel/mem/shmt/shmt02.c
index de1d0b0c3..f6c29b6d8 100644
--- a/testcases/kernel/mem/shmt/shmt02.c
+++ b/testcases/kernel/mem/shmt/shmt02.c
@@ -15,7 +15,7 @@
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
 #include "tst_rand_data.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 #define SHMSIZE 16
 
diff --git a/testcases/kernel/mem/shmt/shmt03.c b/testcases/kernel/mem/shmt/shmt03.c
index 63f5a7b45..fe6bacb8e 100644
--- a/testcases/kernel/mem/shmt/shmt03.c
+++ b/testcases/kernel/mem/shmt/shmt03.c
@@ -16,7 +16,7 @@
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
 #include "tst_rand_data.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 #define SHMSIZE 16
 
diff --git a/testcases/kernel/mem/shmt/shmt04.c b/testcases/kernel/mem/shmt/shmt04.c
index c07b1ef93..2a20d9565 100644
--- a/testcases/kernel/mem/shmt/shmt04.c
+++ b/testcases/kernel/mem/shmt/shmt04.c
@@ -18,7 +18,7 @@
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
 #include "tst_rand_data.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 #define SHMSIZE 16
 
diff --git a/testcases/kernel/mem/shmt/shmt05.c b/testcases/kernel/mem/shmt/shmt05.c
index e8b5d9eb5..a38120809 100644
--- a/testcases/kernel/mem/shmt/shmt05.c
+++ b/testcases/kernel/mem/shmt/shmt05.c
@@ -14,7 +14,7 @@
 
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 #include <sys/shm.h>
 
 #define SHMSIZE 16
diff --git a/testcases/kernel/mem/shmt/shmt07.c b/testcases/kernel/mem/shmt/shmt07.c
index 962479e75..a729cf21c 100644
--- a/testcases/kernel/mem/shmt/shmt07.c
+++ b/testcases/kernel/mem/shmt/shmt07.c
@@ -16,7 +16,7 @@
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
 #include "tst_rand_data.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 #define SHMSIZE 16
 
diff --git a/testcases/kernel/mem/shmt/shmt08.c b/testcases/kernel/mem/shmt/shmt08.c
index 9fb2f6b22..3a7a50d73 100644
--- a/testcases/kernel/mem/shmt/shmt08.c
+++ b/testcases/kernel/mem/shmt/shmt08.c
@@ -14,7 +14,7 @@
 
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 #define SHMSIZE 16
 
diff --git a/testcases/kernel/mem/shmt/shmt09.c b/testcases/kernel/mem/shmt/shmt09.c
index fb40498e6..700307711 100644
--- a/testcases/kernel/mem/shmt/shmt09.c
+++ b/testcases/kernel/mem/shmt/shmt09.c
@@ -19,7 +19,7 @@
 
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 #include "tst_test_macros.h"
 
 #define SHMSIZE 16
diff --git a/testcases/kernel/mem/shmt/shmt10.c b/testcases/kernel/mem/shmt/shmt10.c
index 2bd48b6b5..5876e6bf0 100644
--- a/testcases/kernel/mem/shmt/shmt10.c
+++ b/testcases/kernel/mem/shmt/shmt10.c
@@ -16,7 +16,7 @@
 
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 #define SHMSIZE 0x32768
 
diff --git a/testcases/kernel/syscalls/clock_gettime/clock_gettime04.c b/testcases/kernel/syscalls/clock_gettime/clock_gettime04.c
index 4f262da00..a305f037a 100644
--- a/testcases/kernel/syscalls/clock_gettime/clock_gettime04.c
+++ b/testcases/kernel/syscalls/clock_gettime/clock_gettime04.c
@@ -13,7 +13,7 @@
  */
 
 #include "config.h"
-#include "parse_vdso.h"
+#include "tse_parse_vdso.h"
 #include "time64_variants.h"
 #include "tst_timer.h"
 #include "tst_safe_clocks.h"
diff --git a/testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c b/testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c
index 3c854d109..c150d40a5 100644
--- a/testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c
+++ b/testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c
@@ -22,7 +22,7 @@
 #include <numa.h>
 #include <numaif.h>
 #include <errno.h>
-#include "tst_numa.h"
+#include "tse_numa.h"
 
 #define MEM_LENGTH	(4 * 1024 * 1024)
 #define PAGES_ALLOCATED 16u
@@ -32,7 +32,7 @@
 #define POLICY_DESC_FLAGS(x, y) .policy = x, .flags = y, .desc = "policy: "#x", flags: "#y
 #define POLICY_DESC_FLAGS_NO_TARGET(x, y) .policy = x, .flags = y, .desc = "policy: "#x", flags: "#y", no target"
 
-static struct tst_nodemap *node;
+static struct tse_nodemap *node;
 static struct bitmask *nodemask, *getnodemask, *empty_nodemask;
 
 struct test_case {
@@ -142,7 +142,7 @@ static void setup(void)
 {
 	unsigned int i;
 
-	node = tst_get_nodemap(TST_NUMA_MEM, PAGES_ALLOCATED * getpagesize() / 1024);
+	node = tse_get_nodemap(TST_NUMA_MEM, PAGES_ALLOCATED * getpagesize() / 1024);
 	if (node->cnt < 1)
 		tst_brk(TCONF, "test requires at least one NUMA memory node");
 
@@ -175,7 +175,7 @@ static void cleanup(void)
 
 	numa_free_nodemask(nodemask);
 	numa_free_nodemask(getnodemask);
-	tst_nodemap_free(node);
+	tse_nodemap_free(node);
 }
 
 static void do_test(unsigned int i)
diff --git a/testcases/kernel/syscalls/get_mempolicy/get_mempolicy02.c b/testcases/kernel/syscalls/get_mempolicy/get_mempolicy02.c
index 79ff5d94f..f923afac8 100644
--- a/testcases/kernel/syscalls/get_mempolicy/get_mempolicy02.c
+++ b/testcases/kernel/syscalls/get_mempolicy/get_mempolicy02.c
@@ -22,13 +22,13 @@
 #include <numa.h>
 #include <numaif.h>
 #include <errno.h>
-#include "tst_numa.h"
+#include "tse_numa.h"
 
 #define PAGES_ALLOCATED 16u
 
 #define POLICY_DESC_TEXT(x, y) .policy = x, .desc = "policy: "#x", "y
 
-static struct tst_nodemap *node;
+static struct tse_nodemap *node;
 static struct bitmask *nodemask;
 
 struct test_case {
@@ -55,7 +55,7 @@ static struct test_case tcase[] = {
 
 static void setup(void)
 {
-	node = tst_get_nodemap(TST_NUMA_MEM, PAGES_ALLOCATED * getpagesize() / 1024);
+	node = tse_get_nodemap(TST_NUMA_MEM, PAGES_ALLOCATED * getpagesize() / 1024);
 	if (node->cnt < 1)
 		tst_brk(TCONF, "test requires at least one NUMA memory node");
 
@@ -65,7 +65,7 @@ static void setup(void)
 static void cleanup(void)
 {
 	numa_free_nodemask(nodemask);
-	tst_nodemap_free(node);
+	tse_nodemap_free(node);
 }
 
 static void do_test(unsigned int i)
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl01.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl01.c
index 56d1505fd..95319fa29 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl01.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl01.c
@@ -13,7 +13,7 @@
 
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 static int msg_id = -1;
 static time_t creat_time;
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl02.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl02.c
index 1ace62f11..594f0ebeb 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl02.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl02.c
@@ -13,7 +13,7 @@
 
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 static int msg_id = -1;
 struct msqid_ds orig_buf;
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl03.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl03.c
index cc7abd4b9..a231d0739 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl03.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl03.c
@@ -12,7 +12,7 @@
 
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 static void verify_msgctl(void)
 {
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl04.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl04.c
index 4b62896fb..37f54989b 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl04.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl04.c
@@ -14,7 +14,7 @@
 
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 #include "lapi/syscalls.h"
 
 static int msg_id1 = -1;
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl05.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl05.c
index 7e059d7f0..97735271b 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl05.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl05.c
@@ -8,7 +8,7 @@
  */
 #include <sys/msg.h>
 #include "lapi/msgbuf.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
 
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl06.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl06.c
index 2e22f37fe..78c4f7be2 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl06.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl06.c
@@ -25,7 +25,7 @@
 #include <pwd.h>
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 #include "lapi/msg.h"
 
 static int msg_id = -1;
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl12.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl12.c
index 73eead744..1817be2a8 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl12.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl12.c
@@ -13,7 +13,7 @@
 
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 static int msg_q = -1;
 static int index_q;
diff --git a/testcases/kernel/syscalls/ipc/msgget/msgget01.c b/testcases/kernel/syscalls/ipc/msgget/msgget01.c
index dd5a5ad73..726e09cc5 100644
--- a/testcases/kernel/syscalls/ipc/msgget/msgget01.c
+++ b/testcases/kernel/syscalls/ipc/msgget/msgget01.c
@@ -16,7 +16,7 @@
 
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 static int queue_id = -1;
 static key_t msgkey;
diff --git a/testcases/kernel/syscalls/ipc/msgget/msgget02.c b/testcases/kernel/syscalls/ipc/msgget/msgget02.c
index ef9ab34b8..8cf57fd53 100644
--- a/testcases/kernel/syscalls/ipc/msgget/msgget02.c
+++ b/testcases/kernel/syscalls/ipc/msgget/msgget02.c
@@ -24,7 +24,7 @@
 
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 static key_t msgkey, msgkey1;
 static int queue_id = -1;
diff --git a/testcases/kernel/syscalls/ipc/msgget/msgget03.c b/testcases/kernel/syscalls/ipc/msgget/msgget03.c
index bd0653973..f3d7579a3 100644
--- a/testcases/kernel/syscalls/ipc/msgget/msgget03.c
+++ b/testcases/kernel/syscalls/ipc/msgget/msgget03.c
@@ -17,7 +17,7 @@
 
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 static int maxmsgs, queue_cnt, used_cnt;
 static int *queues;
diff --git a/testcases/kernel/syscalls/ipc/msgget/msgget04.c b/testcases/kernel/syscalls/ipc/msgget/msgget04.c
index 28cbb3352..7f8f2ed9e 100644
--- a/testcases/kernel/syscalls/ipc/msgget/msgget04.c
+++ b/testcases/kernel/syscalls/ipc/msgget/msgget04.c
@@ -20,7 +20,7 @@
 #include <sys/msg.h>
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 #define NEXT_ID_PATH "/proc/sys/kernel/msg_next_id"
 static int queue_id, pid;
diff --git a/testcases/kernel/syscalls/ipc/msgget/msgget05.c b/testcases/kernel/syscalls/ipc/msgget/msgget05.c
index edcb307c6..c683142f5 100644
--- a/testcases/kernel/syscalls/ipc/msgget/msgget05.c
+++ b/testcases/kernel/syscalls/ipc/msgget/msgget05.c
@@ -18,7 +18,7 @@
 #include <sys/msg.h>
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 #define NEXT_ID_PATH "/proc/sys/kernel/msg_next_id"
 
diff --git a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv01.c b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv01.c
index 58bfd2771..2b075da13 100644
--- a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv01.c
+++ b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv01.c
@@ -10,7 +10,7 @@
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
 #include "tst_clocks.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 static key_t msgkey;
 static int queue_id = -1, pid;
diff --git a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv02.c b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv02.c
index 3e4462c03..01c157234 100644
--- a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv02.c
+++ b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv02.c
@@ -30,7 +30,7 @@
 #include <pwd.h>
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 static key_t msgkey;
 static int queue_id = -1;
diff --git a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv03.c b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv03.c
index 3e461b307..c179f75e5 100644
--- a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv03.c
+++ b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv03.c
@@ -27,7 +27,7 @@
 #include <pwd.h>
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 #include "lapi/msg.h"
 
 static key_t msgkey;
diff --git a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv05.c b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv05.c
index cc385ee6e..59d167324 100644
--- a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv05.c
+++ b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv05.c
@@ -11,7 +11,7 @@
 #include <stdlib.h>
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 static key_t msgkey;
 static int queue_id = -1;
diff --git a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv06.c b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv06.c
index f14526df9..2aee01ff6 100644
--- a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv06.c
+++ b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv06.c
@@ -13,7 +13,7 @@
 #include <stdlib.h>
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 static key_t msgkey;
 static int queue_id = -1;
diff --git a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv07.c b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv07.c
index d2d1a882a..2184142f9 100644
--- a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv07.c
+++ b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv07.c
@@ -29,7 +29,7 @@
 #include <sys/wait.h>
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 #include "lapi/msg.h"
 
 #define MSGTYPE1	1
diff --git a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c
index 1ab6eba9f..e55d8c960 100644
--- a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c
+++ b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c
@@ -27,7 +27,7 @@
 #include <sys/msg.h>
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 static long mtype = 121;
 static key_t msgkey;
diff --git a/testcases/kernel/syscalls/ipc/msgsnd/msgsnd01.c b/testcases/kernel/syscalls/ipc/msgsnd/msgsnd01.c
index 6d92f3dec..fb55d29ec 100644
--- a/testcases/kernel/syscalls/ipc/msgsnd/msgsnd01.c
+++ b/testcases/kernel/syscalls/ipc/msgsnd/msgsnd01.c
@@ -16,7 +16,7 @@
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
 #include "tst_clocks.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 static key_t msgkey;
 static int queue_id = -1, pid;
diff --git a/testcases/kernel/syscalls/ipc/msgsnd/msgsnd02.c b/testcases/kernel/syscalls/ipc/msgsnd/msgsnd02.c
index eca660605..b1e1e3889 100644
--- a/testcases/kernel/syscalls/ipc/msgsnd/msgsnd02.c
+++ b/testcases/kernel/syscalls/ipc/msgsnd/msgsnd02.c
@@ -28,7 +28,7 @@
 
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 static key_t msgkey;
 static int queue_id = -1;
diff --git a/testcases/kernel/syscalls/ipc/msgsnd/msgsnd05.c b/testcases/kernel/syscalls/ipc/msgsnd/msgsnd05.c
index 887bfdef2..2ce334fd4 100644
--- a/testcases/kernel/syscalls/ipc/msgsnd/msgsnd05.c
+++ b/testcases/kernel/syscalls/ipc/msgsnd/msgsnd05.c
@@ -21,7 +21,7 @@
 
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 static key_t msgkey;
 static int queue_id = -1;
diff --git a/testcases/kernel/syscalls/ipc/msgsnd/msgsnd06.c b/testcases/kernel/syscalls/ipc/msgsnd/msgsnd06.c
index 8fc665e68..778cef899 100644
--- a/testcases/kernel/syscalls/ipc/msgsnd/msgsnd06.c
+++ b/testcases/kernel/syscalls/ipc/msgsnd/msgsnd06.c
@@ -17,7 +17,7 @@
 
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 static key_t msgkey;
 static int queue_id = -1;
diff --git a/testcases/kernel/syscalls/ipc/semctl/semctl01.c b/testcases/kernel/syscalls/ipc/semctl/semctl01.c
index 92a36bff0..5bd675ab6 100644
--- a/testcases/kernel/syscalls/ipc/semctl/semctl01.c
+++ b/testcases/kernel/syscalls/ipc/semctl/semctl01.c
@@ -11,7 +11,7 @@
 #include "tst_safe_sysv_ipc.h"
 #include "tst_test.h"
 #include "lapi/sem.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 #define INCVAL 2
 #define NEWMODE 066
diff --git a/testcases/kernel/syscalls/ipc/semctl/semctl02.c b/testcases/kernel/syscalls/ipc/semctl/semctl02.c
index 6ca63472c..a8fed4fd8 100644
--- a/testcases/kernel/syscalls/ipc/semctl/semctl02.c
+++ b/testcases/kernel/syscalls/ipc/semctl/semctl02.c
@@ -12,7 +12,7 @@
 #include "tst_safe_sysv_ipc.h"
 #include "tst_test.h"
 #include "lapi/sem.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 static int sem_id = -1;
 
diff --git a/testcases/kernel/syscalls/ipc/semctl/semctl03.c b/testcases/kernel/syscalls/ipc/semctl/semctl03.c
index 11530b201..5a11b95ef 100644
--- a/testcases/kernel/syscalls/ipc/semctl/semctl03.c
+++ b/testcases/kernel/syscalls/ipc/semctl/semctl03.c
@@ -12,7 +12,7 @@
 #include "tst_safe_sysv_ipc.h"
 #include "tst_test.h"
 #include "lapi/sem.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 #include "lapi/syscalls.h"
 
 static int sem_id = -1;
diff --git a/testcases/kernel/syscalls/ipc/semctl/semctl04.c b/testcases/kernel/syscalls/ipc/semctl/semctl04.c
index f6fa361b2..d01bb3db4 100644
--- a/testcases/kernel/syscalls/ipc/semctl/semctl04.c
+++ b/testcases/kernel/syscalls/ipc/semctl/semctl04.c
@@ -17,7 +17,7 @@
 #include "tst_safe_sysv_ipc.h"
 #include "tst_test.h"
 #include "lapi/sem.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 static uid_t ltp_uid;
 static int sem_id = -1;
diff --git a/testcases/kernel/syscalls/ipc/semctl/semctl05.c b/testcases/kernel/syscalls/ipc/semctl/semctl05.c
index 5feee0082..985c1f039 100644
--- a/testcases/kernel/syscalls/ipc/semctl/semctl05.c
+++ b/testcases/kernel/syscalls/ipc/semctl/semctl05.c
@@ -13,7 +13,7 @@
 #include "tst_safe_sysv_ipc.h"
 #include "tst_test.h"
 #include "lapi/sem.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 static int sem_id = -1;
 
diff --git a/testcases/kernel/syscalls/ipc/semctl/semctl06.c b/testcases/kernel/syscalls/ipc/semctl/semctl06.c
index b8734c2fa..e06d17d8d 100644
--- a/testcases/kernel/syscalls/ipc/semctl/semctl06.c
+++ b/testcases/kernel/syscalls/ipc/semctl/semctl06.c
@@ -53,7 +53,7 @@
 #include <signal.h>
 #include "test.h"
 #include <sys/wait.h>
-#include "ipcsem.h"
+#include "tse_ipcsem.h"
 
 int local_flag = 1;
 
diff --git a/testcases/kernel/syscalls/ipc/semctl/semctl07.c b/testcases/kernel/syscalls/ipc/semctl/semctl07.c
index 588fb2436..1b03f0ab2 100644
--- a/testcases/kernel/syscalls/ipc/semctl/semctl07.c
+++ b/testcases/kernel/syscalls/ipc/semctl/semctl07.c
@@ -20,7 +20,7 @@
 
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 #include "lapi/sem.h"
 
 static int semid = -1;
diff --git a/testcases/kernel/syscalls/ipc/semctl/semctl08.c b/testcases/kernel/syscalls/ipc/semctl/semctl08.c
index f4549adf4..083179c92 100644
--- a/testcases/kernel/syscalls/ipc/semctl/semctl08.c
+++ b/testcases/kernel/syscalls/ipc/semctl/semctl08.c
@@ -10,7 +10,7 @@
 #include "lapi/sembuf.h"
 #include "lapi/sem.h"
 #include "tst_test.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 #ifdef HAVE_SEMID64_DS_TIME_HIGH
 
diff --git a/testcases/kernel/syscalls/ipc/semctl/semctl09.c b/testcases/kernel/syscalls/ipc/semctl/semctl09.c
index 32b411efd..f315484c1 100644
--- a/testcases/kernel/syscalls/ipc/semctl/semctl09.c
+++ b/testcases/kernel/syscalls/ipc/semctl/semctl09.c
@@ -40,7 +40,7 @@
 #include <pwd.h>
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 #include "lapi/sem.h"
 #include "lapi/syscalls.h"
 
diff --git a/testcases/kernel/syscalls/ipc/semget/semget01.c b/testcases/kernel/syscalls/ipc/semget/semget01.c
index 3c05517e4..50a05d745 100644
--- a/testcases/kernel/syscalls/ipc/semget/semget01.c
+++ b/testcases/kernel/syscalls/ipc/semget/semget01.c
@@ -12,7 +12,7 @@
 #include <sys/ipc.h>
 #include "lapi/sem.h"
 #include "tst_test.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 #include "tst_safe_sysv_ipc.h"
 
 static int sem_id = -1, sem_key = -1;
diff --git a/testcases/kernel/syscalls/ipc/semget/semget02.c b/testcases/kernel/syscalls/ipc/semget/semget02.c
index d381bbd69..4f292465e 100644
--- a/testcases/kernel/syscalls/ipc/semget/semget02.c
+++ b/testcases/kernel/syscalls/ipc/semget/semget02.c
@@ -26,7 +26,7 @@
 #include <pwd.h>
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 #include "lapi/sem.h"
 
 static int sem_id = -1;
diff --git a/testcases/kernel/syscalls/ipc/semget/semget05.c b/testcases/kernel/syscalls/ipc/semget/semget05.c
index 0e41a1528..57a65dbdd 100644
--- a/testcases/kernel/syscalls/ipc/semget/semget05.c
+++ b/testcases/kernel/syscalls/ipc/semget/semget05.c
@@ -16,7 +16,7 @@
 #include <sys/ipc.h>
 #include "lapi/sem.h"
 #include "tst_test.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 #include "tst_safe_sysv_ipc.h"
 
 static int *sem_id_arr;
diff --git a/testcases/kernel/syscalls/ipc/semop/semop01.c b/testcases/kernel/syscalls/ipc/semop/semop01.c
index 207263539..f5861a0a9 100644
--- a/testcases/kernel/syscalls/ipc/semop/semop01.c
+++ b/testcases/kernel/syscalls/ipc/semop/semop01.c
@@ -9,7 +9,7 @@
 
 #include <stdlib.h>
 #include "tst_test.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 #include "lapi/sem.h"
 #include "semop.h"
 
diff --git a/testcases/kernel/syscalls/ipc/semop/semop02.c b/testcases/kernel/syscalls/ipc/semop/semop02.c
index d8181db17..f82edf9fa 100644
--- a/testcases/kernel/syscalls/ipc/semop/semop02.c
+++ b/testcases/kernel/syscalls/ipc/semop/semop02.c
@@ -23,7 +23,7 @@
 #include <pwd.h>
 #include <sys/ipc.h>
 #include "tst_test.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 #include "lapi/sem.h"
 #include "semop.h"
 
diff --git a/testcases/kernel/syscalls/ipc/semop/semop03.c b/testcases/kernel/syscalls/ipc/semop/semop03.c
index 636b71531..481015147 100644
--- a/testcases/kernel/syscalls/ipc/semop/semop03.c
+++ b/testcases/kernel/syscalls/ipc/semop/semop03.c
@@ -12,7 +12,7 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 #include "tst_test.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 #include "lapi/sem.h"
 #include "semop.h"
 
diff --git a/testcases/kernel/syscalls/ipc/shmat/shmat01.c b/testcases/kernel/syscalls/ipc/shmat/shmat01.c
index 606bdd154..e07e5a4fd 100644
--- a/testcases/kernel/syscalls/ipc/shmat/shmat01.c
+++ b/testcases/kernel/syscalls/ipc/shmat/shmat01.c
@@ -26,7 +26,7 @@
 
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 #define ALIGN_DOWN(in_addr) ((void *)(((uintptr_t)in_addr / SHMLBA) * SHMLBA))
 
diff --git a/testcases/kernel/syscalls/ipc/shmat/shmat02.c b/testcases/kernel/syscalls/ipc/shmat/shmat02.c
index 3ad1fd08e..dc8ea33cd 100644
--- a/testcases/kernel/syscalls/ipc/shmat/shmat02.c
+++ b/testcases/kernel/syscalls/ipc/shmat/shmat02.c
@@ -22,7 +22,7 @@
 
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 static int shm_id1 = -1;
 static int shm_id2 = -1;
diff --git a/testcases/kernel/syscalls/ipc/shmat/shmat04.c b/testcases/kernel/syscalls/ipc/shmat/shmat04.c
index 7b7b802cb..2669d8ad4 100644
--- a/testcases/kernel/syscalls/ipc/shmat/shmat04.c
+++ b/testcases/kernel/syscalls/ipc/shmat/shmat04.c
@@ -21,7 +21,7 @@
 
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 static int segment_id = -1;
 static int key_id;
diff --git a/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c b/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c
index e86cd7103..05aea58cc 100644
--- a/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c
+++ b/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c
@@ -20,7 +20,7 @@
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
 #include "tst_clocks.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 #define NCHILD 20
 
diff --git a/testcases/kernel/syscalls/ipc/shmctl/shmctl02.c b/testcases/kernel/syscalls/ipc/shmctl/shmctl02.c
index 0b12944ce..64962527d 100644
--- a/testcases/kernel/syscalls/ipc/shmctl/shmctl02.c
+++ b/testcases/kernel/syscalls/ipc/shmctl/shmctl02.c
@@ -29,7 +29,7 @@
 
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 #include "lapi/syscalls.h"
 
 #define SHM_SIZE 2048
diff --git a/testcases/kernel/syscalls/ipc/shmctl/shmctl03.c b/testcases/kernel/syscalls/ipc/shmctl/shmctl03.c
index a3291c37f..a1f53e7c1 100644
--- a/testcases/kernel/syscalls/ipc/shmctl/shmctl03.c
+++ b/testcases/kernel/syscalls/ipc/shmctl/shmctl03.c
@@ -11,7 +11,7 @@
 #define _GNU_SOURCE
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 static void verify_ipcinfo(void)
 {
diff --git a/testcases/kernel/syscalls/ipc/shmctl/shmctl04.c b/testcases/kernel/syscalls/ipc/shmctl/shmctl04.c
index da73863dd..3ba05f9b5 100644
--- a/testcases/kernel/syscalls/ipc/shmctl/shmctl04.c
+++ b/testcases/kernel/syscalls/ipc/shmctl/shmctl04.c
@@ -23,7 +23,7 @@
 #include <pwd.h>
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 #include "lapi/shm.h"
 
 #define SHM_SIZE 2048
diff --git a/testcases/kernel/syscalls/ipc/shmctl/shmctl06.c b/testcases/kernel/syscalls/ipc/shmctl/shmctl06.c
index 63e7f843d..0847761c7 100644
--- a/testcases/kernel/syscalls/ipc/shmctl/shmctl06.c
+++ b/testcases/kernel/syscalls/ipc/shmctl/shmctl06.c
@@ -9,7 +9,7 @@
 
 #include <sys/shm.h>
 #include "lapi/shmbuf.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
 
diff --git a/testcases/kernel/syscalls/ipc/shmctl/shmctl07.c b/testcases/kernel/syscalls/ipc/shmctl/shmctl07.c
index 1cc07ead2..358b96508 100644
--- a/testcases/kernel/syscalls/ipc/shmctl/shmctl07.c
+++ b/testcases/kernel/syscalls/ipc/shmctl/shmctl07.c
@@ -11,7 +11,7 @@
 #include <stdio.h>
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 #define SHM_SIZE 2048
 
diff --git a/testcases/kernel/syscalls/ipc/shmctl/shmctl08.c b/testcases/kernel/syscalls/ipc/shmctl/shmctl08.c
index f72f9f9e5..d64465afe 100644
--- a/testcases/kernel/syscalls/ipc/shmctl/shmctl08.c
+++ b/testcases/kernel/syscalls/ipc/shmctl/shmctl08.c
@@ -14,7 +14,7 @@
 #include <stdio.h>
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 #define SHM_SIZE 2048
 
diff --git a/testcases/kernel/syscalls/ipc/shmdt/shmdt01.c b/testcases/kernel/syscalls/ipc/shmdt/shmdt01.c
index 0a6d4096c..e21e9aa2c 100644
--- a/testcases/kernel/syscalls/ipc/shmdt/shmdt01.c
+++ b/testcases/kernel/syscalls/ipc/shmdt/shmdt01.c
@@ -13,7 +13,7 @@
 #include <sys/shm.h>
 #include <setjmp.h>
 #include "tst_test.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 #include "tst_safe_sysv_ipc.h"
 
 static int shm_id = -1, shm_key, pass;
diff --git a/testcases/kernel/syscalls/ipc/shmdt/shmdt02.c b/testcases/kernel/syscalls/ipc/shmdt/shmdt02.c
index 4bdc6eb21..1f716cb6f 100644
--- a/testcases/kernel/syscalls/ipc/shmdt/shmdt02.c
+++ b/testcases/kernel/syscalls/ipc/shmdt/shmdt02.c
@@ -13,7 +13,7 @@
 #include <sys/types.h>
 #include <sys/shm.h>
 #include "tst_test.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 static void *non_attched_addr;
 static void *unaligned_addr;
diff --git a/testcases/kernel/syscalls/ipc/shmget/shmget02.c b/testcases/kernel/syscalls/ipc/shmget/shmget02.c
index 8a0961b04..5c77d47d8 100644
--- a/testcases/kernel/syscalls/ipc/shmget/shmget02.c
+++ b/testcases/kernel/syscalls/ipc/shmget/shmget02.c
@@ -32,7 +32,7 @@
 #include "tst_safe_sysv_ipc.h"
 #include "tst_kconfig.h"
 #include "tst_test.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 #include "lapi/shm.h"
 
 static int shm_id = -1;
diff --git a/testcases/kernel/syscalls/ipc/shmget/shmget03.c b/testcases/kernel/syscalls/ipc/shmget/shmget03.c
index 092f2170e..a54540d58 100644
--- a/testcases/kernel/syscalls/ipc/shmget/shmget03.c
+++ b/testcases/kernel/syscalls/ipc/shmget/shmget03.c
@@ -17,7 +17,7 @@
 #include <sys/shm.h>
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 static int *queues;
 static int maxshms, queue_cnt, used_cnt;
diff --git a/testcases/kernel/syscalls/ipc/shmget/shmget04.c b/testcases/kernel/syscalls/ipc/shmget/shmget04.c
index 2a6a676cd..0f73b2b74 100644
--- a/testcases/kernel/syscalls/ipc/shmget/shmget04.c
+++ b/testcases/kernel/syscalls/ipc/shmget/shmget04.c
@@ -19,7 +19,7 @@
 #include <sys/shm.h>
 #include "tst_safe_sysv_ipc.h"
 #include "tst_test.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 #include "lapi/shm.h"
 
 static int shm_id = -1;
diff --git a/testcases/kernel/syscalls/ipc/shmget/shmget05.c b/testcases/kernel/syscalls/ipc/shmget/shmget05.c
index d96a98546..246674938 100644
--- a/testcases/kernel/syscalls/ipc/shmget/shmget05.c
+++ b/testcases/kernel/syscalls/ipc/shmget/shmget05.c
@@ -21,7 +21,7 @@
 #include <sys/shm.h>
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 #define NEXT_ID_PATH "/proc/sys/kernel/shm_next_id"
 static int shm_id, pid;
diff --git a/testcases/kernel/syscalls/ipc/shmget/shmget06.c b/testcases/kernel/syscalls/ipc/shmget/shmget06.c
index f4bd61bca..420844f0a 100644
--- a/testcases/kernel/syscalls/ipc/shmget/shmget06.c
+++ b/testcases/kernel/syscalls/ipc/shmget/shmget06.c
@@ -19,7 +19,7 @@
 #include <sys/shm.h>
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 
 #define NEXT_ID_PATH "/proc/sys/kernel/shm_next_id"
 
diff --git a/testcases/kernel/syscalls/kill/kill05.c b/testcases/kernel/syscalls/kill/kill05.c
index 3c317e2fc..d44995666 100644
--- a/testcases/kernel/syscalls/kill/kill05.c
+++ b/testcases/kernel/syscalls/kill/kill05.c
@@ -20,7 +20,7 @@
 #include <pwd.h>
 #include <stdlib.h>
 #include "tst_test.h"
-#include "libnewipc.h"
+#include "tse_newipc.h"
 #include "tst_safe_sysv_ipc.h"
 #include "tst_safe_macros.h"
 #include "tst_uid.h"
diff --git a/testcases/kernel/syscalls/mbind/mbind01.c b/testcases/kernel/syscalls/mbind/mbind01.c
index 4b8d168cd..ace107af5 100644
--- a/testcases/kernel/syscalls/mbind/mbind01.c
+++ b/testcases/kernel/syscalls/mbind/mbind01.c
@@ -17,7 +17,7 @@
 #include "config.h"
 #include "numa_helper.h"
 #include "tst_test.h"
-#include "tst_numa.h"
+#include "tse_numa.h"
 #include "lapi/numaif.h"
 
 #ifdef HAVE_NUMA_V2
@@ -141,7 +141,7 @@ static void check_policy_pref_or_local(int policy)
 	if (policy != MPOL_PREFERRED && policy != MPOL_LOCAL) {
 		tst_res(TFAIL, "Wrong policy: %s(%d), "
 			"expected MPOL_PREFERRED or MPOL_LOCAL",
-			tst_mempolicy_mode_name(policy), policy);
+			tse_mempolicy_mode_name(policy), policy);
 	}
 }
 
@@ -221,8 +221,8 @@ static void do_test(unsigned int i)
 			tc->check_policy(policy);
 		else if (tc->policy != policy) {
 			tst_res(TFAIL, "Wrong policy: %s(%d), expected: %s(%d)",
-				tst_mempolicy_mode_name(policy), policy,
-				tst_mempolicy_mode_name(tc->policy), tc->policy);
+				tse_mempolicy_mode_name(policy), policy,
+				tse_mempolicy_mode_name(tc->policy), tc->policy);
 			fail = 1;
 		}
 		if (tc->exp_nodemask) {
diff --git a/testcases/kernel/syscalls/mbind/mbind02.c b/testcases/kernel/syscalls/mbind/mbind02.c
index cd6a03226..00fb15536 100644
--- a/testcases/kernel/syscalls/mbind/mbind02.c
+++ b/testcases/kernel/syscalls/mbind/mbind02.c
@@ -21,25 +21,25 @@
 # include <numaif.h>
 #endif
 #include "tst_test.h"
-#include "tst_numa.h"
+#include "tse_numa.h"
 
 #ifdef HAVE_NUMA_V2
 
 static size_t page_size;
-static struct tst_nodemap *nodes;
+static struct tse_nodemap *nodes;
 
 static void setup(void)
 {
 	page_size = getpagesize();
 
-	nodes = tst_get_nodemap(TST_NUMA_MEM, 2 * page_size / 1024);
+	nodes = tse_get_nodemap(TST_NUMA_MEM, 2 * page_size / 1024);
 	if (nodes->cnt <= 1)
 		tst_brk(TCONF, "Test requires at least two NUMA memory nodes");
 }
 
 static void cleanup(void)
 {
-	tst_nodemap_free(nodes);
+	tse_nodemap_free(nodes);
 }
 
 static void verify_policy(int mode)
@@ -50,11 +50,11 @@ static void verify_policy(int mode)
 	unsigned long size = page_size;
 	int node = 0;
 
-	ptr = tst_numa_map(NULL, size);
-	tst_nodemap_reset_counters(nodes);
-	tst_numa_fault(ptr, size);
-	tst_nodemap_count_pages(nodes, ptr, size);
-	tst_nodemap_print_counters(nodes);
+	ptr = tse_numa_map(NULL, size);
+	tse_nodemap_reset_counters(nodes);
+	tse_numa_fault(ptr, size);
+	tse_nodemap_count_pages(nodes, ptr, size);
+	tse_nodemap_print_counters(nodes);
 
 	for (i = 0; i < nodes->cnt; i++) {
 		if (!nodes->counters[i]) {
@@ -67,24 +67,24 @@ static void verify_policy(int mode)
 
 	TEST(mbind(ptr, size, mode, bm->maskp, bm->size + 1, MPOL_MF_STRICT));
 
-	tst_numa_unmap(ptr, size);
+	tse_numa_unmap(ptr, size);
 	numa_free_nodemask(bm);
 
 	if (TST_RET != -1) {
 		tst_res(TFAIL,
 		        "mbind(%s, MPOL_MF_STRICT) node %u returned %li, expected -1",
-		        tst_mempolicy_mode_name(mode), node, TST_RET);
+		        tse_mempolicy_mode_name(mode), node, TST_RET);
 		return;
 	}
 
 	if (TST_ERR == EIO) {
 		tst_res(TPASS | TTERRNO,
 		        "mbind(%s, MPOL_MF_STRICT) node %u",
-		        tst_mempolicy_mode_name(mode), node);
+		        tse_mempolicy_mode_name(mode), node);
 	} else {
 		tst_res(TFAIL | TTERRNO,
 			"mbind(%s, MPOL_MF_STRICT) node %u expected EIO",
-		        tst_mempolicy_mode_name(mode), node);
+		        tse_mempolicy_mode_name(mode), node);
 	}
 }
 
diff --git a/testcases/kernel/syscalls/mbind/mbind03.c b/testcases/kernel/syscalls/mbind/mbind03.c
index 3d477c9cb..6a026c6ae 100644
--- a/testcases/kernel/syscalls/mbind/mbind03.c
+++ b/testcases/kernel/syscalls/mbind/mbind03.c
@@ -18,25 +18,25 @@
 # include "mbind.h"
 #endif
 #include "tst_test.h"
-#include "tst_numa.h"
+#include "tse_numa.h"
 
 #ifdef HAVE_NUMA_V2
 
 static size_t page_size;
-static struct tst_nodemap *nodes;
+static struct tse_nodemap *nodes;
 
 static void setup(void)
 {
 	page_size = getpagesize();
 
-	nodes = tst_get_nodemap(TST_NUMA_MEM, 2 * page_size / 1024);
+	nodes = tse_get_nodemap(TST_NUMA_MEM, 2 * page_size / 1024);
 	if (nodes->cnt <= 1)
 		tst_brk(TCONF, "Test requires at least two NUMA memory nodes");
 }
 
 static void cleanup(void)
 {
-	tst_nodemap_free(nodes);
+	tse_nodemap_free(nodes);
 }
 
 static void verify_policy(int mode, unsigned flag)
@@ -47,11 +47,11 @@ static void verify_policy(int mode, unsigned flag)
 	unsigned long size = page_size;
 	unsigned int node = 0;
 
-	ptr = tst_numa_map(NULL, size);
-	tst_nodemap_reset_counters(nodes);
-	tst_numa_fault(ptr, size);
-	tst_nodemap_count_pages(nodes, ptr, size);
-	tst_nodemap_print_counters(nodes);
+	ptr = tse_numa_map(NULL, size);
+	tse_nodemap_reset_counters(nodes);
+	tse_numa_fault(ptr, size);
+	tse_nodemap_count_pages(nodes, ptr, size);
+	tse_nodemap_print_counters(nodes);
 
 	for (i = 0; i < nodes->cnt; i++) {
 		if (!nodes->counters[i]) {
@@ -67,15 +67,15 @@ static void verify_policy(int mode, unsigned flag)
 	if (TST_RET) {
 		tst_res(TFAIL | TTERRNO,
 		        "mbind(%s, %s) node %u",
-		        tst_mempolicy_mode_name(mode), mbind_flag_name(flag), node);
+		        tse_mempolicy_mode_name(mode), mbind_flag_name(flag), node);
 		goto exit;
 	} else {
 		tst_res(TPASS, "mbind(%s, %s) node %u succeded",
-		        tst_mempolicy_mode_name(mode), mbind_flag_name(flag), node);
+		        tse_mempolicy_mode_name(mode), mbind_flag_name(flag), node);
 	}
 
-	tst_nodemap_reset_counters(nodes);
-	tst_nodemap_count_pages(nodes, ptr, size);
+	tse_nodemap_reset_counters(nodes);
+	tse_nodemap_count_pages(nodes, ptr, size);
 
 	for (i = 0; i < nodes->cnt; i++) {
 		if (nodes->map[i] == node) {
@@ -95,7 +95,7 @@ static void verify_policy(int mode, unsigned flag)
 	}
 
 exit:
-	tst_numa_unmap(ptr, size);
+	tse_numa_unmap(ptr, size);
 	numa_free_nodemask(bm);
 }
 
diff --git a/testcases/kernel/syscalls/mbind/mbind04.c b/testcases/kernel/syscalls/mbind/mbind04.c
index 50028835f..2cab7aacb 100644
--- a/testcases/kernel/syscalls/mbind/mbind04.c
+++ b/testcases/kernel/syscalls/mbind/mbind04.c
@@ -18,12 +18,12 @@
 # include "mbind.h"
 #endif
 #include "tst_test.h"
-#include "tst_numa.h"
+#include "tse_numa.h"
 
 #ifdef HAVE_NUMA_V2
 
 static size_t page_size;
-static struct tst_nodemap *nodes;
+static struct tse_nodemap *nodes;
 
 #define PAGES_ALLOCATED 16u
 
@@ -31,14 +31,14 @@ static void setup(void)
 {
 	page_size = getpagesize();
 
-	nodes = tst_get_nodemap(TST_NUMA_MEM, 2 * PAGES_ALLOCATED * page_size / 1024);
+	nodes = tse_get_nodemap(TST_NUMA_MEM, 2 * PAGES_ALLOCATED * page_size / 1024);
 	if (nodes->cnt <= 1)
 		tst_brk(TCONF, "Test requires at least two NUMA memory nodes");
 }
 
 static void cleanup(void)
 {
-	tst_nodemap_free(nodes);
+	tse_nodemap_free(nodes);
 }
 
 static void verify_policy(unsigned int node, int mode, unsigned flag)
@@ -51,7 +51,7 @@ static void verify_policy(unsigned int node, int mode, unsigned flag)
 
 	numa_bitmask_setbit(bm, node);
 
-	ptr = tst_numa_map(NULL, size);
+	ptr = tse_numa_map(NULL, size);
 
 	TEST(mbind(ptr, size, mode, bm->maskp, bm->size + 1, flag));
 
@@ -60,12 +60,12 @@ static void verify_policy(unsigned int node, int mode, unsigned flag)
 	if (TST_RET) {
 		tst_res(TFAIL | TTERRNO,
 		        "mbind(%s, %s) node %u",
-		        tst_mempolicy_mode_name(mode), mbind_flag_name(flag), node);
+		        tse_mempolicy_mode_name(mode), mbind_flag_name(flag), node);
 		return;
 	}
 
 	tst_res(TPASS, "mbind(%s, %s) node %u",
-	        tst_mempolicy_mode_name(mode), mbind_flag_name(flag), node);
+	        tse_mempolicy_mode_name(mode), mbind_flag_name(flag), node);
 
 	const char *prefix = "child: ";
 
@@ -75,10 +75,10 @@ static void verify_policy(unsigned int node, int mode, unsigned flag)
 		tst_reap_children();
 	}
 
-	tst_nodemap_reset_counters(nodes);
-	tst_numa_fault(ptr, size);
-	tst_nodemap_count_pages(nodes, ptr, size);
-	tst_numa_unmap(ptr, size);
+	tse_nodemap_reset_counters(nodes);
+	tse_numa_fault(ptr, size);
+	tse_nodemap_count_pages(nodes, ptr, size);
+	tse_numa_unmap(ptr, size);
 
 	int fail = 0;
 
@@ -104,7 +104,7 @@ static void verify_policy(unsigned int node, int mode, unsigned flag)
 	}
 
 	if (fail)
-		tst_nodemap_print_counters(nodes);
+		tse_nodemap_print_counters(nodes);
 
 	if (!pid)
 		exit(0);
diff --git a/testcases/kernel/syscalls/rt_sigtimedwait/rt_sigtimedwait01.c b/testcases/kernel/syscalls/rt_sigtimedwait/rt_sigtimedwait01.c
index 813f75b9e..84234995c 100644
--- a/testcases/kernel/syscalls/rt_sigtimedwait/rt_sigtimedwait01.c
+++ b/testcases/kernel/syscalls/rt_sigtimedwait/rt_sigtimedwait01.c
@@ -2,7 +2,7 @@
 /* Copyright (c) Jiri Palecek<jpalecek@web.de>, 2009 */
 
 #include "time64_variants.h"
-#include "libsigwait.h"
+#include "tse_sigwait.h"
 
 static int my_rt_sigtimedwait(const sigset_t * set, siginfo_t * info,
 			      void *timeout)
@@ -21,24 +21,24 @@ static int my_rt_sigtimedwait_time64(const sigset_t * set, siginfo_t * info,
 #endif
 
 struct sigwait_test_desc tests[] = {
-	{ test_empty_set, SIGUSR1},
-	{ test_unmasked_matching, SIGUSR1},
-	{ test_masked_matching, SIGUSR1},
-	{ test_unmasked_matching_noinfo, SIGUSR1},
-	{ test_masked_matching_noinfo, SIGUSR1},
-	{ test_bad_address, SIGUSR1},
-	{ test_bad_address2, SIGUSR1},
-	{ test_bad_address3, SIGUSR1},
-	{ test_timeout, 0},
+	{ tse_empty_set, SIGUSR1},
+	{ tse_unmasked_matching, SIGUSR1},
+	{ tse_masked_matching, SIGUSR1},
+	{ tse_unmasked_matching_noinfo, SIGUSR1},
+	{ tse_masked_matching_noinfo, SIGUSR1},
+	{ tse_bad_address, SIGUSR1},
+	{ tse_bad_address2, SIGUSR1},
+	{ tse_bad_address3, SIGUSR1},
+	{ tse_timeout, 0},
 	/* Special cases */
 	/* 1: sigwaitinfo does respond to ignored signal */
-	{ test_masked_matching, SIGUSR2},
+	{ tse_masked_matching, SIGUSR2},
 	/* 2: An ignored signal doesn't cause sigwaitinfo to return EINTR */
-	{ test_timeout, SIGUSR2},
+	{ tse_timeout, SIGUSR2},
 	/* 3: The handler is not called when the signal is waited for by sigwaitinfo */
-	{ test_masked_matching, SIGTERM},
+	{ tse_masked_matching, SIGTERM},
 	/* 4: Simultaneous realtime signals are delivered in the order of increasing signal number */
-	{ test_masked_matching_rt, -1},
+	{ tse_masked_matching_rt, -1},
 };
 
 static struct time64_variants variants[] = {
@@ -62,7 +62,7 @@ static void run(unsigned int i)
 static void setup(void)
 {
 	tst_res(TINFO, "Testing variant: %s", variants[tst_variant].desc);
-	sigwait_setup();
+	tse_sigwait_setup();
 }
 
 static struct tst_test test = {
diff --git a/testcases/kernel/syscalls/set_mempolicy/set_mempolicy.h b/testcases/kernel/syscalls/set_mempolicy/set_mempolicy.h
index da6419e18..d0d9f858e 100644
--- a/testcases/kernel/syscalls/set_mempolicy/set_mempolicy.h
+++ b/testcases/kernel/syscalls/set_mempolicy/set_mempolicy.h
@@ -7,15 +7,15 @@
 #ifndef SET_MEMPOLICY_H__
 #define SET_MEMPOLICY_H__
 
-static inline void alloc_fault_count(struct tst_nodemap *nodes,
+static inline void alloc_fault_count(struct tse_nodemap *nodes,
                                      const char *file, size_t size)
 {
 	void *ptr;
 
-	ptr = tst_numa_map(file, size);
-	tst_numa_fault(ptr, size);
-	tst_nodemap_count_pages(nodes, ptr, size);
-	tst_numa_unmap(ptr, size);
+	ptr = tse_numa_map(file, size);
+	tse_numa_fault(ptr, size);
+	tse_nodemap_count_pages(nodes, ptr, size);
+	tse_numa_unmap(ptr, size);
 }
 
 #endif /* SET_MEMPOLICY_H__ */
diff --git a/testcases/kernel/syscalls/set_mempolicy/set_mempolicy01.c b/testcases/kernel/syscalls/set_mempolicy/set_mempolicy01.c
index 39e7156d0..a85a56332 100644
--- a/testcases/kernel/syscalls/set_mempolicy/set_mempolicy01.c
+++ b/testcases/kernel/syscalls/set_mempolicy/set_mempolicy01.c
@@ -17,14 +17,14 @@
 # include <numaif.h>
 #endif
 #include "tst_test.h"
-#include "tst_numa.h"
+#include "tse_numa.h"
 
 #ifdef HAVE_NUMA_V2
 
 #include "set_mempolicy.h"
 
 static size_t page_size;
-static struct tst_nodemap *nodes;
+static struct tse_nodemap *nodes;
 
 #define PAGES_ALLOCATED 16u
 
@@ -32,7 +32,7 @@ static void setup(void)
 {
 	page_size = getpagesize();
 
-	nodes = tst_get_nodemap(TST_NUMA_MEM, 2 * PAGES_ALLOCATED * page_size / 1024);
+	nodes = tse_get_nodemap(TST_NUMA_MEM, 2 * PAGES_ALLOCATED * page_size / 1024);
 	if (nodes->cnt <= 1)
 		tst_brk(TCONF, "Test requires at least two NUMA memory nodes");
 
@@ -48,7 +48,7 @@ static void setup(void)
 
 static void cleanup(void)
 {
-	tst_nodemap_free(nodes);
+	tse_nodemap_free(nodes);
 }
 
 static void verify_mempolicy(unsigned int node, int mode)
@@ -63,12 +63,12 @@ static void verify_mempolicy(unsigned int node, int mode)
 	if (TST_RET) {
 		tst_res(TFAIL | TTERRNO,
 		        "set_mempolicy(%s) node %u",
-		        tst_mempolicy_mode_name(mode), node);
+		        tse_mempolicy_mode_name(mode), node);
 		return;
 	}
 
 	tst_res(TPASS, "set_mempolicy(%s) node %u",
-	        tst_mempolicy_mode_name(mode), node);
+	        tse_mempolicy_mode_name(mode), node);
 
 	numa_free_nodemask(bm);
 
@@ -79,9 +79,9 @@ static void verify_mempolicy(unsigned int node, int mode)
 		tst_reap_children();
 	}
 
-	tst_nodemap_reset_counters(nodes);
+	tse_nodemap_reset_counters(nodes);
 	alloc_fault_count(nodes, NULL, PAGES_ALLOCATED * page_size);
-	tst_nodemap_print_counters(nodes);
+	tse_nodemap_print_counters(nodes);
 
 	for (i = 0; i < nodes->cnt; i++) {
 		if (nodes->map[i] == node) {
diff --git a/testcases/kernel/syscalls/set_mempolicy/set_mempolicy02.c b/testcases/kernel/syscalls/set_mempolicy/set_mempolicy02.c
index 3db9c2009..94d8aa336 100644
--- a/testcases/kernel/syscalls/set_mempolicy/set_mempolicy02.c
+++ b/testcases/kernel/syscalls/set_mempolicy/set_mempolicy02.c
@@ -18,7 +18,7 @@
 # include <numaif.h>
 #endif
 #include "tst_test.h"
-#include "tst_numa.h"
+#include "tse_numa.h"
 
 #ifdef HAVE_NUMA_V2
 
@@ -27,20 +27,20 @@
 #define ALLOC_ON_NODE 8
 
 static size_t page_size;
-static struct tst_nodemap *nodes;
+static struct tse_nodemap *nodes;
 
 static void setup(void)
 {
 	page_size = getpagesize();
 
-	nodes = tst_get_nodemap(TST_NUMA_MEM, 2 * ALLOC_ON_NODE * page_size / 1024);
+	nodes = tse_get_nodemap(TST_NUMA_MEM, 2 * ALLOC_ON_NODE * page_size / 1024);
 	if (nodes->cnt <= 1)
 		tst_brk(TCONF, "Test requires at least two NUMA memory nodes");
 }
 
 static void cleanup(void)
 {
-	tst_nodemap_free(nodes);
+	tse_nodemap_free(nodes);
 }
 
 static void alloc_and_check(size_t size, unsigned int *exp_alloc)
@@ -53,7 +53,7 @@ static void alloc_and_check(size_t size, unsigned int *exp_alloc)
 		tst_reap_children();
 	}
 
-	tst_nodemap_reset_counters(nodes);
+	tse_nodemap_reset_counters(nodes);
 	alloc_fault_count(nodes, NULL, size * page_size);
 
 	for (i = 0; i < nodes->cnt; i++) {
diff --git a/testcases/kernel/syscalls/set_mempolicy/set_mempolicy03.c b/testcases/kernel/syscalls/set_mempolicy/set_mempolicy03.c
index 5cfcda6d8..bc5e03217 100644
--- a/testcases/kernel/syscalls/set_mempolicy/set_mempolicy03.c
+++ b/testcases/kernel/syscalls/set_mempolicy/set_mempolicy03.c
@@ -15,7 +15,7 @@
 # include <numa.h>
 #endif
 #include "tst_test.h"
-#include "tst_numa.h"
+#include "tse_numa.h"
 
 #define MNTPOINT "mntpoint"
 #define PAGES_ALLOCATED 16u
@@ -25,20 +25,20 @@
 #include "set_mempolicy.h"
 
 static size_t page_size;
-static struct tst_nodemap *nodes;
+static struct tse_nodemap *nodes;
 
 static void setup(void)
 {
 	page_size = getpagesize();
 
-	nodes = tst_get_nodemap(TST_NUMA_MEM, 2 * PAGES_ALLOCATED * page_size / 1024);
+	nodes = tse_get_nodemap(TST_NUMA_MEM, 2 * PAGES_ALLOCATED * page_size / 1024);
 	if (nodes->cnt <= 1)
 		tst_brk(TCONF, "Test requires at least two NUMA memory nodes");
 }
 
 static void cleanup(void)
 {
-	tst_nodemap_free(nodes);
+	tse_nodemap_free(nodes);
 }
 
 static void verify_mempolicy(unsigned int node, int mode)
@@ -53,16 +53,16 @@ static void verify_mempolicy(unsigned int node, int mode)
 	if (TST_RET) {
 		tst_res(TFAIL | TTERRNO,
 		        "set_mempolicy(%s) node %u",
-		        tst_mempolicy_mode_name(mode), node);
+		        tse_mempolicy_mode_name(mode), node);
 		return;
 	}
 
 	tst_res(TPASS, "set_mempolicy(%s) node %u",
-	        tst_mempolicy_mode_name(mode), node);
+	        tse_mempolicy_mode_name(mode), node);
 
 	numa_free_nodemask(bm);
 
-	tst_nodemap_reset_counters(nodes);
+	tse_nodemap_reset_counters(nodes);
 	alloc_fault_count(nodes, MNTPOINT "/numa-test-file", PAGES_ALLOCATED * page_size);
 
 	for (i = 0; i < nodes->cnt; i++) {
diff --git a/testcases/kernel/syscalls/set_mempolicy/set_mempolicy04.c b/testcases/kernel/syscalls/set_mempolicy/set_mempolicy04.c
index 2a1d2e1b9..672232c84 100644
--- a/testcases/kernel/syscalls/set_mempolicy/set_mempolicy04.c
+++ b/testcases/kernel/syscalls/set_mempolicy/set_mempolicy04.c
@@ -26,7 +26,7 @@
 # include <numaif.h>
 #endif
 #include "tst_test.h"
-#include "tst_numa.h"
+#include "tse_numa.h"
 
 #define MNTPOINT "mntpoint"
 #define FILES 10
@@ -36,7 +36,7 @@
 #include "set_mempolicy.h"
 
 static size_t page_size;
-static struct tst_nodemap *nodes;
+static struct tse_nodemap *nodes;
 
 static void setup(void)
 {
@@ -44,14 +44,14 @@ static void setup(void)
 
 	page_size = getpagesize();
 
-	nodes = tst_get_nodemap(TST_NUMA_MEM, node_min_pages * page_size / 1024);
+	nodes = tse_get_nodemap(TST_NUMA_MEM, node_min_pages * page_size / 1024);
 	if (nodes->cnt <= 1)
 		tst_brk(TCONF, "Test requires at least two NUMA memory nodes");
 }
 
 static void cleanup(void)
 {
-	tst_nodemap_free(nodes);
+	tse_nodemap_free(nodes);
 }
 
 static void alloc_and_check(void)
@@ -61,7 +61,7 @@ static void alloc_and_check(void)
 	unsigned int total_pages = 0;
 	unsigned int sum_pages = 0;
 
-	tst_nodemap_reset_counters(nodes);
+	tse_nodemap_reset_counters(nodes);
 
 	/*
 	 * The inner loop loops node->cnt times to ensure the sum could
diff --git a/testcases/kernel/syscalls/sigtimedwait/sigtimedwait01.c b/testcases/kernel/syscalls/sigtimedwait/sigtimedwait01.c
index fa36c455f..e1eb8c26a 100644
--- a/testcases/kernel/syscalls/sigtimedwait/sigtimedwait01.c
+++ b/testcases/kernel/syscalls/sigtimedwait/sigtimedwait01.c
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright (c) Jiri Palecek<jpalecek@web.de>, 2009 */
 
-#include "libsigwait.h"
+#include "tse_sigwait.h"
 
 static int my_sigtimedwait(const sigset_t * set, siginfo_t * info,
 			   void *timeout)
@@ -10,15 +10,15 @@ static int my_sigtimedwait(const sigset_t * set, siginfo_t * info,
 }
 
 struct sigwait_test_desc tests[] = {
-	{ test_empty_set, SIGUSR1},
-	{ test_unmasked_matching, SIGUSR1},
-	{ test_masked_matching, SIGUSR1},
-	{ test_unmasked_matching_noinfo, SIGUSR1},
-	{ test_masked_matching_noinfo, SIGUSR1},
-	{ test_bad_address, SIGUSR1},
-	{ test_bad_address2, SIGUSR1},
-	{ test_bad_address3, SIGUSR1},
-	{ test_timeout, 0},
+	{ tse_empty_set, SIGUSR1},
+	{ tse_unmasked_matching, SIGUSR1},
+	{ tse_masked_matching, SIGUSR1},
+	{ tse_unmasked_matching_noinfo, SIGUSR1},
+	{ tse_masked_matching_noinfo, SIGUSR1},
+	{ tse_bad_address, SIGUSR1},
+	{ tse_bad_address2, SIGUSR1},
+	{ tse_bad_address3, SIGUSR1},
+	{ tse_timeout, 0},
 };
 
 static void run(unsigned int i)
@@ -31,6 +31,6 @@ static void run(unsigned int i)
 static struct tst_test test = {
 	.test= run,
 	.tcnt = ARRAY_SIZE(tests),
-	.setup = sigwait_setup,
+	.setup = tse_sigwait_setup,
 	.forks_child = 1,
 };
diff --git a/testcases/kernel/syscalls/sigwait/sigwait01.c b/testcases/kernel/syscalls/sigwait/sigwait01.c
index 92544c141..189d5dfdd 100644
--- a/testcases/kernel/syscalls/sigwait/sigwait01.c
+++ b/testcases/kernel/syscalls/sigwait/sigwait01.c
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright (c) Jiri Palecek<jpalecek@web.de>, 2009 */
 
-#include "libsigwait.h"
+#include "tse_sigwait.h"
 
 static int my_sigwait(const sigset_t * set,
 		      siginfo_t * info LTP_ATTRIBUTE_UNUSED,
@@ -17,8 +17,8 @@ static int my_sigwait(const sigset_t * set,
 }
 
 struct sigwait_test_desc tests[] = {
-	{ test_unmasked_matching_noinfo, SIGUSR1},
-	{ test_masked_matching_noinfo, SIGUSR1},
+	{ tse_unmasked_matching_noinfo, SIGUSR1},
+	{ tse_masked_matching_noinfo, SIGUSR1},
 };
 
 static void run(unsigned int i)
@@ -31,6 +31,6 @@ static void run(unsigned int i)
 static struct tst_test test = {
 	.test= run,
 	.tcnt = ARRAY_SIZE(tests),
-	.setup = sigwait_setup,
+	.setup = tse_sigwait_setup,
 	.forks_child = 1,
 };
diff --git a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
index f7d90047f..c17ea9c24 100644
--- a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
+++ b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright (c) Jiri Palecek<jpalecek@web.de>, 2009 */
 
-#include "libsigwait.h"
+#include "tse_sigwait.h"
 
 static int my_sigwaitinfo(const sigset_t * set, siginfo_t * info,
 			  void *timeout LTP_ATTRIBUTE_UNUSED)
@@ -10,13 +10,13 @@ static int my_sigwaitinfo(const sigset_t * set, siginfo_t * info,
 }
 
 struct sigwait_test_desc tests[] = {
-	{ test_empty_set, SIGUSR1},
-	{ test_unmasked_matching, SIGUSR1},
-	{ test_masked_matching, SIGUSR1},
-	{ test_unmasked_matching_noinfo, SIGUSR1},
-	{ test_masked_matching_noinfo, SIGUSR1},
-	{ test_bad_address, SIGUSR1},
-	{ test_bad_address2, SIGUSR1},
+	{ tse_empty_set, SIGUSR1},
+	{ tse_unmasked_matching, SIGUSR1},
+	{ tse_masked_matching, SIGUSR1},
+	{ tse_unmasked_matching_noinfo, SIGUSR1},
+	{ tse_masked_matching_noinfo, SIGUSR1},
+	{ tse_bad_address, SIGUSR1},
+	{ tse_bad_address2, SIGUSR1},
 };
 
 static void run(unsigned int i)
@@ -29,6 +29,6 @@ static void run(unsigned int i)
 static struct tst_test test = {
 	.test= run,
 	.tcnt = ARRAY_SIZE(tests),
-	.setup = sigwait_setup,
+	.setup = tse_sigwait_setup,
 	.forks_child = 1,
 };
diff --git a/testcases/kernel/syscalls/swapoff/swapoff01.c b/testcases/kernel/syscalls/swapoff/swapoff01.c
index bf097ac1a..065b5edbc 100644
--- a/testcases/kernel/syscalls/swapoff/swapoff01.c
+++ b/testcases/kernel/syscalls/swapoff/swapoff01.c
@@ -13,7 +13,7 @@
 
 #include "tst_test.h"
 #include "lapi/syscalls.h"
-#include "libswap.h"
+#include "tse_swap.h"
 
 #define MNTPOINT	"mntpoint"
 #define TEST_FILE	MNTPOINT"/testswap"
diff --git a/testcases/kernel/syscalls/swapoff/swapoff02.c b/testcases/kernel/syscalls/swapoff/swapoff02.c
index b6c428989..d7b872564 100644
--- a/testcases/kernel/syscalls/swapoff/swapoff02.c
+++ b/testcases/kernel/syscalls/swapoff/swapoff02.c
@@ -14,7 +14,7 @@
 #include <pwd.h>
 #include "tst_test.h"
 #include "lapi/syscalls.h"
-#include "libswap.h"
+#include "tse_swap.h"
 
 #define MNTPOINT	"mntpoint"
 #define TEST_FILE	MNTPOINT"/testswap"
diff --git a/testcases/kernel/syscalls/swapon/swapon01.c b/testcases/kernel/syscalls/swapon/swapon01.c
index a214bc9db..38699c037 100644
--- a/testcases/kernel/syscalls/swapon/swapon01.c
+++ b/testcases/kernel/syscalls/swapon/swapon01.c
@@ -14,7 +14,7 @@
 #include <stdlib.h>
 #include "tst_test.h"
 #include "lapi/syscalls.h"
-#include "libswap.h"
+#include "tse_swap.h"
 
 #define MNTPOINT	"mntpoint"
 #define SWAP_FILE	MNTPOINT"/swapfile01"
diff --git a/testcases/kernel/syscalls/swapon/swapon02.c b/testcases/kernel/syscalls/swapon/swapon02.c
index 625d463f7..d3e528c94 100644
--- a/testcases/kernel/syscalls/swapon/swapon02.c
+++ b/testcases/kernel/syscalls/swapon/swapon02.c
@@ -17,7 +17,7 @@
 
 #include "tst_test.h"
 #include "lapi/syscalls.h"
-#include "libswap.h"
+#include "tse_swap.h"
 
 #define MNTPOINT	"mntpoint"
 #define TEST_FILE	MNTPOINT"/testswap"
diff --git a/testcases/kernel/syscalls/swapon/swapon03.c b/testcases/kernel/syscalls/swapon/swapon03.c
index 53c5750de..fb4daf423 100644
--- a/testcases/kernel/syscalls/swapon/swapon03.c
+++ b/testcases/kernel/syscalls/swapon/swapon03.c
@@ -21,7 +21,7 @@
 #include <sys/swap.h>
 #include "tst_test.h"
 #include "lapi/syscalls.h"
-#include "libswap.h"
+#include "tse_swap.h"
 
 /*
  * MAX_SWAPFILES from the internal kernel implementation is currently <23, 29>,
@@ -40,7 +40,7 @@ static int setup_swap(void)
 	int used_swapfiles, min_swapfiles;
 	char filename[FILENAME_MAX];
 
-	used_swapfiles = tst_count_swaps();
+	used_swapfiles = tse_count_swaps();
 	min_swapfiles = MIN_SWAP_FILES - used_swapfiles;
 
 	while (true) {
diff --git a/testcases/kernel/uevents/uevent03.c b/testcases/kernel/uevents/uevent03.c
index 126c924f1..23866460b 100644
--- a/testcases/kernel/uevents/uevent03.c
+++ b/testcases/kernel/uevents/uevent03.c
@@ -18,7 +18,7 @@
 #include <sys/sysmacros.h>
 #include <linux/uinput.h>
 #include "tst_test.h"
-#include "tst_uinput.h"
+#include "tse_uinput.h"
 #include "uevent.h"
 
 static int mouse_fd;
-- 
2.52.0



More information about the ltp mailing list