simple sanity test for cgconfigparser, cgsnapshot and cgclear tool Signed-off-by: Ivana Hutarova Varekova <varek...@redhat.com> ---
configure.in | 1 + tests/Makefile.am | 2 ++ tests/cgconfigparser/Makefile.am | 3 +++ tests/cgconfigparser/cgconfigparser_simple | 22 ++++++++++++++++++++++ 4 files changed, 28 insertions(+), 0 deletions(-) create mode 100644 tests/cgconfigparser/Makefile.am create mode 100755 tests/cgconfigparser/cgconfigparser_simple diff --git a/configure.in b/configure.in index 936f113..6fa31af 100644 --- a/configure.in +++ b/configure.in @@ -177,6 +177,7 @@ fi AC_CONFIG_FILES([Makefile tests/Makefile + tests/cgconfigparser/Makefile src/Makefile src/daemon/Makefile src/tools/Makefile diff --git a/tests/Makefile.am b/tests/Makefile.am index 5d27342..89a47b4 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,3 +1,5 @@ +SUBDIR = cgconfigparser + INCLUDES = -I$(top_srcdir)/include LDADD = $(top_builddir)/src/.libs/libcgroup.la diff --git a/tests/cgconfigparser/Makefile.am b/tests/cgconfigparser/Makefile.am new file mode 100644 index 0000000..cbb4112 --- /dev/null +++ b/tests/cgconfigparser/Makefile.am @@ -0,0 +1,3 @@ +EXTRA_DIST = cgconfigparser_simple + +TESTS = cgconfigparser_simple diff --git a/tests/cgconfigparser/cgconfigparser_simple b/tests/cgconfigparser/cgconfigparser_simple new file mode 100755 index 0000000..8b01751 --- /dev/null +++ b/tests/cgconfigparser/cgconfigparser_simple @@ -0,0 +1,22 @@ +#!/bin/bash +# simple sanity test for cgconfigparser, cgsnapshot and cgclear tool +. ../testenv.sh + +mkdir -p /tmp/cgroups/cpu 2>/dev/null +mount -t cgroup -o cpu,cpuacct cpu /tmp/cgroups/cpu || die "Mount failed" + +$TOOLSDIR/cgsnapshot >/$TMP/temp.conf || die "cgsnapshot failed" +lss_o1=`lssubsys -m` +$TOOLSDIR/cgclear || die "1st cgclear failed" + +$TOOLSDIR/cgconfigparser -l /$TMP/temp.conf || die "cgconfigparser failed" +lss_o2=`lssubsys -m` +$TOOLSDIR/cgclear || die "2nd cgclear failed" + +if [ "$lss_o1" != "$lss_o2" ]; then + echo "ERROR: first lss ouptput:'$lss_o1', second lss output:'$lss_o2'" +fi + +echo "PASS: cgconfigparser_simple" +cleanup +exit 0 \ No newline at end of file ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel