Merge ~canonical-kernel-team/+git/autotest-client-tests:phlin/stress-smoke-flexible-check into ~canonical-kernel-team/+git/autotest-client-tests:master

Proposed by Po-Hsu Lin
Status: Merged
Merged at revision: d8c3814c8a89617aa15f77bc0126ba1738127a7f
Proposed branch: ~canonical-kernel-team/+git/autotest-client-tests:phlin/stress-smoke-flexible-check
Merge into: ~canonical-kernel-team/+git/autotest-client-tests:master
Prerequisite: ~canonical-kernel-team/+git/autotest-client-tests:phlin/stress-smoke-bailout
Diff against target: 43 lines (+6/-8)
1 file modified
ubuntu_stress_smoke_test/ubuntu_stress_smoke_test_checks.sh (+6/-8)
Reviewer Review Type Date Requested Status
Francis Ginther Approve
Review via email: mp+458052@code.launchpad.net

Commit message

KERNTT-777

The BIOS age was hard-coded to 5 years in commit 0e0870372f "UBUNTU
SAUCE: ubuntu stress smoke test: add minimum machine spec to run test"
back in 2020.

Change this to check BIOS with release year >= 2015 instead, so we
don't need to bump this regularly.

Also skip date check on Xen instances, they known to work but the BIOS
date will report 2006 on these instances.

To post a comment you must log in.
Revision history for this message
Francis Ginther (fginther) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/ubuntu_stress_smoke_test/ubuntu_stress_smoke_test_checks.sh b/ubuntu_stress_smoke_test/ubuntu_stress_smoke_test_checks.sh
2index 807ebfa..6085f39 100755
3--- a/ubuntu_stress_smoke_test/ubuntu_stress_smoke_test_checks.sh
4+++ b/ubuntu_stress_smoke_test/ubuntu_stress_smoke_test_checks.sh
5@@ -1,7 +1,7 @@
6 #!/bin/bash
7
8-# Maximum machine age in years
9-MAX_AGE=5
10+# Maximum machine age was set to 5 years by Colin in 2020, let's use 2015 as the bar
11+MIN_YEAR=2015
12 # minimum required memory in MB
13 MIN_MEM=$((3 * 1024))
14 # minimum free disk required in GB
15@@ -22,8 +22,8 @@ check_machine()
16 datecheck=1
17
18 manufacturer=$(dmidecode -s system-manufacturer)
19- if [ "$manufacturer" == "QEMU" ]; then
20- echo "QEMU instance, no firmware date checking"
21+ if [ "$manufacturer" == "QEMU" ] || [ "$manufacturer" == "Xen" ]; then
22+ echo "$manufacturer instance, no firmware date checking"
23 datecheck=0
24 fi
25
26@@ -47,15 +47,13 @@ check_machine()
27 esac
28
29 if [ $datecheck -eq 1 ]; then
30- year=$(date +%Y)
31- year=$((year - $MAX_AGE))
32 date=$(dmidecode -t 0x0000 | grep "Release Date:" | cut -d'/' -f3)
33 if [ -z "$date" ]; then
34 date=$(dmidecode -t 0x000e | grep "Release Date:" | cut -d'/' -f3)
35 fi
36 if [ ! -z "$date" ]; then
37- if [ $date -lt $year ]; then
38- check_message "BIOS indicates machine is more then $MAX_AGE years old"
39+ if [ $date -lt $MIN_YEAR ]; then
40+ check_message "BIOS indicates machine was released in $date, older then $MIN_YEAR."
41 skip=1
42 fi
43 fi

Subscribers

People subscribed via source and target branches

to all changes: