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

Added new snpguest CI PR test for SNP guest #77

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

LakshmiSaiHarika
Copy link

Perform snpguest cargo tests on the SNP guest

…ithout network port conflict

Added a new tool to assign network ports to multiple SNP guest without network port conflict and cleanup inactive guest network port inthe inventory file tracked by GH Action workflow

Signed-off-by: Harika Nittala <[email protected]>
…ted runner.

Added a new helper script having function definition for SNP related tasks(verify if SNP is enabled for the SNP host kernel, run a command on an active guest) and host dependencies(check rust dependency) on the self-hosted runner.

Signed-off-by: Harika Nittala <[email protected]>
Added snpguest CI PR test workflow to run snpguest cargo tests(without flags) on the SNP guest

Signed-off-by: Harika Nittala <[email protected]>
@LakshmiSaiHarika
Copy link
Author

Hi Reviewers, I re-request for the code review for snpguest CI PR test as I made major changes to address the following features:

  1. Re-organized snp function definitions in a separate file for code cleanup
  2. To handle launch of multiple unique SNP guests with the combination of guest network port and guest name
  3. Added new tool to extract free guest network port for SNP guest launch process.


#!/bin/bash

verify_snp_host() {
Copy link
Author

Choose a reason for hiding this comment

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

Can I add this as a separate command in snp.sh or
use this as it is in the workflow

}

# verify_snp_guest_msr CLI use: verify_snp_guest_msr "${guest_name}" "${guest_port_number}"
verify_snp_guest_msr(){
Copy link
Author

Choose a reason for hiding this comment

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

Can remove this function if we can integrate this functionality in the snp.sh

run: |
set -e

wget https://raw.githubusercontent.com/LakshmiSaiHarika/sev-utils/Fedora-Latest-SNP-kernel-Upstream/tools/snp.sh
Copy link
Author

Choose a reason for hiding this comment

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

export GUEST_NAME=${{ env.guest_name }}
export HOST_SSH_PORT=${{ env.guest_port_in_use }}

./snp.sh launch-guest
Copy link
Author

Choose a reason for hiding this comment

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

./snp.sh launch-guest --guest-name "${{ env.guest_name }}" --guest-port "${{ env.guest_port_in_use }}"

source ./.github/workflows/snp_function_declarations.sh
ssh_guest_command "uname -r" ${{ env.guest_name }} ${{ env.guest_port_in_use }}

- name: Verify SNP on the guest via MSR
Copy link
Author

Choose a reason for hiding this comment

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

Can remove this once this functionality is added in the snp.sh


export GUEST_NAME=${{ env.guest_name }}
export HOST_SSH_PORT=${{ env.guest_port_in_use }}
./snp.sh stop-guests
Copy link
Author

Choose a reason for hiding this comment

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

./snp.sh stop-guests --guest-name "${{ env.guest_name }}"

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.

5 participants