-
Notifications
You must be signed in to change notification settings - Fork 168
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
sriov: fix ipxe rom file issue #6081
base: master
Are you sure you want to change the base?
Conversation
Relying on ipxe build in tests when cannot obtain VF pxe rom file is an unstable testing method. Because this case is mainly to test the xml but not the pxe function. So we decided to use the fixed virtio rom file to test. Signed-off-by: Meina Li <[email protected]>
|
# Directly use virtio rom file because it mainly test xml but not pxe function. | ||
rom_file = "/usr/share/ipxe/1af41000.rom" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can use a more direct variable name instead of commenting here.
# Directly use virtio rom file because it mainly test xml but not pxe function. | |
rom_file = "/usr/share/ipxe/1af41000.rom" | |
virtio_rom_file = "/usr/share/ipxe/1af41000.rom" | |
if not os.path.exists(virtio_rom_file): | |
self.test.error(f"This test needs a rom file, but neither {virtio_rom_file} or {rom_file} exist!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the end of this function, we nee to return rom_file
to use in calling function. So virtio_rom_file is not suitable here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, of course you can return virtio_rom_file if it exists.
Relying on ipxe build in tests when cannot obtain VF pxe rom file is an unstable testing method. Because this case is mainly to test the xml but not the pxe function. So we decided to use the fixed virtio rom file to test.
The error message:
This test needs rom file: /usr/share/ipxe/8086154c.rom.