Paolo Bonzini <pbonz...@redhat.com> writes: > On 23/05/19 21:57, Markus Armbruster wrote: >>>> A large number of headers don't pass this test, by design or by >>>> accident. To keep things more manageable, exclude all headers outside >>>> include/ for now. >>> A lot of these, either in include/ or outside, are _meant_ to be >>> included many times. What about renaming those to .inc.h and >>> whitelisting them in the script? >> Yes, that would be nice. > > Another suggestion: are there headers that cannot even be included once > (due to dependencies)? Is it worth including a test for those even in > the first iteration? > > .inc.h files would skip that test too.
I'm not sure I get what you mean. Most headers failing the test fail it in the first #include: they fail to conform to 2. Headers should normally include everything they need beyond osdep.h. The only way to fail in the second #include is a missing header guard. If it's missing intentionally, it's "_meant_ to be included many times", and you propose renaming to .inc.h. Else, easy fix. I think I'll make a list of headers that fail in the second #include, and try to sort them into "intentional" and "bug" buckets.