Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: use valid squashfs/ext3 inputs #197

Merged
merged 1 commit into from Apr 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions internal/app/siftool/testdata/TestApp_Dump/Three.golden
@@ -1,15 +1,15 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

{"version":1,"header":{"digest":"sha256:635fa0a14a8ef0c0351ed3e985799ed1d4f75ce973dea3cc76c99710795cc3f1"},"objects":[{"relativeId":0,"descriptorDigest":"sha256:3634ad01db0dd5482ecf685267b53d6201690438ca27c3d7ea91c971a1f41f92","objectDigest":"sha256:004dfc8da678c309de28b5386a1e9efd57f536b150c40d29b31506aa0fb17ec2"},{"relativeId":1,"descriptorDigest":"sha256:db74cb63348414def73535c9f0f83e8ad7df61229ed2806f4da8b69d6d7464d6","objectDigest":"sha256:5f78c33274e43fa9de5659265c1d917e25c03722dcb0b8d27db8d5feaa813953"}]}
{"version":1,"header":{"digest":"sha256:635fa0a14a8ef0c0351ed3e985799ed1d4f75ce973dea3cc76c99710795cc3f1"},"objects":[{"relativeId":0,"descriptorDigest":"sha256:3634ad01db0dd5482ecf685267b53d6201690438ca27c3d7ea91c971a1f41f92","objectDigest":"sha256:004dfc8da678c309de28b5386a1e9efd57f536b150c40d29b31506aa0fb17ec2"},{"relativeId":1,"descriptorDigest":"sha256:04b5f87c9692a54f80d10fb6af00c779763aeca29d610348854bd97cd8bf66fd","objectDigest":"sha256:9f9c4e5e131934969b4ac8f495691c70b8c6c8e3f489c2c9ab5f1af82bce0604"}]}
-----BEGIN PGP SIGNATURE-----

wsBzBAEBCAAnBQJe+oD0CZCiDCfuf/e6hBYhBBIEXIwLEATQWN5L7aIMJ+5/97qE
AADY9ggAlW/Y+BssNOLcCAiu0dzZCf5BfbzmOUQ+VNajAsZyOIJnW1t19lDYoRNx
x3YolyyRfEmw9Kf1n6fctDHGPyzRIIOc1/0CVQzNzfKZQO+x0+9qvurILADijY/3
1DKqhbxoO2a5iASXYHH9yYs3J82N3EKEYyFdDMTcHs4UijUnHvwcTt0smY6JQ9Su
vssWg+3qltuVjiYOQPgg9XR5i8suXE76poit9Ftp7jOD9eYtVcUEKRZLrVCsDJu9
77QvejJmgquueYX4pM2EuH9EOFnDV3gl4Cuocsn5OLDgfhYuT1t5Hay1iAPpJqm6
/EXQY7CECByIj6TCFurfXwc+uYSD9Q==
=rZoe
AAC46gf/VXyzZ649nttrX13JkM5kRVPlAIblBQxfoUxA1xwIXdRoM5ceDY0Em+YD
8b6Xl1w2sDTqo0R15cJSh8sf0ClFOvYpDQRNCwKx17k1Wd0gHcW4QVu6gJnlbNvN
o/EJdEN2TkbCM2aFvj34DAIfErRBIEsCeDDvJ/6WUSySWbnydfNU2pCsnK4A7l2H
KOXFzSaPijG9L/pU3O3vNZ+fXPffqHL9JVhs5Mt/Yo3oeoEnoVaKvJLGx/fyl+Gj
7qsfWFyHWzRCww9VFg/TCBeUku0CYRfXhxOgo4OuHNr8oo82rKDZU6+l3UZ2Sw8T
+kLe/zUkaILocGOvhvKdi630OGGb/Q==
=3Jq2
-----END PGP SIGNATURE-----
Binary file modified internal/app/siftool/testdata/TestApp_Dump/Two.golden
Binary file not shown.
Expand Up @@ -5,4 +5,4 @@ Descriptors Total: 48
Descriptors Offset: 4096
Descriptors Size: 27 KiB
Data Offset: 32176
Data Size: 5 KiB
Data Size: 9 KiB
Expand Up @@ -5,4 +5,4 @@ Descriptors Total: 48
Descriptors Offset: 4096
Descriptors Size: 27 KiB
Data Offset: 32176
Data Size: 9 KiB
Data Size: 265 KiB
Expand Up @@ -5,4 +5,4 @@ Descriptors Total: 48
Descriptors Offset: 4096
Descriptors Size: 27 KiB
Data Offset: 32176
Data Size: 17 KiB
Data Size: 269 KiB
Expand Up @@ -3,7 +3,7 @@
Group ID: 2
Linked ID: NONE
Offset: 40960
Size: 4
Size: 262144
Filesystem Type: Ext3
Partition Type: System
Architecture: amd64
Expand Up @@ -3,7 +3,7 @@
Group ID: 1
Linked ID: NONE
Offset: 36864
Size: 4
Size: 4096
Filesystem Type: Squashfs
Partition Type: *System
Architecture: 386
Expand Up @@ -2,7 +2,7 @@
ID: 4
Group ID: NONE
Linked ID: 1 (G)
Offset: 45056
Offset: 303104
Size: 1054
Hash Type: SHA-256
Entity: 12045C8C0B1004D058DE4BEDA20C27EE7FF7BA84
2 changes: 1 addition & 1 deletion internal/app/siftool/testdata/TestApp_List/OneGroup.golden
Expand Up @@ -2,4 +2,4 @@
ID |GROUP |LINK |SIF POSITION (start-end) |TYPE
------------------------------------------------------------------------------
1 |1 |NONE |32768-32772 |FS (Raw/System/386)
2 |1 |NONE |36864-36868 |FS (Squashfs/*System/386)
2 |1 |NONE |36864-40960 |FS (Squashfs/*System/386)
Expand Up @@ -2,5 +2,5 @@
ID |GROUP |LINK |SIF POSITION (start-end) |TYPE
------------------------------------------------------------------------------
1 |1 |NONE |32768-32772 |FS (Raw/System/386)
2 |1 |NONE |36864-36868 |FS (Squashfs/*System/386)
2 |1 |NONE |36864-40960 |FS (Squashfs/*System/386)
3 |NONE |1 (G) |40960-42014 |Signature (SHA-256)
4 changes: 2 additions & 2 deletions internal/app/siftool/testdata/TestApp_List/TwoGroups.golden
Expand Up @@ -2,5 +2,5 @@
ID |GROUP |LINK |SIF POSITION (start-end) |TYPE
------------------------------------------------------------------------------
1 |1 |NONE |32768-32772 |FS (Raw/System/386)
2 |1 |NONE |36864-36868 |FS (Squashfs/*System/386)
3 |2 |NONE |40960-40964 |FS (Ext3/System/amd64)
2 |1 |NONE |36864-40960 |FS (Squashfs/*System/386)
3 |2 |NONE |40960-303104 |FS (Ext3/System/amd64)
Expand Up @@ -2,7 +2,7 @@
ID |GROUP |LINK |SIF POSITION (start-end) |TYPE
------------------------------------------------------------------------------
1 |1 |NONE |32768-32772 |FS (Raw/System/386)
2 |1 |NONE |36864-36868 |FS (Squashfs/*System/386)
3 |2 |NONE |40960-40964 |FS (Ext3/System/amd64)
4 |NONE |1 (G) |45056-46110 |Signature (SHA-256)
5 |NONE |2 (G) |49152-50007 |Signature (SHA-256)
2 |1 |NONE |36864-40960 |FS (Squashfs/*System/386)
3 |2 |NONE |40960-303104 |FS (Ext3/System/amd64)
4 |NONE |1 (G) |303104-304158 |Signature (SHA-256)
5 |NONE |2 (G) |307200-308055 |Signature (SHA-256)
2 changes: 1 addition & 1 deletion pkg/integrity/testdata/TestGetImageMetadata/Object2.golden
@@ -1 +1 @@
{"version":1,"header":{"digest":"sha1:86696357e7806b51baf75fc0bf9b8fc677e5cdd0"},"objects":[{"relativeId":1,"descriptorDigest":"sha1:ddf7e6609fec1f565545207f28d4b39f499d78c5","objectDigest":"sha1:d78f8bb992a56a597f6c7a1fb918bb78271367eb"}]}
{"version":1,"header":{"digest":"sha1:86696357e7806b51baf75fc0bf9b8fc677e5cdd0"},"objects":[{"relativeId":1,"descriptorDigest":"sha1:076d6ec6e32a6237d838ba20c825c6caa4c78544","objectDigest":"sha1:fd526afdbdea7c87d81c33314b0e0dbdfa5ba79f"}]}
2 changes: 1 addition & 1 deletion pkg/integrity/testdata/TestGetImageMetadata/SHA1.golden
@@ -1 +1 @@
{"version":1,"header":{"digest":"sha1:86696357e7806b51baf75fc0bf9b8fc677e5cdd0"},"objects":[{"relativeId":0,"descriptorDigest":"sha1:1406a1a9c75a332fc50cb8519a9a7f9f2531480e","objectDigest":"sha1:15146b9bf4f1f5f9bf176a398d8c4f0321c63064"},{"relativeId":1,"descriptorDigest":"sha1:ddf7e6609fec1f565545207f28d4b39f499d78c5","objectDigest":"sha1:d78f8bb992a56a597f6c7a1fb918bb78271367eb"}]}
{"version":1,"header":{"digest":"sha1:86696357e7806b51baf75fc0bf9b8fc677e5cdd0"},"objects":[{"relativeId":0,"descriptorDigest":"sha1:1406a1a9c75a332fc50cb8519a9a7f9f2531480e","objectDigest":"sha1:15146b9bf4f1f5f9bf176a398d8c4f0321c63064"},{"relativeId":1,"descriptorDigest":"sha1:076d6ec6e32a6237d838ba20c825c6caa4c78544","objectDigest":"sha1:fd526afdbdea7c87d81c33314b0e0dbdfa5ba79f"}]}
2 changes: 1 addition & 1 deletion pkg/integrity/testdata/TestGetImageMetadata/SHA224.golden
@@ -1 +1 @@
{"version":1,"header":{"digest":"sha224:88ecbdbaa9bf8410c9362213ddae5e6771fd2525da3eb390300fb666"},"objects":[{"relativeId":0,"descriptorDigest":"sha224:8ac2ffbf24282ce5f49fc591eee1e0a879b0ae2a9fa813b897b94113","objectDigest":"sha224:071bce5faa03c2016d3e1e086ccb60b6ea3cabc493c9aa1013594efd"},{"relativeId":1,"descriptorDigest":"sha224:fc5b7f5b3622982bcebfbb8b3a0d81b6f850228f2ff3631d03deaab6","objectDigest":"sha224:55b9eee5f60cc362ddc07676f620372611e22272f60fdbec94f243f8"}]}
{"version":1,"header":{"digest":"sha224:88ecbdbaa9bf8410c9362213ddae5e6771fd2525da3eb390300fb666"},"objects":[{"relativeId":0,"descriptorDigest":"sha224:8ac2ffbf24282ce5f49fc591eee1e0a879b0ae2a9fa813b897b94113","objectDigest":"sha224:071bce5faa03c2016d3e1e086ccb60b6ea3cabc493c9aa1013594efd"},{"relativeId":1,"descriptorDigest":"sha224:15f2307c74c24b5aff01556df7642009a968ad717514da242821b1cb","objectDigest":"sha224:1f26e23245e830c5aa90735377d43535b0a080d03981ea58e4b94372"}]}
2 changes: 1 addition & 1 deletion pkg/integrity/testdata/TestGetImageMetadata/SHA256.golden
@@ -1 +1 @@
{"version":1,"header":{"digest":"sha256:635fa0a14a8ef0c0351ed3e985799ed1d4f75ce973dea3cc76c99710795cc3f1"},"objects":[{"relativeId":0,"descriptorDigest":"sha256:3634ad01db0dd5482ecf685267b53d6201690438ca27c3d7ea91c971a1f41f92","objectDigest":"sha256:004dfc8da678c309de28b5386a1e9efd57f536b150c40d29b31506aa0fb17ec2"},{"relativeId":1,"descriptorDigest":"sha256:db74cb63348414def73535c9f0f83e8ad7df61229ed2806f4da8b69d6d7464d6","objectDigest":"sha256:5f78c33274e43fa9de5659265c1d917e25c03722dcb0b8d27db8d5feaa813953"}]}
{"version":1,"header":{"digest":"sha256:635fa0a14a8ef0c0351ed3e985799ed1d4f75ce973dea3cc76c99710795cc3f1"},"objects":[{"relativeId":0,"descriptorDigest":"sha256:3634ad01db0dd5482ecf685267b53d6201690438ca27c3d7ea91c971a1f41f92","objectDigest":"sha256:004dfc8da678c309de28b5386a1e9efd57f536b150c40d29b31506aa0fb17ec2"},{"relativeId":1,"descriptorDigest":"sha256:04b5f87c9692a54f80d10fb6af00c779763aeca29d610348854bd97cd8bf66fd","objectDigest":"sha256:9f9c4e5e131934969b4ac8f495691c70b8c6c8e3f489c2c9ab5f1af82bce0604"}]}
2 changes: 1 addition & 1 deletion pkg/integrity/testdata/TestGetImageMetadata/SHA384.golden
@@ -1 +1 @@
{"version":1,"header":{"digest":"sha384:92bdcff06f2cde591d8af1f0ab80687e5eccf1dfe8fe7a8a8ef4b80d28bd2c7a77bcc4abfbcfdb3fc84ec7992ed54334"},"objects":[{"relativeId":0,"descriptorDigest":"sha384:ed532e8496b916182a4185a3d12f3a6d4c59d204965ef1a732013d1c05050291ec29b48b06ba100a948468868023fb82","objectDigest":"sha384:f8722c6694c4997334525090678b2148f6263502c3eb144a44e8be0d2bfd039f4067a3f8152f94ab3af7c63acfe78ce6"},{"relativeId":1,"descriptorDigest":"sha384:d06c5144e805d18f8ebbce1eef073dd711ab9a6550e76e1fb9b82e5a822dd83273069d258d099a437461e674f519ef9c","objectDigest":"sha384:0b7e0522460767c74abb4245bc0d3a27209a5aed111059faead54ffc74a93759160ac9642d7a7df3038ece62f2fa9815"}]}
{"version":1,"header":{"digest":"sha384:92bdcff06f2cde591d8af1f0ab80687e5eccf1dfe8fe7a8a8ef4b80d28bd2c7a77bcc4abfbcfdb3fc84ec7992ed54334"},"objects":[{"relativeId":0,"descriptorDigest":"sha384:ed532e8496b916182a4185a3d12f3a6d4c59d204965ef1a732013d1c05050291ec29b48b06ba100a948468868023fb82","objectDigest":"sha384:f8722c6694c4997334525090678b2148f6263502c3eb144a44e8be0d2bfd039f4067a3f8152f94ab3af7c63acfe78ce6"},{"relativeId":1,"descriptorDigest":"sha384:de7f8e386d3c1679711711f31812d12a913b0f5202503e46e9e1c5fd36c49908c5e288a3c08e6b72285dba177596668d","objectDigest":"sha384:da6cf2d305a04a53623df94d5e74bc22aee7961a5a62b289f99db693e5a980ee276526f254f6504f9e66621ce821b977"}]}
2 changes: 1 addition & 1 deletion pkg/integrity/testdata/TestGetImageMetadata/SHA512.golden
@@ -1 +1 @@
{"version":1,"header":{"digest":"sha512:503a1101d5a7f66e440f157576597c5ab9a3517b025259da985402f3b7de7c90c6034b8b5d3da992a9cae5b47dd355fce3f9932e92bc47422134cc5b7347e1e7"},"objects":[{"relativeId":0,"descriptorDigest":"sha512:4ccbff33c9be45cf2ba25412de4a87bd623fd48bf00598b756ea5a12a4eddb83aa93176a91a875b595750837b3ba77b5dfbbbd90e2126ca4d4828763db6dc591","objectDigest":"sha512:808e1f67ffbdbdae30946529b920a1ad6d49c0c50423bc0c9d41ece566e291b6c3e6b6839f3095fbab6bc15a5b971b07d4b8b2f22b982ce3c2b8fd05eef7e1b3"},{"relativeId":1,"descriptorDigest":"sha512:4759070398e2e62d47fc166051918ae99493c31e0cb533ad6b041941c69a81a3cd3141a665fb5d1adef21a5ab9ac3247ab2bd4b1551b9377728acf87e56d9870","objectDigest":"sha512:1284b2d521535196f22175d5f558104220a6ad7680e78b49fa6f20e57ea7b185d71ec1edb137e70eba528dedb141f5d2f8bb53149d262932b27cf41fed96aa7f"}]}
{"version":1,"header":{"digest":"sha512:503a1101d5a7f66e440f157576597c5ab9a3517b025259da985402f3b7de7c90c6034b8b5d3da992a9cae5b47dd355fce3f9932e92bc47422134cc5b7347e1e7"},"objects":[{"relativeId":0,"descriptorDigest":"sha512:4ccbff33c9be45cf2ba25412de4a87bd623fd48bf00598b756ea5a12a4eddb83aa93176a91a875b595750837b3ba77b5dfbbbd90e2126ca4d4828763db6dc591","objectDigest":"sha512:808e1f67ffbdbdae30946529b920a1ad6d49c0c50423bc0c9d41ece566e291b6c3e6b6839f3095fbab6bc15a5b971b07d4b8b2f22b982ce3c2b8fd05eef7e1b3"},{"relativeId":1,"descriptorDigest":"sha512:39bc9e8ecf3192e0656f0b4de529b7e6b1b0d892a6b19fd6f619bf476558bc15255ead250e440c3fe69bbf061b49c0ca0d7de18616c0b3172b2ca2d0753ef331","objectDigest":"sha512:c948c053d5494e944dc251ba774882c58c6b18dae241caa84123c779170d1ed0a22ced3af76d67c7090b668fa7d80531e5b9e3f4677b1b5aae64e8d0d24999bf"}]}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified pkg/integrity/testdata/TestSigner_Sign/EncryptedKey.golden
Binary file not shown.
Binary file modified pkg/integrity/testdata/TestSigner_Sign/NoKeyMaterial.golden
Binary file not shown.
Binary file modified pkg/integrity/testdata/TestSigner_Sign/OneGroup.golden
Binary file not shown.
Binary file not shown.
Binary file modified pkg/integrity/testdata/TestSigner_Sign/OptSignGroup1.golden
Binary file not shown.
Binary file modified pkg/integrity/testdata/TestSigner_Sign/OptSignGroup2.golden
Binary file not shown.
Binary file modified pkg/integrity/testdata/TestSigner_Sign/OptSignObject1.golden
Binary file not shown.
Binary file modified pkg/integrity/testdata/TestSigner_Sign/OptSignObject2.golden
Binary file not shown.
Binary file modified pkg/integrity/testdata/TestSigner_Sign/OptSignObject3.golden
Binary file not shown.
Binary file modified pkg/integrity/testdata/TestSigner_Sign/OptSignObjects.golden
Binary file not shown.
Binary file modified pkg/integrity/testdata/TestSigner_Sign/TwoGroups.golden
Binary file not shown.
16 changes: 8 additions & 8 deletions pkg/siftool/testdata/Test_command_getDump/Three/out.golden
@@ -1,15 +1,15 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

{"version":1,"header":{"digest":"sha256:635fa0a14a8ef0c0351ed3e985799ed1d4f75ce973dea3cc76c99710795cc3f1"},"objects":[{"relativeId":0,"descriptorDigest":"sha256:3634ad01db0dd5482ecf685267b53d6201690438ca27c3d7ea91c971a1f41f92","objectDigest":"sha256:004dfc8da678c309de28b5386a1e9efd57f536b150c40d29b31506aa0fb17ec2"},{"relativeId":1,"descriptorDigest":"sha256:db74cb63348414def73535c9f0f83e8ad7df61229ed2806f4da8b69d6d7464d6","objectDigest":"sha256:5f78c33274e43fa9de5659265c1d917e25c03722dcb0b8d27db8d5feaa813953"}]}
{"version":1,"header":{"digest":"sha256:635fa0a14a8ef0c0351ed3e985799ed1d4f75ce973dea3cc76c99710795cc3f1"},"objects":[{"relativeId":0,"descriptorDigest":"sha256:3634ad01db0dd5482ecf685267b53d6201690438ca27c3d7ea91c971a1f41f92","objectDigest":"sha256:004dfc8da678c309de28b5386a1e9efd57f536b150c40d29b31506aa0fb17ec2"},{"relativeId":1,"descriptorDigest":"sha256:04b5f87c9692a54f80d10fb6af00c779763aeca29d610348854bd97cd8bf66fd","objectDigest":"sha256:9f9c4e5e131934969b4ac8f495691c70b8c6c8e3f489c2c9ab5f1af82bce0604"}]}
-----BEGIN PGP SIGNATURE-----

wsBzBAEBCAAnBQJe+oD0CZCiDCfuf/e6hBYhBBIEXIwLEATQWN5L7aIMJ+5/97qE
AADY9ggAlW/Y+BssNOLcCAiu0dzZCf5BfbzmOUQ+VNajAsZyOIJnW1t19lDYoRNx
x3YolyyRfEmw9Kf1n6fctDHGPyzRIIOc1/0CVQzNzfKZQO+x0+9qvurILADijY/3
1DKqhbxoO2a5iASXYHH9yYs3J82N3EKEYyFdDMTcHs4UijUnHvwcTt0smY6JQ9Su
vssWg+3qltuVjiYOQPgg9XR5i8suXE76poit9Ftp7jOD9eYtVcUEKRZLrVCsDJu9
77QvejJmgquueYX4pM2EuH9EOFnDV3gl4Cuocsn5OLDgfhYuT1t5Hay1iAPpJqm6
/EXQY7CECByIj6TCFurfXwc+uYSD9Q==
=rZoe
AAC46gf/VXyzZ649nttrX13JkM5kRVPlAIblBQxfoUxA1xwIXdRoM5ceDY0Em+YD
8b6Xl1w2sDTqo0R15cJSh8sf0ClFOvYpDQRNCwKx17k1Wd0gHcW4QVu6gJnlbNvN
o/EJdEN2TkbCM2aFvj34DAIfErRBIEsCeDDvJ/6WUSySWbnydfNU2pCsnK4A7l2H
KOXFzSaPijG9L/pU3O3vNZ+fXPffqHL9JVhs5Mt/Yo3oeoEnoVaKvJLGx/fyl+Gj
7qsfWFyHWzRCww9VFg/TCBeUku0CYRfXhxOgo4OuHNr8oo82rKDZU6+l3UZ2Sw8T
+kLe/zUkaILocGOvhvKdi630OGGb/Q==
=3Jq2
-----END PGP SIGNATURE-----
Binary file modified pkg/siftool/testdata/Test_command_getDump/Two/out.golden
Binary file not shown.
Expand Up @@ -5,4 +5,4 @@ Descriptors Total: 48
Descriptors Offset: 4096
Descriptors Size: 27 KiB
Data Offset: 32176
Data Size: 5 KiB
Data Size: 9 KiB
Expand Up @@ -5,4 +5,4 @@ Descriptors Total: 48
Descriptors Offset: 4096
Descriptors Size: 27 KiB
Data Offset: 32176
Data Size: 9 KiB
Data Size: 265 KiB
Expand Up @@ -5,4 +5,4 @@ Descriptors Total: 48
Descriptors Offset: 4096
Descriptors Size: 27 KiB
Data Offset: 32176
Data Size: 17 KiB
Data Size: 269 KiB
2 changes: 1 addition & 1 deletion pkg/siftool/testdata/Test_command_getInfo/Two/out.golden
Expand Up @@ -3,7 +3,7 @@
Group ID: 1
Linked ID: NONE
Offset: 36864
Size: 4
Size: 4096
Filesystem Type: Squashfs
Partition Type: *System
Architecture: 386
Expand Up @@ -2,4 +2,4 @@
ID |GROUP |LINK |SIF POSITION (start-end) |TYPE
------------------------------------------------------------------------------
1 |1 |NONE |32768-32772 |FS (Raw/System/386)
2 |1 |NONE |36864-36868 |FS (Squashfs/*System/386)
2 |1 |NONE |36864-40960 |FS (Squashfs/*System/386)
Expand Up @@ -2,5 +2,5 @@
ID |GROUP |LINK |SIF POSITION (start-end) |TYPE
------------------------------------------------------------------------------
1 |1 |NONE |32768-32772 |FS (Raw/System/386)
2 |1 |NONE |36864-36868 |FS (Squashfs/*System/386)
2 |1 |NONE |36864-40960 |FS (Squashfs/*System/386)
3 |NONE |1 (G) |40960-42014 |Signature (SHA-256)
Expand Up @@ -2,5 +2,5 @@
ID |GROUP |LINK |SIF POSITION (start-end) |TYPE
------------------------------------------------------------------------------
1 |1 |NONE |32768-32772 |FS (Raw/System/386)
2 |1 |NONE |36864-36868 |FS (Squashfs/*System/386)
3 |2 |NONE |40960-40964 |FS (Ext3/System/amd64)
2 |1 |NONE |36864-40960 |FS (Squashfs/*System/386)
3 |2 |NONE |40960-303104 |FS (Ext3/System/amd64)
Expand Up @@ -2,7 +2,7 @@
ID |GROUP |LINK |SIF POSITION (start-end) |TYPE
------------------------------------------------------------------------------
1 |1 |NONE |32768-32772 |FS (Raw/System/386)
2 |1 |NONE |36864-36868 |FS (Squashfs/*System/386)
3 |2 |NONE |40960-40964 |FS (Ext3/System/amd64)
4 |NONE |1 (G) |45056-46110 |Signature (SHA-256)
5 |NONE |2 (G) |49152-50007 |Signature (SHA-256)
2 |1 |NONE |36864-40960 |FS (Squashfs/*System/386)
3 |2 |NONE |40960-303104 |FS (Ext3/System/amd64)
4 |NONE |1 (G) |303104-304158 |Signature (SHA-256)
5 |NONE |2 (G) |307200-308055 |Signature (SHA-256)
18 changes: 13 additions & 5 deletions test/gen_sifs.go
@@ -1,4 +1,4 @@
// Copyright (c) 2020-2021, Sylabs Inc. All rights reserved.
// Copyright (c) 2020-2022, Sylabs Inc. All rights reserved.
// This software is licensed under a 3-clause BSD license. Please consult the LICENSE.md file
// distributed with the sources of this project regarding your rights to use or distribute this
// software.
Expand Down Expand Up @@ -66,15 +66,23 @@ func generateImages() error {
}

partPrimSys := func() (sif.DescriptorInput, error) {
return sif.NewDescriptorInput(sif.DataPartition,
bytes.NewReader([]byte{0xde, 0xad, 0xbe, 0xef}),
b, err := os.ReadFile(filepath.Join("input", "root.squashfs"))
if err != nil {
return sif.DescriptorInput{}, err
}

return sif.NewDescriptorInput(sif.DataPartition, bytes.NewReader(b),
sif.OptPartitionMetadata(sif.FsSquash, sif.PartPrimSys, "386"),
)
}

partSystemGroup2 := func() (sif.DescriptorInput, error) {
return sif.NewDescriptorInput(sif.DataPartition,
bytes.NewReader([]byte{0xba, 0xdd, 0xca, 0xfe}),
b, err := os.ReadFile(filepath.Join("input", "root.ext3"))
if err != nil {
return sif.DescriptorInput{}, err
}

return sif.NewDescriptorInput(sif.DataPartition, bytes.NewReader(b),
sif.OptPartitionMetadata(sif.FsExt3, sif.PartSystem, "amd64"),
sif.OptGroupID(2),
)
Expand Down
Binary file modified test/images/one-group-signed.sif
Binary file not shown.
Binary file modified test/images/one-group.sif
Binary file not shown.
Binary file modified test/images/two-groups-signed.sif
Binary file not shown.
Binary file modified test/images/two-groups.sif
Binary file not shown.
Binary file added test/input/root.ext3
Binary file not shown.
Binary file added test/input/root.squashfs
Binary file not shown.