Fix some wording to comply with respectful-code

https: //source.android.com/setup/contribute/respectful-code
Test: Run unit tests
Bug: 161896447
Change-Id: I9a3676b6f7bb6be43756fdf18b1d8b9ec41fb4cf
This commit is contained in:
Kelvin Zhang 2020-07-22 19:21:22 -04:00
parent 757fd2768e
commit c693d95f86
8 changed files with 13 additions and 13 deletions

View File

@ -301,7 +301,7 @@ class EdifyGenerator(object):
len(patchpairs) == 2), \ len(patchpairs) == 2), \
"Failed to handle unknown format. Use PatchPartition() instead." "Failed to handle unknown format. Use PatchPartition() instead."
# Also sanity check the args. # Also validity check the args.
assert tokens[3] == patchpairs[0], \ assert tokens[3] == patchpairs[0], \
"Found mismatching values for source SHA-1: {} vs {}".format( "Found mismatching values for source SHA-1: {} vs {}".format(
tokens[3], patchpairs[0]) tokens[3], patchpairs[0])

View File

@ -370,7 +370,7 @@ class AddImagesToTargetFilesTest(test_utils.ReleaseToolsTestCase):
with zipfile.ZipFile(output_file, 'w') as output_zip: with zipfile.ZipFile(output_file, 'w') as output_zip:
# Create an existing META/care_map.pb entry. # Create an existing META/care_map.pb entry.
common.ZipWriteStr(output_zip, 'META/care_map.pb', common.ZipWriteStr(output_zip, 'META/care_map.pb',
'dummy care_map.pb') 'fake care_map.pb')
# Request to add META/care_map.pb again. # Request to add META/care_map.pb again.
AddCareMapForAbOta(output_zip, ['system', 'vendor'], image_paths) AddCareMapForAbOta(output_zip, ['system', 'vendor'], image_paths)

View File

@ -1619,12 +1619,12 @@ class InstallRecoveryScriptFormatTest(test_utils.ReleaseToolsTestCase):
def setUp(self): def setUp(self):
self._tempdir = common.MakeTempDir() 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" : {}} self._info = {"fstab" : {}}
dummy_fstab = [ fake_fstab = [
"/dev/soc.0/by-name/boot /boot emmc defaults defaults", "/dev/soc.0/by-name/boot /boot emmc defaults defaults",
"/dev/soc.0/by-name/recovery /recovery 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 # Construct the gzipped recovery.img and boot.img
self.recovery_data = bytearray([ self.recovery_data = bytearray([
0x1f, 0x8b, 0x08, 0x00, 0x81, 0x11, 0x02, 0x5a, 0x00, 0x03, 0x2b, 0x4a, 0x1f, 0x8b, 0x08, 0x00, 0x81, 0x11, 0x02, 0x5a, 0x00, 0x03, 0x2b, 0x4a,

View File

@ -61,7 +61,7 @@ def construct_target_files(secondary=False):
'META/ab_partitions.txt', 'META/ab_partitions.txt',
'\n'.join([partition[1] for partition in ab_partitions])) '\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: for path, partition in ab_partitions:
target_files_zip.writestr( target_files_zip.writestr(
'{}/{}.img'.format(path, partition), '{}/{}.img'.format(path, partition),
@ -754,7 +754,7 @@ class PropertyFilesTest(test_utils.ReleaseToolsTestCase):
class StreamingPropertyFilesTest(PropertyFilesTest): class StreamingPropertyFilesTest(PropertyFilesTest):
"""Additional sanity checks specialized for StreamingPropertyFiles.""" """Additional validity checks specialized for StreamingPropertyFiles."""
def test_init(self): def test_init(self):
property_files = StreamingPropertyFiles() property_files = StreamingPropertyFiles()
@ -835,7 +835,7 @@ class StreamingPropertyFilesTest(PropertyFilesTest):
class AbOtaPropertyFilesTest(PropertyFilesTest): class AbOtaPropertyFilesTest(PropertyFilesTest):
"""Additional sanity checks specialized for AbOtaPropertyFiles.""" """Additional validity checks specialized for AbOtaPropertyFiles."""
# The size for payload and metadata signature size. # The size for payload and metadata signature size.
SIGNATURE_SIZE = 256 SIGNATURE_SIZE = 256
@ -1003,7 +1003,7 @@ class AbOtaPropertyFilesTest(PropertyFilesTest):
class NonAbOtaPropertyFilesTest(PropertyFilesTest): class NonAbOtaPropertyFilesTest(PropertyFilesTest):
"""Additional sanity checks specialized for NonAbOtaPropertyFiles.""" """Additional validity checks specialized for NonAbOtaPropertyFiles."""
def test_init(self): def test_init(self):
property_files = NonAbOtaPropertyFiles() property_files = NonAbOtaPropertyFiles()

View File

@ -234,7 +234,7 @@ class VerifiedBootVersion1VerityImageBuilderTest(ReleaseToolsTestCase):
@SkipIfExternalToolsUnavailable() @SkipIfExternalToolsUnavailable()
def test_Build_SanityCheck(self): def test_Build_SanityCheck(self):
# A sanity check for the test itself: the image shouldn't be verifiable # A validity check for the test itself: the image shouldn't be verifiable
# with wrong key. # with wrong key.
self.assertRaises( self.assertRaises(
common.ExternalError, common.ExternalError,

View File

@ -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.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.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.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" 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"

View File

@ -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.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.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.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" 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"

View File

@ -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.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.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.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" 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"