Pradish
01/17/2024, 1:30 PMC:\Osquery\osquery\osquery\config\tests\config_tests.cpp(437): error: Expected equality of these values:
"dfae832a62a3e3a51760334184364b7d66468ccc"
source_hash
Which is: "6ff053778a90c48ed3dc2d48ffb0aca263db620a"
E20240116 21:47:43.806187 18420 config.cpp:879] updateSource failed to parse config, of source: awesome and content:
[ FAILED ] ConfigTests.test_content_update (1131 ms)
76 - tools_tests_testosqueryd (Failed)
Directory: C:/Osquery/osquery/build/tools/tests
"tools_tests_testosqueryd" start time: Jan 17 18:30 India Standard Time
Output:
----------------------------------------------------------
Traceback (most recent call last):
File "C:\Osquery\osquery\build\tools\tests\test_osqueryd.py", line 19, in <module>
import test_base
File "C:\Osquery\osquery\build\tools\tests\test_base.py", line 13, in <module>
import psutil
ModuleNotFoundError: No module named 'psutil'
77 - tools_tests_testosqueryi (Failed)
same reason as above
78 - tools_tests_testrelease (Failed)
79 - tests_integration_tables-test (Failed)
W20240117 18:30:57.449311 11676 virtual_table.cpp:971] The vscode_extensions table returns data based on the current user by default, consider JOINing against the users table
I20240117 18:30:57.476215 11676 vscode_extensions.cpp:31] Could not read vscode extensions.json from C:\Users\XXXname\.vscode-server\extensions\extensions.json
please let me know, if i can raise a PR for an issue that i am fixing, it looks like these are envoirnment issues on my PC .
Appreciate any pointers or hints on these issue.
thank you for looking into this.
Regards
PradishStefano Bonicatti
01/17/2024, 3:56 PMStefano Bonicatti
01/17/2024, 4:03 PMvscode_extensions
table, I don't think that's the entire issue (or even the issue that caused the failure); I suspect that the file doesn't exist and we are printing a log line, which in hindsight should've probably been a verbose log, since we are not necessarily sure that there is even vscode installedStefano Bonicatti
01/17/2024, 4:04 PMtests_integration_tables-test
should show at the end which specific test case failed, and in the test case it should show which assert/check failedStefano Bonicatti
01/18/2024, 12:43 AMvscode_extensions
table I totally forgot I did not already merge a fix for an issue I've found in the test. This should fix it: https://github.com/osquery/osquery/pull/8236Pradish
01/18/2024, 9:57 AMC:\Osquery\osquery\osquery\config\tests\config_tests.cpp(437): error: Expected equality of these values:
"dfae832a62a3e3a51760334184364b7d66468ccc"
source_hash
Which is: *"6ff053778a90c48ed3dc2d48ffb0aca263db620a"*
E20240116 21:47:43.806187 18420 config.cpp:879] updateSource failed to parse config, of source: awesome and content:
[ FAILED ] ConfigTests.test_content_update (1131 ms)
The above test case is failing because it is comparing the two hash values and they are not equal.
For test case #78
i had to make two changes to the base version to make this work.
1. Add the Dumpbin path to the env variables
2. in the file test_release.py located at \osquery\build\tools\tests at line 127
the executable path is mentioned as (BUILD_DIR + "/osquery/osqueryd.exe")
but the exe is not located here, it is located at
osquery/RelWithDebInfo/osqueryd.exe
post these two changes, the test case #78 also passed.
please let me know, if i need to commit this change or is it is left to the developer to make these changes depending on their build configuration.
regards
PradishStefano Bonicatti
01/18/2024, 11:33 AM--build_dir
flag, remove the osquery
prefix in the python script, and maybe rename the BUILD_DIR
variable to osquery dir.Stefano Bonicatti
01/18/2024, 11:34 AMStefano Bonicatti
01/18/2024, 11:35 AMStefano Bonicatti
01/18/2024, 11:36 AMcall "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ <http://steps.vc|steps.vc>_<http://arch.outputs.VC|arch.outputs.VC>_ARCH }}
Stefano Bonicatti
01/18/2024, 11:36 AM