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
unit_tests/freshclam_test.py: fix unit test #881
Conversation
Somehow the tests returns a different result than expected. Not sure if the expected result should be changed (this patch) or that the message emitted by freshclam should be changed.
|
String to match is generated in libfreshclam/libfreshclam_internal.c line 2144 |
|
This certainly does resolve the test failure. Still to be determined I suppose if this is the correct fix. |
|
Indeed. Changing line 2144 in libfreshclam/libfreshclam_internal.c will have the same result, but I have no idea either whether or not this is intentionally different. |
|
After thinking about this for some time, I suspect you are carrying a patch that makes Debug-level messages go to @opoplawski's proposed change switches to look for an Info-level message in |
|
Before I merge, if you can confirm the debug/stderr suspicion that may allow us to fix up the commit message. |
|
I don't believe I have any patches that are changing where any messages might be going. |
Thanks for checking. I'm very confused how the test is failing for you without this change. I have never seen that test fail, and just tried reproducing it locally on In the interests of understanding why it is failing for you, I am very curious if this change would cause the test to pass for you as well, instead of the change in this PR: diff --git a/libfreshclam/libfreshclam.c b/libfreshclam/libfreshclam.c
index eda780374..33a9c0e45 100644
--- a/libfreshclam/libfreshclam.c
+++ b/libfreshclam/libfreshclam.c
@@ -640,7 +640,7 @@ fc_error_t fc_update_database(
if (*bUpdated) {
logg(LOGG_DEBUG, "fc_update_database: %s updated.\n", dbFilename);
} else {
- logg(LOGG_DEBUG, "fc_update_database: %s already up-to-date.\n", dbFilename);
+ logg(LOGG_INFO, "fc_update_database: %s already up-to-date.\n", dbFilename);
}
goto success;
}Can you please test it? It's not a good change, but would prove or disprove my thoughts about the |
|
That patch fixes the test for me as well. FWIW - my ctest line is: |
|
I merged the commit and updated the commit message to explain the reason for the change and the outstanding issue. I am still curious to solve why debug-level messages aren't bring printed for you. |
Somehow the tests returns a different result than expected. Not sure if the expected result should be changed (this patch) or that the message emitted by freshclam should be changed.