Skip to content

Commit

Permalink
fix(sanitizers): false positive fail on multi_test::Eval (dragonflydb…
Browse files Browse the repository at this point in the history
…#2896)

* disable false positives
  • Loading branch information
kostasrim authored Apr 15, 2024
1 parent 868e7a0 commit 86559a2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/server/multi_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,10 @@ TEST_F(MultiTest, FlushDb) {
ASSERT_FALSE(service_->IsShardSetLocked());
}

// Triggers a false possitive and therefore we turn it off
// There seem not to be a good solution to handle these false positives
// since sanitizers work well with u_context which is *very* slow
#ifndef SANITIZERS
TEST_F(MultiTest, Eval) {
if (auto config = absl::GetFlag(FLAGS_default_lua_flags); config != "") {
GTEST_SKIP() << "Skipped Eval test because default_lua_flags is set";
Expand Down Expand Up @@ -456,6 +460,7 @@ TEST_F(MultiTest, Eval) {
"42");
fb.Join();
}
#endif

TEST_F(MultiTest, Watch) {
auto kExecFail = ArgType(RespExpr::NIL);
Expand Down Expand Up @@ -696,6 +701,7 @@ TEST_F(MultiTest, ExecGlobalFallback) {
EXPECT_EQ(1, stats.tx_normal_cnt); // move is global
}

#ifndef SANITIZERS
TEST_F(MultiTest, ScriptFlagsCommand) {
if (auto flags = absl::GetFlag(FLAGS_default_lua_flags); flags != "") {
GTEST_SKIP() << "Skipped ScriptFlagsCommand test because default_lua_flags is set";
Expand Down Expand Up @@ -731,6 +737,7 @@ TEST_F(MultiTest, ScriptFlagsCommand) {
EXPECT_THAT(Run({"eval", kUndeclared2, "0"}), "works");
}
}
#endif

TEST_F(MultiTest, ScriptFlagsEmbedded) {
const char* s1 = R"(
Expand Down

0 comments on commit 86559a2

Please sign in to comment.