libabigail/tests/data/test-diff-suppr
Dodji Seketeli d0bd599b4b Support specifying data member insertion in suppressions
This patch is for supporting this kind of things:

    [suppress_type]
      name = S
      has_data_member_inserted_between = {8, end}

or:

    [suppress_type]
      name = S
      has_data_members_inserted_between = {{8, 31}, {64, end}}

or:

    [suppress_type]
      name = S
      has_data_members_inserted_at = offset_after(member0)

How cool is that, heh?

Anyway, to do this, the patch adds support for tuple values (i.e,
lists of values) in INI files.

Then on top of that the patch adds support for the specific
has_data_member_inserted_between, has_data_members_inserted_between
and has_data_members_inserted_at properties.

	* include/abg-comparison.h (type_suppression::insertion_range):
	Declare new type.
	(type_suppression::insertion_ranges): Declare new typedef.
	(type_suppression::{s,g}et_data_member_insertion_ranges): Declare
	new member functions.
	(is_integer_boundary, is_fn_call_expr_boundary): Declare new
	functions.
	(type_suppression::insertion_range::{boundary, integer_boundary,
	fn_call_expr_boundary}): Define new types.
	* src/abg-comparison.cc:
	(struct type_suppression::insertion_range::priv): New type.
	(type_suppression::insertion_range::{insertion_range, begin,
	end}): Define new member functions.
	(type_suppression::priv::insertion_ranges_): Add data member.
	(type_suppression::{s,g}et_data_member_insertion_ranges): Define
	new member functions.
	(type_suppression::insertion_range::boundary::priv): Define new
	type.
	(type_suppression::insertion_range::boundary::{boundary,
	~boundary}): Define new member functions.
	(type_suppression::insertion_range::integer_boundary::priv):
	Define new type.
	(type_suppression::insertion_range::integer_boundary::{integer_boundary,
	as_integer, operator int, ~integer_boundary}): Define member
	functions.
	(type_suppression::insertion_range::fn_call_expr_boundary::priv):
	Define new type.
	(type_suppression::insertion_range::fn_call_expr_boundary::{fn_call_expr_boundary,
	as_function_call_expr, operator ini::function_call_expr_sptr}):
	Define new member functions.
	(type_suppression::insertion_range::{create_integer_boundary,
	type_suppression::insertion_range::create_fn_call_expr_boundary,
	type_suppression::insertion_range::eval_boundary}): Define new
	member functions.
	(is_integer_boundary, is_fn_call_expr_boundary): Define new
	functions.
	(read_type_suppression, read_function_suppression)
	(read_variable_suppression): Support the new kinds of
	property-related types. Aslo, in read_type_suppression, support
	the new properties has_data_member_inserted_at,
	has_data_member_inserted_between and
	has_data_members_inserted_between.
	(type_suppression::suppresses_diff): If we are looking at a type
	diff node that has inserted data members, evaluate the insertion
	ranges of the current type_suppression and see if they match the
	inserted data members.
	* include/abg-ini.h (property, simple_property, property_value)
	(string_property_value, tuple_property_value, function_call_expr):
	Declare new types.
	(property_sptr, property_value_sptr, string_property_value_sptr)
	(tuple_property_value_sptr): Declare new typedefs.
	(is_string_property_value, is_tuple_property_value)
	(is_simple_property, is_tuple_property, read_function_call_expr):
	Declare new functions.
	* src/abg-ini.cc (char_is_white_space, char_is_comment_start)
	(char_is_delimiter, char_is_property_value_char)
	(char_is_section_name_char, char_is_property_name_char)
	(char_is_comment_start, char_is_white_space)
	(remove_trailing_white_spaces, is_string_property_value)
	(is_tuple_property_value, is_simple_property, is_tuple_property)
	(write_property_value, char_is_function_name_char)
	(char_is_function_argument_char): Define new functions.
	(property::priv, tuple_property_value::priv)
	(simple_property::priv, tuple_property::priv): Define new types.
	(property::{property, get_name, set_name, ~property}): Define new
	member functions.
	(struct property_value::priv): Define new type.
	(property_value::{property_value, get_kind, operator const
	string&(), ~property_value}): Define new member functions.
	(struct string_property_value::priv): Define new type.
	(string_property_value::{string_property_value, set_content,
	as_string, operator string()}, ~string_property_value): Define new
	member functions.
	(tuple_property_value::{tuple_property_value, get_value_items,
	~tuple_property_value, as_string}): Likewise.
	(simple_property::{simple_property, get_value, set_value,
	~simple_property}): Likewise.
	(tuple_property::{tuple_property, set_value, get_value}):
	Likewise.
	(config::section::find_property): Adjust return type.
	(read_context::{char_is_delimiter, char_is_property_value_char,
	char_is_section_name_char, char_is_property_name_char,
	char_is_comment_start, char_is_white_space}): Remove these from
	here as they got moved them to be non-member functions above.
	(read_context::read_property_value): Return a property_value_sptr
	and do not take any parameter anymore.
	(read_context::{read_string_property_value,
	read_tuple_property_value, read_function_name,
	read_function_argument, read_function_call_expr}): Define new
	member functions.
	(read_context::read_property): Adjust return type.  Also, change to read
	the different new kinds of properties values.
	(function_call_expr::priv): Define new type.
	(function_call_expr::{function_call_expr, get_name,
	get_arguments}): New member functions.
	(read_context::read_section): Adjust.
	(write_property, write_section): Adjust.
	* tests/data/test-diff-suppr/libtest{11,12}-add-data-member-v{0,1}.so:
	New test input binaries.
	* tests/data/test-diff-suppr/test{11,12}-add-data-member-{0,1}.suppr:
	New input suppression files.
	* tests/data/test-diff-suppr/test11-add-data-member-{2,3,4}.suppr:
	Add new test input files.
	* tests/data/test-diff-suppr/test{11,12}-add-data-member-report-{0,1}.txt:
	New reference output files.
	* tests/data/test-diff-suppr/test12-add-data-member-report-2.txt:
	Likewise.
	* tests/data/test-diff-suppr/test{11,12}-add-data-member-v{0,1}.cc:
	Source code for the new binaries above.
	* tests/test-diff-suppr.cc (in_out_specs): Add new test inputs.
	* tests/data/Makefile.am: Add the new test related files above to
	source distribution.
	* doc/manuals/libabigail-concepts.rst: Document the new properties
	has_data_member_inserted_at, has_data_member_inserted_between and
	has_data_members_inserted_between.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-05-24 23:43:02 +02:00
..
libtest4-local-suppr-v0.so Properly propagate {REDUNDANT, SUPPRESSED}_CATEGORY wrt local changes 2014-10-13 17:44:44 +02:00
libtest4-local-suppr-v1.so Properly propagate {REDUNDANT, SUPPRESSED}_CATEGORY wrt local changes 2014-10-13 17:44:44 +02:00
libtest5-fn-suppr-v0.so Initial support for function suppressions 2014-10-28 17:36:32 +01:00
libtest5-fn-suppr-v1.so Initial support for function suppressions 2014-10-28 17:36:32 +01:00
libtest6-fn-suppr-v0.so Initial support for function suppressions 2014-10-28 17:36:32 +01:00
libtest6-fn-suppr-v1.so Initial support for function suppressions 2014-10-28 17:36:32 +01:00
libtest7-var-suppr-v0.so Initial support for variable suppressions 2014-11-01 12:22:08 +01:00
libtest7-var-suppr-v1.so Initial support for variable suppressions 2014-11-01 12:22:08 +01:00
libtest8-redundant-fn-v0.so Un-share diff nodes in the comparison IR 2014-12-26 18:45:06 +01:00
libtest8-redundant-fn-v1.so Un-share diff nodes in the comparison IR 2014-12-26 18:45:06 +01:00
libtest9-changed-parm-c-v0.so Un-share diff nodes in the comparison IR 2014-12-26 18:45:06 +01:00
libtest9-changed-parm-c-v1.so Un-share diff nodes in the comparison IR 2014-12-26 18:45:06 +01:00
libtest10-changed-parm-c-v0.so Do not mark sibling structurally identical nodes as redundant 2014-12-26 18:45:06 +01:00
libtest10-changed-parm-c-v1.so Do not mark sibling structurally identical nodes as redundant 2014-12-26 18:45:06 +01:00
libtest11-add-data-member-v0.so Support specifying data member insertion in suppressions 2015-05-24 23:43:02 +02:00
libtest11-add-data-member-v1.so Support specifying data member insertion in suppressions 2015-05-24 23:43:02 +02:00
libtest12-add-data-member-v0.so Support specifying data member insertion in suppressions 2015-05-24 23:43:02 +02:00
libtest12-add-data-member-v1.so Support specifying data member insertion in suppressions 2015-05-24 23:43:02 +02:00
test0-type-suppr-0.suppr Initial support for type suppressions 2014-10-13 17:44:44 +02:00
test0-type-suppr-1.suppr Initial support for type suppressions 2014-10-13 17:44:44 +02:00
test0-type-suppr-2.suppr Initial support for type suppressions 2014-10-13 17:44:44 +02:00
test0-type-suppr-report-0.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test0-type-suppr-report-1.txt Support comparing symbols not referenced by debug info 2014-10-22 23:04:40 +02:00
test0-type-suppr-report-2.txt Support comparing symbols not referenced by debug info 2014-10-22 23:04:40 +02:00
test0-type-suppr-report-3.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test0-type-suppr-v0.cc Initial support for type suppressions 2014-10-13 17:44:44 +02:00
test0-type-suppr-v0.o Initial support for type suppressions 2014-10-13 17:44:44 +02:00
test0-type-suppr-v1.cc Initial support for type suppressions 2014-10-13 17:44:44 +02:00
test0-type-suppr-v1.o Initial support for type suppressions 2014-10-13 17:44:44 +02:00
test1-typedef-suppr-0.suppr Replace is_typedef by type_kind property in type suppressions 2014-10-13 17:44:44 +02:00
test1-typedef-suppr-1.suppr Replace is_typedef by type_kind property in type suppressions 2014-10-13 17:44:44 +02:00
test1-typedef-suppr-report-0.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test1-typedef-suppr-report-1.txt Support comparing symbols not referenced by debug info 2014-10-22 23:04:40 +02:00
test1-typedef-suppr-report-2.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test1-typedef-suppr-v0.c Initial support for type suppressions 2014-10-13 17:44:44 +02:00
test1-typedef-suppr-v0.o Initial support for type suppressions 2014-10-13 17:44:44 +02:00
test1-typedef-suppr-v1.c Initial support for type suppressions 2014-10-13 17:44:44 +02:00
test1-typedef-suppr-v1.o Initial support for type suppressions 2014-10-13 17:44:44 +02:00
test1-typedef-suppr.h Initial support for type suppressions 2014-10-13 17:44:44 +02:00
test2-struct-suppr-0.suppr Fix struct type kind suppression support 2014-10-13 17:44:44 +02:00
test2-struct-suppr-1.suppr Fix struct type kind suppression support 2014-10-13 17:44:44 +02:00
test2-struct-suppr-report-0.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test2-struct-suppr-report-1.txt Support comparing symbols not referenced by debug info 2014-10-22 23:04:40 +02:00
test2-struct-suppr-v0.cc Fix struct type kind suppression support 2014-10-13 17:44:44 +02:00
test2-struct-suppr-v0.o Fix struct type kind suppression support 2014-10-13 17:44:44 +02:00
test2-struct-suppr-v1.cc Fix struct type kind suppression support 2014-10-13 17:44:44 +02:00
test2-struct-suppr-v1.o Fix struct type kind suppression support 2014-10-13 17:44:44 +02:00
test3-struct-suppr-0.suppr Initial support for type suppressions 2014-10-13 17:44:44 +02:00
test3-struct-suppr-1.suppr Initial support for type suppressions 2014-10-13 17:44:44 +02:00
test3-struct-suppr-report-0.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test3-struct-suppr-report-1.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test3-struct-suppr-report-2.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test3-struct-suppr-v0.cc Initial support for type suppressions 2014-10-13 17:44:44 +02:00
test3-struct-suppr-v0.o Initial support for type suppressions 2014-10-13 17:44:44 +02:00
test3-struct-suppr-v1.cc Initial support for type suppressions 2014-10-13 17:44:44 +02:00
test3-struct-suppr-v1.o Initial support for type suppressions 2014-10-13 17:44:44 +02:00
test4-local-suppr-0.suppr Properly propagate {REDUNDANT, SUPPRESSED}_CATEGORY wrt local changes 2014-10-13 17:44:44 +02:00
test4-local-suppr-report-0.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test4-local-suppr-report-1.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test4-local-suppr-v0.c Properly propagate {REDUNDANT, SUPPRESSED}_CATEGORY wrt local changes 2014-10-13 17:44:44 +02:00
test4-local-suppr-v0.h Properly propagate {REDUNDANT, SUPPRESSED}_CATEGORY wrt local changes 2014-10-13 17:44:44 +02:00
test4-local-suppr-v1.c Properly propagate {REDUNDANT, SUPPRESSED}_CATEGORY wrt local changes 2014-10-13 17:44:44 +02:00
test4-local-suppr-v1.h Properly propagate {REDUNDANT, SUPPRESSED}_CATEGORY wrt local changes 2014-10-13 17:44:44 +02:00
test5-fn-suppr-0.suppr Initial support for function suppressions 2014-10-28 17:36:32 +01:00
test5-fn-suppr-1.suppr Initial support for function suppressions 2014-10-28 17:36:32 +01:00
test5-fn-suppr-2.suppr Initial support for function suppressions 2014-10-28 17:36:32 +01:00
test5-fn-suppr-3.suppr Initial support for function suppressions 2014-10-28 17:36:32 +01:00
test5-fn-suppr-4.suppr Initial support for function suppressions 2014-10-28 17:36:32 +01:00
test5-fn-suppr-report-0.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test5-fn-suppr-report-1.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test5-fn-suppr-report-2.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test5-fn-suppr-report-3.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test5-fn-suppr-report-4.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test5-fn-suppr-report-5.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test5-fn-suppr-v0.cc Initial support for function suppressions 2014-10-28 17:36:32 +01:00
test5-fn-suppr-v1.cc Initial support for function suppressions 2014-10-28 17:36:32 +01:00
test6-fn-suppr-0.suppr Initial support for function suppressions 2014-10-28 17:36:32 +01:00
test6-fn-suppr-1.suppr Initial support for function suppressions 2014-10-28 17:36:32 +01:00
test6-fn-suppr-2.suppr Initial support for function suppressions 2014-10-28 17:36:32 +01:00
test6-fn-suppr-3.suppr Initial support for function suppressions 2014-10-28 17:36:32 +01:00
test6-fn-suppr-report-0.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test6-fn-suppr-report-1.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test6-fn-suppr-report-2.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test6-fn-suppr-report-3.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test6-fn-suppr-report-4.txt Initial support for function suppressions 2014-10-28 17:36:32 +01:00
test6-fn-suppr-v0.cc Initial support for function suppressions 2014-10-28 17:36:32 +01:00
test6-fn-suppr-v1.cc Initial support for function suppressions 2014-10-28 17:36:32 +01:00
test6-fn-suppr-version-script Initial support for function suppressions 2014-10-28 17:36:32 +01:00
test7-var-suppr-1.suppr Initial support for variable suppressions 2014-11-01 12:22:08 +01:00
test7-var-suppr-2.suppr Initial support for variable suppressions 2014-11-01 12:22:08 +01:00
test7-var-suppr-3.suppr Initial support for variable suppressions 2014-11-01 12:22:08 +01:00
test7-var-suppr-4.suppr Initial support for variable suppressions 2014-11-01 12:22:08 +01:00
test7-var-suppr-5.suppr Initial support for variable suppressions 2014-11-01 12:22:08 +01:00
test7-var-suppr-6.suppr Initial support for variable suppressions 2014-11-01 12:22:08 +01:00
test7-var-suppr-7.suppr Initial support for variable suppressions 2014-11-01 12:22:08 +01:00
test7-var-suppr-8.suppr Initial support for variable suppressions 2014-11-01 12:22:08 +01:00
test7-var-suppr-report-0.txt Misc reporting fixes/improvements 2015-04-14 06:16:00 +02:00
test7-var-suppr-report-1.txt Misc reporting fixes/improvements 2015-04-14 06:16:00 +02:00
test7-var-suppr-report-2.txt Misc reporting fixes/improvements 2015-04-14 06:16:00 +02:00
test7-var-suppr-report-3.txt Misc reporting fixes/improvements 2015-04-14 06:16:00 +02:00
test7-var-suppr-report-4.txt Misc reporting fixes/improvements 2015-04-14 06:16:00 +02:00
test7-var-suppr-report-5.txt Initial support for variable suppressions 2014-11-01 12:22:08 +01:00
test7-var-suppr-report-6.txt Initial support for variable suppressions 2014-11-01 12:22:08 +01:00
test7-var-suppr-report-7.txt Misc reporting fixes/improvements 2015-04-14 06:16:00 +02:00
test7-var-suppr-report-8.txt Misc reporting fixes/improvements 2015-04-14 06:16:00 +02:00
test7-var-suppr-v0.cc Initial support for variable suppressions 2014-11-01 12:22:08 +01:00
test7-var-suppr-v1.cc Initial support for variable suppressions 2014-11-01 12:22:08 +01:00
test7-var-suppr-version-script Initial support for variable suppressions 2014-11-01 12:22:08 +01:00
test8-redundant-fn-report-0.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test8-redundant-fn-report-1.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test8-redundant-fn-v0.cc Un-share diff nodes in the comparison IR 2014-12-26 18:45:06 +01:00
test8-redundant-fn-v1.cc Un-share diff nodes in the comparison IR 2014-12-26 18:45:06 +01:00
test9-changed-parm-c-report-0.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test9-changed-parm-c-report-1.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test9-changed-parm-c-v0.c Un-share diff nodes in the comparison IR 2014-12-26 18:45:06 +01:00
test9-changed-parm-c-v1.c Un-share diff nodes in the comparison IR 2014-12-26 18:45:06 +01:00
test10-changed-parm-c-report-0.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test10-changed-parm-c-v0.c Do not mark sibling structurally identical nodes as redundant 2014-12-26 18:45:06 +01:00
test10-changed-parm-c-v1.c Do not mark sibling structurally identical nodes as redundant 2014-12-26 18:45:06 +01:00
test11-add-data-member-0.suppr Support specifying data member insertion in suppressions 2015-05-24 23:43:02 +02:00
test11-add-data-member-1.suppr Support specifying data member insertion in suppressions 2015-05-24 23:43:02 +02:00
test11-add-data-member-2.suppr Support specifying data member insertion in suppressions 2015-05-24 23:43:02 +02:00
test11-add-data-member-3.suppr Support specifying data member insertion in suppressions 2015-05-24 23:43:02 +02:00
test11-add-data-member-4.suppr Support specifying data member insertion in suppressions 2015-05-24 23:43:02 +02:00
test11-add-data-member-report-0.txt Support specifying data member insertion in suppressions 2015-05-24 23:43:02 +02:00
test11-add-data-member-report-1.txt Support specifying data member insertion in suppressions 2015-05-24 23:43:02 +02:00
test11-add-data-member-v0.cc Support specifying data member insertion in suppressions 2015-05-24 23:43:02 +02:00
test11-add-data-member-v1.cc Support specifying data member insertion in suppressions 2015-05-24 23:43:02 +02:00
test12-add-data-member-0.suppr Support specifying data member insertion in suppressions 2015-05-24 23:43:02 +02:00
test12-add-data-member-1.suppr Support specifying data member insertion in suppressions 2015-05-24 23:43:02 +02:00
test12-add-data-member-report-0.txt Support specifying data member insertion in suppressions 2015-05-24 23:43:02 +02:00
test12-add-data-member-report-1.txt Support specifying data member insertion in suppressions 2015-05-24 23:43:02 +02:00
test12-add-data-member-report-2.txt Support specifying data member insertion in suppressions 2015-05-24 23:43:02 +02:00
test12-add-data-member-v0.cc Support specifying data member insertion in suppressions 2015-05-24 23:43:02 +02:00
test12-add-data-member-v1.cc Support specifying data member insertion in suppressions 2015-05-24 23:43:02 +02:00