On 05/23/2011 09:06 AM, Ivana Hutarova Varekova wrote:
> 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 <varek...@redhat.com>

The test is poorly written and requires all controllers mounted
(including 'ns'), so unless someone is willing to fix it, I am inclined
to remove the test too, so:

Acked-By: Jan Safranek <jsafr...@redhat.com>

> ---
> 
>  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 95ff008..4cdcbf3 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 076c38a..0000000
> --- a/tests/pathtest.c
> +++ /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
> index b373389..0000000
> --- 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
> 
> 
> ------------------------------------------------------------------------------
> What Every C/C++ and Fortran developer Should Know!
> Read this article and learn how Intel has extended the reach of its 
> next-generation tools to help Windows* and Linux* C/C++ and Fortran 
> developers boost performance applications - including clusters. 
> http://p.sf.net/sfu/intel-dev2devmay
> _______________________________________________
> Libcg-devel mailing list
> Libcg-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libcg-devel
> 


------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to