Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Util functions to make tests with logging of generated test values #331

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shym
Copy link
Collaborator

@shym shym commented Apr 19, 2023

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 make functions.

@shym shym marked this pull request as draft April 19, 2023 09:43
@jmid
Copy link
Collaborator

jmid commented Apr 19, 2023

Cool! I was thinking about this yesterday too 👍

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? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants