[applied] test-read-common: Fix error message
Commit Message
Hello,
The error message in test_task::run_abidw in test-read-common.cc is
wrong. Fixed thus. Also, emit the error message directly to the standard
error as the error is detected.
* tests/test-read-common.cc (test_task::run_abidw): Fix error
message and emit it to stderr directly.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Applied to master branch.
---
tests/test-read-common.cc | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
@@ -103,16 +103,12 @@ test_task::run_abidw(const string& extargs)
drop_private_types += "--headers-dir " + in_public_headers_path +
" --drop-private-types";
string cmd = abidw + " " + spec_options + drop_private_types +
- " --abidiff " + extargs + in_elf_path;
+ " --abidiff " + extargs + in_elf_path;
if (system(cmd.c_str()))
{
- error_message = string("ABIs differ:\n")
- + in_abi_path
- + "\nand:\n"
- + out_abi_path
- + "\n"
+ error_message = string("self comparison with abidw failed:\n")
+ "command was: '" + cmd + "'\n";
-
+ std::cerr << error_message;
return false;
}