Merge "Update language to comply with inclusive guidance"
diff --git a/common/strings.mk b/common/strings.mk
index ba20e27..e560bf0 100644
--- a/common/strings.mk
+++ b/common/strings.mk
@@ -28,7 +28,7 @@
###########################################################
to-upper=$(subst a,A,$(subst b,B,$(subst c,C,$(subst d,D,$(subst e,E,$(subst f,F,$(subst g,G,$(subst h,H,$(subst i,I,$(subst j,J,$(subst k,K,$(subst l,L,$(subst m,M,$(subst n,N,$(subst o,O,$(subst p,P,$(subst q,Q,$(subst r,R,$(subst s,S,$(subst t,T,$(subst u,U,$(subst v,V,$(subst w,W,$(subst x,X,$(subst y,Y,$(subst z,Z,$1))))))))))))))))))))))))))
-# Sanity-check to-lower and to-upper
+# Test to-lower and to-upper
lower := abcdefghijklmnopqrstuvwxyz-_
upper := ABCDEFGHIJKLMNOPQRSTUVWXYZ-_
diff --git a/core/binary.mk b/core/binary.mk
index 29a78a3..be7dc27 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -594,7 +594,7 @@
$(call track-src-file-gen,$(renderscript_sources),$(rs_generated_cpps))
-# This is just a dummy rule to make sure gmake doesn't skip updating the dependents.
+# This is just a no-op rule to make sure gmake doesn't skip updating the dependents.
$(rs_generated_cpps) : $(RenderScript_file_stamp)
@echo "Updated RS generated cpp file $@."
$(hide) touch $@
diff --git a/core/board_config.mk b/core/board_config.mk
index 4141cee..d4fe618 100644
--- a/core/board_config.mk
+++ b/core/board_config.mk
@@ -16,7 +16,7 @@
# ###############################################################
# This file includes BoardConfig.mk for the device being built,
-# and sanity-checks the variable defined therein.
+# and checks the variable defined therein.
# ###############################################################
_board_strip_readonly_list := \
@@ -167,7 +167,7 @@
TARGET_CPU_VARIANT_RUNTIME := $(or $(TARGET_CPU_VARIANT_RUNTIME),$(TARGET_CPU_VARIANT))
TARGET_2ND_CPU_VARIANT_RUNTIME := $(or $(TARGET_2ND_CPU_VARIANT_RUNTIME),$(TARGET_2ND_CPU_VARIANT))
-# The combo makefiles sanity-check and set defaults for various CPU configuration
+# The combo makefiles check and set defaults for various CPU configuration
combo_target := TARGET_
combo_2nd_arch_prefix :=
include $(BUILD_SYSTEM)/combo/select.mk
@@ -191,7 +191,7 @@
TARGET_SUPPORTS_32_BIT_APPS := true
endif
-# Sanity check to warn about likely cryptic errors later in the build.
+# Quick check to warn about likely cryptic errors later in the build.
ifeq ($(TARGET_IS_64_BIT),true)
ifeq (,$(filter true false,$(TARGET_SUPPORTS_64_BIT_APPS)))
$(error Building a 32-bit-app-only product on a 64-bit device. \
@@ -649,7 +649,7 @@
endif
endif
-# Sanity check for building generic OTA packages. Currently it only supports A/B OTAs.
+# Quick check for building generic OTA packages. Currently it only supports A/B OTAs.
ifeq ($(PRODUCT_BUILD_GENERIC_OTA_PACKAGE),true)
ifneq ($(AB_OTA_UPDATER),true)
$(error PRODUCT_BUILD_GENERIC_OTA_PACKAGE with 'AB_OTA_UPDATER != true' is not supported)
diff --git a/core/clear_vars.mk b/core/clear_vars.mk
index 9d9d0e0..7f420a7 100644
--- a/core/clear_vars.mk
+++ b/core/clear_vars.mk
@@ -259,6 +259,7 @@
LOCAL_SANITIZE_RECOVER:=
LOCAL_SANITIZE_NO_RECOVER:=
LOCAL_SANITIZE_BLACKLIST :=
+LOCAL_SANITIZE_BLOCKLIST :=
LOCAL_SDK_LIBRARIES :=
LOCAL_SDK_RES_VERSION:=
LOCAL_SDK_VERSION:=
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk
index cbca1fb..e45c1a6 100644
--- a/core/combo/TARGET_linux-arm.mk
+++ b/core/combo/TARGET_linux-arm.mk
@@ -39,7 +39,7 @@
TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT := generic
endif
-# This sanity checks TARGET_2ND_ARCH_VARIANT against the lists above.
+# This quickly checks TARGET_2ND_ARCH_VARIANT against the lists above.
ifneq (,$(filter $(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT), $(KNOWN_ARMv82a_CORES)))
ifeq (,$(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT))
TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT := armv8-2a
diff --git a/core/config_sanitizers.mk b/core/config_sanitizers.mk
index c5cb91c..323bb36 100644
--- a/core/config_sanitizers.mk
+++ b/core/config_sanitizers.mk
@@ -147,6 +147,9 @@
ifneq ($(LOCAL_SANITIZE_BLACKLIST),)
my_cflags += -fsanitize-blacklist=$(LOCAL_PATH)/$(LOCAL_SANITIZE_BLACKLIST)
endif
+ ifneq ($(LOCAL_SANITIZE_BLOCKLIST),)
+ my_cflags += -fsanitize-blacklist=$(LOCAL_PATH)/$(LOCAL_SANITIZE_BLOCKLIST)
+ endif
endif
# Disable integer_overflow if LOCAL_NOSANITIZE=integer.
diff --git a/core/java_common.mk b/core/java_common.mk
index 373c5d0..b7f2883 100644
--- a/core/java_common.mk
+++ b/core/java_common.mk
@@ -231,7 +231,7 @@
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_RMTYPEDEFS := $(LOCAL_RMTYPEDEFS)
-# Sanity check class path vars.
+# Quickly check class path vars.
disallowed_deps := $(foreach sdk,$(TARGET_AVAILABLE_SDK_VERSIONS),$(call resolve-prebuilt-sdk-module,$(sdk)))
disallowed_deps += $(foreach sdk,$(TARGET_AVAILABLE_SDK_VERSIONS),\
$(foreach sdk_lib,$(JAVA_SDK_LIBRARIES),$(call resolve-prebuilt-sdk-module,$(sdk),$(sdk_lib))))
diff --git a/core/line_coverage.mk b/core/line_coverage.mk
index babcb30..6bfbb8d 100644
--- a/core/line_coverage.mk
+++ b/core/line_coverage.mk
@@ -12,11 +12,11 @@
# -----------------------------------------------------------------
# TODO(b/148306195): Due this issue some fuzz targets cannot be built with
-# line coverage instrumentation. For now we just blacklist them.
-blacklisted_fuzz_targets := libneuralnetworks_fuzzer
+# line coverage instrumentation. For now we just block them.
+blocked_fuzz_targets := libneuralnetworks_fuzzer
fuzz_targets := $(ALL_FUZZ_TARGETS)
-fuzz_targets := $(filter-out $(blacklisted_fuzz_targets),$(fuzz_targets))
+fuzz_targets := $(filter-out $(blocked_fuzz_targets),$(fuzz_targets))
# Android components that considered critical.
diff --git a/core/main.mk b/core/main.mk
index 90c4cc4..b8b4404 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -1226,7 +1226,7 @@
# Strip :32 and :64 suffixes
_modules := $(patsubst %:32,%,$(_modules))
_modules := $(patsubst %:64,%,$(_modules))
- # Sanity check all modules in PRODUCT_PACKAGES exist. We check for the
+ # Quickly check all modules in PRODUCT_PACKAGES exist. We check for the
# existence if either <module> or the <module>_32 variant.
_nonexistent_modules := $(foreach m,$(_modules), \
$(if $(or $(ALL_MODULES.$(m).PATH),$(call get-modules-for-2nd-arch,TARGET,$(m))),,$(m)))
diff --git a/core/product_config.mk b/core/product_config.mk
index bb806bb..38926c2 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -166,7 +166,7 @@
$(if $(filter-out $(makefile),$(PRODUCTS)),$(eval $(call import-products,$(makefile))))\
)
-# Sanity check
+# Quick check
$(check-all-products)
ifneq ($(filter dump-products, $(MAKECMDGOALS)),)
@@ -201,7 +201,7 @@
$(call strip-product-vars)
#############################################################################
-# Sanity check and assign default values
+# Quick check and assign default values
TARGET_DEVICE := $(PRODUCT_DEVICE)
diff --git a/core/robolectric_test_config_template.xml b/core/robolectric_test_config_template.xml
index 78863b7..e79abd5 100644
--- a/core/robolectric_test_config_template.xml
+++ b/core/robolectric_test_config_template.xml
@@ -18,9 +18,13 @@
<option name="test-suite-tag" value="apct" />
<option name="test-suite-tag" value="apct-junit" />
+ <option name="java-folder" value="prebuilts/jdk/jdk9/linux-x86/" />
+ <option name="exclude-paths" value="java" />
+ <option name="use-robolectric-resources" value="true" />
+
{EXTRA_CONFIGS}
- <test class="com.android.tradefed.testtype.HostTest" >
+ <test class="com.android.tradefed.testtype.IsolatedHostTest" >
<option name="jar" value="{MODULE}.jar" />
</test>
</configuration>
diff --git a/core/soong_config.mk b/core/soong_config.mk
index 81dbc23..98ab07d 100644
--- a/core/soong_config.mk
+++ b/core/soong_config.mk
@@ -216,6 +216,8 @@
$(call add_json_bool, BoardUsesRecoveryAsBoot, $(BOARD_USES_RECOVERY_AS_BOOT))
+$(call add_json_list, BoardKernelBinaries, $(BOARD_KERNEL_BINARIES))
+
$(call json_end)
$(file >$(SOONG_VARIABLES).tmp,$(json_contents))
diff --git a/tools/Android.bp b/tools/Android.bp
index 149d06d..e0f3739 100644
--- a/tools/Android.bp
+++ b/tools/Android.bp
@@ -56,3 +56,23 @@
test_config: "post_process_props_unittest.xml",
test_suites: ["general-tests"],
}
+
+python_binary_host {
+ name: "extract_kernel",
+ srcs: ["extract_kernel.py"],
+ version: {
+ py2: {
+ enabled: true,
+ },
+ py3: {
+ enabled: false,
+ },
+ },
+}
+
+genrule_defaults {
+ name: "extract_kernel_release_defaults",
+ tools: ["extract_kernel", "lz4"],
+ out: ["kernel_release.txt"],
+ cmd: "$(location) --tools lz4:$(location lz4) --input $(in) --output-release > $(out)"
+}
diff --git a/tools/check_elf_file.py b/tools/check_elf_file.py
index de855c6..372404b 100755
--- a/tools/check_elf_file.py
+++ b/tools/check_elf_file.py
@@ -174,7 +174,7 @@
@classmethod
def open(cls, elf_file_path, llvm_readobj):
"""Open and parse the ELF file."""
- # Parse the ELF header for simple sanity checks.
+ # Parse the ELF header to check the magic word.
header = cls._read_elf_header(elf_file_path)
if not header or header.ei_magic != _ELF_MAGIC:
raise ELFInvalidMagicError()
diff --git a/tools/extract_kernel.py b/tools/extract_kernel.py
index 8ca11d1..92a647b 100755
--- a/tools/extract_kernel.py
+++ b/tools/extract_kernel.py
@@ -40,10 +40,10 @@
# LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n";
LINUX_BANNER_PREFIX = b'Linux version '
LINUX_BANNER_REGEX = LINUX_BANNER_PREFIX + \
- r'([0-9]+[.][0-9]+[.][0-9]+).* \(.*@.*\) \(.*\) .*\n'
+ r'(?P<release>(?P<version>[0-9]+[.][0-9]+[.][0-9]+).*) \(.*@.*\) \(.*\) .*\n'
-def get_version(input_bytes, start_idx):
+def get_from_release(input_bytes, start_idx, key):
null_idx = input_bytes.find('\x00', start_idx)
if null_idx < 0:
return None
@@ -53,24 +53,43 @@
return None
mo = re.match(LINUX_BANNER_REGEX, linux_banner)
if mo:
- return mo.group(1)
+ return mo.group(key)
return None
-def dump_version(input_bytes):
+def dump_from_release(input_bytes, key):
+ """
+ Helper of dump_version and dump_release
+ """
idx = 0
while True:
idx = input_bytes.find(LINUX_BANNER_PREFIX, idx)
if idx < 0:
return None
- version = get_version(input_bytes, idx)
- if version:
- return version
+ value = get_from_release(input_bytes, idx, key)
+ if value:
+ return value
idx += len(LINUX_BANNER_PREFIX)
+def dump_version(input_bytes):
+ """
+ Dump kernel version, w.x.y, from input_bytes. Search for the string
+ "Linux version " and do pattern matching after it. See LINUX_BANNER_REGEX.
+ """
+ return dump_from_release(input_bytes, "version")
+
+
+def dump_release(input_bytes):
+ """
+ Dump kernel release, w.x.y-..., from input_bytes. Search for the string
+ "Linux version " and do pattern matching after it. See LINUX_BANNER_REGEX.
+ """
+ return dump_from_release(input_bytes, "release")
+
+
def dump_configs(input_bytes):
"""
Dump kernel configuration from input_bytes. This can be done when
@@ -140,6 +159,23 @@
if o:
return o
+
+def dump_to_file(f, dump_fn, input_bytes, desc):
+ """
+ Call decompress_dump(dump_fn, input_bytes) and write to f. If it fails, return
+ False; otherwise return True.
+ """
+ if f is not None:
+ o = decompress_dump(dump_fn, input_bytes)
+ if o:
+ f.write(o)
+ else:
+ sys.stderr.write(
+ "Cannot extract kernel {}".format(desc))
+ return False
+ return True
+
+
def main():
parser = argparse.ArgumentParser(
formatter_class=argparse.RawTextHelpFormatter,
@@ -165,6 +201,13 @@
nargs='?',
type=argparse.FileType('wb'),
const=sys.stdout)
+ parser.add_argument('--output-release',
+ help='If specified, write kernel release. Use stdout if '
+ 'no file is specified.',
+ metavar='FILE',
+ nargs='?',
+ type=argparse.FileType('wb'),
+ const=sys.stdout)
parser.add_argument('--tools',
help='Decompression tools to use. If not specified, PATH '
'is searched.',
@@ -181,25 +224,18 @@
input_bytes = args.input.read()
ret = 0
- if args.output_configs is not None:
- o = decompress_dump(dump_configs, input_bytes)
- if o:
- args.output_configs.write(o)
- else:
- sys.stderr.write(
- "Cannot extract kernel configs in {}".format(args.input.name))
- ret = 1
- if args.output_version is not None:
- o = decompress_dump(dump_version, input_bytes)
- if o:
- args.output_version.write(o)
- else:
- sys.stderr.write(
- "Cannot extract kernel versions in {}".format(args.input.name))
- ret = 1
+ if not dump_to_file(args.output_configs, dump_configs, input_bytes,
+ "configs in {}".format(args.input.name)):
+ ret = 1
+ if not dump_to_file(args.output_version, dump_version, input_bytes,
+ "version in {}".format(args.input.name)):
+ ret = 1
+ if not dump_to_file(args.output_release, dump_release, input_bytes,
+ "kernel release in {}".format(args.input.name)):
+ ret = 1
return ret
if __name__ == '__main__':
- exit(main())
+ sys.exit(main())
diff --git a/tools/fs_config/fs_config_generator.py b/tools/fs_config/fs_config_generator.py
index 1405fd3..940a398 100755
--- a/tools/fs_config/fs_config_generator.py
+++ b/tools/fs_config/fs_config_generator.py
@@ -299,11 +299,10 @@
Parses a C header file and extracts lines starting with #define AID_<name>
while capturing the OEM defined ranges and ignoring other ranges. It also
skips some hardcoded AIDs it doesn't need to generate a mapping for.
- It provides some basic sanity checks. The information extracted from this
- file can later be used to sanity check other things (like oem ranges) as
- well as generating a mapping of names to uids. It was primarily designed to
- parse the private/android_filesystem_config.h, but any C header should
- work.
+ It provides some basic checks. The information extracted from this file can
+ later be used to quickly check other things (like oem ranges) as well as
+ generating a mapping of names to uids. It was primarily designed to parse
+ the private/android_filesystem_config.h, but any C header should work.
"""
_SKIP_AIDS = [
@@ -394,7 +393,7 @@
def _handle_aid(self, identifier, value):
"""Handle an AID C #define.
- Handles an AID, sanity checking, generating the friendly name and
+ Handles an AID, quick checking, generating the friendly name and
adding it to the internal maps. Internal use only.
Args:
@@ -422,7 +421,7 @@
"""Process, check and populate internal data structures.
After parsing and generating the internal data structures, this method
- is responsible for sanity checking ALL of the acquired data.
+ is responsible for quickly checking ALL of the acquired data.
Raises:
ValueError: With the message set to indicate the specific error.
diff --git a/tools/releasetools/apex_utils.py b/tools/releasetools/apex_utils.py
index 1c61938..afebc40 100644
--- a/tools/releasetools/apex_utils.py
+++ b/tools/releasetools/apex_utils.py
@@ -273,7 +273,7 @@
else:
payload_info[key] = value
- # Sanity check.
+ # Validation check.
for key in ('Algorithm', 'Salt', 'apex.key', 'Hash Algorithm'):
if key not in payload_info:
raise ApexInfoError(
diff --git a/tools/releasetools/blockimgdiff.py b/tools/releasetools/blockimgdiff.py
index 8b6a690..d33c2f7 100644
--- a/tools/releasetools/blockimgdiff.py
+++ b/tools/releasetools/blockimgdiff.py
@@ -521,7 +521,7 @@
stashed_blocks -= free_size
if common.OPTIONS.cache_size is not None:
- # Sanity check: abort if we're going to need more stash space than
+ # Validation check: abort if we're going to need more stash space than
# the allowed size (cache_size * threshold). There are two purposes
# of having a threshold here. a) Part of the cache may have been
# occupied by some recovery logs. b) It will buy us some time to deal
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 25ccea0..1846a67 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -96,6 +96,7 @@
self.cache_size = None
self.stash_threshold = 0.8
self.logfile = None
+ self.host_tools = {}
OPTIONS = Options()
@@ -213,6 +214,10 @@
logging.config.dictConfig(config)
+def SetHostToolLocation(tool_name, location):
+ OPTIONS.host_tools[tool_name] = location
+
+
def Run(args, verbose=None, **kwargs):
"""Creates and returns a subprocess.Popen object.
@@ -234,6 +239,14 @@
kwargs['stderr'] = subprocess.STDOUT
if 'universal_newlines' not in kwargs:
kwargs['universal_newlines'] = True
+
+ # If explicitly set host tool location before, use that location to avoid
+ # PATH violation. Make a copy of args in case client relies on the content
+ # of args later.
+ if args and args[0] in OPTIONS.host_tools:
+ args = args[:]
+ args[0] = OPTIONS.host_tools[args[0]]
+
# Don't log any if caller explicitly says so.
if verbose:
logger.info(" Running: \"%s\"", " ".join(args))
@@ -601,7 +614,7 @@
def LoadInfoDict(input_file, repacking=False):
"""Loads the key/value pairs from the given input target_files.
- It reads `META/misc_info.txt` file in the target_files input, does sanity
+ It reads `META/misc_info.txt` file in the target_files input, does validation
checks and returns the parsed key/value pairs for to the given build. It's
usually called early when working on input target_files files, e.g. when
generating OTAs, or signing builds. Note that the function may be called
@@ -1177,7 +1190,7 @@
if args and args.strip():
split_args = shlex.split(args)
for index, arg in enumerate(split_args[:-1]):
- # Sanity check that the image file exists. Some images might be defined
+ # Check that the image file exists. Some images might be defined
# as a path relative to source tree, which may not be available at the
# same location when running this script (we have the input target_files
# zip only). For such cases, we additionally scan other locations (e.g.
diff --git a/tools/releasetools/edify_generator.py b/tools/releasetools/edify_generator.py
index b9c9b19..033c02e 100644
--- a/tools/releasetools/edify_generator.py
+++ b/tools/releasetools/edify_generator.py
@@ -301,7 +301,7 @@
len(patchpairs) == 2), \
"Failed to handle unknown format. Use PatchPartition() instead."
- # Also sanity check the args.
+ # Also validity check the args.
assert tokens[3] == patchpairs[0], \
"Found mismatching values for source SHA-1: {} vs {}".format(
tokens[3], patchpairs[0])
diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py
index c3dcf0d..b70044e 100755
--- a/tools/releasetools/ota_from_target_files.py
+++ b/tools/releasetools/ota_from_target_files.py
@@ -1940,7 +1940,7 @@
def GenerateNonAbOtaPackage(target_file, output_file, source_file=None):
"""Generates a non-A/B OTA package."""
- # Sanity check the loaded info dicts first.
+ # Check the loaded info dicts first.
if OPTIONS.info_dict.get("no_recovery") == "true":
raise common.ExternalError(
"--- target build has specified no recovery ---")
diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py
index 5d10c40..b4646b7 100755
--- a/tools/releasetools/sign_target_files_apks.py
+++ b/tools/releasetools/sign_target_files_apks.py
@@ -1116,7 +1116,7 @@
privkey.endswith(privkey_suffix) and
pubkey[:-pubkey_suffix_len] == privkey[:-privkey_suffix_len])
- # Sanity check on the container key names, as we'll carry them without the
+ # Check the container key names, as we'll carry them without the
# extensions. This doesn't apply to payload keys though, which we will use
# full names only.
container_cert = matches.group("CONTAINER_CERT")
@@ -1149,7 +1149,7 @@
apex_name, key = a.split("=")
OPTIONS.extra_apex_payload_keys[apex_name] = key
elif o == "--skip_apks_with_path_prefix":
- # Sanity check the prefix, which must be in all upper case.
+ # Check the prefix, which must be in all upper case.
prefix = a.split('/')[0]
if not prefix or prefix != prefix.upper():
raise ValueError("Invalid path prefix '%s'" % (a,))
diff --git a/tools/releasetools/test_add_img_to_target_files.py b/tools/releasetools/test_add_img_to_target_files.py
index c82a40b..efa60b6 100644
--- a/tools/releasetools/test_add_img_to_target_files.py
+++ b/tools/releasetools/test_add_img_to_target_files.py
@@ -370,7 +370,7 @@
with zipfile.ZipFile(output_file, 'w') as output_zip:
# Create an existing META/care_map.pb entry.
common.ZipWriteStr(output_zip, 'META/care_map.pb',
- 'dummy care_map.pb')
+ 'fake care_map.pb')
# Request to add META/care_map.pb again.
AddCareMapForAbOta(output_zip, ['system', 'vendor'], image_paths)
diff --git a/tools/releasetools/test_check_target_files_vintf.py b/tools/releasetools/test_check_target_files_vintf.py
index d326229..8725dd6 100644
--- a/tools/releasetools/test_check_target_files_vintf.py
+++ b/tools/releasetools/test_check_target_files_vintf.py
@@ -87,8 +87,8 @@
return test_dir
@test_utils.SkipIfExternalToolsUnavailable()
- def test_CheckVintf_sanity(self):
- msg = 'Sanity check with skeleton target files failed.'
+ def test_CheckVintf_skeleton(self):
+ msg = 'vintf check with skeleton target files failed.'
test_dir = self.prepare_test_dir('does-not-exist')
self.assertTrue(CheckVintf(test_dir), msg=msg)
diff --git a/tools/releasetools/test_common.py b/tools/releasetools/test_common.py
index 787e675..81ee53d 100644
--- a/tools/releasetools/test_common.py
+++ b/tools/releasetools/test_common.py
@@ -1619,12 +1619,12 @@
def setUp(self):
self._tempdir = common.MakeTempDir()
- # Create a dummy dict that contains the fstab info for boot&recovery.
+ # Create a fake dict that contains the fstab info for boot&recovery.
self._info = {"fstab" : {}}
- dummy_fstab = [
+ fake_fstab = [
"/dev/soc.0/by-name/boot /boot emmc defaults defaults",
"/dev/soc.0/by-name/recovery /recovery emmc defaults defaults"]
- self._info["fstab"] = common.LoadRecoveryFSTab("\n".join, 2, dummy_fstab)
+ self._info["fstab"] = common.LoadRecoveryFSTab("\n".join, 2, fake_fstab)
# Construct the gzipped recovery.img and boot.img
self.recovery_data = bytearray([
0x1f, 0x8b, 0x08, 0x00, 0x81, 0x11, 0x02, 0x5a, 0x00, 0x03, 0x2b, 0x4a,
diff --git a/tools/releasetools/test_ota_from_target_files.py b/tools/releasetools/test_ota_from_target_files.py
index 7783f96..07b2e05 100644
--- a/tools/releasetools/test_ota_from_target_files.py
+++ b/tools/releasetools/test_ota_from_target_files.py
@@ -61,7 +61,7 @@
'META/ab_partitions.txt',
'\n'.join([partition[1] for partition in ab_partitions]))
- # Create dummy images for each of them.
+ # Create fake images for each of them.
for path, partition in ab_partitions:
target_files_zip.writestr(
'{}/{}.img'.format(path, partition),
@@ -754,7 +754,7 @@
class StreamingPropertyFilesTest(PropertyFilesTest):
- """Additional sanity checks specialized for StreamingPropertyFiles."""
+ """Additional validity checks specialized for StreamingPropertyFiles."""
def test_init(self):
property_files = StreamingPropertyFiles()
@@ -835,7 +835,7 @@
class AbOtaPropertyFilesTest(PropertyFilesTest):
- """Additional sanity checks specialized for AbOtaPropertyFiles."""
+ """Additional validity checks specialized for AbOtaPropertyFiles."""
# The size for payload and metadata signature size.
SIGNATURE_SIZE = 256
@@ -1003,7 +1003,7 @@
class NonAbOtaPropertyFilesTest(PropertyFilesTest):
- """Additional sanity checks specialized for NonAbOtaPropertyFiles."""
+ """Additional validity checks specialized for NonAbOtaPropertyFiles."""
def test_init(self):
property_files = NonAbOtaPropertyFiles()
diff --git a/tools/releasetools/test_verity_utils.py b/tools/releasetools/test_verity_utils.py
index d02bc7f..a850390 100644
--- a/tools/releasetools/test_verity_utils.py
+++ b/tools/releasetools/test_verity_utils.py
@@ -233,8 +233,8 @@
os.path.join(get_testdata_dir(), 'testkey_mincrypt'))
@SkipIfExternalToolsUnavailable()
- def test_Build_SanityCheck(self):
- # A sanity check for the test itself: the image shouldn't be verifiable
+ def test_Build_ValidationCheck(self):
+ # A validity check for the test itself: the image shouldn't be verifiable
# with wrong key.
self.assertRaises(
common.ExternalError,
diff --git a/tools/releasetools/testdata/apexkeys_framework.txt b/tools/releasetools/testdata/apexkeys_framework.txt
index b9caf9e..a827f22 100644
--- a/tools/releasetools/testdata/apexkeys_framework.txt
+++ b/tools/releasetools/testdata/apexkeys_framework.txt
@@ -1,5 +1,5 @@
name="com.android.conscrypt.apex" public_key="external/conscrypt/apex/com.android.conscrypt.avbpubkey" private_key="external/conscrypt/apex/com.android.conscrypt.pem" container_certificate="external/conscrypt/apex/com.android.conscrypt.x509.pem" container_private_key="external/conscrypt/apex/com.android.conscrypt.pk8" partition="system"
-name="com.android.dummy_product.apex" public_key="selected" private_key="selected" container_certificate="selected" container_private_key="selected" partition="product"
+name="com.android.fake_product.apex" public_key="selected" private_key="selected" container_certificate="selected" container_private_key="selected" partition="product"
name="com.android.runtime.apex" public_key="bionic/apex/com.android.runtime.avbpubkey" private_key="bionic/apex/com.android.runtime.pem" container_certificate="bionic/apex/com.android.runtime.x509.pem" container_private_key="bionic/apex/com.android.runtime.pk8" partition="system"
name="com.android.vndk.current.on_vendor.apex" public_key="not_selected" private_key="not_selected" container_certificate="not_selected" container_private_key="not_selected" partition="vendor"
name="com.android.vndk.v27.apex" public_key="packages/modules/vndk/apex/com.android.vndk.v27.pubkey" private_key="packages/modules/vndk/apex/com.android.vndk.v27.pem" container_certificate="packages/modules/vndk/apex/com.android.vndk.v27.x509.pem" container_private_key="packages/modules/vndk/apex/com.android.vndk.v27.pk8" partition="system_ext"
diff --git a/tools/releasetools/testdata/apexkeys_merge.txt b/tools/releasetools/testdata/apexkeys_merge.txt
index a9355d7..5b1b544 100644
--- a/tools/releasetools/testdata/apexkeys_merge.txt
+++ b/tools/releasetools/testdata/apexkeys_merge.txt
@@ -1,5 +1,5 @@
name="com.android.conscrypt.apex" public_key="external/conscrypt/apex/com.android.conscrypt.avbpubkey" private_key="external/conscrypt/apex/com.android.conscrypt.pem" container_certificate="external/conscrypt/apex/com.android.conscrypt.x509.pem" container_private_key="external/conscrypt/apex/com.android.conscrypt.pk8" partition="system"
-name="com.android.dummy_product.apex" public_key="selected" private_key="selected" container_certificate="selected" container_private_key="selected" partition="product"
+name="com.android.fake_product.apex" public_key="selected" private_key="selected" container_certificate="selected" container_private_key="selected" partition="product"
name="com.android.runtime.apex" public_key="bionic/apex/com.android.runtime.avbpubkey" private_key="bionic/apex/com.android.runtime.pem" container_certificate="bionic/apex/com.android.runtime.x509.pem" container_private_key="bionic/apex/com.android.runtime.pk8" partition="system"
name="com.android.vndk.current.on_vendor.apex" public_key="packages/modules/vndk/apex/com.android.vndk.current.pubkey" private_key="packages/modules/vndk/apex/com.android.vndk.current.pem" container_certificate="packages/modules/vndk/apex/com.android.vndk.current.x509.pem" container_private_key="packages/modules/vndk/apex/com.android.vndk.current.pk8" partition="vendor"
name="com.android.vndk.v27.apex" public_key="packages/modules/vndk/apex/com.android.vndk.v27.pubkey" private_key="packages/modules/vndk/apex/com.android.vndk.v27.pem" container_certificate="packages/modules/vndk/apex/com.android.vndk.v27.x509.pem" container_private_key="packages/modules/vndk/apex/com.android.vndk.v27.pk8" partition="system_ext"
diff --git a/tools/releasetools/testdata/apexkeys_vendor.txt b/tools/releasetools/testdata/apexkeys_vendor.txt
index 7dd3964..c6a9771 100644
--- a/tools/releasetools/testdata/apexkeys_vendor.txt
+++ b/tools/releasetools/testdata/apexkeys_vendor.txt
@@ -1,5 +1,5 @@
name="com.android.conscrypt.apex" public_key="not_selected" private_key="not_selected" container_certificate="not_selected" container_private_key="not_selected" partition="system"
-name="com.android.dummy_product.apex" public_key="not_selected" private_key="not_selected" container_certificate="not_selected" container_private_key="not_selected" partition="product"
+name="com.android.fake_product.apex" public_key="not_selected" private_key="not_selected" container_certificate="not_selected" container_private_key="not_selected" partition="product"
name="com.android.runtime.apex" public_key="not_selected" private_key="not_selected" container_certificate="not_selected" container_private_key="not_selected" partition="system"
name="com.android.vndk.current.on_vendor.apex" public_key="packages/modules/vndk/apex/com.android.vndk.current.pubkey" private_key="packages/modules/vndk/apex/com.android.vndk.current.pem" container_certificate="packages/modules/vndk/apex/com.android.vndk.current.x509.pem" container_private_key="packages/modules/vndk/apex/com.android.vndk.current.pk8" partition="vendor"
name="com.android.vndk.v27.apex" public_key="not_selected" private_key="not_selected" container_certificate="not_selected" container_private_key="not_selected" partition="system_ext"