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

* Re: [PATCH] abipkgdiff: Respect 'create_abi_file_path' interface
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Schwinge @ 2021-12-17  9:27 UTC (permalink / raw)
  To: libabigail

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

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

* Re: [PATCH] abipkgdiff: Respect 'create_abi_file_path' interface
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Dodji Seketeli @ 2021-12-20 14:58 UTC (permalink / raw)
  To: Thomas Schwinge; +Cc: libabigail

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,

-- 
		Dodji

^ 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).