Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 38de3ba6 authored by Bowgo Tsai's avatar Bowgo Tsai Committed by Gerrit Code Review
Browse files

Merge "libfs_avb: Fix unit test failures"

parents 8d84d08d 708d9627
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -216,9 +216,11 @@ TEST_F(AvbUtilTest, GetAvbFooter) {
            "Header Block:             256 bytes\n"
            "Header Block:             256 bytes\n"
            "Authentication Block:     1088 bytes\n"
            "Authentication Block:     1088 bytes\n"
            "Auxiliary Block:          2304 bytes\n"
            "Auxiliary Block:          2304 bytes\n"
            "Public key (sha1):        5227b569de003adc7f8ec3fc03e05dfbd969abad\n"
            "Algorithm:                SHA512_RSA8192\n"
            "Algorithm:                SHA512_RSA8192\n"
            "Rollback Index:           20\n"
            "Rollback Index:           20\n"
            "Flags:                    0\n"
            "Flags:                    0\n"
            "Rollback Index Location:  0\n"
            "Release String:           'unit test'\n"
            "Release String:           'unit test'\n"
            "Descriptors:\n"
            "Descriptors:\n"
            "    Hashtree descriptor:\n"
            "    Hashtree descriptor:\n"
@@ -346,9 +348,11 @@ TEST_F(AvbUtilTest, GetVBMetaHeader) {
            "Header Block:             256 bytes\n"
            "Header Block:             256 bytes\n"
            "Authentication Block:     576 bytes\n"
            "Authentication Block:     576 bytes\n"
            "Auxiliary Block:          1216 bytes\n"
            "Auxiliary Block:          1216 bytes\n"
            "Public key (sha1):        2597c218aae470a130f61162feaae70afd97f011\n"
            "Algorithm:                SHA256_RSA4096\n"
            "Algorithm:                SHA256_RSA4096\n"
            "Rollback Index:           10\n"
            "Rollback Index:           10\n"
            "Flags:                    0\n"
            "Flags:                    0\n"
            "Rollback Index Location:  0\n"
            "Release String:           'unit test'\n"
            "Release String:           'unit test'\n"
            "Descriptors:\n"
            "Descriptors:\n"
            "    Hash descriptor:\n"
            "    Hash descriptor:\n"
@@ -639,9 +643,11 @@ TEST_F(AvbUtilTest, VerifyVBMetaDataWithoutFooter) {
            "Header Block:             256 bytes\n"
            "Header Block:             256 bytes\n"
            "Authentication Block:     1088 bytes\n"
            "Authentication Block:     1088 bytes\n"
            "Auxiliary Block:          3840 bytes\n"
            "Auxiliary Block:          3840 bytes\n"
            "Public key (sha1):        5227b569de003adc7f8ec3fc03e05dfbd969abad\n"
            "Algorithm:                SHA256_RSA8192\n"
            "Algorithm:                SHA256_RSA8192\n"
            "Rollback Index:           0\n"
            "Rollback Index:           0\n"
            "Flags:                    0\n"
            "Flags:                    0\n"
            "Rollback Index Location:  0\n"
            "Release String:           'unit test'\n"
            "Release String:           'unit test'\n"
            "Descriptors:\n"
            "Descriptors:\n"
            "    Chain Partition descriptor:\n"
            "    Chain Partition descriptor:\n"
@@ -854,9 +860,11 @@ TEST_F(AvbUtilTest, GetChainPartitionInfo) {
            "Header Block:             256 bytes\n"
            "Header Block:             256 bytes\n"
            "Authentication Block:     1088 bytes\n"
            "Authentication Block:     1088 bytes\n"
            "Auxiliary Block:          3840 bytes\n"
            "Auxiliary Block:          3840 bytes\n"
            "Public key (sha1):        5227b569de003adc7f8ec3fc03e05dfbd969abad\n"
            "Algorithm:                SHA256_RSA8192\n"
            "Algorithm:                SHA256_RSA8192\n"
            "Rollback Index:           0\n"
            "Rollback Index:           0\n"
            "Flags:                    0\n"
            "Flags:                    0\n"
            "Rollback Index Location:  0\n"
            "Release String:           'unit test'\n"
            "Release String:           'unit test'\n"
            "Descriptors:\n"
            "Descriptors:\n"
            "    Chain Partition descriptor:\n"
            "    Chain Partition descriptor:\n"
@@ -886,9 +894,11 @@ TEST_F(AvbUtilTest, GetChainPartitionInfo) {
            "Header Block:             256 bytes\n"
            "Header Block:             256 bytes\n"
            "Authentication Block:     576 bytes\n"
            "Authentication Block:     576 bytes\n"
            "Auxiliary Block:          2176 bytes\n"
            "Auxiliary Block:          2176 bytes\n"
            "Public key (sha1):        2597c218aae470a130f61162feaae70afd97f011\n"
            "Algorithm:                SHA256_RSA4096\n"
            "Algorithm:                SHA256_RSA4096\n"
            "Rollback Index:           0\n"
            "Rollback Index:           0\n"
            "Flags:                    0\n"
            "Flags:                    0\n"
            "Rollback Index Location:  0\n"
            "Release String:           'unit test'\n"
            "Release String:           'unit test'\n"
            "Descriptors:\n"
            "Descriptors:\n"
            "    Chain Partition descriptor:\n"
            "    Chain Partition descriptor:\n"
@@ -936,9 +946,11 @@ TEST_F(AvbUtilTest, GetChainPartitionInfoNone) {
            "Header Block:             256 bytes\n"
            "Header Block:             256 bytes\n"
            "Authentication Block:     320 bytes\n"
            "Authentication Block:     320 bytes\n"
            "Auxiliary Block:          960 bytes\n"
            "Auxiliary Block:          960 bytes\n"
            "Public key (sha1):        cdbb77177f731920bbe0a0f94f84d9038ae0617d\n"
            "Algorithm:                SHA256_RSA2048\n"
            "Algorithm:                SHA256_RSA2048\n"
            "Rollback Index:           0\n"
            "Rollback Index:           0\n"
            "Flags:                    0\n"
            "Flags:                    0\n"
            "Rollback Index Location:  0\n"
            "Release String:           'unit test'\n"
            "Release String:           'unit test'\n"
            "Descriptors:\n"
            "Descriptors:\n"
            "    Hash descriptor:\n"
            "    Hash descriptor:\n"
+10 −0
Original line number Original line Diff line number Diff line
@@ -59,9 +59,11 @@ TEST_F(BaseFsAvbTest, GenerateVBMetaImage) {
            "Header Block:             256 bytes\n"
            "Header Block:             256 bytes\n"
            "Authentication Block:     320 bytes\n"
            "Authentication Block:     320 bytes\n"
            "Auxiliary Block:          576 bytes\n"
            "Auxiliary Block:          576 bytes\n"
            "Public key (sha1):        cdbb77177f731920bbe0a0f94f84d9038ae0617d\n"
            "Algorithm:                SHA256_RSA2048\n"
            "Algorithm:                SHA256_RSA2048\n"
            "Rollback Index:           0\n"
            "Rollback Index:           0\n"
            "Flags:                    0\n"
            "Flags:                    0\n"
            "Rollback Index Location:  0\n"
            "Release String:           'unit test'\n"
            "Release String:           'unit test'\n"
            "Descriptors:\n"
            "Descriptors:\n"
            "    (none)\n",
            "    (none)\n",
@@ -89,9 +91,11 @@ TEST_F(BaseFsAvbTest, AddHashFooter) {
            "Header Block:             256 bytes\n"
            "Header Block:             256 bytes\n"
            "Authentication Block:     576 bytes\n"
            "Authentication Block:     576 bytes\n"
            "Auxiliary Block:          1216 bytes\n"
            "Auxiliary Block:          1216 bytes\n"
            "Public key (sha1):        2597c218aae470a130f61162feaae70afd97f011\n"
            "Algorithm:                SHA256_RSA4096\n"
            "Algorithm:                SHA256_RSA4096\n"
            "Rollback Index:           10\n"
            "Rollback Index:           10\n"
            "Flags:                    0\n"
            "Flags:                    0\n"
            "Rollback Index Location:  0\n"
            "Release String:           'unit test'\n"
            "Release String:           'unit test'\n"
            "Descriptors:\n"
            "Descriptors:\n"
            "    Hash descriptor:\n"
            "    Hash descriptor:\n"
@@ -126,9 +130,11 @@ TEST_F(BaseFsAvbTest, AddHashtreeFooter) {
            "Header Block:             256 bytes\n"
            "Header Block:             256 bytes\n"
            "Authentication Block:     1088 bytes\n"
            "Authentication Block:     1088 bytes\n"
            "Auxiliary Block:          2304 bytes\n"
            "Auxiliary Block:          2304 bytes\n"
            "Public key (sha1):        5227b569de003adc7f8ec3fc03e05dfbd969abad\n"
            "Algorithm:                SHA512_RSA8192\n"
            "Algorithm:                SHA512_RSA8192\n"
            "Rollback Index:           20\n"
            "Rollback Index:           20\n"
            "Flags:                    0\n"
            "Flags:                    0\n"
            "Rollback Index Location:  0\n"
            "Release String:           'unit test'\n"
            "Release String:           'unit test'\n"
            "Descriptors:\n"
            "Descriptors:\n"
            "    Hashtree descriptor:\n"
            "    Hashtree descriptor:\n"
@@ -180,9 +186,11 @@ TEST_F(BaseFsAvbTest, GenerateVBMetaImageWithDescriptors) {
            "Header Block:             256 bytes\n"
            "Header Block:             256 bytes\n"
            "Authentication Block:     320 bytes\n"
            "Authentication Block:     320 bytes\n"
            "Auxiliary Block:          960 bytes\n"
            "Auxiliary Block:          960 bytes\n"
            "Public key (sha1):        cdbb77177f731920bbe0a0f94f84d9038ae0617d\n"
            "Algorithm:                SHA256_RSA2048\n"
            "Algorithm:                SHA256_RSA2048\n"
            "Rollback Index:           0\n"
            "Rollback Index:           0\n"
            "Flags:                    0\n"
            "Flags:                    0\n"
            "Rollback Index Location:  0\n"
            "Release String:           'unit test'\n"
            "Release String:           'unit test'\n"
            "Descriptors:\n"
            "Descriptors:\n"
            "    Hash descriptor:\n"
            "    Hash descriptor:\n"
@@ -249,9 +257,11 @@ TEST_F(BaseFsAvbTest, GenerateVBMetaImageWithChainDescriptors) {
            "Header Block:             256 bytes\n"
            "Header Block:             256 bytes\n"
            "Authentication Block:     1088 bytes\n"
            "Authentication Block:     1088 bytes\n"
            "Auxiliary Block:          3840 bytes\n"
            "Auxiliary Block:          3840 bytes\n"
            "Public key (sha1):        5227b569de003adc7f8ec3fc03e05dfbd969abad\n"
            "Algorithm:                SHA256_RSA8192\n"
            "Algorithm:                SHA256_RSA8192\n"
            "Rollback Index:           0\n"
            "Rollback Index:           0\n"
            "Flags:                    0\n"
            "Flags:                    0\n"
            "Rollback Index Location:  0\n"
            "Release String:           'unit test'\n"
            "Release String:           'unit test'\n"
            "Descriptors:\n"
            "Descriptors:\n"
            "    Chain Partition descriptor:\n"
            "    Chain Partition descriptor:\n"
+2 −0
Original line number Original line Diff line number Diff line
@@ -57,9 +57,11 @@ TEST_F(PublicFsAvbUtilTest, GetHashtreeDescriptor) {
            "Header Block:             256 bytes\n"
            "Header Block:             256 bytes\n"
            "Authentication Block:     576 bytes\n"
            "Authentication Block:     576 bytes\n"
            "Auxiliary Block:          1280 bytes\n"
            "Auxiliary Block:          1280 bytes\n"
            "Public key (sha1):        2597c218aae470a130f61162feaae70afd97f011\n"
            "Algorithm:                SHA512_RSA4096\n"
            "Algorithm:                SHA512_RSA4096\n"
            "Rollback Index:           20\n"
            "Rollback Index:           20\n"
            "Flags:                    0\n"
            "Flags:                    0\n"
            "Rollback Index Location:  0\n"
            "Release String:           'unit test'\n"
            "Release String:           'unit test'\n"
            "Descriptors:\n"
            "Descriptors:\n"
            "    Hashtree descriptor:\n"
            "    Hashtree descriptor:\n"