From patchwork Tue Jun 18 07:41:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 13701912 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD257C27C4F for ; Tue, 18 Jun 2024 07:42:11 +0000 (UTC) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (EUR05-VI1-obe.outbound.protection.outlook.com [40.107.21.71]) by mx.groups.io with SMTP id smtpd.web10.81128.1718696522045518839 for ; Tue, 18 Jun 2024 00:42:02 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@siemens.com header.s=selector2 header.b=fUrPdcaX; spf=pass (domain: siemens.com, ip: 40.107.21.71, mailfrom: jan.kiszka@siemens.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U71xuLpxYrz0afYLZKUfPygyVurJoSDtv5QzgRElKfZwrOlz6O8yD+hPw9xtqRhZYFetlAoqVHReG04AOSdXZ9CPnWbCFNwR6KSrOtNI0R4NGJidZcCraKfLsaInUx2sdvcEUcJVU0huwCLgZJVvvtLPxNa4m1loXRGdWdyPig8llrpnbu8XqXmIIBzdwt1JnpWB86iWvQbAks0bD/YMMDVzCQAIRG7WwgjZ+05evjOTAmGkbNQ9IbyssuxtBmX5rE6rz9SvBYGkjJgtSIKxgvoMmNd++A8N2enofOvAUnn/T314jhpXYN3Fy3WJ4W5ipzXJoE6ZaV7OS4dDZsf/dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=cXsAkJbUwHahDzx3XcPVBGQ/5AeXiFcgXfu1byhupOs=; b=fmR/GSodq8F+cFBGQCA6EVQs/SkVK190DJDbQYcpEKKZ/kvWSvzltzhd7LoKxBFO892adtv6YS+nK54hEsyisAGoP4uH6iaqhxHxpBpXOutIpz/HrMgoki32kOiz4kVE7mM5s5YC1iXK2Ikhsip3Wvcbiih6pA+GyvLBTjtDFU1vHshkbvKZFNJnQ7/i9NzJmX2BLKX6Vrz2tIipeVXbdHkJFpESlnmUrT7knJSFmv0/vI28JyUxHr7ZCkD+umsFkqN8ycFhdWiINA/hZkUDO6cub/RFnNy6Xxi1pn1w/WxRKwsLqbZoRvZLR01kH1Jdmw4IsLR03QLBCCg+qK6lxw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siemens.com; dmarc=pass action=none header.from=siemens.com; dkim=pass header.d=siemens.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=siemens.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cXsAkJbUwHahDzx3XcPVBGQ/5AeXiFcgXfu1byhupOs=; b=fUrPdcaXiMyZX1TYpbx3MYVbK55MuiW2GSh3nHUsytIi+acFMsGLtpD8Y6YD0Dm5bh43b+2YVAhZzWRXLZJ9h0YRaWpxKWBjcs7m25/nnydJV/B5spAGd9YsSskeNLYSL/8Fg7FDLJ8SFTiZSJc9hjQCt8FeURAyLRKb4ukgux7BJvpGs4nIo3dhdi/2xJsghdwdYVZIpZseL21vCrSu2ZLmeeYVc48/TeudDtKCfPkAPxP1SSGBECXvAw4mAYZCVGIyV6SXxivpBo8isMtTauL/fOHIL9KhpDtt6q7GkXdI3Gxh7JoiqnhUn1hO7P1Zml/c/Zwx++IdD20P/oqHeQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=siemens.com; Received: from AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:588::19) by DB9PR10MB6715.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:3d1::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.30; Tue, 18 Jun 2024 07:41:58 +0000 Received: from AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM ([fe80::8fe1:7e71:cf4a:7408]) by AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM ([fe80::8fe1:7e71:cf4a:7408%7]) with mapi id 15.20.7677.030; Tue, 18 Jun 2024 07:41:58 +0000 Message-ID: Date: Tue, 18 Jun 2024 09:41:56 +0200 User-Agent: Mozilla Thunderbird From: Jan Kiszka To: cip-dev Subject: [isar-cip-core][PATCH] scripts: Address shellcheck warnings in submit_lava.sh Content-Language: en-US Cc: Sai Sathujoda Autocrypt: addr=jan.kiszka@siemens.com; keydata= xsFNBGZY+hkBEACkdtFD81AUVtTVX+UEiUFs7ZQPQsdFpzVmr6R3D059f+lzr4Mlg6KKAcNZ uNUqthIkgLGWzKugodvkcCK8Wbyw+1vxcl4Lw56WezLsOTfu7oi7Z0vp1XkrLcM0tofTbClW xMA964mgUlBT2m/J/ybZd945D0wU57k/smGzDAxkpJgHBrYE/iJWcu46jkGZaLjK4xcMoBWB I6hW9Njxx3Ek0fpLO3876bszc8KjcHOulKreK+ezyJ01Hvbx85s68XWN6N2ulLGtk7E/sXlb 79hylHy5QuU9mZdsRjjRGJb0H9Buzfuz0XrcwOTMJq7e7fbN0QakjivAXsmXim+s5dlKlZjr L3ILWte4ah7cGgqc06nFb5jOhnGnZwnKJlpuod3pc/BFaFGtVHvyoRgxJ9tmDZnjzMfu8YrA +MVv6muwbHnEAeh/f8e9O+oeouqTBzgcaWTq81IyS56/UD6U5GHet9Pz1MB15nnzVcyZXIoC roIhgCUkcl+5m2Z9G56bkiUcFq0IcACzjcRPWvwA09ZbRHXAK/ao/+vP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IfDsqjB0r/q7WeJaI8NKfFwNOGPuo93N+WUyBi2yYCXMOgBUifm0 T6Hbf3SHQpbA56wcKPWJqAC2iFaxNDowcJij9LtEqOlToCMtDBekDwchRvqrWN1mDXLg+av8 qH4kDzsqKX8zzTzfAWFxrkXA/kFpR3JsMzNmvextkN2kOLCCHkym0zz5Y3vxaYtbXG2wTrqJ 8WpkWIE8STUhQa9AkezgucXN7r6uSrzW8IQXxBInZwFIyBgM0f/fzyNqzThFT15QMrYUqhhW ZffO4PeNJOUYfXdH13A6rbU0y6xE7Okuoa01EqNi9yqyLA8gPgg/DhOpGtK8KokCsdYsTbk= X-ClientProxiedBy: FR3P281CA0161.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a2::20) To AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:588::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4PR10MB6181:EE_|DB9PR10MB6715:EE_ X-MS-Office365-Filtering-Correlation-Id: bc66bc13-1e2e-43a3-9adf-08dc8f6a221b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|366013|376011|1800799021; X-Microsoft-Antispam-Message-Info: =?utf-8?q?UNWFFBIJrEkk/9bwHOXnUyHUKlwvF8T?= =?utf-8?q?vrOGky7Xg855aoDRC8dI0Ov6pNymneL2oRhseiul9VHP+4W6z/nB9voim8mhn8TwD?= =?utf-8?q?a9fjDdISktwACwx8MU9K8qsF4HVPunlPS0+/jK9jR1fsH+G1bnBGr396TukyboOR7?= =?utf-8?q?XD7HlIu12URMc9jWc4BZOYSLtSNa613Xod2d3HmY0EwFu3AvYpGOWXb1Yom4QDA6c?= =?utf-8?q?XBW33SXgxyz4NAWQshnWe7Nc7d5K0OSvnkJTegeq7AZ7/5sXqm42gcfWLfxou8Id+?= =?utf-8?q?1x/nHSiDuFc1gg69hwK+WTT91zyKVwGB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Jxz/+uPQr/ZhvJBY+V5?= =?utf-8?q?SNSg9TeGCPvamfhaUGJVctDMur7IUcP546HT+YsuDZapOLpaOOuZiKgvG3vjSNJyu?= =?utf-8?q?OEn3RY8vwdrRj?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230037)(366013)(376011)(1800799021);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?n+1AbpqKDBEYQIWhxA1MgWyku/bP?= =?utf-8?q?kq/luk+2Zben6WONi6VW94y6YSCm48fCox4dqg86Sw9HVBPD7rZt5LkuLxAliVgqq?= =?utf-8?q?j8U6N0oI4/5k92jDtTlqkrg7QxwXH5Hxwqusz2eiyCTTYqfhQWBd6v1156V9LCWuY?= =?utf-8?q?G+m/lHEldPr7mO2+GRYOFj118Cp4howR4Dj3j7qCVW+jM7WKMGdSEHFA1R9kgthdP?= =?utf-8?q?Xfgg80JTw4M+cfpwXsfl3YUrbEhWn/LvOJyvMT1IpqI1eN7HMuOGlpoJAkT9kxVF6?= =?utf-8?q?ePb5fllT0L0IrLMbukSrQ3b9bIxy4V4MpMXygAZDjYpwzBJQgopog8E0Go5cLKZyW?= =?utf-8?q?bJh/utfxKu1xK5tZY1+a8f++ER++XiTq9xo/FAKznvAHcWvDfTKXtPTuA0Z69O0yi?= =?utf-8?q?IymaP2wa6DutcwoF9mOO7bg2MHx8JjZjaQ+iLmjLOLV+bOLXWZUxQnEzgolTL89Uj?= =?utf-8?q?mu++mDnSqTZnM1EXhzM0Ha96f9icPlR+pwvhvWLJaJbFJY9YqFtdJa54wTPfHRtWI?= =?utf-8?q?7BSdJP5yTJsB8nRFrqzdJ9L/aYGiwUOxBVYqIk6Ey0fLSdwr5pDS2kvEiRz7lj7kb?= =?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q?1DH3lbfuo2A0AfxUuh6lRQl96RReeoSKPeGi49TrP5X5hA/zD09kM4krykpHTZe0q?= =?utf-8?q?kc2W10wvbNq2B3TRCJOiJQbr2koX8msGFQ=3D=3D?= X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-Network-Message-Id: bc66bc13-1e2e-43a3-9adf-08dc8f6a221b X-MS-Exchange-CrossTenant-AuthSource: AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jun 2024 07:41:58.2128 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TT744pDRwq/cPb/EtpGHpcx0gvdg7sVi6GpItr8xqmi3drwJPAxDfOeOHweR8b1PjhGe4v+h10N1/XyE7ZyExg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR10MB6715 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 18 Jun 2024 07:42:11 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/16279 From: Jan Kiszka No functional changes intended. Signed-off-by: Jan Kiszka --- scripts/submit_lava.sh | 69 +++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 38 deletions(-) diff --git a/scripts/submit_lava.sh b/scripts/submit_lava.sh index 9cf2c580..b2810e0c 100755 --- a/scripts/submit_lava.sh +++ b/scripts/submit_lava.sh @@ -54,13 +54,13 @@ add_firmware_artifacts () { # The created job definitions test SWUpdate, Secureboot and IEC layer create_job () { if [ "$1" = "IEC" ]; then - cp $LAVA_TEMPLATES/IEC_template.yml "${job_dir}"/${1}_${2}.yml + cp $LAVA_TEMPLATES/IEC_template.yml "${job_dir}/${1}_${2}.yml" elif [ "$1" = "swupdate" ]; then - cp $LAVA_TEMPLATES/swupdate_template.yml "${job_dir}"/${1}_${2}.yml + cp $LAVA_TEMPLATES/swupdate_template.yml "${job_dir}/${1}_${2}.yml" elif [ "$1" = "kernel-panic" ] || [ "$1" = "initramfs-crash" ]; then - cp $LAVA_TEMPLATES/swupdate_template.yml "${job_dir}"/"${1}".yml + cp $LAVA_TEMPLATES/swupdate_template.yml "${job_dir}/${1}.yml" sed -i "s@software update testing@${1}_rollback_testing@g" "${job_dir}"/*.yml sed -i "s@) = 2@) = 0@g" "${job_dir}"/*.yml if [ "$1" = "kernel-panic" ]; then @@ -71,7 +71,7 @@ create_job () { sed -i "s@echo software update is successful!!@dd if=/dev/urandom of=/dev/sda5 bs=512 count=1@g" "${job_dir}"/*.yml fi else - cp $LAVA_TEMPLATES/secureboot_template.yml "${job_dir}"/${1}_${2}.yml + cp $LAVA_TEMPLATES/secureboot_template.yml "${job_dir}/${1}_${2}.yml" fi if [ "$1" != "kernel-panic" ]; then @@ -79,7 +79,7 @@ create_job () { fi if [ "$2" != "qemu-amd64" ]; then - add_firmware_artifacts "${job_dir}"/*.yml $2 + add_firmware_artifacts "${job_dir}"/*.yml "$2" fi sed -i -e "s@#distribution#@${RELEASE}@g" -e "s@#project_url#@${PROJECT_URL}@g" "${job_dir}"/*.yml @@ -88,7 +88,7 @@ create_job () { # Target is recieved from gitlab job in form of qemu-"architecture" # In the template context field needs only architecture excepting the device type local arch - arch=$(echo ${2} | cut -d '-' -f 2) + arch=$(echo "$2" | cut -d '-' -f 2) sed -i "s@#context-architecture#@${arch}@g" "${job_dir}"/*.yml } @@ -117,7 +117,7 @@ submit_squad_watch_job(){ --header "Authorization: token $CIP_SQUAD_LAB_TOKEN" \ --form backend="$SQUAD_LAVA_BACKEND" \ --form testjob_id="$1" \ - --form metadata='{"device": "'${DEVICE}'", "CI pipeline": "'${CI_PIPELINE_URL}'", "CI job": "'${CI_JOB_URL}'"}' \ + --form metadata='{"device": "'"${DEVICE}"'", "CI pipeline": "'"${CI_PIPELINE_URL}"'", "CI job": "'"${CI_JOB_URL}"'"}' \ "$squad_url") if [[ $ret != [0-9]* ]] @@ -135,12 +135,13 @@ submit_squad_watch_job(){ # $1: Job definition file submit_job() { # First check if respective device is online - local job device ret status health device test + local job device ret device job=$1 device=$(grep device_type "$job" | cut -d ":" -f 2 | awk '{$1=$1};1') if is_device_online "$device"; then echo "Submitting $1 to LAVA master..." # Catch error that occurs if invalid yaml file is submitted + # shellcheck disable=2086 ret=$(lavacli $LAVACLI_ARGS jobs submit "$1") || error=true if [[ $ret != [0-9]* ]] @@ -151,38 +152,31 @@ submit_job() { echo "Job submitted successfully as #${ret}." local lavacli_output=${job_dir}/lavacli_output + # shellcheck disable=2086 lavacli $LAVACLI_ARGS jobs show "${ret}" \ > "$lavacli_output" - status=$(cat "$lavacli_output" \ - | grep "state" \ + STATUS=$(grep "state" "$lavacli_output" \ | cut -d ":" -f 2 \ | awk '{$1=$1};1') - STATUS=$status - health=$(cat "$lavacli_output" \ - | grep "Health" \ + HEALTH=$(grep "Health" "$lavacli_output" \ | cut -d ":" -f 2 \ | awk '{$1=$1};1') - HEALTH=$health - device=$(cat "$lavacli_output" \ - | grep "device :" \ + DEVICE=$(grep "device :" "$lavacli_output" \ | cut -d ":" -f 2 \ | awk '{$1=$1};1') - DEVICE=$device - test=$(cat "$lavacli_output" \ - | grep "description" \ + TESTING=$(grep "description" "$lavacli_output" \ | rev | cut -d "_" -f 1 | rev) - TESTING=$test - submit_squad_watch_job "${ret}" "${device}" + submit_squad_watch_job "${ret}" "${DEVICE}" - if ! check_status $ret; then + if ! check_status "$ret"; then ERROR=true fi - get_junit_test_results $ret + get_junit_test_results "$ret" fi else return 1 @@ -195,6 +189,7 @@ is_device_online () { local lavacli_output=${job_dir}/lavacli_output # Get list of all devices + # shellcheck disable=2086 lavacli $LAVACLI_ARGS devices list > "$lavacli_output" # Count the number of online devices @@ -213,6 +208,7 @@ is_device_online () { validate_jobs () { local ret=0 for JOB in "${job_dir}"/*.yml; do + # shellcheck disable=2086 if lavacli $LAVACLI_ARGS jobs validate "$JOB"; then echo "$JOB is a valid definition" if ! submit_job $JOB; then @@ -246,6 +242,7 @@ check_for_test_error () { # $1: LAVA job ID to show results for get_test_result () { if [ -n "${1}" ]; then + # shellcheck disable=2086 lavacli "$LAVACLI_ARGS" results "${1}" fi } @@ -287,7 +284,7 @@ print_summary () { } check_status () { - local end_time status health device now + local end_time status now if [ -n "$TEST_TIMEOUT" ]; then # Current time + timeout time end_time=$(date +%s -d "+ $TEST_TIMEOUT min") @@ -295,7 +292,7 @@ check_status () { local error=false - if [ ! -z $1 ]; then + if [ -n "$1" ]; then print_status "Current job status:" while true do @@ -303,31 +300,27 @@ check_status () { if [ "${STATUS}" != "Finished" ] then local lavacli_output=${job_dir}/lavacli_output + # shellcheck disable=2086 lavacli $LAVACLI_ARGS jobs show "$1" \ > "$lavacli_output" - status=$(cat "$lavacli_output" \ - | grep "state" \ + status=$(grep "state" "$lavacli_output" \ | cut -d ":" -f 2 \ | awk '{$1=$1};1') - health=$(cat "$lavacli_output" \ - | grep "Health" \ + HEALTH=$(grep "Health" "$lavacli_output" \ | cut -d ":" -f 2 \ | awk '{$1=$1};1') - HEALTH=$health - device=$(cat "$lavacli_output" \ - | grep "device :" \ + DEVICE=$(grep "device :" "$lavacli_output" \ | cut -d ":" -f 2 \ | awk '{$1=$1};1') - DEVICE=$device if [ "${STATUS}" != "$status" ]; then STATUS=$status # Something has changed - print_status "Current job status:" $1 + print_status "Current job status:" "$1" else STATUS=$status fi @@ -353,7 +346,7 @@ check_status () { if check_if_finished; then # Print job outcome - print_status "Final job status:" $1 + print_status "Final job status:" "$1" if check_for_test_error; then error=true @@ -365,7 +358,7 @@ check_status () { echo "---------------------" echo "Errors during testing" echo "---------------------" - print_summary $1 + print_summary "$1" clean_up return 1 fi @@ -373,12 +366,12 @@ check_status () { echo "-----------------------------------" echo "Submitted test is successful" echo "-----------------------------------" - print_summary $1 + print_summary "$1" return 0 } set_up -create_job $TEST $TARGET +create_job "$TEST" "$TARGET" if ! validate_jobs; then clean_up