Commit Graph

9 Commits

Author SHA1 Message Date
Jayant Chowdhary
6893d8cc69 Mark two records as different if the access specifier is downgraded.
Earlier, we marked two records as different if their access specifiers
were not the same.

Bug: http://b/79493296

Test: tests/test.py

Change-Id: I117a408c7a85624a1e3d7a7477ae789eddd4bccc
2018-05-14 14:07:49 -07:00
Jayant Chowdhary
9c569ce793 Fix incorrect public object access specifiers.
Bug: 78184573

Test: tests/test.py

Change-Id: I9cf5df612322eb66e9a46450d7f43c99586dbab6
2018-04-17 13:37:16 -07:00
Jayant Chowdhary
bab864d2d0 Add test for function pointer diffing.
Bug: 71486762

Test: tests/test.py

Change-Id: Id956804c36b0c06b4e6259d6864438974ed18267
2018-03-21 22:13:55 -07:00
Jayant Chowdhary
3bc023f373 Add an additional test for ODR.
Also add missing test source files.

Test: tests/test.py

Change-Id: I44ec2cab9596e4722600995855d0a035e304e7ae
2018-02-12 13:43:54 -08:00
Jayant Chowdhary
7cc00996e5 Fix map key in header-abi-diff while extracting user defined types.
The key being added to respective maps which facilitate diffing of
unreferenced user defined types was earlier the linker set key. The
unique id should be used instead. This is because linker set keys for C
and C++ types can be the same, but their unique id's cannot. Thus,
having linker set keys as a key leaves open the possibility of false
type aliasing, whereas the unique id does not.

Test: python3 tests/test.py

Test: python3 tests/test.py \
      MyTest.test_libc_and_cpp_with_unused_struct_and_libc_and_cpp_with_unused_cstruct;
      before this change, this test fails; after this change, the test
      passes.

Change-Id: I91816167a48308a8c812d01e0a09e9bb70c60b50
2018-02-07 13:04:30 -08:00
Jayant Chowdhary
537edf605d Fix invalidation of vector iterator while computing removed class fields.
Test: tests/test.py pass

Change-Id: I58eb0966972c8fc1f74cd6a28708c5f591a77f75
2018-01-02 18:47:48 -08:00
Jayant Chowdhary
a668261e85 Fix missing setter for RecordKind.
The record kind (struct, class or union) was not being set while
converting from protobuf to IR.

Test: tests/test.py, all tests pass. Without the change, the default
      kind of a C record would have shown up as class_kind.

Change-Id: I507581211a6d30c2c51414c6fab6413eece6b458
2017-12-07 12:48:42 -08:00
Jayant Chowdhary
29092604b2 Fix how header-checker tests run.
Previously, the tests mainly exercised header-abi-diff.
After this change, checked-in reference dumps are compared with
generated dumps. This allows us to:
  - get header-abi-dumper and header-abi-linker involved in testing
    better.
  - Know about any incompatbile message format changes made
    inadvertently.

Test: tests/test.py; all tests pass.

Change-Id: I7c7ba0811e6c08c6194a0a11616680279e7a0e1d
2017-12-07 12:46:10 -08:00
Jayant Chowdhary
860b41407e Add more comprehensive tests for abi diffing.
1) We do not involve the build system to create test reference dumps. Symbols
in tests, are faked through version scripts to avoid checking in prebuilt .so
test files.

2) Also add a script to create reference abi dumps.

3) Fix a comment in ast_processing.cpp

Test: Run tests/test.py, all tests run and pass on generic arm64, mips64
and x86_64 builds.

Change-Id: Id3a420c1ae093a05a79da4c29e85071f28d714d1
2017-08-24 23:41:01 -07:00