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 <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
b24d9c4413
commit
59002a9e9d
5 changed files with 7 additions and 8 deletions
|
@ -74,7 +74,7 @@ protected:
|
|||
vector<std::string> 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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue