summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2020-08-12 15:46:30 -0700
committerCommit Bot <commit-bot@chromium.org>2020-08-19 02:09:02 +0000
commit053592bd3d5fcb79b8fa3a6f6193ffedfc041dba (patch)
tree6088a6910490013226292fdb570f0dcd992d8739 /scripts
parentfaf9cd3bbbc133487c272d81771b8bbf4d439915 (diff)
downloadvboot-053592bd3d5fcb79b8fa3a6f6193ffedfc041dba.tar.gz
inclusive: change usage of sanity
Google is working to change its source code to use more inclusive language. To that end, replace the term "sanity" with inclusive alternatives. BUG=b:163883397 BRANCH=None TEST=grep -ir sanity TEST=make runtests Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: I708a044d89050c442f14fb11a8ae5e98490d56af Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2353420 Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/image_signing/ensure_sane_lsb-release.sh2
-rwxr-xr-xscripts/image_signing/make_dev_ssd.sh29
-rwxr-xr-xscripts/image_signing/sign_android_image.sh10
-rwxr-xr-xscripts/image_signing/sign_official_build.sh2
-rwxr-xr-xscripts/keygeneration/keyset_version_check.sh4
5 files changed, 24 insertions, 23 deletions
diff --git a/scripts/image_signing/ensure_sane_lsb-release.sh b/scripts/image_signing/ensure_sane_lsb-release.sh
index a42866a3..7476a8e4 100755
--- a/scripts/image_signing/ensure_sane_lsb-release.sh
+++ b/scripts/image_signing/ensure_sane_lsb-release.sh
@@ -59,7 +59,7 @@ check_keyval_in_list() {
}
# Usage: lsb_syntaxcheck path-to-lsb-file
-# Enforces a number of basic sanity checks on the overall format and contents
+# Enforces a number of basic validity checks on the overall format and contents
# of the lsb-release file:
# - Every line is "key=value".
# - No space after key, no space before value.
diff --git a/scripts/image_signing/make_dev_ssd.sh b/scripts/image_signing/make_dev_ssd.sh
index 42b90a5e..1fdbfaf7 100755
--- a/scripts/image_signing/make_dev_ssd.sh
+++ b/scripts/image_signing/make_dev_ssd.sh
@@ -48,7 +48,8 @@ DEFINE_string partitions "" \
"List of partitions to examine (default: $DEFAULT_PARTITIONS)" ""
DEFINE_boolean recovery_key "$FLAGS_FALSE" \
"Use recovery key to sign image (to boot from USB)" ""
-DEFINE_boolean force "$FLAGS_FALSE" "Skip sanity checks and make the change" "f"
+DEFINE_boolean force "$FLAGS_FALSE" \
+ "Skip validity checks and make the change" "f"
DEFINE_boolean default_rw_root "${FLAGS_TRUE}" \
"When --remove_rootfs_verification is set, change root mount option to RW." ""
@@ -334,8 +335,8 @@ resign_ssd_kernel() {
return $resigned_kernels
}
-sanity_check_crossystem_flags() {
- debug_msg "crossystem sanity check"
+validity_check_crossystem_flags() {
+ debug_msg "crossystem validity check"
if [ -n "${FLAGS_save_config}" ]; then
debug_msg "not resigning kernel."
return
@@ -360,8 +361,8 @@ sanity_check_crossystem_flags() {
return $FLAGS_FALSE
}
-sanity_check_live_partitions() {
- debug_msg "Partition sanity check"
+validity_check_live_partitions() {
+ debug_msg "Partition validity check"
if [ "$FLAGS_partitions" = "$ROOTDEV_KERNEL" ]; then
debug_msg "only for current active partition - safe."
return
@@ -387,8 +388,8 @@ sanity_check_live_partitions() {
return $FLAGS_FALSE
}
-sanity_check_live_firmware() {
- debug_msg "Firmware compatibility sanity check"
+validity_check_live_firmware() {
+ debug_msg "Firmware compatibility validity check"
if [ "$(crossystem mainfw_type)" = "developer" ]; then
debug_msg "developer type firmware in active."
return
@@ -471,12 +472,12 @@ main() {
die "No valid kernel partitions on ${FLAGS_image} (${FLAGS_partitions})."
FLAGS_partitions="$valid_partitions"
- # Sanity checks
+ # Validity checks
if [ "$FLAGS_force" = "$FLAGS_TRUE" ]; then
echo "
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- ! INFO: ALL SANITY CHECKS WERE BYPASSED. YOU ARE ON YOUR OWN. !
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! INFO: ALL VALIDITY CHECKS WERE BYPASSED. YOU ARE ON YOUR OWN. !
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
" >&2
local i
for i in $(seq 5 -1 1); do
@@ -484,9 +485,9 @@ main() {
sleep 1
done
echo ""
- elif ! sanity_check_live_firmware ||
- ! sanity_check_live_partitions ||
- ! sanity_check_crossystem_flags; then
+ elif ! validity_check_live_firmware ||
+ ! validity_check_live_partitions ||
+ ! validity_check_crossystem_flags; then
die "IMAGE ${FLAGS_image} IS NOT MODIFIED."
fi
fi
diff --git a/scripts/image_signing/sign_android_image.sh b/scripts/image_signing/sign_android_image.sh
index c1f7c76b..06d6f2bf 100755
--- a/scripts/image_signing/sign_android_image.sh
+++ b/scripts/image_signing/sign_android_image.sh
@@ -53,7 +53,7 @@ sign_framework_apks() {
info "Start signing framework apks"
- # Counters for sanity check.
+ # Counters for validity check.
local counter_platform=0
local counter_media=0
local counter_shared=0
@@ -133,7 +133,7 @@ build flavor '${flavor_prop}'."
info "Found ${counter_shared} shared APKs."
info "Found ${counter_releasekey} release APKs."
info "Found ${counter_total} total APKs."
- # Sanity check.
+ # Validity check.
if [[ ${counter_platform} -lt 2 || ${counter_media} -lt 2 ||
${counter_shared} -lt 2 || ${counter_releasekey} -lt 2 ||
${counter_total} -lt 25 ]]; then
@@ -174,7 +174,7 @@ update_sepolicy() {
cp "${xml}" "${orig}"
sudo sed -i -E "s/${pattern}/\1${new_cert}"'\2/g' "${xml}"
- # Sanity check.
+ # Validity check.
if cmp "${xml}" "${orig}"; then
die "Failed to replace SELinux policy cert"
fi
@@ -267,7 +267,7 @@ main() {
replace_ota_cert "${system_mnt}" "${key_dir}/releasekey.x509.pem"
reapply_file_security_context "${system_mnt}" "${root_fs_dir}"
- # Sanity check.
+ # Validity check.
snapshot_file_properties "${system_mnt}" > "${working_dir}/properties.new"
local d
if ! d=$(diff "${working_dir}"/properties.{orig,new}); then
@@ -281,7 +281,7 @@ main() {
if [[ -f "${packages_cache}" ]]; then
if type -P aapt &>/dev/null; then
info "Regenerating packages cache ${packages_cache}"
- # For the sanity check.
+ # For the validity check.
local packages_before=$(grep "<package " "${packages_cache}" | wc -l)
local vendor_mnt=$(make_temp_dir)
local vendor_img="${android_dir}/vendor.raw.img"
diff --git a/scripts/image_signing/sign_official_build.sh b/scripts/image_signing/sign_official_build.sh
index 0d02fe34..53c6a041 100755
--- a/scripts/image_signing/sign_official_build.sh
+++ b/scripts/image_signing/sign_official_build.sh
@@ -321,7 +321,7 @@ update_stateful_partition_vblock() {
sudo umount "${stateful_dir}"
}
-# Do a sanity check on the image's rootfs
+# Do a validity check on the image's rootfs
# ARGS: Image
verify_image_rootfs() {
local rootfs=$1
diff --git a/scripts/keygeneration/keyset_version_check.sh b/scripts/keygeneration/keyset_version_check.sh
index f351b75b..2ab33945 100755
--- a/scripts/keygeneration/keyset_version_check.sh
+++ b/scripts/keygeneration/keyset_version_check.sh
@@ -3,7 +3,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-# Script that sanity checks a keyset to ensure actual key versions
+# Script that validity checks a keyset to ensure actual key versions
# match those set in key.versions.
# Load common constants and variables.
@@ -16,7 +16,7 @@ if [ $# -ne 1 ]; then
cat <<EOF
Usage: $0 <keyset directory>
-Sanity check a keyset directory for key versions.
+Validity check a keyset directory for key versions.
EOF
exit 1
fi