Blame 3989e169fc0da9c29da8dd692427d4f4c1ace413.patch

52984c3
From 3989e169fc0da9c29da8dd692427d4f4c1ace413 Mon Sep 17 00:00:00 2001
52984c3
From: Daniel Xu <dlxu@fb.com>
52984c3
Date: Wed, 23 Jun 2021 18:17:26 -0700
52984c3
Subject: [PATCH] Fix ODR violation in tests
52984c3
52984c3
Summary: ContinuePlugin was defined twice. Namespace the test one to avoid ODR issues.
52984c3
52984c3
Reviewed By: davide125
52984c3
52984c3
Differential Revision: D29346385
52984c3
52984c3
fbshipit-source-id: 58fdde38a64c8bd22d14d55d0ba04ae865d2fabf
52984c3
---
52984c3
 src/oomd/config/ConfigCompilerTest.cpp | 3 +++
52984c3
 1 file changed, 3 insertions(+)
52984c3
52984c3
diff --git a/src/oomd/config/ConfigCompilerTest.cpp b/src/oomd/config/ConfigCompilerTest.cpp
52984c3
index ecf2b92..abe5d10 100644
52984c3
--- a/src/oomd/config/ConfigCompilerTest.cpp
52984c3
+++ b/src/oomd/config/ConfigCompilerTest.cpp
52984c3
@@ -36,6 +36,7 @@ using namespace Oomd::Config2;
52984c3
 using namespace Oomd::Engine;
52984c3
 
52984c3
 namespace {
52984c3
+
52984c3
 int prerun_count;
52984c3
 int prerun_stored_count;
52984c3
 int count;
52984c3
@@ -57,6 +58,7 @@ void reset_counters() {
52984c3
 static constexpr auto kRandomCgroupFs = "oomd/fixtures/cgroup";
52984c3
 
52984c3
 namespace Oomd {
52984c3
+namespace test {
52984c3
 
52984c3
 class ContinuePlugin : public BasePlugin {
52984c3
  public:
52984c3
@@ -308,6 +310,7 @@ REGISTER_PLUGIN(NoInit, NoInitPlugin::create);
52984c3
 REGISTER_PREKILL_HOOK(NoOpPrekillHook, NoOpPrekillHook::create);
52984c3
 REGISTER_PLUGIN(Kill, KillPlugin::create);
52984c3
 
52984c3
+} // namespace test
52984c3
 } // namespace Oomd
52984c3
 
52984c3
 class CompilerTest : public ::testing::Test {