Skip to content
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

edk2_check_mor: add a new case #4162

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

Conversation

XueqiangWei
Copy link
Contributor

@XueqiangWei XueqiangWei commented Sep 19, 2024

check mor enabled under secure mode

Signed-off-by: Xueqiang Wei [email protected]
ID: 2895

@XueqiangWei
Copy link
Contributor Author

(1/1) Host_RHEL.m9.x.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.x.x86_64.io-github-autotest-qemu.edk2_check_mor.q35: STARTED
(1/1) Host_RHEL.m9.x.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.x.x86_64.io-github-autotest-qemu.edk2_check_mor.q35: PASS (230.75 s)

@XueqiangWei
Copy link
Contributor Author

@zhencliu, Could you please help review it? Many thanks.

try:
find_command(params["cmd_installed"])
except CmdNotFoundError as e:
test.error(e.__str__())
Copy link
Contributor

Choose a reason for hiding this comment

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

test.error(str(e))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated, thanks.

if status:
test.cancel('Secure boot is not enabled,'
'MOR must run under secure mode')
if not signed:
Copy link
Contributor

Choose a reason for hiding this comment

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

move the if under line 53?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated, check whether the guest has been signed after checking secure boot enabled. If the guest is not signed, it should not boot succeed under secure mode. Thanks.

return True if re.search(sign_keyword, sign_info) else False

package = params["package_installed"]
install_status = utils_package.package_install(package)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to uninstall the package post-test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, this package is very small and it contains test scripts, I think it can be kept. Thanks.
(Of course, we can call the function utils_package.package_remove(), but I think we can keep it here.)

check mor enabled under secure mode

Signed-off-by: Xueqiang Wei <[email protected]>
@XueqiangWei
Copy link
Contributor Author

(1/1) Host_RHEL.m9.u5.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.x86_64.io-github-autotest-qemu.edk2_check_mor.q35: PASS (128.93 s)

@XueqiangWei
Copy link
Contributor Author

@zhencliu Could you please help review it again? Many thanks.

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