From nobody Sun Nov 24 02:09:13 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1724970929; cv=pass; d=zohomail.com; s=zohoarc; b=JL7vcuGq1hX+A19l7kq5f5Nf4b/2ALZ7yBQ3k9aJ6eGTzXYbKwGNlo4kfukDZBvFTJni/PLkp11ooG3yhsC2gNwDwiSzSPEgERPdofh7rxnOIxWLNjbhj4GVGgoCQuaZc09Fk/zsYvVx+iWJhWWj78JX7xbnedU7BIz2K6g2XZA= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1724970929; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=U1jgTNWGwPI6xz2FmLlpvUZAIaWeP7Yy8H0GhG+UJYc=; b=j77mbwi9RD3Yf+x614x0DVLs/Crsnhcg3DwALwTRkJ3/K+L8bH3a7OOmv6HM203OPMUBEfv/g22y3eb0rZY+xUDd7buWGE92I+SuBa4fqLvYEdWq12XDrJx0GL6+DG4CxoWeIQ+05/rV1CweXzEZ2tbP0e0AMwlMqN+FhseJmWU= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1724970929033782.1959245464819; Thu, 29 Aug 2024 15:35:29 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.786136.1195678 (Exim 4.92) (envelope-from ) id 1sjnjG-00033c-96; Thu, 29 Aug 2024 22:34:58 +0000 Received: by outflank-mailman (output) from mailman id 786136.1195678; Thu, 29 Aug 2024 22:34:58 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sjnjG-00033V-63; Thu, 29 Aug 2024 22:34:58 +0000 Received: by outflank-mailman (input) for mailman id 786136; Thu, 29 Aug 2024 22:34:56 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sjnjE-000330-FS for xen-devel@lists.xenproject.org; Thu, 29 Aug 2024 22:34:56 +0000 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on20627.outbound.protection.outlook.com [2a01:111:f400:7ea9::627]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id e8b95f59-6656-11ef-99a0-01e77a169b0f; Fri, 30 Aug 2024 00:34:54 +0200 (CEST) Received: from SA0PR11CA0201.namprd11.prod.outlook.com (2603:10b6:806:1bc::26) by CY5PR12MB6573.namprd12.prod.outlook.com (2603:10b6:930:43::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.27; Thu, 29 Aug 2024 22:34:47 +0000 Received: from SN1PEPF000397B3.namprd05.prod.outlook.com (2603:10b6:806:1bc:cafe::4f) by SA0PR11CA0201.outlook.office365.com (2603:10b6:806:1bc::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.27 via Frontend Transport; Thu, 29 Aug 2024 22:34:47 +0000 Received: from SATLEXMB03.amd.com (165.204.84.17) by SN1PEPF000397B3.mail.protection.outlook.com (10.167.248.57) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7918.13 via Frontend Transport; Thu, 29 Aug 2024 22:34:46 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 29 Aug 2024 17:34:45 -0500 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 29 Aug 2024 17:34:45 -0500 Received: from xsjwoods50.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 29 Aug 2024 17:34:44 -0500 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: e8b95f59-6656-11ef-99a0-01e77a169b0f ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=iy9pa/B4RtQH+pJnJvocQdzo6x6PA+eZRU9SC2j6IdOgqRZXZ5jcJzrJlvK+R7292GOmToqo20mvbnfNP3r8mmTBf8otuL0g3BdVcZRe0iWpveQNjKCxmdk8KvHZZ+rVeMJLNxWkFx0dKEZ/ttU8GUOyEa80pwPQETMsNRGFgs1HXBg34emAgueC7ksBeu0+8IGTlTMn2fxeUGKBeAgSMOo2wki1/FShVwcSMJf0OF7/KNwgi+iFUgjtBj88SaunLTyTk/UTlNXB6uU3hZ5ATtlKAdhYnDMhlwVCSe1NvQOXyE13ioYKZSxZ+lA5d0VAxBPOwWWyyDEKUneOIMP0fg== 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=U1jgTNWGwPI6xz2FmLlpvUZAIaWeP7Yy8H0GhG+UJYc=; b=Xe1Z3YR6KkwLeFZvJiquEPqp/qBZugLgQkVZn1ab9l/vG+q3c2ViPKVe8z1FWd7Y8zrk/EgKr2lPvgS5Jx+giKnlnDOhf5u2L3RSgYuS1eMPVJq92fcZWmV2bAQmGhzA46Pa1mVzJikqSOn+VkrrdFlG8aZZb1j8rbnTWf2zUg7LQ5qBezYfSpR9a7AjPW8JSnOp3L/gQ5/r4aCeE7vf4ELwurMSUhw0RBaXqsvZFbmWtzATLDr1YZWlgLtkX4+vYL2ChF9OVtn0XJA0J90AvKuOJLgjbyGvSO0dIrj8kcbtRhXwupzDOmAvt25Ds4ysNhJfypgNofeIpkUbTTSRrg== 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=U1jgTNWGwPI6xz2FmLlpvUZAIaWeP7Yy8H0GhG+UJYc=; b=ZPrKYbQGVeXlZ5Te40i/8y4K1McoP/mfnrY177vOHUuzdxxQJLteRZlhkk+qFllOKZ3RMp6NxFuAEmC26VQP1m0wblae6FMwGeXm38SDZ/AtpmTU5KcZUziIB8osU7VrqPsJz+Gj/XZe1LZQ8HvgYqNhGGFkqAlJYS8lJuTyAgM= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C From: To: CC: Victor Lira , Andrew Cooper , Jan Beulich , Julien Grall , Stefano Stabellini , Michal Orzel Subject: [PATCH v2 1/2] automation: fix false success in qemu tests Date: Thu, 29 Aug 2024 15:34:22 -0700 Message-ID: <9b60c6473aa084e4e47c64aa2347db6e3ca9ac91.1724967614.git.victorm.lira@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: None (SATLEXMB05.amd.com: victorm.lira@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF000397B3:EE_|CY5PR12MB6573:EE_ X-MS-Office365-Filtering-Correlation-Id: 3e62a679-f183-4ccc-d13f-08dcc87ac95b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?NLMFrx89MS2Sx93VZzOxKLxaPSQg5C7zR0cKesafOCKIQMJdA2tNR58M2XsO?= =?us-ascii?Q?MMS7Am+qNyN5AvwpcASUNsz9LJwUEKWxXlvWXmkbzd1sEJOBBLsxydhS4C/y?= =?us-ascii?Q?yTB6eTC5F5VJcd/8TzKVme8fBDpAkH0lBtvraoauwHDu3dzmv8QZGcCBamqo?= =?us-ascii?Q?YWEPLJCegu+qQavZHlBNDxZ7OIQKbjPeLpX0t+k4kphT87NO+ogFkdC+9xEd?= =?us-ascii?Q?8ELpiDzqzjjty5TEfp2dlH22p+mA8Ipeofc3oEB0iwap0JZ3js5+QH0M6S5y?= =?us-ascii?Q?+/OPnFXCYEe008rQANfsSuxNTOhxn6WT7ave2hqxQ5tPSdJtWZkZWwjCn5Lc?= =?us-ascii?Q?nsPDs3CeYgChTbUfNY9IUhH+/RXVN3NSJ0AvrkObl7YbSW542o8TAl8irRNR?= =?us-ascii?Q?RYJxbHi6fWtVthjEdAWBTcviuL1fIAsqYmldj21KUlD5zKXA9uU7cWmZMAvQ?= =?us-ascii?Q?paMRt10vvvgsUB3wseG89ytQiBLy3a+0bBQlalfx3bgRzImJJ7cFIgponVgH?= =?us-ascii?Q?/PLxWU9bAHrW1A4MppcVXefZ8FpZOYgxZ/wjpQUeeeCDBJIqaQh/9LtdmYXa?= =?us-ascii?Q?c8dmHDU7y5LwHgSmZLNDA0mr9dvtiNL79uWAvVpMbXXkoytYD8Poj/cyHf4Q?= =?us-ascii?Q?eMijae5JqHUciQGPiY4JtEg3Bp51j/APM/sIkGl9WLNHBm2tMFzb3K9HRkFc?= =?us-ascii?Q?sUuK5XKvlhCRuQ5NblLhMpvCoNoomPOGVy+Tn7U2FZt3ldmTDflZ6BCUTG2R?= =?us-ascii?Q?eECKmvFMWCVfpqTVG95hKYlILa25MGFrk9PYsiGjHPU6o/hRETfzR8aRwX5l?= =?us-ascii?Q?tn/U/UReVVbudG4M1nwoyAK4BdguYgYm2ou0AooxY7bH5LE1hOPZHM2jcBY7?= =?us-ascii?Q?VkTcFEPXkTgocKHyQIa0CXSl5K24nqLuDid+xAJWeriw62VAqmS3VpFj360P?= =?us-ascii?Q?Lsdz2qcADpZD0/IL5g+A4HGNhG+O9oq/4r0Jn68Fy807ppS3dh6R7622e1l0?= =?us-ascii?Q?+6HX2tN4nzkDk043KBL+u5wLdn6VemYZOvRSFn85/tVfGr7FUgJOy+payKzu?= =?us-ascii?Q?5iDzWnifJ6oMnfLhk4ojI8lyAlV3lQhoCf0CwqBwJgUtCY21acYs9C6i8iMb?= =?us-ascii?Q?SLVrIeNSgjDrAu394L4lmoqTYTXEKhW5rRdklCM3H+P+dxBiiZnO63cVZIdL?= =?us-ascii?Q?VG6C7UGWDismXVbhMlSqyQ64G1OHbdEld6ahJN0/6NftuTxTBombNL3bGuZB?= =?us-ascii?Q?fr8dBQsJZHQsKaPgtsYAPdZw6TWK2O0KhJt3Jyvdep34UacRMbmonEa6DhiV?= =?us-ascii?Q?neWN/+dYZCTS/gr4Qj7o1EQ/mV6wQdpCSRCHW/l4H4VGiQXdTsCgg6nsLLsX?= =?us-ascii?Q?JdixlOiAtCdDZmXzz4ySSDxbGPh6hxbBF79fWLce4ZhH1iwaCw=3D=3D?= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(376014)(36860700013)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2024 22:34:46.6914 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3e62a679-f183-4ccc-d13f-08dcc87ac95b X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF000397B3.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6573 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1724970930434116600 Content-Type: text/plain; charset="utf-8" From: Victor Lira Fix flaw in qemu-*.sh tests that producess a false success. The following lines produces success despite the "expect" script producing nonzero exit status: set +e ... ./automation/scripts/qemu-key.exp | sed 's/\r\+$//' (end of file) The default exit status for a pipeline using "|" operator is that of the rightmost command. Fix this by setting the "pipefail" option in the shell, and removing "set +e" allowing the expect script to determine the result. Signed-off-by: Victor Lira Reviewed-by: Stefano Stabellini --- Cc: Andrew Cooper Cc: Jan Beulich Cc: Julien Grall Cc: Stefano Stabellini Cc: Michal Orzel Cc: xen-devel@lists.xenproject.org --- automation/scripts/qemu-alpine-x86_64.sh | 3 +-- automation/scripts/qemu-key.exp | 2 +- automation/scripts/qemu-smoke-dom0-arm32.sh | 3 +-- automation/scripts/qemu-smoke-dom0-arm64.sh | 3 +-- automation/scripts/qemu-smoke-dom0less-arm32.sh | 3 +-- automation/scripts/qemu-smoke-dom0less-arm64.sh | 3 +-- automation/scripts/qemu-smoke-ppc64le.sh | 3 +-- automation/scripts/qemu-smoke-riscv64.sh | 3 +-- automation/scripts/qemu-smoke-x86-64.sh | 3 +-- automation/scripts/qemu-xtf-dom0less-arm64.sh | 3 +-- 10 files changed, 10 insertions(+), 19 deletions(-) diff --git a/automation/scripts/qemu-alpine-x86_64.sh b/automation/scripts/= qemu-alpine-x86_64.sh index 42a89e86b021..93914c41bc24 100755 --- a/automation/scripts/qemu-alpine-x86_64.sh +++ b/automation/scripts/qemu-alpine-x86_64.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -ex +set -ex -o pipefail # DomU Busybox cd binaries @@ -76,7 +76,6 @@ EOF # Run the test rm -f smoke.serial -set +e export QEMU_CMD=3D"qemu-system-x86_64 \ -cpu qemu64,+svm \ -m 2G -smp 2 \ diff --git a/automation/scripts/qemu-key.exp b/automation/scripts/qemu-key.= exp index 787f1f08cb96..66c416483146 100755 --- a/automation/scripts/qemu-key.exp +++ b/automation/scripts/qemu-key.exp @@ -14,7 +14,7 @@ eval spawn $env(QEMU_CMD) expect_after { -re "(.*)\r" { - exp_continue + exp_continue -continue_timer } timeout {send_error "ERROR-Timeout!\n"; exit 1} eof {send_error "ERROR-EOF!\n"; exit 1} diff --git a/automation/scripts/qemu-smoke-dom0-arm32.sh b/automation/scrip= ts/qemu-smoke-dom0-arm32.sh index fd64b19358ae..7c282eff3a58 100755 --- a/automation/scripts/qemu-smoke-dom0-arm32.sh +++ b/automation/scripts/qemu-smoke-dom0-arm32.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -ex +set -ex -o pipefail serial_log=3D"$(pwd)/smoke.serial" @@ -77,7 +77,6 @@ git clone --depth 1 https://gitlab.com/xen-project/imageb= uilder.git bash imagebuilder/scripts/uboot-script-gen -t tftp -d . -c config rm -f ${serial_log} -set +e export QEMU_CMD=3D"./qemu-system-arm \ -machine virt \ -machine virtualization=3Dtrue \ diff --git a/automation/scripts/qemu-smoke-dom0-arm64.sh b/automation/scrip= ts/qemu-smoke-dom0-arm64.sh index e0cea742b0a0..81f210f7f50e 100755 --- a/automation/scripts/qemu-smoke-dom0-arm64.sh +++ b/automation/scripts/qemu-smoke-dom0-arm64.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -ex +set -ex -o pipefail # DomU Busybox cd binaries @@ -93,7 +93,6 @@ bash imagebuilder/scripts/uboot-script-gen -t tftp -d bin= aries/ -c binaries/conf # Run the test rm -f smoke.serial -set +e export QEMU_CMD=3D"./binaries/qemu-system-aarch64 \ -machine virtualization=3Dtrue \ -cpu cortex-a57 -machine type=3Dvirt \ diff --git a/automation/scripts/qemu-smoke-dom0less-arm32.sh b/automation/s= cripts/qemu-smoke-dom0less-arm32.sh index e824cb7c2a3d..38e8a0b0bd7d 100755 --- a/automation/scripts/qemu-smoke-dom0less-arm32.sh +++ b/automation/scripts/qemu-smoke-dom0less-arm32.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -ex +set -ex -o pipefail test_variant=3D$1 @@ -130,7 +130,6 @@ bash imagebuilder/scripts/uboot-script-gen -t tftp -d .= -c config # Run the test rm -f ${serial_log} -set +e export QEMU_CMD=3D"./qemu-system-arm \ -machine virt \ -machine virtualization=3Dtrue \ diff --git a/automation/scripts/qemu-smoke-dom0less-arm64.sh b/automation/s= cripts/qemu-smoke-dom0less-arm64.sh index f42ba5d196bc..ea67650e17da 100755 --- a/automation/scripts/qemu-smoke-dom0less-arm64.sh +++ b/automation/scripts/qemu-smoke-dom0less-arm64.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -ex +set -ex -o pipefail test_variant=3D$1 @@ -204,7 +204,6 @@ bash imagebuilder/scripts/uboot-script-gen -t tftp -d b= inaries/ -c binaries/conf # Run the test rm -f smoke.serial -set +e export QEMU_CMD=3D"./binaries/qemu-system-aarch64 \ -machine virtualization=3Dtrue \ -cpu cortex-a57 -machine type=3Dvirt,gic-version=3D$gic_version \ diff --git a/automation/scripts/qemu-smoke-ppc64le.sh b/automation/scripts/= qemu-smoke-ppc64le.sh index 594f92c19cc2..49e189c37058 100755 --- a/automation/scripts/qemu-smoke-ppc64le.sh +++ b/automation/scripts/qemu-smoke-ppc64le.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -ex +set -ex -o pipefail serial_log=3D"$(pwd)/smoke.serial" @@ -9,7 +9,6 @@ machine=3D$1 # Run the test rm -f ${serial_log} -set +e export QEMU_CMD=3D"qemu-system-ppc64 \ -bios skiboot.lid \ diff --git a/automation/scripts/qemu-smoke-riscv64.sh b/automation/scripts/= qemu-smoke-riscv64.sh index c2595f657ff3..422ee03e0d26 100755 --- a/automation/scripts/qemu-smoke-riscv64.sh +++ b/automation/scripts/qemu-smoke-riscv64.sh @@ -1,10 +1,9 @@ #!/bin/bash -set -ex +set -ex -o pipefail # Run the test rm -f smoke.serial -set +e export QEMU_CMD=3D"qemu-system-riscv64 \ -M virt \ diff --git a/automation/scripts/qemu-smoke-x86-64.sh b/automation/scripts/q= emu-smoke-x86-64.sh index 3440b1761db4..7495185d9fc6 100755 --- a/automation/scripts/qemu-smoke-x86-64.sh +++ b/automation/scripts/qemu-smoke-x86-64.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -ex +set -ex -o pipefail # variant should be either pv or pvh variant=3D$1 @@ -15,7 +15,6 @@ case $variant in esac rm -f smoke.serial -set +e export QEMU_CMD=3D"qemu-system-x86_64 -nographic -kernel binaries/xen \ -initrd xtf/tests/example/$k \ -append \"loglvl=3Dall console=3Dcom1 noreboot console_timestamps= =3Dboot $extra\" \ diff --git a/automation/scripts/qemu-xtf-dom0less-arm64.sh b/automation/scr= ipts/qemu-xtf-dom0less-arm64.sh index 4042fe50602b..acef1637e25b 100755 --- a/automation/scripts/qemu-xtf-dom0less-arm64.sh +++ b/automation/scripts/qemu-xtf-dom0less-arm64.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -ex +set -ex -o pipefail # Name of the XTF test xtf_test=3D$1 @@ -50,7 +50,6 @@ bash imagebuilder/scripts/uboot-script-gen -t tftp -d bin= aries/ -c binaries/conf # Run the test rm -f smoke.serial -set +e export QEMU_CMD=3D"./binaries/qemu-system-aarch64 \ -machine virtualization=3Dtrue \ -cpu cortex-a57 -machine type=3Dvirt \ -- 2.25.1 From nobody Sun Nov 24 02:09:13 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1724970928; cv=pass; d=zohomail.com; s=zohoarc; b=m9xSG3iMLPl2GlzWQ5Rym6RLF9VbRJXcTmh8TMSqjRHdIXvMERSzBi4ZoceUW7g62vv+eqiib++036RC6GIs8jH7gmN4Aps7ACJJQYqASDSdm9DdM/A5ZfXnvpZG55bjCfICFBc8/N0IHzOT3AvwX5qX0qV6s9D9VwYDK8KDPZQ= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1724970928; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=bDjxXa+T088VquLWdlKJWLM1PWaU1rdeMmmnf3wCXPE=; b=X2KXRobH2nGVrh1c30W/CF13t11zhVxTS3C+okkyRJIBirhJ45aidxefWG9S7laMWoLYxEemKtMteS7BMBnEgBMlVZ9ADwQWWIPPXyLIw5xjm4UJjRU/YH9ksMP5Mcl/AZREBdhBPvbvu39PhMhPyW0dcTzqQUqWrppMcVd3YoQ= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1724970928364459.3213708427975; Thu, 29 Aug 2024 15:35:28 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.786137.1195688 (Exim 4.92) (envelope-from ) id 1sjnjM-0003LJ-Gu; Thu, 29 Aug 2024 22:35:04 +0000 Received: by outflank-mailman (output) from mailman id 786137.1195688; Thu, 29 Aug 2024 22:35:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sjnjM-0003L8-E2; Thu, 29 Aug 2024 22:35:04 +0000 Received: by outflank-mailman (input) for mailman id 786137; Thu, 29 Aug 2024 22:35:02 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sjnjK-000330-Pl for xen-devel@lists.xenproject.org; Thu, 29 Aug 2024 22:35:02 +0000 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2061a.outbound.protection.outlook.com [2a01:111:f400:7e88::61a]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id ec89af0e-6656-11ef-99a0-01e77a169b0f; Fri, 30 Aug 2024 00:35:00 +0200 (CEST) Received: from CH2PR03CA0012.namprd03.prod.outlook.com (2603:10b6:610:59::22) by CY8PR12MB7585.namprd12.prod.outlook.com (2603:10b6:930:98::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.20; Thu, 29 Aug 2024 22:34:54 +0000 Received: from DS3PEPF0000C381.namprd04.prod.outlook.com (2603:10b6:610:59:cafe::4c) by CH2PR03CA0012.outlook.office365.com (2603:10b6:610:59::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.28 via Frontend Transport; Thu, 29 Aug 2024 22:34:54 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by DS3PEPF0000C381.mail.protection.outlook.com (10.167.23.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7918.13 via Frontend Transport; Thu, 29 Aug 2024 22:34:54 +0000 Received: from SATLEXMB06.amd.com (10.181.40.147) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 29 Aug 2024 17:34:52 -0500 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB06.amd.com (10.181.40.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 29 Aug 2024 17:34:52 -0500 Received: from xsjwoods50.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 29 Aug 2024 17:34:52 -0500 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: ec89af0e-6656-11ef-99a0-01e77a169b0f ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=kCIclsFLjbTirbjJWJ5DddrjPvcqAim+fjSUpHWaIEph1aBvTwz9Lk0SeijnaDpRTQZ0ZHqZ0o2Vcnc2P9D2d2fPHWCi0sco7dB/HLj8UxwTxy9NsLAfHZZtg5YP7hgDI3txqVl73wW0BjG+EYXpzyyB/6NMNZhNUx7ixPoXdqGuKsXUr5WnhFw+dN0YHIGook70QD00FGMVbSoWWO3x5iNybKWO/4f0IP+eueVaAIdC9WIiioB0LBxmDXil49x4vOuKi3yHhQqNUO3d1kty2xZJ2NvfP6XrV8lk3twIcH8GEEvxJ86bcSHIrHCWxigOmJDhqGPStyTWc4P5z+fU+A== 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=bDjxXa+T088VquLWdlKJWLM1PWaU1rdeMmmnf3wCXPE=; b=D5b/UW8TX50rgXG4ZbjUQYD2fWb3E/Vm/9R9LRnGprbTT6GgJoXlYOuu2WbtONvS5GiiP9xXB4Wi8X/vm9RI9EWvivtR89T8Cg+4XWQEkDYifC8UY++HMkb4zn9qwj2ZJblg4UqzflF0j7vqpqtxHHJB4OP8Iflal8P2Kv4/0TPgRdLByhPhp4ccYqoebcZnMXB5cYrlFs9g0ZLrLr21glYJbFsIn6w/pQewgf0qBFFu4Ay9oDQgCjX1t7PNApgEYQiQ0KSHj0vYwRIyoCIAwXvuZCGbKdjcI8srtmM+qMQPAUw/uL9I0xmp2SABpso3QNlZSl6yE4+uxQshx1R/YQ== 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bDjxXa+T088VquLWdlKJWLM1PWaU1rdeMmmnf3wCXPE=; b=wwKbc2GP0FYCbZch/IIGkzuoMDDDDGLG/rOPfGbauIUsp8iC9LIgTIq8hJqQ5OMEeLId9dyODog76GJAdaDpM44y68AYDdQKc8vC6oC3i0MX7vbBxPyijkcn1+Go1bQhiNxKFJnUoboqAZ26tNU7su8Oe5tkcHaKkXR5qt8QTHQ= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C From: To: CC: Victor Lira , Andrew Cooper , Jan Beulich , Julien Grall , Stefano Stabellini , Michal Orzel Subject: [PATCH v2 2/2] automation: use expect utility in xilinx tests Date: Thu, 29 Aug 2024 15:34:23 -0700 Message-ID: <5bbea0bbf22b409dd047b93e2e8cebcab61d14d5.1724967614.git.victorm.lira@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF0000C381:EE_|CY8PR12MB7585:EE_ X-MS-Office365-Filtering-Correlation-Id: d31913c4-1328-4e11-e12b-08dcc87acdc2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|36860700013|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?6gpoesJPAOSU2TdUqG7pTCKAfqwmZL5MMGb2JvNPtqGkxfVXhGhfyhKNHmWS?= =?us-ascii?Q?1QPMIgS36ACGuMIM4LDu38TDxF3EXQiuq3RwBVw1GNkxafJwFM/XXqNRULIs?= =?us-ascii?Q?VziFpfffQBZn5+8Cx5brgqA1jeCgPQJDIYrwzw5/CEACRBhEFHJ2r93QD9Cj?= =?us-ascii?Q?0eT2N5IsmAgAuZaQRU4lRvwDyw21GYCMcDHtDtcpiKKHOmsbuHf6YAVmq3/R?= =?us-ascii?Q?LvQ2HqDdPB3j9PSS3YphSvJ7DhvsiurM8qjJvsaybsjMJm2EObS7cjIsoIu8?= =?us-ascii?Q?ljB3mhPVMitTxu89SBWgpH775dsNCqzgaEPkYGeoKKnzT044DKMUWXMgyL2j?= =?us-ascii?Q?BLYqh8PfqZXetPriQ8LYZR/sO6YmzX1RNu/hosDuKJqRGIL6NsoiLIQMKU6H?= =?us-ascii?Q?Tfvt3RUT2hAmbP5oT+L/zv8zq8aWNZSvfUdqbjVzm+slkEj0DkPwVhp4XXAx?= =?us-ascii?Q?x0LLDLmioE5g3Hh3ecXBrgAb6m0vAAQkP2LgpGhg4LE2fgGFGXKCQ/TaR47c?= =?us-ascii?Q?9wlGN/g11MPfHuPNHkiiJnF+8s9RepIrCQlB+2FOlU7Yl3Re2VsZa5iGJLoe?= =?us-ascii?Q?JUrsONaZT+JMRviuSZuu7jmYCaorTT8o6rX8gYRhzAlrdyECtlUR5516+bNY?= =?us-ascii?Q?thfBJR717UQqM6jBbNYaQJ9s2Lqs/6pE/83aLp40wnYWuZg12gtYoN/MA1Ur?= =?us-ascii?Q?zF44gLsc2O9gKajsM8dSrtmlOPOp0/xyLySMCiVFMs7/pIwRhQ7/e6Xk7Cex?= =?us-ascii?Q?vI8R5fYCm31IJqma7E7PGepOsBjX3l/bS1+PPYv78kJKpUV8pZihe5b4rp2A?= =?us-ascii?Q?UQHeVQh0tqu29aAmsjD26SUtQPCgvm+dZl818tFWoqaAjhBTOyfvPMkxk4ue?= =?us-ascii?Q?b3eWQMpYkXg5RQoAGlNvRSCqATNbS254K7jNJAINmIdi+rvkJGexS/2KeXMB?= =?us-ascii?Q?fQX899aeclkY3oetD9RomORcfI2Km72LDk0bOZeE5P5qzx+KKUoGRcCU/DGp?= =?us-ascii?Q?IlupV8yxqxHYWDrDpSdZLebxHxcbl0yYNKHTon51JBLQrE8wxVPp2IH0ZGRM?= =?us-ascii?Q?BUJkVUfRPaRaqKXf4DID8QC8dwDV0d14H6EpkicGRGgXUgIQxSNssTQRXX5N?= =?us-ascii?Q?6ghMpCRRHRuVXvLc2ICgPmxQRiBL5Sj6ci5Sbj6Oh32jiPzRzE0hThtsaUuW?= =?us-ascii?Q?uLPrx6Ajuc0tNe2aICzax5UAsxOF3R+VLDPRzaJbtB4q47zTOA4XB6JLOoz/?= =?us-ascii?Q?tjqC6G7XkPV81nGFdTm4bOE4oZdW3fjPdhSX65YM5DQzuHHKNY9XsQEexbro?= =?us-ascii?Q?CWKriEy3BvasgICWyT8OirENA9Czu9EEDxosXtSNLL3oQPaG+8fCKvlUs+bT?= =?us-ascii?Q?uqcWGHPFIt2I5pjGgNiJUFeZ4K0+8PIL3G5p4Mr7VtAFh2Jtmg=3D=3D?= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(36860700013)(376014)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2024 22:34:54.0465 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d31913c4-1328-4e11-e12b-08dcc87acdc2 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS3PEPF0000C381.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7585 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1724970930354116600 Content-Type: text/plain; charset="utf-8" From: Victor Lira Fixes: 95764a0817a5 (automation: update xilinx test scripts (tty)) This patch introduced a CI failure due to a timeout in xilinx-x86_64 test. Change xilinx-x86_64 and xilinx-arm64 scripts to use "expect" utility to determine test result and allow early exit from tests. Add "expect" to xilinx container environment (dockerfile). Rename references to "QEMU" in "qemu-key.exp" expect script to "TEST" to be used by both QEMU and hardware tests. Signed-off-by: Victor Lira Reviewed-by: Stefano Stabellini --- Cc: Andrew Cooper Cc: Jan Beulich Cc: Julien Grall Cc: Stefano Stabellini Cc: Michal Orzel Cc: xen-devel@lists.xenproject.org --- .../build/ubuntu/xenial-xilinx.dockerfile | 1 + automation/gitlab-ci/test.yaml | 2 ++ .../scripts/{qemu-key.exp =3D> console.exp} | 8 +++---- automation/scripts/qemu-alpine-x86_64.sh | 6 ++--- automation/scripts/qemu-smoke-dom0-arm32.sh | 6 ++--- automation/scripts/qemu-smoke-dom0-arm64.sh | 6 ++--- .../scripts/qemu-smoke-dom0less-arm32.sh | 6 ++--- .../scripts/qemu-smoke-dom0less-arm64.sh | 6 ++--- automation/scripts/qemu-smoke-ppc64le.sh | 6 ++--- automation/scripts/qemu-smoke-riscv64.sh | 6 ++--- automation/scripts/qemu-smoke-x86-64.sh | 6 ++--- automation/scripts/qemu-xtf-dom0less-arm64.sh | 6 ++--- .../scripts/xilinx-smoke-dom0-x86_64.sh | 22 +++++++++---------- .../scripts/xilinx-smoke-dom0less-arm64.sh | 19 ++++++++-------- 14 files changed, 54 insertions(+), 52 deletions(-) rename automation/scripts/{qemu-key.exp =3D> console.exp} (83%) diff --git a/automation/build/ubuntu/xenial-xilinx.dockerfile b/automation/= build/ubuntu/xenial-xilinx.dockerfile index f03d62e8bd3f..6107d8b7711f 100644 --- a/automation/build/ubuntu/xenial-xilinx.dockerfile +++ b/automation/build/ubuntu/xenial-xilinx.dockerfile @@ -20,6 +20,7 @@ RUN apt-get update && \ git \ gzip \ file \ + expect \ && \ apt-get autoremove -y && \ apt-get clean && \ diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index 3b339f387fbe..e3ebe3745994 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -84,6 +84,7 @@ variables: CONTAINER: ubuntu:xenial-xilinx LOGFILE: qemu-smoke-xilinx.log + TEST_TIMEOUT: 120 artifacts: paths: - smoke.serial @@ -103,6 +104,7 @@ LOGFILE: xilinx-smoke-x86_64.log XEN_CMD_CONSOLE: "console=3Dcom2 com2=3D115200,8n1,0x2F8,4" TEST_BOARD: "crater" + TEST_TIMEOUT: 500 artifacts: paths: - smoke.serial diff --git a/automation/scripts/qemu-key.exp b/automation/scripts/console.e= xp similarity index 83% rename from automation/scripts/qemu-key.exp rename to automation/scripts/console.exp index 66c416483146..f538aa6bd06c 100755 --- a/automation/scripts/qemu-key.exp +++ b/automation/scripts/console.exp @@ -1,16 +1,16 @@ #!/usr/bin/expect -f -if {[info exists env(QEMU_TIMEOUT)]} { - set timeout $env(QEMU_TIMEOUT) +if {[info exists env(TEST_TIMEOUT)]} { + set timeout $env(TEST_TIMEOUT) } else { set timeout 1500 } -log_file -a $env(QEMU_LOG) +log_file -a $env(TEST_LOG) match_max 10000 -eval spawn $env(QEMU_CMD) +eval spawn $env(TEST_CMD) expect_after { -re "(.*)\r" { diff --git a/automation/scripts/qemu-alpine-x86_64.sh b/automation/scripts/= qemu-alpine-x86_64.sh index 93914c41bc24..1ff689b577e3 100755 --- a/automation/scripts/qemu-alpine-x86_64.sh +++ b/automation/scripts/qemu-alpine-x86_64.sh @@ -76,7 +76,7 @@ EOF # Run the test rm -f smoke.serial -export QEMU_CMD=3D"qemu-system-x86_64 \ +export TEST_CMD=3D"qemu-system-x86_64 \ -cpu qemu64,+svm \ -m 2G -smp 2 \ -monitor none -serial stdio \ @@ -84,8 +84,8 @@ export QEMU_CMD=3D"qemu-system-x86_64 \ -device virtio-net-pci,netdev=3Dn0 \ -netdev user,id=3Dn0,tftp=3Dbinaries,bootfile=3D/pxelinux.0" -export QEMU_LOG=3D"smoke.serial" +export TEST_LOG=3D"smoke.serial" export LOG_MSG=3D"Domain-0" export PASSED=3D"BusyBox" -./automation/scripts/qemu-key.exp | sed 's/\r\+$//' +./automation/scripts/console.exp | sed 's/\r\+$//' diff --git a/automation/scripts/qemu-smoke-dom0-arm32.sh b/automation/scrip= ts/qemu-smoke-dom0-arm32.sh index 7c282eff3a58..e1cd83880928 100755 --- a/automation/scripts/qemu-smoke-dom0-arm32.sh +++ b/automation/scripts/qemu-smoke-dom0-arm32.sh @@ -77,7 +77,7 @@ git clone --depth 1 https://gitlab.com/xen-project/imageb= uilder.git bash imagebuilder/scripts/uboot-script-gen -t tftp -d . -c config rm -f ${serial_log} -export QEMU_CMD=3D"./qemu-system-arm \ +export TEST_CMD=3D"./qemu-system-arm \ -machine virt \ -machine virtualization=3Dtrue \ -smp 4 \ @@ -91,8 +91,8 @@ export QEMU_CMD=3D"./qemu-system-arm \ -bios /usr/lib/u-boot/qemu_arm/u-boot.bin" export UBOOT_CMD=3D"virtio scan; dhcp; tftpb 0x40000000 boot.scr; source 0= x40000000" -export QEMU_LOG=3D"${serial_log}" +export TEST_LOG=3D"${serial_log}" export LOG_MSG=3D"Domain-0" export PASSED=3D"/ #" -../automation/scripts/qemu-key.exp | sed 's/\r\+$//' +../automation/scripts/console.exp | sed 's/\r\+$//' diff --git a/automation/scripts/qemu-smoke-dom0-arm64.sh b/automation/scrip= ts/qemu-smoke-dom0-arm64.sh index 81f210f7f50e..4d22a124df11 100755 --- a/automation/scripts/qemu-smoke-dom0-arm64.sh +++ b/automation/scripts/qemu-smoke-dom0-arm64.sh @@ -93,7 +93,7 @@ bash imagebuilder/scripts/uboot-script-gen -t tftp -d bin= aries/ -c binaries/conf # Run the test rm -f smoke.serial -export QEMU_CMD=3D"./binaries/qemu-system-aarch64 \ +export TEST_CMD=3D"./binaries/qemu-system-aarch64 \ -machine virtualization=3Dtrue \ -cpu cortex-a57 -machine type=3Dvirt \ -m 2048 -monitor none -serial stdio \ @@ -104,8 +104,8 @@ export QEMU_CMD=3D"./binaries/qemu-system-aarch64 \ -bios /usr/lib/u-boot/qemu_arm64/u-boot.bin" export UBOOT_CMD=3D"virtio scan; dhcp; tftpb 0x40000000 boot.scr; source 0= x40000000" -export QEMU_LOG=3D"smoke.serial" +export TEST_LOG=3D"smoke.serial" export LOG_MSG=3D"Domain-0" export PASSED=3D"BusyBox" -./automation/scripts/qemu-key.exp | sed 's/\r\+$//' +./automation/scripts/console.exp | sed 's/\r\+$//' diff --git a/automation/scripts/qemu-smoke-dom0less-arm32.sh b/automation/s= cripts/qemu-smoke-dom0less-arm32.sh index 38e8a0b0bd7d..41f6e5d8e615 100755 --- a/automation/scripts/qemu-smoke-dom0less-arm32.sh +++ b/automation/scripts/qemu-smoke-dom0less-arm32.sh @@ -130,7 +130,7 @@ bash imagebuilder/scripts/uboot-script-gen -t tftp -d .= -c config # Run the test rm -f ${serial_log} -export QEMU_CMD=3D"./qemu-system-arm \ +export TEST_CMD=3D"./qemu-system-arm \ -machine virt \ -machine virtualization=3Dtrue \ -smp 4 \ @@ -144,8 +144,8 @@ export QEMU_CMD=3D"./qemu-system-arm \ -bios /usr/lib/u-boot/qemu_arm/u-boot.bin" export UBOOT_CMD=3D"virtio scan; dhcp; tftpb 0x40000000 boot.scr; source 0= x40000000" -export QEMU_LOG=3D"${serial_log}" +export TEST_LOG=3D"${serial_log}" export LOG_MSG=3D"${dom0_prompt}" export PASSED=3D"${passed}" -../automation/scripts/qemu-key.exp | sed 's/\r\+$//' +../automation/scripts/console.exp | sed 's/\r\+$//' diff --git a/automation/scripts/qemu-smoke-dom0less-arm64.sh b/automation/s= cripts/qemu-smoke-dom0less-arm64.sh index ea67650e17da..83e1866ca6c5 100755 --- a/automation/scripts/qemu-smoke-dom0less-arm64.sh +++ b/automation/scripts/qemu-smoke-dom0less-arm64.sh @@ -204,7 +204,7 @@ bash imagebuilder/scripts/uboot-script-gen -t tftp -d b= inaries/ -c binaries/conf # Run the test rm -f smoke.serial -export QEMU_CMD=3D"./binaries/qemu-system-aarch64 \ +export TEST_CMD=3D"./binaries/qemu-system-aarch64 \ -machine virtualization=3Dtrue \ -cpu cortex-a57 -machine type=3Dvirt,gic-version=3D$gic_version \ -m 2048 -monitor none -serial stdio \ @@ -215,8 +215,8 @@ export QEMU_CMD=3D"./binaries/qemu-system-aarch64 \ -bios /usr/lib/u-boot/qemu_arm64/u-boot.bin" export UBOOT_CMD=3D"virtio scan; dhcp; tftpb 0x40000000 boot.scr; source 0= x40000000" -export QEMU_LOG=3D"smoke.serial" +export TEST_LOG=3D"smoke.serial" export LOG_MSG=3D"Welcome to Alpine Linux" export PASSED=3D"${passed}" -./automation/scripts/qemu-key.exp | sed 's/\r\+$//' +./automation/scripts/console.exp | sed 's/\r\+$//' diff --git a/automation/scripts/qemu-smoke-ppc64le.sh b/automation/scripts/= qemu-smoke-ppc64le.sh index 49e189c37058..617096ad1fa8 100755 --- a/automation/scripts/qemu-smoke-ppc64le.sh +++ b/automation/scripts/qemu-smoke-ppc64le.sh @@ -10,7 +10,7 @@ machine=3D$1 # Run the test rm -f ${serial_log} -export QEMU_CMD=3D"qemu-system-ppc64 \ +export TEST_CMD=3D"qemu-system-ppc64 \ -bios skiboot.lid \ -M $machine \ -m 2g \ @@ -21,7 +21,7 @@ export QEMU_CMD=3D"qemu-system-ppc64 \ -serial stdio \ -kernel binaries/xen" -export QEMU_LOG=3D"${serial_log}" +export TEST_LOG=3D"${serial_log}" export PASSED=3D"Hello, ppc64le!" -./automation/scripts/qemu-key.exp | sed 's/\r\+$//' +./automation/scripts/console.exp | sed 's/\r\+$//' diff --git a/automation/scripts/qemu-smoke-riscv64.sh b/automation/scripts/= qemu-smoke-riscv64.sh index 422ee03e0d26..8f755d0a6a99 100755 --- a/automation/scripts/qemu-smoke-riscv64.sh +++ b/automation/scripts/qemu-smoke-riscv64.sh @@ -5,14 +5,14 @@ set -ex -o pipefail # Run the test rm -f smoke.serial -export QEMU_CMD=3D"qemu-system-riscv64 \ +export TEST_CMD=3D"qemu-system-riscv64 \ -M virt \ -smp 1 \ -nographic \ -m 2g \ -kernel binaries/xen" -export QEMU_LOG=3D"smoke.serial" +export TEST_LOG=3D"smoke.serial" export PASSED=3D"All set up" -./automation/scripts/qemu-key.exp | sed 's/\r\+$//' +./automation/scripts/console.exp | sed 's/\r\+$//' diff --git a/automation/scripts/qemu-smoke-x86-64.sh b/automation/scripts/q= emu-smoke-x86-64.sh index 7495185d9fc6..da0c26cc2f82 100755 --- a/automation/scripts/qemu-smoke-x86-64.sh +++ b/automation/scripts/qemu-smoke-x86-64.sh @@ -15,12 +15,12 @@ case $variant in esac rm -f smoke.serial -export QEMU_CMD=3D"qemu-system-x86_64 -nographic -kernel binaries/xen \ +export TEST_CMD=3D"qemu-system-x86_64 -nographic -kernel binaries/xen \ -initrd xtf/tests/example/$k \ -append \"loglvl=3Dall console=3Dcom1 noreboot console_timestamps= =3Dboot $extra\" \ -m 512 -monitor none -serial stdio" -export QEMU_LOG=3D"smoke.serial" +export TEST_LOG=3D"smoke.serial" export PASSED=3D"Test result: SUCCESS" -./automation/scripts/qemu-key.exp | sed 's/\r\+$//' +./automation/scripts/console.exp | sed 's/\r\+$//' diff --git a/automation/scripts/qemu-xtf-dom0less-arm64.sh b/automation/scr= ipts/qemu-xtf-dom0less-arm64.sh index acef1637e25b..9608de6ec033 100755 --- a/automation/scripts/qemu-xtf-dom0less-arm64.sh +++ b/automation/scripts/qemu-xtf-dom0less-arm64.sh @@ -50,7 +50,7 @@ bash imagebuilder/scripts/uboot-script-gen -t tftp -d bin= aries/ -c binaries/conf # Run the test rm -f smoke.serial -export QEMU_CMD=3D"./binaries/qemu-system-aarch64 \ +export TEST_CMD=3D"./binaries/qemu-system-aarch64 \ -machine virtualization=3Dtrue \ -cpu cortex-a57 -machine type=3Dvirt \ -m 2048 -monitor none -serial stdio \ @@ -61,7 +61,7 @@ export QEMU_CMD=3D"./binaries/qemu-system-aarch64 \ -bios /usr/lib/u-boot/qemu_arm64/u-boot.bin" export UBOOT_CMD=3D"virtio scan; dhcp; tftpb 0x40000000 boot.scr; source 0= x40000000" -export QEMU_LOG=3D"smoke.serial" +export TEST_LOG=3D"smoke.serial" export PASSED=3D"${passed}" -./automation/scripts/qemu-key.exp | sed 's/\r\+$//' +./automation/scripts/console.exp | sed 's/\r\+$//' diff --git a/automation/scripts/xilinx-smoke-dom0-x86_64.sh b/automation/sc= ripts/xilinx-smoke-dom0-x86_64.sh index 4559e2b9ee1f..ef6e1361a95c 100755 --- a/automation/scripts/xilinx-smoke-dom0-x86_64.sh +++ b/automation/scripts/xilinx-smoke-dom0-x86_64.sh @@ -1,8 +1,8 @@ -#!/bin/sh +#!/usr/bin/env bash # Run x86_64 dom0 tests on hardware. -set -ex +set -ex -o pipefail fatal() { echo "$(basename "$0") $*" >&2 @@ -27,7 +27,6 @@ memory =3D 512 vif =3D [ "bridge=3Dxenbr0", ] disk =3D [ ] ' -TIMEOUT_SECONDS=3D200 # Select test variant. if [ "${TEST}" =3D "ping" ]; then @@ -125,20 +124,19 @@ boot # Power cycle board and collect serial port output. SERIAL_DEV=3D"/dev/serial/${TEST_BOARD}" -SERIAL_CMD=3D"cat ${SERIAL_DEV} | tee smoke.serial | sed 's/\r//'" sh /scratch/gitlab-runner/${TEST_BOARD}.sh 2 sleep 5 sh /scratch/gitlab-runner/${TEST_BOARD}.sh 1 sleep 5 set +e stty -F ${SERIAL_DEV} 115200 -timeout -k 1 ${TIMEOUT_SECONDS} nohup sh -c "${SERIAL_CMD}" -sh /scratch/gitlab-runner/${TEST_BOARD}.sh 2 - -set -e -if grep -q "${PASS_MSG}" smoke.serial; then - exit 0 -fi +# Capture test result and power off board before exiting. +export PASSED=3D"${PASS_MSG}" +export TEST_CMD=3D"cat ${SERIAL_DEV}" +export TEST_LOG=3D"smoke.serial" -fatal "Test failed" +./automation/scripts/console.exp | sed 's/\r\+$//' +TEST_RESULT=3D$? +sh "/scratch/gitlab-runner/${TEST_BOARD}.sh" 2 +exit ${TEST_RESULT} diff --git a/automation/scripts/xilinx-smoke-dom0less-arm64.sh b/automation= /scripts/xilinx-smoke-dom0less-arm64.sh index 18aa07f0a273..b24ad11b8cac 100755 --- a/automation/scripts/xilinx-smoke-dom0less-arm64.sh +++ b/automation/scripts/xilinx-smoke-dom0less-arm64.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -ex +set -ex -o pipefail test_variant=3D$1 @@ -137,13 +137,14 @@ cd $START SERIAL_DEV=3D"/dev/serial/zynq" set +e 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 -bash zcu102.sh 2 -cd $START +# Capture test result and power off board before exiting. +export PASSED=3D"${passed}" +export LOG_MSG=3D"Welcome to Alpine Linux" +export TEST_CMD=3D"cat ${SERIAL_DEV}" +export TEST_LOG=3D"smoke.serial" -set -e -(grep -q "^Welcome to Alpine Linux" smoke.serial && grep -q "${passed}" sm= oke.serial) || exit 1 -exit 0 +./automation/scripts/console.exp | sed 's/\r\+$//' +TEST_RESULT=3D$? +sh "/scratch/gitlab-runner/zcu102.sh" 2 +exit ${TEST_RESULT} -- 2.25.1