From f58ba79a4d43fe1bee76f71dbbcda9671104fb70 Mon Sep 17 00:00:00 2001
From: Olivier Dion <olivier.dion@savoirfairelinux.com>
Date: Thu, 10 Jun 2021 15:09:22 -0400
Subject: [PATCH] fuzzing/supervisor: Add supervisor

Change-Id: Ie593e1a6496d47fa8bb1fa3b046a01f87a44377b
---
 test/fuzzing/Makefile.am        |  2 +-
 test/fuzzing/lib/supervisor.cpp | 31 +++++++++++++++++++++++++++
 test/fuzzing/lib/supervisor.h   | 38 +++++++++++++++++++++++++++++++++
 3 files changed, 70 insertions(+), 1 deletion(-)
 create mode 100644 test/fuzzing/lib/supervisor.cpp
 create mode 100644 test/fuzzing/lib/supervisor.h

diff --git a/test/fuzzing/Makefile.am b/test/fuzzing/Makefile.am
index a1771e0c52..829d02d31d 100644
--- a/test/fuzzing/Makefile.am
+++ b/test/fuzzing/Makefile.am
@@ -6,4 +6,4 @@ check_PROGRAMS =
 
 lib_LTLIBRARIES = libfuzz.la
 
-libfuzz_la_SOURCES = lib/utils.cpp
+libfuzz_la_SOURCES = lib/utils.cpp lib/supervisor.cpp
diff --git a/test/fuzzing/lib/supervisor.cpp b/test/fuzzing/lib/supervisor.cpp
new file mode 100644
index 0000000000..fe22f1222f
--- /dev/null
+++ b/test/fuzzing/lib/supervisor.cpp
@@ -0,0 +1,31 @@
+/*
+ *  Copyright (C) 2021 Savoir-faire Linux Inc.
+ *
+ *  Author: Olivier Dion <olivier.dion>@savoirfairelinux.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program 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 General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA.
+ */
+
+#include "lib/supervisor.h"
+
+namespace supervisor {
+
+namespace env {
+
+const char* log     = "SUPERVISOR_LOG";
+const char* tls_out = "SUPERVISOR_TLS_OUT";
+
+}; // namespace env
+}; // namespace supervisor
diff --git a/test/fuzzing/lib/supervisor.h b/test/fuzzing/lib/supervisor.h
new file mode 100644
index 0000000000..4bbc2f4e88
--- /dev/null
+++ b/test/fuzzing/lib/supervisor.h
@@ -0,0 +1,38 @@
+/*
+ *  Copyright (C) 2021 Savoir-faire Linux Inc.
+ *
+ *  Author: Olivier Dion <olivier.dion>@savoirfairelinux.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program 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 General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA.
+ */
+
+#pragma once
+
+namespace supervisor {
+
+namespace signal {
+
+enum exit {
+    log = 1,
+};
+};
+
+namespace env {
+
+extern const char* log;
+extern const char* tls_out;
+
+}; // namespace env
+}; // namespace supervisor
-- 
GitLab