Skip to content

Conversation

gthvn1
Copy link
Contributor

@gthvn1 gthvn1 commented Oct 8, 2025

No description provided.

@gthvn1 gthvn1 force-pushed the gtn-fix-perfmon-typo branch from 1bb4376 to f9e5617 Compare October 8, 2025 15:49
@psafont
Copy link
Member

psafont commented Oct 9, 2025

@gthvn1 Tests are failing because perfmon doesn't have any tests. This means that currently perfmon can't be modified without spending the effort to add them

@gthvn1
Copy link
Contributor Author

gthvn1 commented Oct 9, 2025

Oh. I understood that python3/tests/test_extauth_hook_AD.py and nbd_client_manager:nbd_client_manager.py failed. So it was not related to my modification. And I see the coverage issue but I thought it was only a warning.
Ok so I guess that need to have a closer look to understand how to add a test ;)

@gthvn1
Copy link
Contributor Author

gthvn1 commented Oct 9, 2025

In fact I see in the logs:

...
python3/tests/test_perfmon.py::TestGetFsUsage::test_get_percent_fs_usage PASSED [ 40%]
python3/tests/test_perfmon.py::TestGetFsUsage::test_get_percent_log_fs_usage PASSED [ 41%]
python3/tests/test_perfmon.py::TestGetFsUsage::test_get_percent_log_fs_usage_same_file_system PASSED [ 42%]
python3/tests/test_perfmon.py::TestGetMemUsage::test_get_percent_mem_usage PASSED [ 43%]
python3/tests/test_perfmon.py::TestGetMemUsage::test_get_percent_mem_usage_exception PASSED [ 43%]
python3/tests/test_perfmon.py::TestGetPercentSRUsage::test_get_percent_sr_usage_correct_input PASSED [ 44%]
python3/tests/test_perfmon.py::TestGetPercentSRUsage::test_get_percent_sr_usage_exception_handling PASSED [ 45%]
...

So it looks like perfmon has some tests.
But when I run tests locally (I just run pytest tests) I have an issue with tests/observer/it_traces.py.

>           assert span.__name__ == "span_of_tracers"
E           AssertionError: assert '_span_noop' == 'span_of_tracers'
E
E             - span_of_tracers
E             + _span_noop

tests/observer/it_traces.py:73: AssertionError
---------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------
Hello, I am a print() in traced_script.py.
----------------------------------------------------------------------------------------------- Captured log call ------------------------------------------------------------------------------------------------
DEBUG    __main__:observer.py:400 configs = ['/home/gthouvenin/git/xen-api/python3/tests/observer/observer.conf']
ERROR    __main__:observer.py:147 missing opentelemetry dependencies: No module named 'opentelemetry'
============================================================================================ short test summary info =============================================================================================
FAILED tests/observer/it_traces.py::it_creates_a_tracer - AssertionError: assert '_span_noop' == 'span_of_tracers'
========================================================================================= 1 failed, 109 passed in 0.32s ==========================================================================================

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants