multicoretests
multicoretests copied to clipboard
Add Util functions to make tests with logging of generated test values
This has been useful quite a few times for us, for instance to investigate deadlocks or livelocks, and build standalone reproducers. This might be more generally useful. This is still a draft, with the following points to fix:
- documentation for the new functions
- possibly rename those functions to explicitly mention
triple - possibly add slightly more generic versions, not tied to triples, so that all our
Test.make{,_neg}can be replaced by these wrappers - maybe share the code between the
makefunctions.
Cool! I was thinking about this yesterday too :+1:
Logs is a nice and popular library for this kind of logging: https://erratique.ch/software/logs (sans dependencies). AFAIU, it works through callbacks to a 'reporter'. By default, a "nop-reporter" does nothing and hence is relatively cheap. To have things printed, one then just need to set another reporter. I was wondering whether it would be handy to use for us? :thinking: