aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
Diffstat (limited to 'executor')
-rw-r--r--executor/common.h6
-rw-r--r--executor/common_linux.h3
2 files changed, 4 insertions, 5 deletions
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);
diff --git a/executor/common_linux.h b/executor/common_linux.h
index 9c1f5d776..e491c1f94 100644
--- a/executor/common_linux.h
+++ b/executor/common_linux.h
@@ -1969,8 +1969,7 @@ static void kill_and_wait(int pid, int* status)
#define SYZ_HAVE_SETUP_LOOP 1
static void setup_loop()
{
-// TODO(dvyukov): this needs SYZ_EXECUTOR and a test.
-#if SYZ_ENABLE_CGROUPS
+#if SYZ_EXECUTOR || SYZ_ENABLE_CGROUPS
int pid = getpid();
char cgroupdir[64];
char procs_file[128];