[XEN][PATCH v1] automation: update xilinx test scripts config

victorm.lira@amd.com posted 1 patch 3 months, 4 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/6b69088c886ce53ca17fe11ad97e3c364c2220de.1724176414.git.victorm.lira@amd.com
.../scripts/xilinx-smoke-dom0-x86_64.sh       | 29 +++++++++++--------
.../scripts/xilinx-smoke-dom0less-arm64.sh    |  5 ++--
2 files changed, 20 insertions(+), 14 deletions(-)
[XEN][PATCH v1] automation: update xilinx test scripts config
Posted by victorm.lira@amd.com 3 months, 4 weeks ago
From: Victor Lira <victorm.lira@amd.com>

Change xen command line parameters to support new test board.
Abstract serial port device name and tftp boot directory.

Signed-off-by: Victor Lira <victorm.lira@amd.com>
---
Cc: Stefano Stabellini <sstabellini@kernel.org>
---
 .../scripts/xilinx-smoke-dom0-x86_64.sh       | 29 +++++++++++--------
 .../scripts/xilinx-smoke-dom0less-arm64.sh    |  5 ++--
 2 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/automation/scripts/xilinx-smoke-dom0-x86_64.sh b/automation/scripts/xilinx-smoke-dom0-x86_64.sh
index e6e6fac6a5..2696bc84bd 100755
--- a/automation/scripts/xilinx-smoke-dom0-x86_64.sh
+++ b/automation/scripts/xilinx-smoke-dom0-x86_64.sh
@@ -12,10 +12,12 @@ fatal() {
 # Test parameter defaults.
 TEST="$1"
 PASS_MSG="Test passed: ${TEST}"
-XEN_CMD_CONSOLE="console=com1 com1=115200,8n1,0x3F8,4"
+XEN_CMD_CONSOLE="console=com2 com2=115200,8n1,0x2e8,4"
 XEN_CMD_DOM0="dom0=pvh dom0_max_vcpus=4 dom0_mem=4G"
 XEN_CMD_XEN="sched=null loglvl=all guest_loglvl=all console_timestamps=boot"
-XEN_CMD_EXTRA=""
+XEN_CMD_EXTRA="noreboot=true sync_console"
+DOM0_CMDLINE="console=hvc0 root=/dev/ram0 earlyprintk=xen"
+DOM0_CMDLINE="${DOM0_CMDLINE} loglevel=8 ignore_loglevel no_console_suspend"
 DOM0_CMD=""
 DOMU_CMD=""
 DOMU_CFG='
@@ -28,7 +30,7 @@ memory = 512
 vif = [ "bridge=xenbr0", ]
 disk = [ ]
 '
-TIMEOUT_SECONDS=120
+TIMEOUT_SECONDS=200

 # Select test variant.
 if [ "${TEST}" = "ping" ]; then
@@ -112,26 +114,29 @@ cd ..

 # Load software into TFTP server directory.
 TFTP="/scratch/gitlab-runner/tftp"
+BOARD_ID="x86_64-0"
+BOARD_DIR="${TFTP}/${BOARD_ID}"
 XEN_CMDLINE="${XEN_CMD_CONSOLE} ${XEN_CMD_XEN} ${XEN_CMD_DOM0} ${XEN_CMD_EXTRA}"
-cp -f binaries/xen ${TFTP}/pxelinux.cfg/xen
-cp -f binaries/bzImage ${TFTP}/pxelinux.cfg/vmlinuz
-cp -f binaries/dom0-rootfs.cpio.gz ${TFTP}/pxelinux.cfg/initrd-dom0
+cp -f binaries/xen ${BOARD_DIR}/xen
+cp -f binaries/bzImage ${BOARD_DIR}/vmlinuz
+cp -f binaries/dom0-rootfs.cpio.gz ${BOARD_DIR}/initrd-dom0
 echo "
 net_default_server=10.0.6.1
-multiboot2 (tftp)/pxelinux.cfg/xen ${XEN_CMDLINE}
-module2 (tftp)/pxelinux.cfg/vmlinuz console=hvc0 root=/dev/ram0 earlyprintk=xen
-module2 (tftp)/pxelinux.cfg/initrd-dom0
+multiboot2 (tftp)/${BOARD_ID}/xen ${XEN_CMDLINE} updated_test
+module2 (tftp)/${BOARD_ID}/vmlinuz ${DOM0_CMDLINE}
+module2 (tftp)/${BOARD_ID}/initrd-dom0
 boot
-" > ${TFTP}/pxelinux.cfg/grub.cfg
+" > ${BOARD_DIR}/grub.cfg

 # Power cycle board and collect serial port output.
-SERIAL_CMD="cat /dev/ttyUSB9 | tee smoke.serial | sed 's/\r//'"
+SERIAL_DEV="/dev/serial/${BOARD_ID}"
+SERIAL_CMD="cat ${SERIAL_DEV} | tee smoke.serial | sed 's/\r//'"
 sh /scratch/gitlab-runner/v2000a.sh 2
 sleep 5
 sh /scratch/gitlab-runner/v2000a.sh 1
 sleep 5
 set +e
-stty -F /dev/ttyUSB9 115200
+stty -F ${SERIAL_DEV} 115200
 timeout -k 1 ${TIMEOUT_SECONDS} nohup sh -c "${SERIAL_CMD}"
 sh /scratch/gitlab-runner/v2000a.sh 2

diff --git a/automation/scripts/xilinx-smoke-dom0less-arm64.sh b/automation/scripts/xilinx-smoke-dom0less-arm64.sh
index 666411d6a0..c8382bb0c7 100755
--- a/automation/scripts/xilinx-smoke-dom0less-arm64.sh
+++ b/automation/scripts/xilinx-smoke-dom0less-arm64.sh
@@ -134,9 +134,10 @@ sleep 5
 cd $START

 # connect to serial
+SERIAL_DEV="/dev/serial/arm64-0"
 set +e
-stty -F /dev/ttyUSB0 115200
-timeout -k 1 120 nohup sh -c "cat /dev/ttyUSB0 | tee smoke.serial | sed 's/\r//'"
+stty -F ${SERIAL_DEV} 115200
+timeout -k 1 120 nohup sh -c "cat ${SERIAL_DEV} | tee smoke.serial | sed 's/\r//'"

 # stop the board
 cd /scratch/gitlab-runner
--
2.25.1