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

Run libstd test suite in miri #54914

Closed
RalfJung opened this issue Oct 8, 2018 · 5 comments
Closed

Run libstd test suite in miri #54914

RalfJung opened this issue Oct 8, 2018 · 5 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. E-hard Call for participation: Hard difficulty. Experience needed to fix: A lot.

Comments

@RalfJung
Copy link
Member

RalfJung commented Oct 8, 2018

We have all these nice #[test] functions in libstd (and liballoc and libcore), wouldn't it be great if we could run them all in miri? Maybe even on CI? miri has a small test suite itself that exercises some bits on libstd, and that lets us find things like #54908, but it's not very exhaustive and it doesn't seem like a good idea to duplicate all that.

So I think we should figure out a way to run the libstd tests in miri. Unfortunately I don't have a very good idea of what it would take. But it sounds like a great project, if someone is looking for one. :D

@RalfJung RalfJung added E-hard Call for participation: Hard difficulty. Experience needed to fix: A lot. C-enhancement Category: An issue proposing an enhancement or a PR with one. labels Oct 8, 2018
@Mark-Simulacrum
Copy link
Member

Is there some level of general idea what would need to be done for this? I think a list of a few "starter" steps might be good here -- I get the impression this might not be actually too hard?

Basically I think as-is this is fairly unlikely to happen because issues like this tend to languish unfortunately -- but getting a few starter steps together should help immensely.

@RalfJung
Copy link
Member Author

RalfJung commented Oct 8, 2018

The problem is I have no idea what it takes.^^ I'd start by trying to run cargo miri test on libstd, seeing why that doesn't work and going from there. Probably taking some inspiration from xargo for how to use cargo to build libstd. But figuring out what it takes is probably the most time-consuming part here, and I don't think I'll have time for that soon.

If you think that's too vague to be tracked here, we could open an issue in the miri tracker instead. I just hoped here it might find someone else who is motivated enough to give it a try, that's unlikely to happen on the miri side.

@Mark-Simulacrum
Copy link
Member

I think even that much is a good starting point for this - thanks!

@RalfJung
Copy link
Member Author

Here's another issue this could have prevented (or caught earlier): #54957

And this earlier issue would also have been detected: #53529

@RalfJung
Copy link
Member Author

This is done now in the form of https://github.com/RalfJung/miri-test-libstd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. E-hard Call for participation: Hard difficulty. Experience needed to fix: A lot.
Projects
None yet
Development

No branches or pull requests

2 participants