[LTP] [PATCH 13/13] testcases/kernel/mem: Remove library

Cyril Hrubis chrubis@suse.cz
Wed Dec 18 19:45:18 CET 2024


Now that the last bits of the library are unused we can remove it
safely.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
 testcases/kernel/mem/include/libmem.mk | 43 --------------------------
 testcases/kernel/mem/include/mem.h     | 25 ---------------
 testcases/kernel/mem/lib/Makefile      | 27 ----------------
 testcases/kernel/mem/lib/mem.c         | 30 ------------------
 4 files changed, 125 deletions(-)
 delete mode 100644 testcases/kernel/mem/include/libmem.mk
 delete mode 100644 testcases/kernel/mem/include/mem.h
 delete mode 100644 testcases/kernel/mem/lib/Makefile
 delete mode 100644 testcases/kernel/mem/lib/mem.c

diff --git a/testcases/kernel/mem/include/libmem.mk b/testcases/kernel/mem/include/libmem.mk
deleted file mode 100644
index b6d45f0fc..000000000
--- a/testcases/kernel/mem/include/libmem.mk
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-#  Copyright (C) 2012  Red Hat, Inc.
-#
-#  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
-#
-
-MEM_SRCDIR		:= $(abs_top_srcdir)/testcases/kernel/mem
-LIBMEM_SRCDIR		:= $(MEM_SRCDIR)/lib
-
-MEM_DIR			:= $(top_builddir)/testcases/kernel/mem
-LIBMEM_DIR		:= $(MEM_DIR)/lib
-LIBMEM			:= $(LIBMEM_DIR)/libmem.a
-FILTER_OUT_DIRS		:= $(LIBMEM_DIR)
-CFLAGS			+= -I$(MEM_SRCDIR)/include -pthread
-LDLIBS			+= $(NUMA_LIBS) -lmem -lltp
-LDFLAGS			+= -L$(LIBMEM_DIR)
-
-$(LIBMEM_DIR):
-	mkdir -p "$@"
-
-$(LIBMEM): $(LIBMEM_DIR)
-	$(MAKE) -C $^ -f "$(LIBMEM_SRCDIR)/Makefile" all
-
-MAKE_DEPS		+= $(LIBMEM)
-
-trunk-clean:: | lib-clean
-
-lib-clean:: $(LIBMEM_DIR)
-	$(MAKE) -C $^ -f "$(LIBMEM_SRCDIR)/Makefile" clean
-
-include $(top_srcdir)/testcases/kernel/include/lib.mk
diff --git a/testcases/kernel/mem/include/mem.h b/testcases/kernel/mem/include/mem.h
deleted file mode 100644
index 25389f34c..000000000
--- a/testcases/kernel/mem/include/mem.h
+++ /dev/null
@@ -1,25 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/*
- * Copyright (c) Linux Test Project, 2011-2021
- */
-#ifndef _MEM_H
-#define _MEM_H
-#include "config.h"
-#include "tst_test.h"
-#include "ksm_helper.h"
-#include "tst_memutils.h"
-
-#define MB			(1UL<<20)
-#define KB			(1UL<<10)
-#define PATH_SYSVM		"/proc/sys/vm/"
-#define PATH_MEMINFO		"/proc/meminfo"
-
-/* KSM */
-
-/* HUGETLB */
-
-#define PATH_SHMMAX		"/proc/sys/kernel/shmmax"
-
-void write_memcg(void);
-
-#endif
diff --git a/testcases/kernel/mem/lib/Makefile b/testcases/kernel/mem/lib/Makefile
deleted file mode 100644
index d4624e9b0..000000000
--- a/testcases/kernel/mem/lib/Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-#  Copyright (C) 2010  Red Hat, Inc.
-#
-#  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
-#
-
-top_srcdir		?= ../../../..
-
-include $(top_srcdir)/include/mk/env_pre.mk
-
-CPPFLAGS		+= -I$(abs_srcdir)/../include
-INTERNAL_LIB		:= libmem.a
-
-include $(top_srcdir)/testcases/kernel/include/lib.mk
-include $(top_srcdir)/include/mk/lib.mk
diff --git a/testcases/kernel/mem/lib/mem.c b/testcases/kernel/mem/lib/mem.c
deleted file mode 100644
index 4e5c0b873..000000000
--- a/testcases/kernel/mem/lib/mem.c
+++ /dev/null
@@ -1,30 +0,0 @@
-#define TST_NO_DEFAULT_MAIN
-
-#include "config.h"
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <sys/param.h>
-#include <errno.h>
-#include <fcntl.h>
-#if HAVE_NUMA_H
-#include <numa.h>
-#endif
-#if HAVE_NUMAIF_H
-#include <numaif.h>
-#endif
-#include <pthread.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#include "mem.h"
-#include "numa_helper.h"
-
-
-/* KSM */
-
-- 
2.45.2



More information about the ltp mailing list