How to use get_vmbus_version method in lisa

Best Python code snippet using lisa_python

kdumpcrash.py

Source:kdumpcrash.py Github

copy

Full Screen

...193 kdump = node.tools[KdumpBase]194 kdump.check_required_kernel_config()195 # Check the VMBus version for kdump supported196 dmesg = node.tools[Dmesg]197 vmbus_version = dmesg.get_vmbus_version()198 if vmbus_version < "3.0.0":199 raise SkippedException(200 f"No negotiated VMBus version {vmbus_version}. "201 "Kernel might be old or patches not included. "202 "Full support for kdump is not present."203 )204 # Below code aims to check the kernel config for "auto crashkernel" supported.205 # Redhat/Centos has this "auto crashkernel" feature. For version 7, it needs the206 # CONFIG_KEXEC_AUTO_RESERVE. For version 8, the ifdefine of that config is207 # removed. For these changes we can refer to Centos kernel, gotten according208 # to https://wiki.centos.org/action/show/Sources?action=show&redirect=sources209 # In addition, we didn't see upstream kernel has the auto crashkernel feature.210 # It may be a patch owned by Redhat/Centos.211 # Note that crashkernel=auto option in the boot command line is no longer...

Full Screen

Full Screen

common.py

Source:common.py Github

copy

Full Screen

...19 uname = node.tools[Uname]20 kernel_version = uname.get_linux_information().kernel_version21 dmesg = node.tools[Dmesg]22 lsvmbus = node.tools[Lsvmbus]23 vmbus_version = dmesg.get_vmbus_version()24 file_path_list: Dict[str, str] = {}25 # the vmbus interrupt channel reassignment feature is available in 5.8+ kernel and26 # vmbus version in 4.1+, the vmbus version is negotiated with the host.27 if kernel_version >= "5.8.0" and vmbus_version >= "4.1.0":28 # save the raw cpu number for each channel for restoring later.29 channels = lsvmbus.get_device_channels(force_run=True)30 for channel in channels:31 for channel_vp_map in channel.channel_vp_map:32 current_target_cpu = channel_vp_map.target_cpu33 if current_target_cpu == target_cpu:34 continue35 file_path_list[36 get_interrupts_assigned_cpu(37 channel.device_id, channel_vp_map.rel_id...

Full Screen

Full Screen

dmesg.py

Source:dmesg.py Github

copy

Full Screen

...52 raise LisaException(error_message)53 else:54 self._log.debug(error_message)55 return result56 def get_vmbus_version(self) -> VersionInfo:57 result = self._run()58 result.assert_exit_code(59 message=f"exit code should be zero, but actually {result.exit_code}"60 )61 raw_vmbus_version = re.finditer(self.__vmbus_version_pattern, result.stdout)62 for vmbus_version in raw_vmbus_version:63 matched_vmbus_version = self.__vmbus_version_pattern.match(64 vmbus_version.group()65 )66 if matched_vmbus_version:67 major = matched_vmbus_version.group("major")68 minor = matched_vmbus_version.group("minor")69 self._log.info(f"vmbus version is {major}.{minor}")70 return VersionInfo(int(major), int(minor))...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run lisa automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful