From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 1BF513858D35 for ; Fri, 17 Dec 2021 09:27:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1BF513858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: CFRxQqVRt2z+aeMtsawuj6wTsPoMbcIyNW/+h27vA+lJdrBwR1L+NK1oyn1f6njF44kyGitktB P+bxFeGwysHg9dwKy7CG4vD5DsLxnJ7SS/uAfUqqKZmhbox7qI6zr/LOTT1KY/oZG3bEJ8uD9f ZVnZcKzmsG0q9fJAy7xSbxX3/gjmolIAfx+QAJCQKNaCFhS0fZDX/s2CQGSR7k5MHZa5mZr6/D avU7sPZJhKDw+3sG6335d9MW73//ugXVvcg35Tq1MnHyX2lStqCZi8pjWR5LZFuY8DsxyqIWds FxVw2cZaAnvQmZIBcGMQPp+5 X-IronPort-AV: E=Sophos;i="5.88,213,1635235200"; d="scan'208";a="69829072" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 17 Dec 2021 01:27:22 -0800 IronPort-SDR: KMiNHcd/2WmlCM9f3tZh4TwGj+WuE80A7h3IOw7gEVoYdwZxoz+FI1sVy7z4K45rIZDNRazS9l Tiwh2jOx1qY4v1y2sIRcXHoN8oIZzB0n8EsA1VKZVTtGD1rNQfr+9cYeZMSt9J0Q3mr1u4ZBs5 S8e54LZpG5fQM9gwq4JemZBYwX0NzXW93g6KgBU5s14JFjfxZ4uDD/RS87aLTGxWjp01KSuw3b 9ZkQSMzfgZ/B+g6ugg2HUN3Tf/VYYDMUppWMrsTKLQ+sTUpMPJ7TiTX57FlWBLyU/E5CC37VlI lY4= From: Thomas Schwinge To: Subject: Re: [PATCH] abipkgdiff: Respect 'create_abi_file_path' interface In-Reply-To: <20211210104150.3248635-1-thomas@codesourcery.com> References: <20211210104150.3248635-1-thomas@codesourcery.com> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/27.1 (x86_64-pc-linux-gnu) Date: Fri, 17 Dec 2021 10:27:07 +0100 Message-ID: <87o85fy42c.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, 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 List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Dec 2021 09:27:26 -0000 Hi! Ping. Gr=C3=BC=C3=9Fe 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 '' > =3D=3D=3D=3D Error happened during self check of '[...]' =3D=3D=3D=3D > [...] > > 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 retur= n > true". So we ought to 'return abigail::tools_utils::ABIDIFF_ERROR' in th= at > 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 > --- > 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=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955