From patchwork Tue Jun 18 16:10:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sai.Sathujoda@toshiba-tsip.com X-Patchwork-Id: 13702648 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 D5377C27C4F for ; Tue, 18 Jun 2024 16:10:44 +0000 (UTC) Received: from mo-csw.securemx.jp (mo-csw.securemx.jp [210.130.202.132]) by mx.groups.io with SMTP id smtpd.web10.90715.1718727043928441092 for ; Tue, 18 Jun 2024 09:10:44 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: toshiba-tsip.com, ip: 210.130.202.132, mailfrom: sai.sathujoda@toshiba-tsip.com) Received: by mo-csw.securemx.jp (mx-mo-csw1121) id 45IGAfCi2526398; Wed, 19 Jun 2024 01:10:42 +0900 X-Iguazu-Qid: 2rWhNMNedRGMflekgC X-Iguazu-QSIG: v=2; s=0; t=1718727041; q=2rWhNMNedRGMflekgC; m=9FvucWW0izBIGX1bJs+uWhaOBLGsYD7foRmV+hxuku4= Received: from imx12-a.toshiba.co.jp ([38.106.60.135]) by relay.securemx.jp (mx-mr1120) id 45IGAen0963220 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 19 Jun 2024 01:10:41 +0900 From: Sai.Sathujoda@toshiba-tsip.com To: cip-dev@lists.cip-project.org, jan.kiszka@siemens.com Cc: sai ashrith sathujoda , dinesh.kumar@toshiba-tsip.com, kazuhiro3.hayashi@toshiba.co.jp Subject: [isar-cip-core v1 1/3] templates/swupdate_template.yml: Fail the job immediately after unexpected outcome Date: Tue, 18 Jun 2024 21:40:33 +0530 X-TSB-HOP2: ON Message-Id: <20240618161035.1810237-2-Sai.Sathujoda@toshiba-tsip.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240618161035.1810237-1-Sai.Sathujoda@toshiba-tsip.com> References: <20240618161035.1810237-1-Sai.Sathujoda@toshiba-tsip.com> MIME-Version: 1.0 X-OriginalArrivalTime: 18 Jun 2024 16:10:34.0115 (UTC) FILETIME=[0C964530:01DAC19A] 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 16:10:44 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/16285 From: sai ashrith sathujoda Previously to make the job incomplete, a sleep command is added in the test job under the intention that it will cause a timeout error and make the job incomplete. Sometimes due to unknown circumstances the error cannot be caught using this method. This also increases the job time. To avoid this, "lava-test-raise " can be used to immediately fail the job as soon as unexpected outcome occurs. Signed-off-by: sai ashrith sathujoda --- tests/templates/swupdate_template.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/templates/swupdate_template.yml b/tests/templates/swupdate_template.yml index bf6777c..119a5d3 100644 --- a/tests/templates/swupdate_template.yml +++ b/tests/templates/swupdate_template.yml @@ -58,7 +58,7 @@ actions: password: "CIPsecurity@123" # TEST_BLOCK -# Sleep 200s is added to make the job incomplete with a timeout if software update application failed +# Fail the job if software update application failed - test: timeout: minutes: 15 @@ -70,7 +70,7 @@ actions: description: "Test software update" run: steps: - - if swupdate -d "-u #project_url#/#branch#/#architecture#/cip-core-image-security-cip-core-#distribution#-#architecture#.swu"; then echo software update is successful!!; else sleep 200s; fi + - if swupdate -d "-u #project_url#/#branch#/#architecture#/cip-core-image-security-cip-core-#distribution#-#architecture#.swu"; then echo software update is successful!!; else lava-test-raise "Fail job"; fi from: inline name: sample-test-1 path: inline/sample-test.yaml @@ -102,7 +102,7 @@ actions: parameters: kernel-start-message: "kernel: C:BOOT1:linux.efi" -# sleep 180s is added to make the job incomplete if ustate is not 2 in the updated partition +# Fail the job if ustate is not #updatestate# after reboot - test: timeout: minutes: 5 @@ -114,7 +114,7 @@ actions: description: "check boot loader environment variables" run: steps: - - if [ $(bg_printenv | grep ustate | awk 'FNR == 2{print $2}') = 2 ]; then bg_setenv -c; else sleep 180s; fi + - if [ $(bg_printenv | grep ustate | awk 'FNR == 2{print $2}') = 2 ]; then bg_setenv -c; else lava-test-raise "Fail job"; fi from: inline name: sample-test-2 path: inline/sample-test.yaml From patchwork Tue Jun 18 16:10:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sai.Sathujoda@toshiba-tsip.com X-Patchwork-Id: 13702651 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 425B2C2BA18 for ; Tue, 18 Jun 2024 16:10:54 +0000 (UTC) Received: from mo-csw.securemx.jp (mo-csw.securemx.jp [210.130.202.134]) by mx.groups.io with SMTP id smtpd.web11.90419.1718727046425880578 for ; Tue, 18 Jun 2024 09:10:46 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: toshiba-tsip.com, ip: 210.130.202.134, mailfrom: sai.sathujoda@toshiba-tsip.com) Received: by mo-csw.securemx.jp (mx-mo-csw1800) id 45IGAihr3077118; Wed, 19 Jun 2024 01:10:45 +0900 X-Iguazu-Qid: 2yAbfjWam4hjIFhTIO X-Iguazu-QSIG: v=2; s=0; t=1718727044; q=2yAbfjWam4hjIFhTIO; m=KTbKf3gu98qhcH95aQqe6evUXx2oHHyU9uDiMI/6olk= Received: from imx2-a.toshiba.co.jp (imx2-a.toshiba.co.jp [106.186.93.35]) by relay.securemx.jp (mx-mr1801) id 45IGAhOl1686267 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 19 Jun 2024 01:10:43 +0900 From: Sai.Sathujoda@toshiba-tsip.com To: cip-dev@lists.cip-project.org, jan.kiszka@siemens.com Cc: sai ashrith sathujoda , dinesh.kumar@toshiba-tsip.com, kazuhiro3.hayashi@toshiba.co.jp Subject: [isar-cip-core v1 2/3] submit_lava.sh: Rectify the ustate value in case of a rollback scenario Date: Tue, 18 Jun 2024 21:40:34 +0530 X-TSB-HOP2: ON Message-Id: <20240618161035.1810237-3-Sai.Sathujoda@toshiba-tsip.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240618161035.1810237-1-Sai.Sathujoda@toshiba-tsip.com> References: <20240618161035.1810237-1-Sai.Sathujoda@toshiba-tsip.com> MIME-Version: 1.0 X-OriginalArrivalTime: 18 Jun 2024 16:10:34.0256 (UTC) FILETIME=[0CABC900:01DAC19A] 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 16:10:54 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/16286 From: sai ashrith sathujoda In the rollback test cases, ustate should be 3 after reboot. But currently the definition is checking for 0. This error is not caught because the sleep time was covered inside the timeout leading the job to be complete. Signed-off-by: sai ashrith sathujoda --- scripts/submit_lava.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/submit_lava.sh b/scripts/submit_lava.sh index b2810e0..ee8dd37 100755 --- a/scripts/submit_lava.sh +++ b/scripts/submit_lava.sh @@ -58,11 +58,12 @@ create_job () { elif [ "$1" = "swupdate" ]; then cp $LAVA_TEMPLATES/swupdate_template.yml "${job_dir}/${1}_${2}.yml" + sed -i "s@#updatestate#@2@g" "${job_dir}"/*.yml elif [ "$1" = "kernel-panic" ] || [ "$1" = "initramfs-crash" ]; then 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 + sed -i -e "s@#updatestate#@3@g" -e "s@) = 2@) = 3@g" "${job_dir}"/*.yml if [ "$1" = "kernel-panic" ]; then sed -i "s@kernel: C:BOOT1:linux.efi@Kernel panic - not syncing: sysrq triggered crash@g" "${job_dir}"/*.yml sed -i "s@#branch#@maintain-lava-artifact@g" "${job_dir}"/*.yml From patchwork Tue Jun 18 16:10:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sai.Sathujoda@toshiba-tsip.com X-Patchwork-Id: 13702650 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 42A4DC41513 for ; Tue, 18 Jun 2024 16:10:54 +0000 (UTC) Received: from mo-csw.securemx.jp (mo-csw.securemx.jp [210.130.202.158]) by mx.groups.io with SMTP id smtpd.web10.90720.1718727051457984860 for ; Tue, 18 Jun 2024 09:10:51 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: toshiba-tsip.com, ip: 210.130.202.158, mailfrom: sai.sathujoda@toshiba-tsip.com) Received: by mo-csw.securemx.jp (mx-mo-csw1122) id 45IGAm2l2986366; Wed, 19 Jun 2024 01:10:48 +0900 X-Iguazu-Qid: 2rWhyQ028tnf8mw3Ga X-Iguazu-QSIG: v=2; s=0; t=1718727048; q=2rWhyQ028tnf8mw3Ga; m=uX8D6AqPe14RevAIt8R5KOB8rtvBUSTPIVlcmSz/m5c= Received: from imx2-a.toshiba.co.jp (imx2-a.toshiba.co.jp [106.186.93.35]) by relay.securemx.jp (mx-mr1122) id 45IGAlc2454227 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 19 Jun 2024 01:10:48 +0900 From: Sai.Sathujoda@toshiba-tsip.com To: cip-dev@lists.cip-project.org, jan.kiszka@siemens.com Cc: sai ashrith sathujoda , dinesh.kumar@toshiba-tsip.com, kazuhiro3.hayashi@toshiba.co.jp Subject: [isar-cip-core v1 3/3] .gitlab-ci.yml: Add relevant qemu target in 'needs' for test targets Date: Tue, 18 Jun 2024 21:40:35 +0530 X-TSB-HOP2: ON Message-Id: <20240618161035.1810237-4-Sai.Sathujoda@toshiba-tsip.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240618161035.1810237-1-Sai.Sathujoda@toshiba-tsip.com> References: <20240618161035.1810237-1-Sai.Sathujoda@toshiba-tsip.com> MIME-Version: 1.0 X-OriginalArrivalTime: 18 Jun 2024 16:10:34.0271 (UTC) FILETIME=[0CAE12F0:01DAC19A] 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 16:10:54 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/16287 From: sai ashrith sathujoda Signed-off-by: sai ashrith sathujoda --- .gitlab-ci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b567556..a283429 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -352,7 +352,6 @@ build:qemu-riscv64: - if: $CI_PIPELINE_SOURCE == "schedule" when: never - if: $CI_COMMIT_BRANCH != "master" - needs: ["build:qemu-amd64-base","build:qemu-arm64-base","build:qemu-arm-base"] tags: - small allow_failure: true @@ -370,6 +369,7 @@ build:qemu-riscv64: test:qemu-amd64-secure-boot: extends: - .test-cip-core + needs: ["build:qemu-amd64-base"] variables: target: qemu-amd64 test_function: secure-boot @@ -377,6 +377,7 @@ test:qemu-amd64-secure-boot: test:qemu-arm64-secure-boot: extends: - .test-cip-core + needs: ["build:qemu-arm64-base"] variables: target: qemu-arm64 test_function: secure-boot @@ -384,6 +385,7 @@ test:qemu-arm64-secure-boot: test:qemu-arm-secure-boot: extends: - .test-cip-core + needs: ["build:qemu-arm-base"] variables: target: qemu-arm test_function: secure-boot @@ -391,6 +393,7 @@ test:qemu-arm-secure-boot: test:qemu-amd64-swupdate: extends: - .test-cip-core + needs: ["build:qemu-amd64-base"] variables: target: qemu-amd64 test_function: swupdate @@ -398,6 +401,7 @@ test:qemu-amd64-swupdate: test:qemu-arm64-swupdate: extends: - .test-cip-core + needs: ["build:qemu-arm64-base"] variables: target: qemu-arm64 test_function: swupdate @@ -405,6 +409,7 @@ test:qemu-arm64-swupdate: test:qemu-arm-swupdate: extends: - .test-cip-core + needs: ["build:qemu-arm-base"] variables: target: qemu-arm test_function: swupdate @@ -412,6 +417,7 @@ test:qemu-arm-swupdate: test:qemu-amd64-swupdate-kernel-panic: extends: - .test-cip-core + needs: ["build:qemu-amd64-base"] variables: target: qemu-amd64 test_function: kernel-panic @@ -419,6 +425,7 @@ test:qemu-amd64-swupdate-kernel-panic: test:qemu-amd64-swupdate-initramfs-crash: extends: - .test-cip-core + needs: ["build:qemu-amd64-base"] variables: target: qemu-amd64 test_function: initramfs-crash @@ -426,6 +433,7 @@ test:qemu-amd64-swupdate-initramfs-crash: test:qemu-amd64-IEC: extends: - .test-cip-core + needs: ["build:qemu-amd64-base"] variables: target: qemu-amd64 test_function: IEC @@ -433,6 +441,7 @@ test:qemu-amd64-IEC: test:qemu-arm64-IEC: extends: - .test-cip-core + needs: ["build:qemu-arm64-base"] variables: target: qemu-arm64 test_function: IEC @@ -440,6 +449,7 @@ test:qemu-arm64-IEC: test:qemu-arm-IEC: extends: - .test-cip-core + needs: ["build:qemu-arm-base"] variables: target: qemu-arm test_function: IEC