VirtualBox

Changeset 72397 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 31, 2018 7:30:03 AM (7 years ago)
Author:
vboxsync
Message:

ValidationKit/utils/testExecService: Update vboxtxs-runvm readme and scripts. Adds dumping of nested-smoke test results to kernel log,
so we can see output on the test manager side.

Location:
trunk/src/VBox/ValidationKit/utils/TestExecServ
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-runvm.sh

    r72315 r72397  
    4242CDROM_PATH=/media/cdrom
    4343SCRATCH_PATH=/tmp/vboxtxs-scratch
     44SMOKEOUTPUT_PATH=/tmp/vboxtxs-smoketestoutput
     45DEVKMSG_PATH=/dev/kmsg
    4446
    4547PIDFILE="/var/run/vboxtxs"
     
    5456fi
    5557
    56 begin_msg()
    57 {
    58     test -n "${2}" && echo "${SCRIPTNAME}: ${1}."
    59     logger -t "${SCRIPTNAME}" "${1}."
     58kernlog_msg() {
     59    test -n "$2" && echo "${SCRIPTNAME}: ${1}"
     60    echo "${SCRIPTNAME}: ${1}" > $DEVKMSG_PATH
    6061}
    6162
    62 succ_msg()
    63 {
    64     logger -t "${SCRIPTNAME}" "${1}."
     63dumpfile_to_kernlog() {
     64    if test -f "$1"; then
     65        kernlog_msg "---------------------- DUMP BEGIN ----------------------"
     66        cat "$1" | while read LINE
     67        do
     68            kernlog_msg "${LINE}"
     69        done
     70        kernlog_msg "---------------------- DUMP END ------------------------"
     71        rm -f "$1"
     72    else
     73        kernlog_msg "${1}: file not found" console
     74    fi
    6575}
    6676
    67 fail_msg()
     77killproc()
    6878{
    69     echo "${SCRIPTNAME}: failed: ${1}." >&2
    70     logger -t "${SCRIPTNAME}" "failed: ${1}."
    71 }
    72 
    73 killproc() {
    7479    kp_binary="${1##*/}"
    7580    pkill "${kp_binary}" || return 0
     
    112117start() {
    113118    if ! test -f $PIDFILE; then
    114         begin_msg "Starting VirtualBox Nested Hardware-Virtualization Smoke Test" console
     119        kernlog_msg "Starting Nested Smoke Test" console
    115120        fixAndTestBinary
    116121        testRsrcPath
    117122        sleep 5
    118         $PYTHON_BINARY $SMOKETEST_SCRIPT -v -v -d --vbox-session-type gui --quick all
     123        $PYTHON_BINARY $SMOKETEST_SCRIPT -v -v -d --vbox-session-type gui --quick all 1> "${SMOKEOUTPUT_PATH}" 2>&1
    119124        RETVAL=$?
     125        dumpfile_to_kernlog "${SMOKEOUTPUT_PATH}"
    120126        if test $RETVAL -eq 0; then
    121             begin_msg "Starting VirtualBox Test Execution service" console
     127            kernlog_msg "Starting VirtualBox Test Execution service" console
    122128            mount /dev/cdrom "${CDROM_PATH}" 2> /dev/null > /dev/null
    123129            $binary --auto-upgrade --scratch="${SCRATCH_PATH}" --cdrom="${CDROM_PATH}" --no-display-output > /dev/null
    124130            RETVAL=$?
    125             test $RETVAL -eq 0 && sleep 2 && echo `pidof TestExecService` > $PIDFILE
     131            test $RETVAL -eq 0 && sleep 3 && echo `pidof TestExecService` > $PIDFILE
    126132            if ! test -s "${PIDFILE}"; then
    127133                RETVAL=5
    128134            fi
    129         fi
    130         if test $RETVAL -eq 0; then
    131             succ_msg "VirtualBox Test Execution service started"
     135            if test $RETVAL -eq 0; then
     136                kernlog_msg "Test Execution service started" console
     137            else
     138                kernlog_msg "Test Execution service failed to start" console
     139            fi
    132140        else
    133             fail_msg "VirtualBox Test Execution service failed to start"
     141            kernlog_msg "Smoke Test failed! error code ${RETVAL}" console
     142            RETVAL=7
    134143        fi
    135144    fi
     
    139148stop() {
    140149    if test -f $PIDFILE; then
    141         begin_msg "Stopping VirtualBox Test Execution Service" console
     150        kernlog_msg "Stopping VirtualBox Test Execution Service"
    142151        killproc $binary
     152        rm -f $PIDFILE
    143153    fi
    144154}
     
    180190
    181191exit $RETVAL
     192
  • trunk/src/VBox/ValidationKit/utils/TestExecServ/vboxtxs-runvm-readme.txt

    r72315 r72397  
    2525    Enable the vboxtxs-runvm service, usually using:
    2626       systemctl enable vboxtxs-runvm
    27 8.  Check the cdrom location in /opt/validationkit/linux/vboxtxs-runvm and fix
    28     it so it's correct.
     278.  Check the cdrom location and /dev/kmsg equivalent of your linux distro
     28    in /opt/validationkit/linux/vboxtxs-runvm and fix it so it's correct.
    29299.  reboot / done.
    3030
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette