public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Remove ABI XML test data file blank lines
@ 2020-07-16 17:33 Giuliano Procida
  2020-07-16 17:33 ` [PATCH 2/2] abg-writer.cc: Fix indentation of XML output Giuliano Procida
  2020-07-28 14:22 ` [PATCH 1/2] Remove ABI XML test data file blank lines Dodji Seketeli
  0 siblings, 2 replies; 4+ messages in thread
From: Giuliano Procida @ 2020-07-16 17:33 UTC (permalink / raw)
  To: libabigail; +Cc: dodji, kernel-team, gprocida

Following a change which eliminated the output of extra blank lines in
XML output, it now also makes sense to remove such blank lines from
saved generated XML files.

This commit does this.

	* tests/data/test-abidiff/test-PR18166-libtirpc.so.abi: Remove
	blank lines.
	* tests/data/test-diff-dwarf-abixml/PR25409-librte_bus_dpaa.so.20.0.abi:
	Ditto.
	* tests/data/test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1.abi:
	Ditto.
	* tests/data/test-diff-suppr/test45-abi-wl.xml: Ditto.
	* tests/data/test-diff-suppr/test45-abi.xml: Ditto.
	* tests/data/test-diff-suppr/test46-PR25128-base.xml: Ditto.
	* tests/data/test-diff-suppr/test46-PR25128-new.xml: Ditto.

Signed-off-by: Giuliano Procida <gprocida@google.com>
---
 .../test-abidiff/test-PR18166-libtirpc.so.abi |  38 -
 .../PR25409-librte_bus_dpaa.so.20.0.abi       |  86 --
 .../test0-pr19026-libvtkIOSQL-6.1.so.1.abi    |  48 --
 tests/data/test-diff-suppr/test45-abi-wl.xml  | 164 ----
 tests/data/test-diff-suppr/test45-abi.xml     | 766 ------------------
 .../test-diff-suppr/test46-PR25128-base.xml   | 765 -----------------
 .../test-diff-suppr/test46-PR25128-new.xml    | 765 -----------------
 7 files changed, 2632 deletions(-)

Large diff omitted inline, see
https://github.com/myxoid/libabigail/commit/33a4d98dc3b8935e5fa4faf8e2c8b3161db18ec5


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

* [PATCH 2/2] abg-writer.cc: Fix indentation of XML output
  2020-07-16 17:33 [PATCH 1/2] Remove ABI XML test data file blank lines Giuliano Procida
@ 2020-07-16 17:33 ` Giuliano Procida
  2020-07-28 15:08   ` Dodji Seketeli
  2020-07-28 14:22 ` [PATCH 1/2] Remove ABI XML test data file blank lines Dodji Seketeli
  1 sibling, 1 reply; 4+ messages in thread
From: Giuliano Procida @ 2020-07-16 17:33 UTC (permalink / raw)
  To: libabigail; +Cc: dodji, kernel-team, gprocida

The XML writer produces valid XML. However, it differs in a few
respects from that obtained with xmllint --format.

- there is no XML declaration at the start
- attributes use single quotes rather than double quotes
- indentation is mostly 2 spaces but this is broken in places

This commit fixes the last of these issues as it actually causes
readability issues when examining diffs. It also does this for every
test XML file, whether used as input, compared against output or not
used at all, to match what xmllint --format would do.

	* src/abg-writer.cc (write_canonical_types_of_scope): Do not
	add additional indentation. (write_translation_unit): Pass
	additional indentation to write_canonical_types_of_scope.
	(write_class_decl): Ensure optional annotations of base
	classes have the same indentation as the base classes
	themselves.
	* tests/data/test-annotate/libtest23.so.abi: Fix indentation.
	* tests/data/test-annotate/libtest24-drop-fns-2.so.abi: Ditto.
	* tests/data/test-annotate/libtest24-drop-fns.so.abi: Ditto.
	* tests/data/test-annotate/test-anonymous-members-0.o.abi:
	Ditto.
	* tests/data/test-annotate/test1.abi: Ditto.
	* tests/data/test-annotate/test14-pr18893.so.abi: Ditto.
	* tests/data/test-annotate/test15-pr18892.so.abi: Ditto.
	* tests/data/test-annotate/test17-pr19027.so.abi: Ditto.
	* tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
	Ditto.
	* tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
	Ditto.
	* tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi:
	Ditto.
	* tests/data/test-annotate/test21-pr19092.so.abi: Ditto.
	* tests/data/test-diff-suppr/test45-abi-wl.xml: Ditto.
	* tests/data/test-diff-suppr/test45-abi.xml: Ditto.
	* tests/data/test-diff-suppr/test46-PR25128-base.xml: Ditto.
	* tests/data/test-diff-suppr/test46-PR25128-new.xml: Ditto.
	* tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi:
	Ditto.
	* tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Ditto.
	* tests/data/test-read-dwarf/libtest23.so.abi: Ditto.
	* tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi:
	Ditto.
	* tests/data/test-read-dwarf/libtest24-drop-fns.so.abi: Ditto.
	* tests/data/test-read-dwarf/test1.abi: Ditto.
	* tests/data/test-read-dwarf/test1.hash.abi: Ditto.
	* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Ditto.
	* tests/data/test-read-dwarf/test11-pr18828.so.abi: Ditto.
	* tests/data/test-read-dwarf/test12-pr18844.so.abi: Ditto.
	* tests/data/test-read-dwarf/test14-pr18893.so.abi: Ditto.
	* tests/data/test-read-dwarf/test15-pr18892.so.abi: Ditto.
	* tests/data/test-read-dwarf/test16-pr18904.so.abi: Ditto.
	* tests/data/test-read-dwarf/test17-pr19027.so.abi: Ditto.
	* tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
	Ditto.
	* tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
	Ditto.
	* tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
	Ditto.
	* tests/data/test-read-dwarf/test21-pr19092.so.abi: Ditto.
	* tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
	Ditto.
	* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Ditto.
	* tests/data/test-read-write/test10.xml: Ditto.
	* tests/data/test-read-write/test15.xml: Ditto.
	* tests/data/test-read-write/test21.xml: Ditto.
	* tests/data/test-read-write/test28-without-std-fns-ref.xml:
	Ditto.
	* tests/data/test-read-write/test28-without-std-vars-ref.xml:
	Ditto.

Signed-off-by: Giuliano Procida <gprocida@google.com>
---
 src/abg-writer.cc                             |   10 +-
 tests/data/test-annotate/libtest23.so.abi     |  176 +-
 .../test-annotate/libtest24-drop-fns-2.so.abi |  554 +-
 .../test-annotate/libtest24-drop-fns.so.abi   |  554 +-
 .../test-anonymous-members-0.o.abi            |  154 +-
 tests/data/test-annotate/test1.abi            |   20 +-
 .../data/test-annotate/test14-pr18893.so.abi  |  180 +-
 .../data/test-annotate/test15-pr18892.so.abi  | 1046 +-
 .../data/test-annotate/test17-pr19027.so.abi  | 3552 +++----
 ...st18-pr19037-libvtkRenderingLIC-6.1.so.abi | 2168 ++--
 ...19-pr19023-libtcmalloc_and_profiler.so.abi | 5324 +++++-----
 ...st20-pr19025-libvtkParallelCore-6.1.so.abi | 2308 ++---
 .../data/test-annotate/test21-pr19092.so.abi  |  306 +-
 tests/data/test-diff-suppr/test45-abi-wl.xml  |  392 +-
 tests/data/test-diff-suppr/test45-abi.xml     |  574 +-
 .../test-diff-suppr/test46-PR25128-base.xml   |  574 +-
 .../test-diff-suppr/test46-PR25128-new.xml    |  574 +-
 .../PR22015-libboost_iostreams.so.abi         |  230 +-
 .../test-read-dwarf/PR22122-libftdc.so.abi    |  498 +-
 tests/data/test-read-dwarf/libtest23.so.abi   |  132 +-
 .../libtest24-drop-fns-2.so.abi               |  386 +-
 .../test-read-dwarf/libtest24-drop-fns.so.abi |  198 +-
 tests/data/test-read-dwarf/test1.abi          |   12 +-
 tests/data/test-read-dwarf/test1.hash.abi     |   12 +-
 .../test-read-dwarf/test10-pr18818-gcc.so.abi | 1670 ++--
 .../test-read-dwarf/test11-pr18828.so.abi     | 7988 +++++++--------
 .../test-read-dwarf/test12-pr18844.so.abi     | 8674 ++++++++--------
 .../test-read-dwarf/test14-pr18893.so.abi     |  100 +-
 .../test-read-dwarf/test15-pr18892.so.abi     |  770 +-
 .../test-read-dwarf/test16-pr18904.so.abi     | 8800 ++++++++---------
 .../test-read-dwarf/test17-pr19027.so.abi     | 2468 ++---
 ...st18-pr19037-libvtkRenderingLIC-6.1.so.abi | 1492 +--
 ...19-pr19023-libtcmalloc_and_profiler.so.abi | 3838 +++----
 ...st20-pr19025-libvtkParallelCore-6.1.so.abi | 1554 +--
 .../test-read-dwarf/test21-pr19092.so.abi     |  234 +-
 .../test22-pr19097-libstdc++.so.6.0.17.so.abi | 7834 +++++++--------
 .../test9-pr18818-clang.so.abi                | 1126 +--
 tests/data/test-read-write/test10.xml         |    6 +-
 tests/data/test-read-write/test15.xml         |    6 +-
 tests/data/test-read-write/test21.xml         |    6 +-
 .../test28-without-std-fns-ref.xml            |  172 +-
 .../test28-without-std-vars-ref.xml           |  160 +-
 42 files changed, 33415 insertions(+), 33417 deletions(-)


Large diff omitted inline, see
https://github.com/myxoid/libabigail/commit/aa481f6e7f2387007657c2923149a855e88212f4

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

* Re: [PATCH 1/2] Remove ABI XML test data file blank lines
  2020-07-16 17:33 [PATCH 1/2] Remove ABI XML test data file blank lines Giuliano Procida
  2020-07-16 17:33 ` [PATCH 2/2] abg-writer.cc: Fix indentation of XML output Giuliano Procida
@ 2020-07-28 14:22 ` Dodji Seketeli
  1 sibling, 0 replies; 4+ messages in thread
From: Dodji Seketeli @ 2020-07-28 14:22 UTC (permalink / raw)
  To: Giuliano Procida; +Cc: libabigail, kernel-team

Giuliano Procida <gprocida@google.com> a écrit:

> Following a change which eliminated the output of extra blank lines in
> XML output, it now also makes sense to remove such blank lines from
> saved generated XML files.
>
> This commit does this.
>
> 	* tests/data/test-abidiff/test-PR18166-libtirpc.so.abi: Remove
> 	blank lines.
> 	* tests/data/test-diff-dwarf-abixml/PR25409-librte_bus_dpaa.so.20.0.abi:
> 	Ditto.
> 	* tests/data/test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1.abi:
> 	Ditto.
> 	* tests/data/test-diff-suppr/test45-abi-wl.xml: Ditto.
> 	* tests/data/test-diff-suppr/test45-abi.xml: Ditto.
> 	* tests/data/test-diff-suppr/test46-PR25128-base.xml: Ditto.
> 	* tests/data/test-diff-suppr/test46-PR25128-new.xml: Ditto.
>
> Signed-off-by: Giuliano Procida <gprocida@google.com>

Applied to master, thanks!

Cheers,

-- 
		Dodji

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

* Re: [PATCH 2/2] abg-writer.cc: Fix indentation of XML output
  2020-07-16 17:33 ` [PATCH 2/2] abg-writer.cc: Fix indentation of XML output Giuliano Procida
@ 2020-07-28 15:08   ` Dodji Seketeli
  0 siblings, 0 replies; 4+ messages in thread
From: Dodji Seketeli @ 2020-07-28 15:08 UTC (permalink / raw)
  To: Giuliano Procida; +Cc: libabigail, kernel-team

Giuliano Procida <gprocida@google.com> a écrit:

[...]

> 	* src/abg-writer.cc (write_canonical_types_of_scope): Do not
> 	add additional indentation. (write_translation_unit): Pass
> 	additional indentation to write_canonical_types_of_scope.
> 	(write_class_decl): Ensure optional annotations of base
> 	classes have the same indentation as the base classes
> 	themselves.
> 	* tests/data/test-annotate/libtest23.so.abi: Fix indentation.

[...]

> Signed-off-by: Giuliano Procida <gprocida@google.com>

Applied to master, thanks!

Cheers,

-- 
		Dodji

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

end of thread, other threads:[~2020-07-28 15:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-16 17:33 [PATCH 1/2] Remove ABI XML test data file blank lines Giuliano Procida
2020-07-16 17:33 ` [PATCH 2/2] abg-writer.cc: Fix indentation of XML output Giuliano Procida
2020-07-28 15:08   ` Dodji Seketeli
2020-07-28 14:22 ` [PATCH 1/2] Remove ABI XML test data file blank lines 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).