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

Guest test td 0304 - bugfix and test enhance #197

Merged
merged 2 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions tdx-guest/tdx.guest_test_executor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -340,17 +340,19 @@ case "$TESTCASE" in
if [[ "$GCOV" == "off" ]]; then
guest_test_close
fi
else
die "rpm file not accessible: $RPM"
fi
;;
TD_KDUMP_START)
guest_test_prepare tdx_guest_kdump_test.sh
guest_test_entry tdx_guest_kdump_test.sh "-t KDUMP_S" || \
guest_test_prepare tdx_kdump_test.sh
guest_test_entry tdx_kdump_test.sh "-t KDUMP_S" || \
die "Failed on $TESTCASE tdx_kdump_test.sh -t KDUMP_S"
# no need to do guest_test_close as kdump/kexec trigger reboot
;;
TD_KDUMP_CHECK)
guest_test_prepare tdx_guest_kdump_test.sh
guest_test_entry tdx_guest_kdump_test.sh "-t KDUMP_C" || \
guest_test_prepare tdx_kdump_test.sh
guest_test_entry tdx_kdump_test.sh "-t KDUMP_C" || \
die "Failed on $TESTCASE tdx_kdump_test.sh -t KDUMP_C"
if [[ "$GCOV" == "off" ]]; then
guest_test_close
Expand Down
6 changes: 3 additions & 3 deletions tdx-guest/tdx_kdump_test_entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ done

###################### Do Works ######################
# install kdump test kernel rpm in target TDX guest OS image
./guest-test/guest.test_launcher.sh -v 1 -s 1 -m 16 -d "$DEBUG" -t tdx -f tdx -x TD_RPM_INSTALL -c "accept_memory=lazy" -p off -r "$RPM" || \
./guest-test/guest.test_launcher.sh -v 1 -s 1 -m 16 -d "$DEBUG" -t tdx -e tdx-guest -f tdx -x TD_RPM_INSTALL -c "accept_memory=lazy" -p off -r "$RPM" || \
die "Failed on kdump test kernel rpm install"
sleep 3
# prepare and trigger kdump in target TDX guest OS image
./guest-test/guest.test_launcher.sh -v "$VCPU" -s 1 -m "$MEM" -d "$DEBUG" -t tdx -f tdx -x TD_KDUMP_START -c "accept_memory=lazy crashkernel=1G-4G:256M,4G-64G:384M,64G-:512M" -p off || \
./guest-test/guest.test_launcher.sh -v "$VCPU" -s 1 -m "$MEM" -d "$DEBUG" -t tdx -e tdx-guest -f tdx -x TD_KDUMP_START -c "accept_memory=lazy crashkernel=1G-4G:256M,4G-64G:384M,64G-:512M" -p off || \
die "Failed on trigger kdump"
sleep 3
# check kdump log generated in target TDX guest OS image
./guest-test/guest.test_launcher.sh -v 1 -s 1 -m 16 -d "$DEBUG" -t tdx -f tdx -x TD_KDUMP_CHECK -c "accept_memory=lazy" -p off || \
./guest-test/guest.test_launcher.sh -v 1 -s 1 -m 16 -d "$DEBUG" -t tdx -e tdx-guest -f tdx -x TD_KDUMP_CHECK -c "accept_memory=lazy" -p off || \
die "Failed on kdupm log check"
5 changes: 5 additions & 0 deletions tdx-guest/tdx_rpm_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ RPM_FILE=$1

###################### Do Works ######################
# check rpm file type: kernel image, kernel devel or kernel headers
if [[ -f "$RPM_FILE" ]]; then
test_print_trc "rpm file for test: $RPM_FILE"
else
die "no rpm file for test"
fi

# for kernel-devel rpm, remove old devel package and install new one
if grep "\-devel\-" "$RPM_FILE" > /dev/null; then
Expand Down
Loading