John Snow <js...@redhat.com> writes: > On 3/25/21 2:18 AM, Markus Armbruster wrote: [...] >> Apropos qapi-gen testing scripts. I have scripts to show me how the >> generated code changes along the way in a branch. They evolved over a >> long time, and try to cope with changes in the tree that are hardly >> relevant anymore. By now, they could quite possibly make Frankenstein >> recoil in horror. >> > > Are they in the tree?
No, because in their current state, they are incomprehensible *and* need frequent tinkering. > Largely if the generated code changes it's > invisible to me, but I rely heavily on the unit tests. I guess maybe if > they are not in a state to upstream it might not be worth the hassle to > clean them, but I don't know. The negative unit tests are fairly comprehensive, and guard against screwing up error path reasonably well. The positive unit tests compare the frontend state dumped by test-qapi.py, and compile-test the generated code. Reasonable protection against frontend screwups. Some protection against backend screwups. Plenty of unwanted code generation changes can go undetected. A tool to show generated code changes for review is useful, and having such a tool in the tree would be nice. >> As a secondary purpose, the scripts show me how output of pycodestyle-3 >> and pylint change. This would be uninteresting if the code in master >> was clean against a useful configuration of these tools. Your work has >> been making it less interesting. >> > > --js