Adjust unit tests for supporting chain partition with no ab
Test: libfs_avb_internal_test libfs_avb_test Signed-off-by: wuhaitao3 <wuhaitao3@xiaomi.corp-partner.google.com> Change-Id: I5f91510e72776ed2ed53756ae94a87b1417ae1a5
This commit is contained in:
parent
cfec879ad6
commit
250aa5ed72
2 changed files with 11 additions and 4 deletions
|
@ -655,10 +655,12 @@ TEST_F(AvbUtilTest, VerifyVBMetaDataWithoutFooter) {
|
|||
" Partition Name: boot\n"
|
||||
" Rollback Index Location: 1\n"
|
||||
" Public key (sha1): cdbb77177f731920bbe0a0f94f84d9038ae0617d\n"
|
||||
" Flags: 0\n"
|
||||
" Chain Partition descriptor:\n"
|
||||
" Partition Name: system\n"
|
||||
" Rollback Index Location: 2\n"
|
||||
" Public key (sha1): 2597c218aae470a130f61162feaae70afd97f011\n",
|
||||
" Public key (sha1): 2597c218aae470a130f61162feaae70afd97f011\n"
|
||||
" Flags: 0\n",
|
||||
InfoImage("vbmeta.img"));
|
||||
|
||||
android::base::unique_fd fd(open(vbmeta_path.value().c_str(), O_RDONLY | O_CLOEXEC));
|
||||
|
@ -876,10 +878,12 @@ TEST_F(AvbUtilTest, GetChainPartitionInfo) {
|
|||
" Partition Name: boot\n"
|
||||
" Rollback Index Location: 1\n"
|
||||
" Public key (sha1): cdbb77177f731920bbe0a0f94f84d9038ae0617d\n"
|
||||
" Flags: 0\n"
|
||||
" Chain Partition descriptor:\n"
|
||||
" Partition Name: vbmeta_system\n"
|
||||
" Rollback Index Location: 2\n"
|
||||
" Public key (sha1): 2597c218aae470a130f61162feaae70afd97f011\n",
|
||||
" Public key (sha1): 2597c218aae470a130f61162feaae70afd97f011\n"
|
||||
" Flags: 0\n",
|
||||
InfoImage("vbmeta.img"));
|
||||
|
||||
bool fatal_error = false;
|
||||
|
@ -909,7 +913,8 @@ TEST_F(AvbUtilTest, GetChainPartitionInfo) {
|
|||
" Chain Partition descriptor:\n"
|
||||
" Partition Name: system\n"
|
||||
" Rollback Index Location: 3\n"
|
||||
" Public key (sha1): 2597c218aae470a130f61162feaae70afd97f011\n",
|
||||
" Public key (sha1): 2597c218aae470a130f61162feaae70afd97f011\n"
|
||||
" Flags: 0\n",
|
||||
InfoImage("vbmeta_system.img"));
|
||||
|
||||
chained_descriptors = GetChainPartitionInfo(LoadVBMetaData("vbmeta_system.img"), &fatal_error);
|
||||
|
|
|
@ -268,10 +268,12 @@ TEST_F(BaseFsAvbTest, GenerateVBMetaImageWithChainDescriptors) {
|
|||
" Partition Name: boot\n"
|
||||
" Rollback Index Location: 1\n"
|
||||
" Public key (sha1): cdbb77177f731920bbe0a0f94f84d9038ae0617d\n"
|
||||
" Flags: 0\n"
|
||||
" Chain Partition descriptor:\n"
|
||||
" Partition Name: system\n"
|
||||
" Rollback Index Location: 2\n"
|
||||
" Public key (sha1): 2597c218aae470a130f61162feaae70afd97f011\n",
|
||||
" Public key (sha1): 2597c218aae470a130f61162feaae70afd97f011\n"
|
||||
" Flags: 0\n",
|
||||
InfoImage("vbmeta.img"));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue