summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-12-11 23:31:07 +0100
committerLennart Poettering <lennart@poettering.net>2013-12-11 23:31:07 +0100
commite9174f29c7e3ee45137537b126458718913a3ec5 (patch)
treedd8b7afb775a0121031607b2e5b2358b8c0fbece /src/test
parent897395791f53064d8c9a18cf6b6567404fbedf15 (diff)
journald: cache cgroup root path, instead of querying it on every incoming log message
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-cgroup-util.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/test/test-cgroup-util.c b/src/test/test-cgroup-util.c
index 4d802d483a..eae67395bc 100644
--- a/src/test/test-cgroup-util.c
+++ b/src/test/test-cgroup-util.c
@@ -140,7 +140,7 @@ static void test_proc(void) {
assert_se(d);
FOREACH_DIRENT(de, d, break) {
- _cleanup_free_ char *path = NULL, *path_shifted = NULL, *session = NULL, *unit = NULL, *user_unit = NULL, *machine = NULL, *prefix = NULL, *slice = NULL;
+ _cleanup_free_ char *path = NULL, *path_shifted = NULL, *session = NULL, *unit = NULL, *user_unit = NULL, *machine = NULL, *slice = NULL;
pid_t pid;
uid_t uid = (uid_t) -1;
@@ -156,7 +156,7 @@ static void test_proc(void) {
continue;
cg_pid_get_path(SYSTEMD_CGROUP_CONTROLLER, pid, &path);
- cg_pid_get_path_shifted(pid, &prefix, &path_shifted);
+ cg_pid_get_path_shifted(pid, NULL, &path_shifted);
cg_pid_get_owner_uid(pid, &uid);
cg_pid_get_session(pid, &session);
cg_pid_get_unit(pid, &unit);
@@ -164,10 +164,9 @@ static void test_proc(void) {
cg_pid_get_machine_name(pid, &machine);
cg_pid_get_slice(pid, &slice);
- printf("%lu\t%s\t%s\t%s\t%lu\t%s\t%s\t%s\t%s\t%s\n",
+ printf("%lu\t%s\t%s\t%lu\t%s\t%s\t%s\t%s\t%s\n",
(unsigned long) pid,
path,
- prefix,
path_shifted,
(unsigned long) uid,
session,