diff options
author | Gaurav Shah <gauravsh@chromium.org> | 2012-03-13 15:37:56 -0700 |
---|---|---|
committer | Gaurav Shah <gauravsh@chromium.org> | 2012-03-13 15:43:57 -0700 |
commit | 075fd17655862743574f5b571ac7418b9a347959 (patch) | |
tree | 75ffa474c3f503566637db8226d77bd6618ff5bc | |
parent | c0c41663ecad1f10f2acc048fd78532f7003ab0e (diff) | |
download | vboot-075fd17655862743574f5b571ac7418b9a347959.tar.gz |
signer security test: special case dogfood channel for app id check
Similar to the canary channel, the dogfood channel images can have their
own app id that is distinct from the board app id.
BUG=chromium-os:25702, chrome-os-partner:8441
TEST=on a dogfood-channel image
Change-Id: Ic993a40d905b224072d325a69e47fdb6633c2e22
Reviewed-on: https://gerrit.chromium.org/gerrit/18039
Tested-by: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
-rwxr-xr-x | scripts/image_signing/ensure_sane_lsb-release.sh | 10 | ||||
-rw-r--r-- | scripts/image_signing/sample-test-configs/ensure_sane_lsb-release.config | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/scripts/image_signing/ensure_sane_lsb-release.sh b/scripts/image_signing/ensure_sane_lsb-release.sh index bab5b1fa..bbdffeb6 100755 --- a/scripts/image_signing/ensure_sane_lsb-release.sh +++ b/scripts/image_signing/ensure_sane_lsb-release.sh @@ -149,12 +149,12 @@ main() { cut -d - -f 1,2) # a copy of the board string with '-' squished to variable-name-safe '_'. local boardvar=${board//-/_} - # For a canary channel, appid maybe a different default value. - if ! lsbequals $lsb CHROMEOS_RELEASE_TRACK "canary-channel" \ - >/dev/null 2>&1; then - eval "expected_appid=\"\$expected_appid_$boardvar\"" + channel=$(lsbval $lsb CHROMEOS_RELEASE_TRACK) + # For a canary or dogfood channel, appid maybe a different default value. + if [ $channel = 'canary-channel' ] || [ $channel = 'dogfood-channel' ]; then + eval "expected_appid=\"\$expected_appid_${channel%\-channel}\"" else - eval "expected_appid=\"\$expected_appid_canary\"" + eval "expected_appid=\"\$expected_appid_$boardvar\"" fi lsbequals $lsb CHROMEOS_RELEASE_APPID "$expected_appid" || testfail=1 else # unrecognized board diff --git a/scripts/image_signing/sample-test-configs/ensure_sane_lsb-release.config b/scripts/image_signing/sample-test-configs/ensure_sane_lsb-release.config index 831fed8e..4dfae3c1 100644 --- a/scripts/image_signing/sample-test-configs/ensure_sane_lsb-release.config +++ b/scripts/image_signing/sample-test-configs/ensure_sane_lsb-release.config @@ -16,6 +16,7 @@ expected_boards=( # List track names here expected_release_tracks=( canary-channel + dogfood-channel beta-channel dev-channel ) @@ -27,3 +28,4 @@ expected_release_tracks=( expected_appid_x86_mario="{87efface-864d-49a5-9bb3-4b050a7c227a}" expected_appid_x86_alex="{C776D42E-287A-435E-8BA7-E770BD30B46D}" expected_appid_canary="{90F229CE-83E2-4FAF-8479-E368A34938B1}" +expected_appid_dogfood="{4897842343-83E2-4FAF-8479-E368A34938B1}" |