-
Notifications
You must be signed in to change notification settings - Fork 83
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
Improve PJDFSTest suite #59
Comments
Bonjour! I assume you saw the GSoC proposal at https://wiki.freebsd.org/SummerOfCodeIdeas#PJDFSTest_rewrite ? I agree with what you said regarding debugability, lower barrier to entry, and inheritance. And I agree that Python's |
Yes, it was this one that I saw!
What a coincidence!
Hmm, you raised important points. I thought that
Oh, thanks, I understand now. I will definitely add ATF integration, it could also be beneficial for the upstream project if I abstract it enough. I think of implementing it as a |
Yeah, if we do this in Rust I think we would be unable to rely on Custom Test Framework. But in fact, what we're aiming for isn't a "test" as far as Cargo is concerned. Instead, we want a binary that can be reused by itself, outside of Cargo. That means we needn't be held up by CTF compatibility. OTOH, it means that we would need to reimplement all of test collection ourselves. I actually wrote a PoC integration for ATF and Python several years ago. I could dig it up again, but I would advise you not to worry about that part. It is strictly optional. |
So, I did some research on how we could implement test collection ourselves, and cumbersome is a euphemism…
|
Does the standard test framework use one of those techniques? Another option is to abandon test collection, and do what the Criterion benchmark framework does. It requires you to supply each test case's name to a macro that will generate the main function. |
AFAIK, the tests are collected directly by the compiler, so definitely not one of those techniques. |
We can use this, that's too bad however that we can't directly collect them. |
@musikid as you've probably noticed, the GSoC application period is officially open. If you're still interested, don't forget to submit your application by 19-April! |
@asomers Yes, I'm still interested! I'm currently experimenting different workflows to know which one could be better for the project.
If you could give me some suggestions, I would be glad to hear. |
Thanks for the tip about cargo-nextest. I hadn't heard of it. After musing for a while, I think some combination of options 1 and 3 would probably be the best. We'll have to have our own test runner, but it needn't implement multithreading. But as long as it supports a |
Also, don't sweat the linker magic. That could open up quite a can of worms. It's easier just to follow Criterion's example and use a macro to declare test cases. The linker stuff would be nice, but it's lower priority than everything else. |
Yes, I wrote a POC for an ATF wrapper for pytest, and the interface is simple. So, I will not focus on adding multithreading.
Let the worms' can sealed, got it! |
I published a first draft of the proposal! I should have finished it for the weekend. |
Is it online somewhere were I can see it? |
I published it on the GSoC dashboard. Do you have access to it? |
I think so, but I couldn't find it. Honestly, that site is not very easy to navigate. Could you please send a direct link? |
Sure, here it is: https://summerofcode.withgoogle.com/proposals/details/ENoMuEAp ! |
Nope. I get an "Access Denied". Maybe mentors aren't allowed to view proposals that are still in the draft stage? |
They should, normally, to suggest modifications (as Google says). I gave you access to the GitHub repo in which I write (I made it private for now, since it's a draft). |
Ok, I figured out how to find it. Your direct link gives me a 403 error, but I found it by browsing through the FreeBSD project's page. |
Oh, perfect! |
I read the proposal that you uploaded today, and I have three comments:
|
Got it, I will avoid the proc macros then.
Sorry, I thought that I already moved it to the end! Thank you for the advices and the time you took to read it! |
Hi!
I would be interested in handling the rewriting of the test suite for GSoC.
I saw the experimental start and would like to add some highlights for the questions raised in the PR, and in addition to the GSoC summary:
In addition to make debugging easier, it could also lower the entry barrier for potential contributors/reviewers.
As mentioned in the summary,
sh
is harder to debug but also to review, with sometimes surprising behavior.Also, if we rewrite the tests, duplications due to the lack of parameterization and inheritance would probably not make the number of tests to convert a big deal.
It depends on the language that will be finally chosen, but for example, Python implements almost all POSIX syscalls with calling conventions very similar to those of C.
From what I have checked, the only missing that are present in
pdjfstest.c
are these ones:(The bold functions have tests.)
Though, to be fair, most of those
-at
functions are replaced by thedir_fd
parameter (except forbindat
andconnectat
).So, the only functions which would potentially need bindings are
lpathconf
,bindat
andconnectat
.This would also allow us to improve the documentation, which for the moment (no offense!) is rather scarce.
Language choice
Python
Pros
os
module)Cons
Rust
Pros
Cons
Go
Pros
syscall
module)Cons
ATF integration
I maybe misunderstood something, but I'm not sure of why is it needed to support ATF, given the fact that
kyua
supports TAP (and even plain) tests and that it seems to produce reports even for non-ATF tests.A
Kyuafile
would probably be sufficient to output reports.The text was updated successfully, but these errors were encountered: