Fix tests/futility/test_show_contents.sh
authorSophie Brun <sophie@freexian.com>
Tue, 6 Feb 2018 15:29:11 +0000 (15:29 +0000)
committerRaphaël Hertzog <hertzog@debian.org>
Tue, 6 Feb 2018 15:29:11 +0000 (15:29 +0000)
Last-Update: 2017-11-14

Tests compare generated files containing the file path and upstream files
("expected output") containing path like
"/mnt/host/source/src/platform/vboot_reference/tests/".  They can't
match. Drop these lines mentioning paths in the generated files and in
the upstream provided files to avoid failures.
Last-Update: 2017-11-14
Gbp-Pq: Name 0011-fix-tests-show-contents.patch

16 files changed:
tests/futility/expect_output/show.tests_devkeys_kernel.keyblock
tests/futility/expect_output/show.tests_devkeys_root_key.vbprivk
tests/futility/expect_output/show.tests_devkeys_root_key.vbpubk
tests/futility/expect_output/show.tests_futility_data_bios_mario_mp.bin
tests/futility/expect_output/show.tests_futility_data_bios_zgb_mp.bin
tests/futility/expect_output/show.tests_futility_data_fw_gbb.bin
tests/futility/expect_output/show.tests_futility_data_fw_vblock.bin
tests/futility/expect_output/show.tests_futility_data_kern_preamble.bin
tests/futility/expect_output/show.tests_futility_data_sample.vbprik2
tests/futility/expect_output/show.tests_futility_data_sample.vbpubk2
tests/futility/expect_output/show.tests_testkeys_key_rsa2048.pem
tests/futility/expect_output/show.tests_testkeys_key_rsa8192.pub.pem
tests/futility/expect_output/vbutil_key.tests_devkeys_root_key.vbprivk
tests/futility/expect_output/vbutil_key.tests_devkeys_root_key.vbpubk
tests/futility/expect_output/vbutil_keyblock.tests_devkeys_kernel.keyblock
tests/futility/test_show_contents.sh

index 16d56a7a56f7f1f148190eed4f8642999a781556..4953eda908fb9142a026467c11074f49d94478c6 100644 (file)
@@ -1,4 +1,3 @@
-Key block:               /mnt/host/source/src/platform/vboot_reference/tests/devkeys/kernel.keyblock
   Signature:             ignored
   Size:                  0x4b8
   Flags:                 7  !DEV DEV !REC
index 40760ec90019b7f8842e061070476ef715d496fb..d9e7753c61f91f721f612e0808d2b47a220ce321 100644 (file)
@@ -1,4 +1,3 @@
-Private Key file:      /mnt/host/source/src/platform/vboot_reference/tests/devkeys/root_key.vbprivk
   Vboot API:           1.0
   Algorithm:           11 RSA8192 SHA512
   Key sha1sum:         b11d74edd286c144e1135b49e7f0bc20cf041f10
index d6f26fbac0e02534a4bd0975960daabc7a7ba617..f0d04c36037486fbeb4afd94aad71049defafecb 100644 (file)
@@ -1,4 +1,3 @@
-Public Key file:       /mnt/host/source/src/platform/vboot_reference/tests/devkeys/root_key.vbpubk
   Vboot API:           1.0
   Algorithm:           11 RSA8192 SHA512
   Key Version:         1
index 6241d7a82c60cc925116d68cc4e9d3eb6a47d7ef..ca27ac858cdb6d45a90bab5d6914862407234a61 100644 (file)
@@ -1,4 +1,3 @@
-BIOS:                    /mnt/host/source/src/platform/vboot_reference/tests/futility/data/bios_mario_mp.bin
 GBB header:              GBB Area
   Version:               1.0
   Flags:                 0x00000000
index 211068551a81fc7a17833d136e88ed5d8a1bf178..2a99fde7b1387dd17ceb39d0f137239a60a63042 100644 (file)
@@ -1,4 +1,3 @@
-BIOS:                    /mnt/host/source/src/platform/vboot_reference/tests/futility/data/bios_zgb_mp.bin
 GBB header:              GBB
   Version:               1.0
   Flags:                 0x00000000
index 74ebc98cee2284ec4a1ab99847a90a83092cc320..b6b1c535113b0e10c5f8e57804e684625aaac716 100644 (file)
@@ -1,4 +1,3 @@
-GBB header:              /mnt/host/source/src/platform/vboot_reference/tests/futility/data/fw_gbb.bin
   Version:               1.1
   Flags:                 0x00000039
   Regions:                 offset       size
index 67ee12fecf318df39725e03cfa06313ace0ac77b..40555e8dac32d0f17c27b6b4bb7a4cf612d1512f 100644 (file)
@@ -1,4 +1,3 @@
-Key block:               /mnt/host/source/src/platform/vboot_reference/tests/futility/data/fw_vblock.bin
   Signature:             ignored
   Size:                  0x8b8
   Flags:                 7  !DEV DEV !REC
index c64868393414e8f796af96cf39892e83b54aada1..2ac275dab0e3af400a1278ef249fddd87b437a11 100644 (file)
@@ -1,4 +1,3 @@
-Kernel partition:        /mnt/host/source/src/platform/vboot_reference/tests/futility/data/kern_preamble.bin
 Key block:
   Signature:             ignored
   Size:                  0x5b8
index 059972c789d2304f6e197eb71e842743a14bdede..73c4a79f55bc90af208e3313ff545fe2eced67e7 100644 (file)
@@ -1,4 +1,3 @@
-Private key file:      /mnt/host/source/src/platform/vboot_reference/tests/futility/data/sample.vbprik2
   Vboot API:           2.1
   Desc:                "sample vb21 keypair"
   Signature Algorithm: 5 RSA8192
index cd5654f0575b81ab7f54c07366e4213be845d078..9a6f301c8a20805adbaa5f877f907db9255e0ee4 100644 (file)
@@ -1,4 +1,3 @@
-Public Key file:       /mnt/host/source/src/platform/vboot_reference/tests/futility/data/sample.vbpubk2
   Vboot API:           2.1
   Desc:                "sample vb21 keypair"
   Signature Algorithm: 5 RSA8192
index f3069968f1152d6937f60985f912597e1f0616ae..3ba04ca01a5318f0250498db99d89e24727bb6b4 100644 (file)
@@ -1,3 +1,2 @@
-Private Key file:      /mnt/host/source/src/platform/vboot_reference/tests/testkeys/key_rsa2048.pem
   Key length:          2048
   Key sha1sum:         bfb2fa9188a87bf766dd7c313ea6802553b646b6
index 8b4993a4739d770c488bdb696ec55f26a0144ca1..3a16a5710e6e6308d1b792c68168527803ad5db7 100644 (file)
@@ -1,3 +1,2 @@
-Public Key file:      /mnt/host/source/src/platform/vboot_reference/tests/testkeys/key_rsa8192.pub.pem
   Key length:          8192
   Key sha1sum:         f1afa44a1aed0d0e9ff630579df920a725e9de5e
index fa020be59a546a77c621924f60143fe67935adf7..c17fd2aff03ed8b729eca86a2520a7fd6cc3d878 100644 (file)
@@ -1,2 +1 @@
-Private Key file:  /mnt/host/source/src/platform/vboot_reference/tests/devkeys/root_key.vbprivk
 Algorithm:         11 RSA8192 SHA512
index b0cd54a1892d2279d3a18962490d6f7a65edda7f..88dafa17ff7f1b50f8a9bdc4a8643ae0e3ae37cc 100644 (file)
@@ -1,4 +1,3 @@
-Public Key file:   /mnt/host/source/src/platform/vboot_reference/tests/devkeys/root_key.vbpubk
 Algorithm:         11 RSA8192 SHA512
 Key Version:       1
 Key sha1sum:       b11d74edd286c144e1135b49e7f0bc20cf041f10
index 0dfa97374752f848764478feb6ffcd5b1975186e..c1c9c52eec6314c4cbb64174129e54266d9b4047 100644 (file)
@@ -1,4 +1,3 @@
-Key block file:       /mnt/host/source/src/platform/vboot_reference/tests/devkeys/kernel.keyblock
 Signature             valid
 Flags:                7  !DEV DEV !REC
 Data key algorithm:   4 RSA2048 SHA256
index f24c434d00f9668d83a07f7913713a5d20ec226a..028d7dbdf750480ca2bddf8b86dcb75f6cd98df5 100755 (executable)
@@ -29,7 +29,7 @@ for file in $SHOW_FILES; do
     outfile="show.${file//\//_}"
     gotfile="${OUTDIR}/${outfile}"
     wantfile="${SRCDIR}/tests/futility/expect_output/${outfile}"
-    ${FUTILITY} show "${SRCDIR}/${file}" | tee "${gotfile}"
+    ${FUTILITY} show "${SRCDIR}/${file}" | grep -v "tests/" | tee "${gotfile}"
 
     # Uncomment this to update the expected output
     #cp ${gotfile} ${wantfile}
@@ -48,7 +48,7 @@ for file in $VBUTIL_KEY_FILES; do
     outfile="vbutil_key.${file//\//_}"
     gotfile="${OUTDIR}/${outfile}"
     wantfile="${SRCDIR}/tests/futility/expect_output/${outfile}"
-    ${FUTILITY} vbutil_key --unpack "${SRCDIR}/${file}" | tee "${gotfile}"
+    ${FUTILITY} vbutil_key --unpack "${SRCDIR}/${file}" | grep -v "tests/" | tee "${gotfile}"
 
     # Uncomment this to update the expected output
     #cp ${gotfile} ${wantfile}
@@ -64,7 +64,7 @@ gotfile="${OUTDIR}/${outfile}"
 wantfile="${SRCDIR}/tests/futility/expect_output/${outfile}"
 ${FUTILITY} vbutil_keyblock --unpack "${SRCDIR}/${file}" \
     --signpubkey "${SRCDIR}/tests/devkeys/kernel_subkey.vbpubk" \
-    | tee "${gotfile}"
+    | grep -v "tests/" | tee "${gotfile}"
 
 # Uncomment this to update the expected output
 #cp ${gotfile} ${wantfile}