[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XEN][PATCH v2] automation: update xilinx test scripts (tty)


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: <victorm.lira@xxxxxxx>
  • Date: Fri, 23 Aug 2024 15:29:04 -0700
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hHyfLdJ5rqccJpxu6iDb17bnVwujeMyggvhgUMvzF8c=; b=lq+6Vm0nM3aBx5qUdLR7Wbx9gxx1x5Ubi1kAEwuZhj+N8i8yjCwUNxRieNx4brq20sOMPFlb5JjwPLT6MmsUgNThT/QC0qQsHy591a5tEeU+T1+/zyipu3Y1meQl485tbBSRxd3mePgnEjZLwLjdmWopVqgYGtXEMEESyLo0a8r/VFayBwBeIXap59asp0GOCDh8qMrpxBAyxiqzXtSzKmlTkOmC07WinRks/3WNN1a9UDj55sCoK++9bbgxSroMkJfZMOZJLjUbkOU081PlWFf3bhNUBPxrjdKMF5GjweyDALSPom0CtaKWYaeMfKDw0Wc9z8NtIw3VQe6EcHObvA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=w9ezWBk81ExZbDqIduBYpdmM5WPwwpi2abQ+4sBpXOwjp5jqloqhHuxZKdKF+XgaNXpFTFcfRJ65Q81OrUrxMwqSsLdv4pug5HM983PyFhelKJI9vKW1qqhO+WaCg7uvyRuYLathRyq653THsgNg0iKCS+kd9Qb3hViPZ9iDf2hl3i4kZg0ngayIrbOyYpOAUQ+93GPem+9PCHqGvoInr7UqOJoRHdzmW6U8x+CG3fRvHCtAUYH/NzWQl3IfdNavQ5fj4drfdkbXMdtd1VAoYdKO3oTqj3nfE++CLxj4gmonWZW2cWW6KK8+JdFWSArdgyEF55vLsUGt9/nSw8u3Fg==
  • Cc: Victor Lira <victorm.lira@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Fri, 23 Aug 2024 22:29:43 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

From: Victor Lira <victorm.lira@xxxxxxx>

Update serial device names from ttyUSB* to test board specific names.

Update xilinx-smoke-dom0-x86_64 with new Xen command line console options,
which are now set as Gitlab CI/CD variables. Abstract the directory where
binaries are stored. Increase the timeout to match new setup.

Signed-off-by: Victor Lira <victorm.lira@xxxxxxx>
---
Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 automation/gitlab-ci/test.yaml                |  2 ++
 .../scripts/xilinx-smoke-dom0-x86_64.sh       | 28 +++++++++----------
 .../scripts/xilinx-smoke-dom0less-arm64.sh    |  5 ++--
 3 files changed, 19 insertions(+), 16 deletions(-)

diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml
index 4e74946419..3b339f387f 100644
--- a/automation/gitlab-ci/test.yaml
+++ b/automation/gitlab-ci/test.yaml
@@ -101,6 +101,8 @@
   variables:
     CONTAINER: ubuntu:xenial-xilinx
     LOGFILE: xilinx-smoke-x86_64.log
+    XEN_CMD_CONSOLE: "console=com2 com2=115200,8n1,0x2F8,4"
+    TEST_BOARD: "crater"
   artifacts:
     paths:
       - smoke.serial
diff --git a/automation/scripts/xilinx-smoke-dom0-x86_64.sh 
b/automation/scripts/xilinx-smoke-dom0-x86_64.sh
index e6e6fac6a5..4559e2b9ee 100755
--- a/automation/scripts/xilinx-smoke-dom0-x86_64.sh
+++ b/automation/scripts/xilinx-smoke-dom0-x86_64.sh
@@ -12,7 +12,6 @@ fatal() {
 # Test parameter defaults.
 TEST="$1"
 PASS_MSG="Test passed: ${TEST}"
-XEN_CMD_CONSOLE="console=com1 com1=115200,8n1,0x3F8,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=""
@@ -28,7 +27,7 @@ memory = 512
 vif = [ "bridge=xenbr0", ]
 disk = [ ]
 '
-TIMEOUT_SECONDS=120
+TIMEOUT_SECONDS=200

 # Select test variant.
 if [ "${TEST}" = "ping" ]; then
@@ -113,27 +112,28 @@ cd ..
 # Load software into TFTP server directory.
 TFTP="/scratch/gitlab-runner/tftp"
 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 ${TFTP}/${TEST_BOARD}/xen
+cp -f binaries/bzImage ${TFTP}/${TEST_BOARD}/vmlinuz
+cp -f binaries/dom0-rootfs.cpio.gz ${TFTP}/${TEST_BOARD}/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)/${TEST_BOARD}/xen ${XEN_CMDLINE}
+module2 (tftp)/${TEST_BOARD}/vmlinuz console=hvc0 root=/dev/ram0 
earlyprintk=xen
+module2 (tftp)/${TEST_BOARD}/initrd-dom0
 boot
-" > ${TFTP}/pxelinux.cfg/grub.cfg
+" > ${TFTP}/${TEST_BOARD}/grub.cfg

 # Power cycle board and collect serial port output.
-SERIAL_CMD="cat /dev/ttyUSB9 | tee smoke.serial | sed 's/\r//'"
-sh /scratch/gitlab-runner/v2000a.sh 2
+SERIAL_DEV="/dev/serial/${TEST_BOARD}"
+SERIAL_CMD="cat ${SERIAL_DEV} | tee smoke.serial | sed 's/\r//'"
+sh /scratch/gitlab-runner/${TEST_BOARD}.sh 2
 sleep 5
-sh /scratch/gitlab-runner/v2000a.sh 1
+sh /scratch/gitlab-runner/${TEST_BOARD}.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
+sh /scratch/gitlab-runner/${TEST_BOARD}.sh 2

 set -e

diff --git a/automation/scripts/xilinx-smoke-dom0less-arm64.sh 
b/automation/scripts/xilinx-smoke-dom0less-arm64.sh
index 666411d6a0..18aa07f0a2 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/zynq"
 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.37.6




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.