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

add 4 guest test td attestation TCs and improve overall test logic #124

Merged
merged 7 commits into from
Oct 26, 2023

Conversation

hongyuni
Copy link
Contributor

add 4 guest test td attestation TCs and improve overall test logic, includes test_executor and test_launcher logic improvement

@hongyuni
Copy link
Contributor Author

the remained CodeCheck failure are related to source code ported from linux kernel tools/testing/selftests/tdx/, maybe we would keep them the way it is to avoid too much differences compared to linux kernel selftests code implementation

@@ -282,6 +284,7 @@ if ! guest_kernel_check; then
pkill "${VM_TYPE}vm_$PORT"
die "TEST TIMEOUT!!!!!!!!!!!!"
elif [ "$GCOV" == "off" ] && [ "$EXEC_FLAG" -eq 1 ]; then
pkill "${VM_TYPE}vm_$PORT"
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi Yongyu,
You mixed 'tabs' and 'spaces' for the indentation in the whole file.
Would you like to fix it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in new commit

source common.sh

while getopts :t: arg; do
case $arg in
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use 2 spaces for each indentation level instead of tabs in shell files.
It would be great if you could fix the indentation for the whole file.
Great thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in new commit

Copy link
Contributor

Choose a reason for hiding this comment

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

Please use 2 spaces for each indentation level instead of tabs in shell files. It would be great if you could fix the indentation for the whole file. Great thanks.

@hongyuni Hi Hongyu, as mentioned, please use 2 spaces for the indentation. @hanning0511 Please correct me if I'm wrong. I remember that we have such rules, right?

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry, updated 2 spaces indentation in latest commit, thought do so but there was some mistake. Would you help to review it?

@@ -0,0 +1,319 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* kselftest.h: low-level kselftest framework to include from
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's have a talk about why need these header files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

above source header files are all from kselftest

@hongyuni
Copy link
Contributor Author

Hi @ysun, all tab/2 spaces mismatching issues fixed in latest commit, would you take a new review?

strict on the $BOOT_PATTERN to avoid fake guest test execution

[Test Components] tdx
[Test Types] any
[Supported Devices] spr,emr,gnr,srf

Signed-off-by: Hongyu Ning <[email protected]>
add new implementation of 4 tdx guest attestation related testcases

[Test Components] tdx
[Test Types] func
[Supported Devices] spr,emr,gnr,srf

Signed-off-by: Hongyu Ning <[email protected]>
add tdx_guest_attest compile tools prepare logic to support auto compile
in centos stream 9 or rhel 9 guest os

[Test Components] tdx
[Test Types] func
[Supported Devices] spr,emr,gnr,srf

Signed-off-by: Hongyu Ning <[email protected]>
improve test_launcher management logic to support well on $GCOV=on case
and several corner VM lifecycle management issues

[Test Components] tdx
[Test Types] any
[Supported Devices] spr,emr,gnr,srf

Signed-off-by: Hongyu Ning <[email protected]>
improve code logic based on code check hints

[Test Components] tdx
[Test Types] func
[Supported Devices] spr,emr,gnr,srf

Signed-off-by: Hongyu Ning <[email protected]>
use guest os installed kernel headers search path and remove previous
standalone header file to avoid kernel driver and selftest tool ioctl
conflictions

[Test Components] tdx
[Test Types] func
[Supported Devices] spr,emr,gnr,srf

Signed-off-by: Hongyu Ning <[email protected]>
@hongyuni hongyuni force-pushed the guest_test_td_attest branch from 1ffd1d9 to 2d63a3c Compare October 24, 2023 01:20
@@ -8,77 +8,77 @@


# @desc This script do basic TD attestation check in TDX Guest VM
# test binary is based on kselftest linux/tools/testing/selftests/tdx implementation
# test binary is based on kselftest linux/tools/testing/selftests/tdx implementation
Copy link
Contributor

Choose a reason for hiding this comment

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

The indentation is not correct here.
And you don't need to add new commits to fix this. Update the patch and force-update the branch in your own remote repo. The PR can be updated automatically.

Copy link
Contributor

Choose a reason for hiding this comment

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

Others look good to me.
Next time, please refine the patch right in the patch instead of adding new ones.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry for that, I've revised it based on your comments.

and got your point, will keep the PR consistent in future.

all tab format unified to 2 spaces across all source code

[Test Components] tdx
[Test Types] func
[Supported Devices] spr,emr,gnr.srf

Signed-off-by: Hongyu Ning <[email protected]>
@hongyuni hongyuni force-pushed the guest_test_td_attest branch 2 times, most recently from 77dbc9f to 3482060 Compare October 25, 2023 01:57
@ysun ysun merged commit c96cd27 into intel:main Oct 26, 2023
1 of 2 checks passed
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.

3 participants