• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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. $(dirname "$(readlink -f "${0}")")/common.sh
10
11echo "Running test to validate system_is_locked()"
12
13readonly ORIGINAL_FW_FILE="$1"
14
15check_file_exists "${ORIGINAL_FW_FILE}"
16
17echo "Making sure hardware write protect is ENABLED and software write \
18protect is ENABLED"
19check_hw_and_sw_write_protect_enabled
20
21echo "Validating initial state"
22check_has_mp_rw_firmware
23check_has_mp_ro_firmware
24check_running_rw_firmware
25check_is_rollback_set_to_initial_val
26
27echo "Checking that firmware is functional"
28check_firmware_is_functional
29
30echo "Checking that we cannot access raw frame"
31check_raw_fpframe_fails
32
33