diff options
-rw-r--r-- | eval/src/tests/apps/eval_expr/CMakeLists.txt | 2 | ||||
-rw-r--r-- | eval/src/tests/apps/eval_expr/eval_expr_test.cpp | 20 | ||||
-rw-r--r-- | valgrind-suppressions.txt | 10 |
3 files changed, 13 insertions, 19 deletions
diff --git a/eval/src/tests/apps/eval_expr/CMakeLists.txt b/eval/src/tests/apps/eval_expr/CMakeLists.txt index 84f90f61f49..5d64bc6c0dc 100644 --- a/eval/src/tests/apps/eval_expr/CMakeLists.txt +++ b/eval/src/tests/apps/eval_expr/CMakeLists.txt @@ -3,7 +3,7 @@ vespa_add_executable(eval_eval_expr_test_app TEST SOURCES eval_expr_test.cpp DEPENDS - vespalib + vespaeval ) vespa_add_test(NAME eval_eval_expr_test_app COMMAND eval_eval_expr_test_app DEPENDS eval_eval_expr_test_app eval_eval_expr_app) diff --git a/eval/src/tests/apps/eval_expr/eval_expr_test.cpp b/eval/src/tests/apps/eval_expr/eval_expr_test.cpp index bcbaf1c7d20..b9e07705056 100644 --- a/eval/src/tests/apps/eval_expr/eval_expr_test.cpp +++ b/eval/src/tests/apps/eval_expr/eval_expr_test.cpp @@ -9,8 +9,10 @@ #include <vespa/vespalib/data/output.h> #include <vespa/vespalib/data/simple_buffer.h> #include <vespa/vespalib/util/size_literals.h> +#include <vespa/eval/eval/test/test_io.h> using namespace vespalib; +using namespace vespalib::eval::test; using vespalib::make_string_short::fmt; using vespalib::slime::JsonFormat; using vespalib::slime::Inspector; @@ -27,24 +29,6 @@ void read_until_eof(Input &input) { } } -// copied from vespalib::eval::test -// -// It seems that linking with the eval library contaminates the -// process proxy in such a way that valgrind will fail. The working -// theory is that some static state gets initialized before the proxy -// is forked. This test bypasses the issue by linking with vespalib -// instead. A more robust solution would be to reverse the roles of -// the process proxy and the program; letting the proxy start the -// program. This could also be combined with the ability to send open -// file descriptors on unix domain sockets to avoid indirection for -// stdin/stdout streams. - -void write_compact(const Slime &slime, Output &out) { - JsonFormat::encode(slime, out, true); - out.reserve(1).data[0] = '\n'; - out.commit(1); -} - // Output adapter used to write to stdin of a child process class ChildIn : public Output { ChildProcess &_child; diff --git a/valgrind-suppressions.txt b/valgrind-suppressions.txt index 650ca6bceff..75a7b256b35 100644 --- a/valgrind-suppressions.txt +++ b/valgrind-suppressions.txt @@ -307,6 +307,16 @@ ... } { + Needed to avoid leak errors on static wchar strings when using the fastos process proxy + Memcheck:Leak + match-leak-kinds: possible + fun:_Znwm + fun:_ZNSbIwSt11char_traitsIwESaIwEE4_Rep9_S_createEmmRKS1_ + ... + fun:__static_initialization_and_destruction_0 + ... +} +{ Apparent memory leak on Fedora 28. Memcheck:Leak match-leak-kinds: possible |