[applied] test-read-common: Fix error message

Message ID 871q6aaaak.fsf@redhat.com
State New
Headers
Series [applied] test-read-common: Fix error message |

Commit Message

Dodji Seketeli May 9, 2024, 10:29 p.m. UTC
  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(-)
  

Patch

diff --git a/tests/test-read-common.cc b/tests/test-read-common.cc
index 8c682b1c..9871f7c4 100644
--- a/tests/test-read-common.cc
+++ b/tests/test-read-common.cc
@@ -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;
     }