-
Notifications
You must be signed in to change notification settings - Fork 123
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
Test boot aggregate #2749
Test boot aggregate #2749
Conversation
workload/ebizzy.py
Outdated
# | ||
# See LICENSE for more details. | ||
# | ||
# Copyright: 2022 IBM |
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.
Please change this to 2024
workload/ebizzy.py
Outdated
# See LICENSE for more details. | ||
# | ||
# Copyright: 2022 IBM | ||
# Author: Disha Goel <[email protected]> |
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.
Author name also
workload/ebizzy.py
Outdated
|
||
def test_workload(self): | ||
# Get ebizzy workload and build | ||
url = 'https://sourceforge.net/projects/ebizzy/files/ebizzy/0.3/ebizzy-0.3.tar.gz' |
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.
is this possible to get it from yaml?
workload/ebizzy.py
Outdated
process.run("./ebizzy -S1 -s1024 -t10", shell=True) | ||
|
||
def capture_top_output(self): | ||
process.getoutput("perf top -a > %s " % self.temp_file, timeout=10) |
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.
use "process.run"
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.
updated the file with latest changes
6047211
to
0ae196a
Compare
@Krishan-Saraswat the files you have pushed are different. |
@Naresh-ibm I have fixed the commits that happened because I didn't move the branch to master and two different commits got combined. |
security/grub-extend-pcr.py
Outdated
self.fail("files doesn't exist") | ||
if not os.path.exists("/sys/kernel/security/tpm0/binary_bios_measurements"): | ||
self.fail("file doesn't exist") | ||
cmd1 = "head -n1 /sys/kernel/security/ima/ascii_runtime_measurements" |
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.
Please use the variable name for the filename(s). You used the filename more than once.
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.
resolved
security/grub-extend-pcr.py
Outdated
if not os.path.exists("/sys/kernel/security/tpm0/binary_bios_measurements"): | ||
self.fail("file doesn't exist") | ||
cmd1 = "head -n1 /sys/kernel/security/ima/ascii_runtime_measurements" | ||
cmd2 = "tsseventextend -if /sys/kernel/security/tpm0/binary_bios_measurements -sim -pcrmax 9" |
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.
Please use the variable name for the filename(s). You used the filename more than once.
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.
resolved
security/grub-extend-pcr.py
Outdated
ascii_runtime_measurements and binary_bios_measurements | ||
''' | ||
if not os.path.exists("/sys/kernel/security/ima/ascii_runtime_measurements"): | ||
self.fail("files doesn't 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.
Please mention what file is not there.
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.
resolved
security/grub-extend-pcr.py
Outdated
if not os.path.exists("/sys/kernel/security/ima/ascii_runtime_measurements"): | ||
self.fail("files doesn't exist") | ||
if not os.path.exists("/sys/kernel/security/tpm0/binary_bios_measurements"): | ||
self.fail("file doesn't 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.
Please mention what file is not there.
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.
resolved
security/grub-extend-pcr.py
Outdated
tssevent_output = process.system_output(cmd2, ignore_status=True).decode().splitlines()[-1] | ||
tssevent_value = tssevent_output.split(":")[1].strip().replace(" ", "") | ||
if arm_value != tssevent_value: | ||
self.fail("Boot aggregate output doesn't match") |
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.
Improve this message - 'Boot aggregate output not matched from ascii and binary measurements'.
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.
resolved.
Added testcase to validate the output for boot aggregate from two different files ascii_runtime_measurements and binary_bios_measurements. Signed-off-by: Krishan Gopal Saraswat <[email protected]>
0ae196a
to
d1aa700
Compare
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.
@Krishan-Saraswat Thanks for PR
@PraveenPenguin @nasastry Thanks for review
LGTM
localhost:# avocado run --max-parallel-tasks=1 grub-extend-pcr.py
JOB ID : 1dfd2c3459f708c42271d21a32e6251d5706d9d4
JOB LOG : /root/avocado-fvt-wrapper/results/job-2024-01-16T00.36-1dfd2c3/job.log
(1/4) grub-extend-pcr.py:GrubExtendPCR.test_tsspcrread_8: STARTED
(1/4) grub-extend-pcr.py:GrubExtendPCR.test_tsspcrread_8: PASS (0.04 s)
(2/4) grub-extend-pcr.py:GrubExtendPCR.test_tsspcrread_9: STARTED
(2/4) grub-extend-pcr.py:GrubExtendPCR.test_tsspcrread_9: PASS (0.04 s)
(3/4) grub-extend-pcr.py:GrubExtendPCR.test_tsseventextend: STARTED
(3/4) grub-extend-pcr.py:GrubExtendPCR.test_tsseventextend: PASS (0.04 s)
(4/4) grub-extend-pcr.py:GrubExtendPCR.test_boot_aggregate: STARTED
(4/4) grub-extend-pcr.py:GrubExtendPCR.test_boot_aggregate: PASS (0.04 s)
RESULTS : PASS 4 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML : /root/avocado-fvt-wrapper/results/job-2024-01-16T00.36-1dfd2c3/results.html
JOB TIME : 30.53 s