From: Thomas Schwinge <thomas@codesourcery.com>
To: libabigail@sourceware.org
Cc: Thomas Schwinge <thomas@codesourcery.com>
Subject: [PATCH] abipkgdiff: Respect 'create_abi_file_path' interface
Date: Fri, 10 Dec 2021 11:41:50 +0100 [thread overview]
Message-ID: <20211210104150.3248635-1-thomas@codesourcery.com> (raw)
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
next reply other threads:[~2021-12-10 10:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-10 10:41 Thomas Schwinge [this message]
2021-12-17 9:27 ` Thomas Schwinge
2021-12-20 14:58 ` Dodji Seketeli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211210104150.3248635-1-thomas@codesourcery.com \
--to=thomas@codesourcery.com \
--cc=libabigail@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).