Message ID | 20211210104150.3248635-1-thomas@codesourcery.com |
---|---|
State | Committed |
Headers |
Return-Path: <libabigail-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B77113857C5F for <patchwork@sourceware.org>; Fri, 10 Dec 2021 10:43:23 +0000 (GMT) X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from smtprelay01.ispgateway.de (smtprelay01.ispgateway.de [80.67.31.39]) by sourceware.org (Postfix) with ESMTPS id 398C13857C4F for <libabigail@sourceware.org>; Fri, 10 Dec 2021 10:42:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 398C13857C4F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=schwinge.name Received: from [192.94.31.2] (helo=dem-tschwing-1.ger.mentorg.com) by smtprelay01.ispgateway.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <outgoing@schwinge.name>) id 1mvdLl-00033M-Ma; Fri, 10 Dec 2021 11:42:01 +0100 Received: (nullmailer pid 3248700 invoked by uid 1000); Fri, 10 Dec 2021 10:41:58 -0000 From: Thomas Schwinge <thomas@codesourcery.com> To: libabigail@sourceware.org Subject: [PATCH] abipkgdiff: Respect 'create_abi_file_path' interface Date: Fri, 10 Dec 2021 11:41:50 +0100 Message-Id: <20211210104150.3248635-1-thomas@codesourcery.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Df-Sender: b3V0Z29pbmdAc2Nod2luZ2UubmFtZQ== X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project <libabigail.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libabigail>, <mailto:libabigail-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libabigail/> List-Help: <mailto:libabigail-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libabigail>, <mailto:libabigail-request@sourceware.org?subject=subscribe> Cc: Thomas Schwinge <thomas@codesourcery.com> Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libabigail" <libabigail-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
abipkgdiff: Respect 'create_abi_file_path' interface
|
|
Commit Message
Thomas Schwinge
Dec. 10, 2021, 10:41 a.m. UTC
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(+)
Comments
Hi! Ping. Grüße Thomas On 2021-12-10T11:41:50+0100, I wrote: > 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 ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
Hello, Thomas Schwinge <thomas@codesourcery.com> a écrit: > 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> Applied to master, thanks! [...] Cheers,
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);