-
Notifications
You must be signed in to change notification settings - Fork 18
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
libc: unittests for path resolving (realpath()
, canonicalize_file_name()
, etc.)
#29
Conversation
1b69612
to
e063593
Compare
@Maxez @damianloew @niewim19 : no need for full code review, just showing how tests could/should be written. |
e063593
to
65dffc3
Compare
Nothing is mentioned in PR, which platforms these tests apply to, so I decided to check on These tests are valid only for real root-fs as I can see (
|
Thanks for checking. The Exception is probably due to Regarding the failed test - it is probably an issue with Please verify if You have the most recent |
Yes, I have all recent I'm executing the test form syspage using command like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I verified test on ia32-generic
. I also ran test on imxrt106x
with fixed setjmp
:
- I got same error as @gerard5 (but without exception)
- I got exception (I think) on
check_file_contents
Overall tests look good, without taking into account some issues with cleaning.
I don't know if I'm big fan of one binary that tests the whole libc:
- We can't exclude some architectures from individual tests
- As you mentioned in comments it would be great to pass some arguments (like a path prefix) to the test binary. With one binary it won't be convenient.
- With separate binaries we have clean state at the start of test
- Using runner as is we can't see progress of individual tests
On the other hand, executing one binary will be much faster ;).
Thanks for checking, my answers below
dummyfs error as suspected, should be fixed by: phoenix-rtos/phoenix-rtos-filesystems#42
I suppose this might be a stack overflow than, will reduce the
Written as a todo, would be nice to have recursive rm to clean full
My idea was that if it would be necessary, we could define separate YAML tests as the same binary with different test groups being run (we control how I believe most of the tests should work on most architectures (even if not now than in the future). In case of my current test - it seems it could be done with some preparation (mounting
No, we just need to implement some sane way of passing the arguments. I believe we should have named params (
No, not with separate binaries but with restarts between the tests - and only considering readonly rootfs (which is not the case on
Oh, this could be solved in unittest harness (and might be actually a good thing to be done :)).
Yeah, my initial and most strong motivation. The next one is that there are many repetitive tasks when writing |
JIRA: DTR-75
JIRA: DTR-75
JIRA: DTR-75
65dffc3
to
ef19886
Compare
In the "pure" harness test it could be done by using some
Yeap, it should be not hard to do. I'm going to create issues what can be done to improve runner so it'll be listed :) |
@jsarzy @gerard5 as phoenix-rtos/libphoenix#99 is now merged and upstreamed, can You give an approval so I can merge this. Thanks for checking on rt1064, we found another bug in dummyfs thanks to that. I hope we will be able to automatically run this test on rt1064 also, but that should be a topic of separate PR. |
@gerard5 seems like You're using old toolchain thus including invalid |
Yes you are right my mistake. I am working on my home computer today and forgot that the |
Description
libc unit test framework stub + tests around pathname resolution.
The tests will fail until all relevant changes in kernel / filesystems / libphoenix will be merged
Motivation and Context
Rewriting path handling in
libphoenix
.Types of changes
How Has This Been Tested?
Checklist:
Special treatment
This PR is to be merged only after all other relevant PR will be merged and CI checks for this test would pass
I would appreciate review anyway.