public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] abipkgdiff: Respect 'create_abi_file_path' interface
@ 2021-12-10 10:41 Thomas Schwinge
  2021-12-17  9:27 ` Thomas Schwinge
  2021-12-20 14:58 ` Dodji Seketeli
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Schwinge @ 2021-12-10 10:41 UTC (permalink / raw)
  To: libabigail; +Cc: Thomas Schwinge

Currently we may run into this:

    [...]
    abipkgdiff: Could not create the directory tree to store the abi for '[...]'
    abipkgdiff: Writting ABIXML file '' ...
    abipkgdiff: Wrote ABIXML file '' OK
    abipkgdiff: Reading ABIXML file '' ...
    abipkgdiff: Could not read temporary ABIXML file ''
    ==== Error happened during self check of '[...]' ====
    [...]

That is, after a failed 'create_abi_file_path', we proceed with an empty
'abi_file_path' -- because that one only gets set "iff the function return
true".  So we ought to 'return abigail::tools_utils::ABIDIFF_ERROR' in that
case.

(It's likewise strange why 'create_write_context'/'write_corpus' succeed with
an empty 'abi_file_path', but that's for another day...)

	* tools/abipkgdiff.cc (compare_to_self): Respect
	'create_abi_file_path' interface.

Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
---
 tools/abipkgdiff.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git tools/abipkgdiff.cc tools/abipkgdiff.cc
index 33efa23a..7fc833b2 100644
--- tools/abipkgdiff.cc
+++ tools/abipkgdiff.cc
@@ -1583,6 +1583,8 @@ compare_to_self(const elf_file& elf,
 	    << "Could not create the directory tree to store the abi for '"
 	    << elf.path
 	    << "'\n";
+
+	return abigail::tools_utils::ABIDIFF_ERROR;
       }
     ofstream of(abi_file_path.c_str(), std::ios_base::trunc);
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-12-20 14:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-10 10:41 [PATCH] abipkgdiff: Respect 'create_abi_file_path' interface Thomas Schwinge
2021-12-17  9:27 ` Thomas Schwinge
2021-12-20 14:58 ` Dodji Seketeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).