From 3a2fe60529aff48ba86c979157df9c1a7eefd658 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 9 Aug 2018 14:48:06 +0200 Subject: executor: fix cgroups 1. Create per-proc cgroup in executor. 2. Setup cgroups after chdir into test dir (it assumes relative paths against test dir). 3. Add test. --- executor/common.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'executor/common.h') diff --git a/executor/common.h b/executor/common.h index 04358d1b1..6b8b43a33 100644 --- a/executor/common.h +++ b/executor/common.h @@ -514,13 +514,13 @@ static void loop() if (pid < 0) fail("clone failed"); if (pid == 0) { -#if SYZ_HAVE_SETUP_TEST - setup_test(); -#endif #if SYZ_EXECUTOR || SYZ_USE_TMP_DIR if (chdir(cwdbuf)) fail("failed to chdir"); #endif +#if SYZ_HAVE_SETUP_TEST + setup_test(); +#endif #if GOOS_akaros #if SYZ_EXECUTOR dup2(child_pipe[0], kInPipeFd); -- cgit mrf-deployment