diff options
author | Scott Lobdell <slobdell@google.com> | 2021-03-23 20:33:04 +0000 |
---|---|---|
committer | Scott Lobdell <slobdell@google.com> | 2021-03-24 02:40:01 +0000 |
commit | 757dbb836469bbdd7eb8312deaf584fe0c99c17d (patch) | |
tree | a678b33ad5f0f024d0f942f127b91665f0616193 /tests/UpdatableSystemFontTest/src/com/android/updatablesystemfont/UpdatableSystemFontTest.java | |
parent | 7710a95746be8dba8c6ffe7172f9c01334a2ca81 (diff) | |
parent | f022dd1e6827ebf7c52b06aa40f2059a3f0f5cad (diff) |
Merge SP1A.210311.001
Change-Id: Id1a205bf3f0609c0b13e4bea377056c3b06299fa
Diffstat (limited to 'tests/UpdatableSystemFontTest/src/com/android/updatablesystemfont/UpdatableSystemFontTest.java')
-rw-r--r-- | tests/UpdatableSystemFontTest/src/com/android/updatablesystemfont/UpdatableSystemFontTest.java | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/tests/UpdatableSystemFontTest/src/com/android/updatablesystemfont/UpdatableSystemFontTest.java b/tests/UpdatableSystemFontTest/src/com/android/updatablesystemfont/UpdatableSystemFontTest.java index e249f8a99b0c..92fa498f8326 100644 --- a/tests/UpdatableSystemFontTest/src/com/android/updatablesystemfont/UpdatableSystemFontTest.java +++ b/tests/UpdatableSystemFontTest/src/com/android/updatablesystemfont/UpdatableSystemFontTest.java @@ -21,7 +21,6 @@ import static com.google.common.truth.Truth.assertWithMessage; import android.platform.test.annotations.RootPermissionTest; -import com.android.blockdevicewriter.BlockDeviceWriter; import com.android.fsverity.AddFsVerityCertRule; import com.android.tradefed.device.DeviceNotAvailableException; import com.android.tradefed.log.LogUtil.CLog; @@ -144,30 +143,6 @@ public class UpdatableSystemFontTest extends BaseHostJUnit4Test { assertThat(fontPathAfterReboot).isEqualTo(fontPath); } - @Test - public void reboot_clearDamagedFiles() throws Exception { - expectRemoteCommandToSucceed(String.format("cmd font update %s %s", - TEST_NOTO_COLOR_EMOJI_V1_TTF, TEST_NOTO_COLOR_EMOJI_V1_TTF_FSV_SIG)); - String fontPath = getFontPath(NOTO_COLOR_EMOJI_TTF); - assertThat(fontPath).startsWith("/data/fonts/files/"); - assertThat(BlockDeviceWriter.canReadByte(getDevice(), fontPath, 0)).isTrue(); - - BlockDeviceWriter.damageFileAgainstBlockDevice(getDevice(), fontPath, 0); - expectRemoteCommandToSucceed("stop"); - // We have to make sure system_server is gone before dropping caches, because system_server - // process holds font memory maps and prevents cache eviction. - waitUntilSystemServerIsGone(); - BlockDeviceWriter.assertFileNotOpen(getDevice(), fontPath); - BlockDeviceWriter.dropCaches(getDevice()); - assertThat(BlockDeviceWriter.canReadByte(getDevice(), fontPath, 0)).isFalse(); - - expectRemoteCommandToSucceed("start"); - waitUntilFontCommandIsReady(); - String fontPathAfterReboot = getFontPath(NOTO_COLOR_EMOJI_TTF); - assertWithMessage("Damaged file should be deleted") - .that(fontPathAfterReboot).startsWith("/system"); - } - private String getFontPath(String fontFileName) throws Exception { // TODO: add a dedicated command for testing. String lines = expectRemoteCommandToSucceed("cmd font dump"); |