From a36f583f2d3e80d890ff15c32a6b6122bc9f93e6 Mon Sep 17 00:00:00 2001 From: Ivana Hutarova Varekova Date: Mon, 23 May 2011 09:06:58 +0200 Subject: [PATCH] tests: remove not used and obsolete test pathtest pathtest(.sh) is ot run in the current makefile and it does not work properly, so there is no reason to add it there. This path removes pathtest from git. Signed-off-by: Ivana Hutarova Varekova Signed-off-by: Jan Safranek --- tests/Makefile.am | 5 ++--- tests/pathtest.c | 40 ---------------------------------------- tests/pathtest.sh | 12 ------------ 3 files changed, 2 insertions(+), 55 deletions(-) delete mode 100644 tests/pathtest.c delete mode 100755 tests/pathtest.sh diff --git a/tests/Makefile.am b/tests/Makefile.am index 95ff008f..4cdcbf36 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -4,12 +4,11 @@ INCLUDES = -I$(top_srcdir)/include LDADD = $(top_builddir)/src/.libs/libcgroup.la # compile the tests, but do not install them -noinst_PROGRAMS = libcgrouptest01 libcg_ba setuid pathtest walk_test read_stats walk_task get_controller get_mount_point proctest get_all_controller get_variable_names test_named_hierarchy get_procs +noinst_PROGRAMS = libcgrouptest01 libcg_ba setuid walk_test read_stats walk_task get_controller get_mount_point proctest get_all_controller get_variable_names test_named_hierarchy get_procs libcgrouptest01_SOURCES=libcgrouptest01.c test_functions.c libcgrouptest.h libcg_ba_SOURCES=libcg_ba.cpp setuid_SOURCES=setuid.c -pathtest_SOURCES=pathtest.c walk_test_SOURCES=walk_test.c read_stats_SOURCES=read_stats.c walk_task_SOURCES=walk_task.c @@ -21,6 +20,6 @@ get_variable_names_SOURCES=get_variable_names.c test_named_hierarchy_SOURCES=test_named_hierarchy.c get_procs_SOURCES=get_procs.c -EXTRA_DIST = pathtest.sh runlibcgrouptest.sh +EXTRA_DIST = runlibcgrouptest.sh TESTS = runlibcgrouptest.sh diff --git a/tests/pathtest.c b/tests/pathtest.c deleted file mode 100644 index 076c38ae..00000000 --- a/tests/pathtest.c +++ /dev/null @@ -1,40 +0,0 @@ -#include -#include -#include -#include -#include -#include - -int main(int argc, char *argv[]) -{ - char *path; - char *expected_path, *controller; - int ret; - - if (argc < 2) { - fprintf(stderr, "Usage %s: \n", - argv[0]); - exit(EXIT_FAILURE); - } - - controller = argv[1]; - expected_path = argv[2]; - - cgroup_init(); - - ret = cgroup_get_current_controller_path(getpid(), controller, &path); - if (ret) - printf("Test FAIL, get path failed for controller %s\n", - controller); - else { - if (strcmp(path, expected_path)) - printf("Test FAIL, expected_path %s, got path %s\n", - expected_path, path); - else - printf("Test PASS, controller %s path %s\n", - controller, path); - free(path); - } - - return EXIT_SUCCESS; -} diff --git a/tests/pathtest.sh b/tests/pathtest.sh deleted file mode 100755 index b3733895..00000000 --- a/tests/pathtest.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -while read name extra -do - echo $name | grep -q '^#' - if [ $? -eq 0 ] - then - continue - fi - path=`cat /proc/$$/cgroup | cut -d ':' -f 3` - ./pathtest $name $path -done < /proc/cgroups -- 2.47.2