-
Notifications
You must be signed in to change notification settings - Fork 9
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
Logs from FileSystemHandler are not captured in tests #9
Comments
Hi @inetic , I have limited rust knowledge but I don't believe this is related to the driver. |
Hi @Liryna , thanks for the reply. Yeah, when one doesn't use the Thinking about it, what I wrote above that it might be a driver thing is probably not the case because (if I understand it correctly) the An interesting thing is, that if I do
So if it's not related to the code being run from the driver, another thing that comes to my mind that could cause this is if the Dokan (Rust or C) code redirected the Would you know if Dokan has code that is doing a redirection like that? |
The Dokan C library does not redirect Looking at the code, I would expect to have create and other calls (by the OS or other apps) done at mount time ( dokan-rust/dokan/src/usage_tests.rs Lines 1188 to 1189 in f3c2280
|
@inetic have you been able to make progress here ? Can this be closed ? |
I have fixed a problem that I had with a workaround to this issue and them moved to work on something else. I do plan to come back to this when there is more time or once I'm back to working on Windows. If you wish, I'm fine if you close this ticket and I or someone can reopen it when it's an issue again. |
When a
println!
line is inserted into a function inside an implementation of theFileSystemHandler
and a test is run, theprintln!
line is not captured by the test but is printed out right when the test is run.For example, if we add
println!("<<< hello from handler >>>")
above this line, and then run the (currently failing) testcargo test can_find_files
. The output isNotice that the
"<<< hello from handler >>>"
line appears above the"---- usage_tests::can_find_files stdout ----"
line.This would normally not be too big of a problem, but it becomes one when tests run ok individually and only start misbehaving when they are run all at once.
My theory is that the
FileSystemHandler
functions are being called from insider the driver and this somehow circumvents thestdout
output that the test is capturing. But I know next to nothing about Windows driver development, so I might very well be wrong.Perhaps there is a flag that I missed that could fix this? Or maybe someone could suggest a fix?
The text was updated successfully, but these errors were encountered: