]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
tests: remove not used and obsolete test pathtest
authorIvana Hutarova Varekova <varekova@redhat.com>
Mon, 23 May 2011 07:06:58 +0000 (09:06 +0200)
committerJan Safranek <jsafrane@redhat.com>
Fri, 27 May 2011 07:08:10 +0000 (09:08 +0200)
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 <varekova@redhat.com>
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
tests/Makefile.am
tests/pathtest.c [deleted file]
tests/pathtest.sh [deleted file]

index 95ff008fef7a018a346bce2263bdc36a6b420f71..4cdcbf366a207065d83096934b2d83dc67710659 100644 (file)
@@ -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 (file)
index 076c38a..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <string.h>
-#include <libcgroup.h>
-
-int main(int argc, char *argv[])
-{
-       char *path;
-       char *expected_path, *controller;
-       int ret;
-
-       if (argc < 2) {
-               fprintf(stderr, "Usage %s: <controller name> <path>\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 (executable)
index b373389..0000000
+++ /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