buildsi / build-abi-tests

0 stars 0 forks source link

A good test case: Removing an empty base class can break ABI #1

Open vsoch opened 3 years ago

vsoch commented 3 years ago

https://quuxplusone.github.io/blog/2021/05/07/std-iterator-as-a-base-class/

woodard commented 3 years ago

That is an interesting one and I spent some time looking at it. I hadn't thought enough about ranges to consider their ABI implications. I will implement it and test it out but I'm fairly certain that libabigail as it is now will easily catch that one. That brings up an interesting question that isn't really decided.

My original idea was to kind of formalize the cases that I knew about where we were doing ABI analysis but got the answer wrong. What I've got right now are sort of a collection of test cases that underly bug reports that I've filed. Of course, I also expected you guys to learn from our challenges and make sure that smeagol handled these cases as well.

The thing that is to be decided, should we put simple tests that libabigail already gets right in here? An example being the one you pointed out. I'm certainly not against you guys adding those kinds of tests to the project but I don't want to do it myself. There are just hundreds of little cases which are trivial and boring to me. However, I can see the value to you as you develop smeagol. If you add little snippets of code, I can quickly wire up libabigail tests for them. So if that is the direction you want to go, I'm all for it. Add everything you want.

I think we should figure out a way to run the tests on both smeagol and libabigail against the same snippets of code. I'm certain that you know of a better way to organize tests to be run than the trivial Makefile targets that run shell scripts method I used.

This is a nascent project, I am not sure where it wants to go. Let's just do stuff and let that emerge.

vsoch commented 3 years ago

The thing that is to be decided, should we put simple tests that libabigail already gets right in here?

Yes! My thinking is that we want a vanilla-repository of all the cases that we can think of, and then we can figure out how to use them with smeagle, and whatever other methods we come up with. But for now I think this repository is just a place we keep cases that we find, and make sure we have at least a simple script to compile that represents the case.

I think we should figure out a way to run the tests on both smeagol and libabigail against the same snippets of code. I'm certain that you know of a better way to organize tests to be run than the trivial Makefile targets that run shell scripts method I used.

One hundred percent. I haven't thought about this yet, but we'd want this repository to serve as almost a little database to find tests to run that (should) break ABI.

This is a nascent project, I am not sure where it wants to go. Let's just do stuff and let that emerge.

+1, onward! :D