abixml-reader: Support SONAME related properties on file suppression

When comparing binary files (using abidiff for instance) libabigail
can interpret the [suppress_file] section of a suppression
specification.  If the suppression specification matches either of the
compared files, no comparison is performed.

At the moment, that doesn't work when comparing abixml files.

Thus, this patch implements that feature for abixml files.

With this patch, one can now write a suppression specification like
this:

  [suppress_file]
    soname_regexp = <some-regexp>

or

  [suppress_file]
    file_name_regexp = <some-regexp>

If either abixml file has a soname matched by such a regexp, then no
comparison is performed.

	* doc/manuals/libabigail-concepts.rst: Update the documentation to
	mention soname_regexp and soname_not_regexp is supported in the
	[suppress_file] section.
	* include/abg-suppression.h (suppression_matches_soname)
	(suppression_matches_soname_or_filename): Declare new functions.
	Make them be friends of class suppression_base.
	* src/abg-reader.cc
	(read_context::corpus_is_suppressed_by_soname_or_filename): Define
	new member function.
	(read_corpus_from_input): Apply file suppression.
	* src/abg-suppression.cc (read_file_suppression): Support
	"soname_regexp" and "soname_not_regexp" in the [suppress_file]
	section.
	(suppression_matches_soname)
	(suppression_matches_soname_or_filename): Define new functions.
	* tests/data/test-diff-suppr/libtest48-soname-abixml-report-{1,2}.txt:
	New test reference output files.
	Likewise.
	* tests/data/test-diff-suppr/libtest48-soname-abixml-suppr.txt:
	New test suppression file.
	* tests/data/test-diff-suppr/libtest48-soname-abixml-suppr-{2,3,4}.txt::
	Likewise.
	* tests/data/test-diff-suppr/libtest48-soname-abixml-v{0,1}.so: New
	test binary input files.
	* tests/data/test-diff-suppr/libtest48-soname-abixml-v{0,1}.so.abi:
	New abixml for the binary input files above.
	* tests/data/test-diff-suppr/test48-soname-abixml-v{0,1}.c: Source
	code of the binary input files above.
	* tests/data/Makefile.am: Add the above test material to source
	distribution.
	* tests/test-diff-suppr.cc (in_out_specs): Add the test input
	above to this test harness.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
18 files changed