test: log: log_process: Log an error when failing due to incorrect message
One of the error paths in the test returns without logging a message, which makes failures difficult to debug. Fix it by adding an error message. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
9ba0c3fef8
commit
030fe617ef
1 changed files with 4 additions and 1 deletions
|
@ -115,8 +115,11 @@ protected:
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
string str(buf);
|
string str(buf);
|
||||||
if (str.find(message) == string::npos)
|
if (str.find(message) == string::npos) {
|
||||||
|
cerr << "Received message is not correct (received "
|
||||||
|
<< str.length() << " bytes)" << endl;
|
||||||
return TestFail;
|
return TestFail;
|
||||||
|
}
|
||||||
|
|
||||||
return TestPass;
|
return TestPass;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue