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

Test Enhance: improve logic regarding $GCOV handling #119

Merged
merged 1 commit into from
Oct 13, 2023
Merged
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
14 changes: 11 additions & 3 deletions guest-test/guest.test_launcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ while read -r line; do
if [[ $line == $BOOT_PATTERN ]]; then
test_print_trc "VM_TYPE: $VM_TYPE, VCPU: $VCPU, SOCKETS: $SOCKETS, MEM: $MEM, DEBUG: $DEBUG, PMU: $PMU, CMDLINE: $CMDLINE, TESTCASE: $TESTCASE, SECONDS: $SECONDS"
EXEC_FLAG=0
./guest.test_executor.sh || break # break while read loop in case of TD VM test failure
if ! ./guest.test_executor.sh; then EXEC_FLAG=1 && break; fi # break while read loop in case of TD VM test failure
# err_handlers string matching
elif [[ $line == $ERR_STR1 ]]; then
test_print_err "There is $ERR_STR1, test is not fully PASS"
Expand Down Expand Up @@ -306,11 +306,19 @@ fi
# VM life-cycles management step 3
# Kill the tdvm_$PORT process in case above ssh command close not accessible due to network or other issues
if [ "$GCOV" == "off" ]; then
if [ ! "$(pgrep "${VM_TYPE}vm_$PORT")" ]; then
if [ ! "$(pgrep "${VM_TYPE}vm_$PORT")" ] && [ $EXEC_FLAG -eq 0 ]; then
test_print_trc "$VM_TYPE VM test complete all correctly..."
else
else # [ ${VM_TYPE}vm_$PORT process is still up ] || [ $EXEC_FLAG -eq 1 ]
pkill "${VM_TYPE}vm_$PORT"
test_print_wrg "${VM_TYPE}vm_$PORT process is still up, kill it since test expected to end here"
die "$VM_TYPE VM test fail, please check test log"
fi
else # [ $GCOV == "on" ]
if [ $EXEC_FLAG -eq 0 ]; then
test_print_trc "$VM_TYPE VM test complete all correctly..."
test_print_trc "Please shutdown $VM_TYPE VM after gcov collect completed"
else
test_print_err "$VM_TYPE VM test fail, please check test log"
test_print_trc "Please shutdown $VM_TYPE VM after gcov collect or debug completed"
fi
fi
Loading