Skip to content

Add and fix hyperv modules test #3853

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kanchansenlaskar
Copy link
Collaborator

This PR contains the changes:

  1. Addition of other hyperv modules e.g. (hv_vmbus hv_storvsc hv_utils hv_balloon hid_hyperv hyperv_keyboard hyperv_fb)
  2. Also since the test is about reloading the modules, only looking for non-built in modules is not enough, hence added a small change to look specifically for reloadable modules in the config file.
  3. Fixes around the existing hv_netvsc failure where the timout of 10min for the command execution was not honored. And that is because the LocalProcess in the spur lib gets stops running withing the first 50 sec. Hence a workaround for the time being is put to reduce the dmesg log level to 4 if the existing log level is more than 4.

@kanchansenlaskar kanchansenlaskar force-pushed the kasenlaskar/hyperv_module_add_and_fix branch 2 times, most recently from 1cdd16f to 6b9ac2e Compare June 11, 2025 19:37
.split()[0]
)

# The 10-minute timeout specified in node.execute is not being honoured,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you asking if the log floods cause the test to run longer, specifically up to 50 seconds? How many lines are printed when running this test case?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taking hv_netvsc as an example where we are trying to run the following command (which runs for 100 iterations as you can see below):
for i in $(seq 1 100); do modprobe -r -v hv_netvsc; modprobe -v hv_netvsc; done; sleep 1; ip link set eth0 down; ip link set eth0 up; dhclient -r eth0; dhclient eth0

I tried running locally to the VMs without LISA:
With log level 4:
The execution finishes in around 10 seconds.
200 lines

With log level 7:
The execution takes around 90 seconds.
200 + 800 lines

Coming back to LISA:
The process runs only for around 50 seconds, when the execution time goes beyond that, it shows that as not running. This is what is coming from the LocalProcess of spur lib.

Basically, in the wait_result() method of process.py file, there is a while loop condition:
while self.is_running() and timeout >= timer.elapsed(False):
In that the first condition is returning False after approx. 50 seconds and hence it comes out of the loop it stops waiting for the execution to complete even though the process is actually running. Hence the timeout of 10 mins is also not considered.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand the reduced log level. Regarding the timeout, I need more information. Do you mean it happens only in LocalProcess, not SshProcess? If self.is_running() returns False, it means the process has exited. This is by design. How do you know the process is actually running?

Copy link
Collaborator Author

@kanchansenlaskar kanchansenlaskar Jun 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean it happens only in LocalProcess, not SshProcess?

I tried with SshProcess as well in LISA, and faced the same problem

do you know the process is actually running?

I don't know actually, however, when I ran the same command locally on the same vm with the same log level, it ran without any issues. It only gave issue when I ran with spur lib from LISA.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check if the issue still exists, after moved to modprobe? And please share me the full log, I can take a look.

@kanchansenlaskar kanchansenlaskar force-pushed the kasenlaskar/hyperv_module_add_and_fix branch from 6b9ac2e to 14d92fc Compare June 12, 2025 15:06
@kanchansenlaskar kanchansenlaskar force-pushed the kasenlaskar/hyperv_module_add_and_fix branch from 14d92fc to 747ca1b Compare June 16, 2025 18:09
@kanchansenlaskar kanchansenlaskar force-pushed the kasenlaskar/hyperv_module_add_and_fix branch 2 times, most recently from bdc9e3e to df80e7a Compare June 17, 2025 19:56
[
# Modules which dont have "=y" in the kernel config
# and therefore are not built into the kernel.
"NOT_BUILT_IN",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be

  • BUILT_IN =y
  • MODULE =m
  • NOT_BUILD =n

@@ -42,6 +42,15 @@ def _freebsd_tool(cls) -> Optional[Type[Tool]]:
def can_install(self) -> bool:
return False

def generate_renew_command(self, interface: str = "eth0") -> str:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also reuse it inside of the dhclient to reduce duplicate code.

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.

2 participants