depcomp
libtool
ltmain.sh
+m4
missing
install-sh
aclocal.m4
--- /dev/null
+[submodule "googletest"]
+ path = googletest
+ url = git@github.com:google/googletest.git
+ fetchRecurseSubmodules = true
AUTOMAKE_OPTIONS = foreign
+ACLOCAL_AMFLAGS= -I m4
SUBDIRS = dist doc include samples scripts src tests
EXTRA_DIST = README_daemon libcgroup.doxyfile README_systemd
# In following section update all occurences of version, including soname
AC_INIT([libcgroup], 0.41)
-AM_INIT_AUTOMAKE([foreign dist-bzip2])
+AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# we do not want static libraries
AC_DISABLE_STATIC
+AM_PROG_AR
+LT_INIT
+
AC_CONFIG_SRCDIR([src])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_FILES([Makefile
tests/Makefile
+ tests/gunit/Makefile
tests/tools/testenv.sh
tests/tools/Makefile
tests/tools/cgconfigparser/Makefile
CLEANFILES = lex.c parse.c parse.h
INCLUDES = -I$(top_srcdir)/include
-lib_LTLIBRARIES = libcgroup.la
+lib_LTLIBRARIES = libcgroup.la libcgroupfortesting.la
libcgroup_la_SOURCES = parse.h parse.y lex.l api.c config.c libcgroup-internal.h libcgroup.map wrapper.c log.c
libcgroup_la_LIBADD = -lpthread
libcgroup_la_LDFLAGS = -Wl,--version-script,$(srcdir)/libcgroup.map \
-version-number $(LIBRARY_VERSION_MAJOR):$(LIBRARY_VERSION_MINOR):$(LIBRARY_VERSION_RELEASE)
+libcgroupfortesting_la_SOURCES = $(libcgroup_la_SOURCES)
+libcgroupfortesting_la_LIBADD = -lpthread
+libcgroupfortesting_la_LDFLAGS = -Wl,--version-script,$(top_srcdir)/tests/gunit/libcgroup_unittest.map \
+ -version-number $(LIBRARY_VERSION_MAJOR):$(LIBRARY_VERSION_MINOR):$(LIBRARY_VERSION_RELEASE)
-SUBDIRS = tools
+SUBDIRS = gunit tools
INCLUDES = -I$(top_srcdir)/include
LDADD = $(top_builddir)/src/.libs/libcgroup.la
--- /dev/null
+*.log
+*.o
+*.trs
+
+gtest
+libgtest.la
--- /dev/null
+#
+# libcgroup googletests Makefile.am
+#
+# Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
+# Author: Tom Hromatka <tom.hromatka@oracle.com>
+#
+
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of version 2.1 of the GNU Lesser General Public License as
+# published by the Free Software Foundation.
+#
+# This library 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 Lesser General Public License
+# for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this library; if not, see <http://www.gnu.org/licenses>.
+#
+
+AM_CPPFLAGS = -I$(top_srcdir)/include \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/googletest/googletest/include \
+ -I$(top_srcdir)/googletest/googletest \
+ -std=c++11
+LDADD = $(top_builddir)/src/.libs/libcgroupfortesting.la \
+ libgtest.la
+
+libgtest_la_SOURCES = $(top_srcdir)/googletest/googletest/src/gtest-all.cc
+libgtest_la_CPPFLAGS = -I$(top_srcdir)/googletest/googletest/include \
+ -I$(top_srcdir)/googletest/googletest
+
+check_LTLIBRARIES = libgtest.la
+check_PROGRAMS = gtest
+TESTS = gtest
+
+gtest_SOURCES = gtest.cpp
--- /dev/null
+/**
+ * libcgroup googletest main entry point
+ *
+ * Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
+ * Author: Tom Hromatka <tom.hromatka@oracle.com>
+ */
+
+/*
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of version 2.1 of the GNU Lesser General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This library 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 Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, see <http://www.gnu.org/licenses>.
+ */
+
+#include "gtest/gtest.h"
+
+int main(int argc, char **argv)
+{
+ ::testing::InitGoogleTest(&argc, argv);
+
+ return RUN_ALL_TESTS();
+}
--- /dev/null
+CGROUP_0.32 {
+global:
+ cgroup_init;
+ cgroup_attach_task;
+ cgroup_modify_cgroup;
+ cgroup_create_cgroup;
+ cgroup_delete_cgroup;
+ cgroup_attach_task_pid;
+ cgroup_get_cgroup;
+ cgroup_create_cgroup_from_parent;
+ cgroup_copy_cgroup;
+ cgroup_change_cgroup_uid_gid;
+ cgroup_change_cgroup_path;
+ cgroup_new_cgroup;
+ cgroup_add_controller;
+ cgroup_free;
+ cgroup_free_controllers;
+ cgroup_add_value_string;
+ cgroup_add_value_int64;
+ cgroup_add_value_uint64;
+ cgroup_add_value_bool;
+ cgroup_compare_cgroup;
+ cgroup_compare_controllers;
+ cgroup_set_uid_gid;
+ cgroup_get_uid_gid;
+ cgroup_get_value_string;
+ cgroup_set_value_string;
+ cgroup_get_value_int64;
+ cgroup_set_value_int64;
+ cgroup_get_value_uint64;
+ cgroup_set_value_uint64;
+ cgroup_get_value_bool;
+ cgroup_set_value_bool;
+ cgroup_change_cgroup_uid_gid_flags;
+ cgroup_print_rules_config;
+ cgroup_reload_cached_rules;
+ cgroup_init_rules_cache;
+ cgroup_get_current_controller_path;
+ cgroup_config_load_config;
+ *;
+};
+
+CGROUP_0.32.1 {
+global:
+ cgroup_strerror;
+} CGROUP_0.32;
+
+CGROUP_0.33 {
+global:
+ cgroup_get_last_errno;
+ cgroup_walk_tree_begin;
+ cgroup_walk_tree_next;
+ cgroup_walk_tree_end;
+} CGROUP_0.32.1;
+
+CGROUP_0.34 {
+global:
+ cgroup_get_task_begin;
+ cgroup_get_task_end;
+ cgroup_get_task_next;
+ cgroup_read_stats_begin;
+ cgroup_read_stats_next;
+ cgroup_read_stats_end;
+ cgroup_walk_tree_set_flags;
+ cgroup_get_controller_end;
+ cgroup_get_controller_next;
+ cgroup_get_controller_begin;
+ cgroup_unload_cgroups;
+ cgroup_get_controller;
+ cgroup_get_uid_gid_from_procfs;
+ cgroup_get_subsys_mount_point;
+ cgroup_get_procname_from_procfs;
+ cgroup_register_unchanged_process;
+ cgroup_change_cgroup_flags;
+} CGROUP_0.33;
+
+CGROUP_0.35 {
+global:
+ create_cgroup_from_name_value_pairs;
+ cgroup_delete_cgroup_ext;
+ cgroup_get_all_controller_begin;
+ cgroup_get_all_controller_next;
+ cgroup_get_all_controller_end;
+ cgroup_get_value_name_count;
+ cgroup_get_value_name;
+} CGROUP_0.34;
+
+CGROUP_0.36 {
+} CGROUP_0.35;
+
+CGROUP_0.37 {
+ cgroup_get_procs;
+ cgroup_read_value_begin;
+ cgroup_read_value_next;
+ cgroup_read_value_end;
+ cg_chmod_recursive;
+} CGROUP_0.36;
+
+CGROUP_0.38 {
+ cgroup_get_subsys_mount_point_begin;
+ cgroup_get_subsys_mount_point_next;
+ cgroup_get_subsys_mount_point_end;
+ cgroup_set_permissions;
+ cgroup_config_unload_config;
+ cgroup_config_set_default;
+} CGROUP_0.37;
+
+CGROUP_0.39 {
+ cgroup_reload_cached_templates;
+ cgroup_init_templates_cache;
+ cgroup_config_create_template_group;
+ cgroup_change_all_cgroups;
+ cgroup_set_logger;
+ cgroup_set_default_logger;
+ cgroup_set_loglevel;
+ cgroup_log;
+ cgroup_parse_log_level_str;
+} CGROUP_0.38;
+
+CGROUP_0.40 {
+ cgroup_templates_cache_set_source_files;
+ cgroup_load_templates_cache_from_files;
+} CGROUP_0.39;
+
+CGROUP_0.41 {
+} CGROUP_0.40;
+
+CGROUP_0.42 {
+ cgroup_add_all_controllers;
+} CGROUP_0.41;