1#!/bin/bash 2 3# Copyright 2019 The Chromium OS Authors. All rights reserved. 4# Use of this source code is governed by a BSD-style license that can be 5# found in the LICENSE file. 6 7set -e 8 9# shellcheck source=./common.sh 10. "$(dirname "$(readlink -f "${0}")")/common.sh" 11 12echo "Running test to validate system_is_locked()" 13 14readonly ORIGINAL_FW_FILE="$1" 15 16check_file_exists "${ORIGINAL_FW_FILE}" 17 18echo "Making sure hardware write protect is ENABLED and software write \ 19protect is ENABLED" 20check_hw_and_sw_write_protect_enabled 21 22echo "Validating initial state" 23check_has_mp_rw_firmware 24check_has_mp_ro_firmware 25check_running_rw_firmware 26check_is_rollback_set_to_initial_val 27 28echo "Checking that firmware is functional" 29check_firmware_is_functional 30 31echo "Checking that system is locked" 32check_system_is_locked 33 34echo "Checking that we cannot access raw frame" 35check_raw_fpframe_fails 36