Bug 30931 - Support check-uapi.sh
Summary: Support check-uapi.sh
Status: RESOLVED FIXED
Alias: None
Product: libabigail
Classification: Unclassified
Component: default (show other bugs)
Version: unspecified
: P2 enhancement
Target Milestone: ---
Assignee: Dodji Seketeli
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-02 13:53 UTC by Dodji Seketeli
Modified: 2023-10-20 23:08 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dodji Seketeli 2023-10-02 13:53:06 UTC
A new script used to check the compatibility of changes the user ABI hearders of the Linux kernel is in the process of being upstreamed. The script uses libabigail and thus needs some improvements in the code base of the project.

This enhancement request is to track those improvements.

The post kicking off this effort is at https://inbox.sourceware.org/libabigail/5363161d-8167-284e-e35d-9a8ef20adea9@quicinc.com/.

The improvement needed on the libabigail from are expressed here: https://inbox.sourceware.org/libabigail/340b33bd-2b43-9f99-58e1-f1b77a51b48a@quicinc.com/.

The branch where patches for this effort are going to be accumulated until their merging into the mainline branch is at https://sourceware.org/git/?p=libabigail.git;a=shortlog;h=refs/heads/users/dodji/check-uapi-support.
Comment 1 Dodji Seketeli 2023-10-02 13:57:02 UTC
Patches related to the "better anonymous enum change support" are being accumulated in the branch https://sourceware.org/git/?p=libabigail.git;a=shortlog;h=refs/heads/users/dodji/better-anon-enums, before being merged into the branch https://sourceware.org/git/?p=libabigail.git;a=shortlog;h=refs/heads/users/dodji/check-uapi-support.
Comment 2 Dodji Seketeli 2023-10-05 13:31:24 UTC
Patches related to the suppressing data member insertion right before flexible array data members are being accumulated in the "fam-suppr" branch at https://sourceware.org/git/?p=libabigail.git;a=shortlog;h=refs/heads/users/dodji/fam-suppr.

The description of what we want is discussed in the message https://inbox.sourceware.org/libabigail/153dc338-ff1f-4273-1663-e934124e4bcc@quicinc.com/
Comment 3 Dodji Seketeli 2023-10-12 15:48:31 UTC
The branches "better-anon-enum" and "fam-suppr" have now been merged into the branch "check-uapi-support".  This is as John Moon told me off-list that he tested the two former branches.

The check-uapi-support branch now has all the patches we have been working on to support the check-uapi.sh program so far.
Comment 4 Dodji Seketeli 2023-10-13 15:27:39 UTC
So, on the branch "users/dodji/check-uapi-support", the issue we were having with anonymous enums is present also for anonymous unions & structs.

In short, here is what we have:

For example:

union {
        int a;
        int b;
};

------

union {
        int a;
        int b;
        int c;
};


Yields:

1 removed type unreachable from any public interface:

  [D] 'union {int a; int b;}' at test_1.c:1:1

1 added type unreachable from any public interface:

  [A] 'union {int a; int b; int c;}' at test_2.c:1:1

This has been reported off-list by John Moon.

To handle this issue I created the branch https://sourceware.org/git/?p=libabigail.git;a=shortlog;h=refs/heads/users/dodji/better-anon-class with the patch https://sourceware.org/git/?p=libabigail.git;a=commit;h=2776e2590e269f2b304b49f8626d52b77ca5ae54.

When John agrees, I'll merge that patch into the "users/dodji/check-uapi-support" branch.
Comment 5 John Moon 2023-10-13 17:13:36 UTC
Agreed - the patch fixes the issue. Thanks for the quick turnaround!
Comment 6 Dodji Seketeli 2023-10-13 19:32:48 UTC
> Agreed - the patch fixes the issue.

OK, so I have merged the patch into the branch https://sourceware.org/git/?p=libabigail.git;a=shortlog;h=refs/heads/users/dodji/check-uapi-support.

> Thanks for the quick turnaround!

My pleasure!
Comment 7 Dodji Seketeli 2023-10-17 08:59:55 UTC
I have rebased the WIP branch https://sourceware.org/git/?p=libabigail.git;a=shortlog;h=refs/heads/users/dodji/check-uapi-support on top of the commit below which is the current tip of the master branch as I am writing this:

  a1256078 Bug 30971 - Wrong interpretation of "has_data_member_inserted_at"

Is there a task left to support the UAPI compatibility checker?  I am reviewing the patches in the WIP branch to get them ready for merging into the master branch at this point.  If there is a task left for which I can help, please let me know.
Comment 8 Dodji Seketeli 2023-10-20 23:08:59 UTC
The patches of the branch "check-uapi-support" have been merged in the master branch of the git repository.

The support for the check-uapi.sh tool should thus be available in libabigail 2.4.

Thanks!