diff mbox series

[isar-cip-core,v1,2/3] submit_lava.sh: Rectify the ustate value in case of a rollback scenario

Message ID 20240618161035.1810237-3-Sai.Sathujoda@toshiba-tsip.com (mailing list archive)
State Accepted
Headers show
Series Minor corrections to CIP Core testing | expand

Commit Message

Sai.Sathujoda@toshiba-tsip.com June 18, 2024, 4:10 p.m. UTC
From: sai ashrith sathujoda <sai.sathujoda@toshiba-tsip.com>

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 <sai.sathujoda@toshiba-tsip.com>
---
 scripts/submit_lava.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

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