How to use timesync_validate_ptp method in lisa

Best Python code snippet using lisa_python

timesync.py

Source:timesync.py Github

copy

Full Screen

...75 instead of /dev/ptp0 or /dev/ptp1.76 """,77 priority=2,78 )79 def timesync_validate_ptp(self, node: Node) -> None:80 # 1. PTP time source is available on Azure guests (newer versions of Linux).81 dmesg = node.tools[Dmesg]82 assert_that(dmesg.get_output()).contains(self.ptp_registered_msg)83 # 2. PTP device name is hyperv.84 cat = node.tools[Cat]85 clock_name_result = cat.run("/sys/class/ptp/ptp0/clock_name")86 assert_that(clock_name_result.stdout).described_as(87 f"ptp clock name should be 'hyperv', meaning the Azure host, "88 f"but it is {clock_name_result.stdout}, more info please refer "89 f"https://docs.microsoft.com/en-us/azure/virtual-machines/linux/time-sync#check-for-ptp-clock-source" # noqa: E50190 ).is_equal_to("hyperv")91 # 3. When accelerated network is enabled, multiple PTP devices will92 # be available, the names of ptp are changeable, create the symlink93 # /dev/ptp_hyperv to whichever /dev/ptp entry corresponds to the Azure host....

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