libabigail/tests/data
Giuliano Procida dc0ac49157 Tidy checks for sufficient suppression properties.
Each suppression specification must have at least one of a documented
per-suppression type list of properties defined if it is to be
considered at all.

At present:

- suppression specifications which fail the check are silently ignored
- in the function suppression case, the check does not trigger an
  early return and risks a later null pointer dereference.

This commit:

- reimplements the checks using arrays and helper function calls
- adds a helper function to determine if a suppression specification
  is going to be ignored due a lack of properties
- makes the parsing functions return failure early if the check fails

Inconsistencies between suppression types (in particular, the
treatment of the "label" property) remain.

The only behavioural change may be to how present but empty properties
are handled. This is an edge case that may be worth revisiting in a
more general fashion in a later commit.

	* src/abg-suppression.cc (check_sufficient_props): New helper
	function to check for sufficient properties in a section.
	(read_type_suppression): Replace conditional logic with call
	to check_sufficient_props.
	(read_function_suppression): Ditto.
	(read_variable_suppression): Ditto.
	(read_file_suppression): Ditto.
	* tests/data/test-diff-suppr/test15-suppr-added-fn-4.suppr:
	Explain why the suppression will be ignored.
	* tests/data/test-diff-suppr/test16-suppr-removed-fn-4.suppr:
	Ditto.
	* tests/data/test-diff-suppr/test17-suppr-added-var-4.suppr:
	Ditto.
	* tests/data/test-diff-suppr/test18-suppr-removed-var-4.suppr:
	Ditto.

Signed-off-by: Giuliano Procida <gprocida@google.com>
2020-05-12 18:08:33 +02:00
..
test-abicompat abidiff: Clean up new lines between sections. 2020-03-30 16:26:31 +02:00
test-abidiff abidiff: More compact references to prior diffs. 2020-04-14 11:47:10 +02:00
test-abidiff-exit abidiff: Omit declaration-only type size 0 diffs. 2020-04-27 13:12:48 +02:00
test-alt-dwarf-file
test-annotate corpus/writer: sort emitted translation units by path name 2020-05-05 13:09:34 +02:00
test-core-diff
test-default-supprs
test-diff-dwarf abg-reporter-priv.cc: Fix anonymous member size change reports. 2020-04-14 12:39:59 +02:00
test-diff-dwarf-abixml
test-diff-filter abg-reporter-priv.cc: Fix anonymous member size change reports. 2020-04-14 12:39:59 +02:00
test-diff-pkg abg-reporter-priv.cc: Fix anonymous member size change reports. 2020-04-14 12:39:59 +02:00
test-diff-suppr Tidy checks for sufficient suppression properties. 2020-05-12 18:08:33 +02:00
test-fedabipkgdiff Tag add/remove/change lines unconditionally with [A], [D], [C]. 2020-03-18 14:45:26 +01:00
test-ini
test-kmi-whitelist KMI Whitelists: Add functionality to make whitelists additive 2020-01-21 18:37:43 +00:00
test-lookup-syms dwarf-reader: Fix bloom filter access in GNU_HASH section 2020-03-20 13:35:00 +01:00
test-read-dwarf dwarf-reader: remove superfluous ABG_ASSERT 2020-03-18 23:10:14 +01:00
test-read-write Fix size calculations for multidimensional arrays. 2020-03-31 19:48:35 +02:00
test-types-stability
test-write-read-archive
Makefile.am Add tests for declaration-only struct diffs. 2020-04-27 12:48:58 +02:00