From 59002a9e9d84417197999391c7d8c6af620fc1fb Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 29 Nov 2021 23:16:35 +0200 Subject: test: Replace "/proc/self/exe" with path to test binary When tests are run under valgrind, /proc/self/exe points to valgrind, not to the test binary. This results in failures for tests that need to fork processes. Fix it by replacing "/proc/self/exe" with the path to the test binary. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Kieran Bingham --- test/log/log_process.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/log') diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp index ca835133..2484c58f 100644 --- a/test/log/log_process.cpp +++ b/test/log/log_process.cpp @@ -74,7 +74,7 @@ protected: vector args; args.push_back(to_string(exitCode)); args.push_back(to_string(num_)); - int ret = proc_.start("/proc/self/exe", args); + int ret = proc_.start(self(), args); if (ret) { cerr << "failed to start process" << endl; return TestFail; -- cgit v1.2.1