Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Issue 3423022: Fix test suite deficiencies. (Closed)

Created:
10 years, 3 months ago by vb
Modified:
9 years, 6 months ago
CC:
chromium-os-reviews_chromium.org, Randall Spangler, gauravsh, Luigi Semenzato, Bill Richardson
Visibility:
Public.

Description

Fix test suite deficiencies. While trying to debug/test some vbutil_kernel changes (coming in a different CL) it was noticed that this utility is not covered by tests, and the script which runs it to set up further testing (tests/gen_fuzz_test_cases.sh) fails because of the key format mismatch. Some investigation has shown that this was left behind when vboot_reference key storage format was changed. To make gen_fuzz_test_cases.sh work again a new set of test keys is required, the keys are generated by tests/gen_test_keys.sh. This utility had to be changed to generate the proper set of wrapped public and private keys. Actually code in tests/gen_test_keys.shgenerate_keys() is copied in pasted in many scripts in this tree, this has to be refactored, but under a different CL. Once the changes were made, two scripts were run: ./tests/gen_test_keys.sh ./gen_test_cases.sh resulting in the new and updated keys generated. firmware/stub/tpm_lite_stub.c was edited to fix compilation warning issued when compiling with debugging enabled. Change-Id: I26a45cbad00d21a29195f2a89b4df7d3559133fe BUG=chromium-os:7178 TEST=described below The following commands succeed: vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv make make runtests ./tests/gen_fuzz_test_cases.sh ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note that ./tests/gen_fuzz_test_cases.sh was failing before this change. The upcoming CL modifying vbutil_kernel will make sure gen_fuzz_test_cases.sh is executed when tests are run and will enhance it to cover vbutil_kernel testing. Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=a222fbc

Patch Set 1 : Fix test suite deficiencies. #

Total comments: 2

Patch Set 2 : Address review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+309 lines, -273 lines) Patch
M firmware/stub/tpm_lite_stub.c View 1 chunk +1 line, -1 line 0 comments Download
M firmware/version.c View 1 chunk +1 line, -1 line 0 comments Download
M tests/gen_fuzz_test_cases.sh View 4 chunks +11 lines, -9 lines 0 comments Download
M tests/gen_test_keys.sh View 1 1 chunk +38 lines, -7 lines 0 comments Download
M tests/run_rsa_tests.sh View 2 chunks +3 lines, -1 line 0 comments Download
M tests/testcases/test_file View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testcases/test_file.rsa1024_sha1.sig View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testcases/test_file.rsa1024_sha256.sig View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testcases/test_file.rsa1024_sha512.sig View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testcases/test_file.rsa2048_sha1.sig View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testcases/test_file.rsa2048_sha256.sig View 1 1 chunk +2 lines, -1 line 0 comments Download
M tests/testcases/test_file.rsa2048_sha512.sig View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testcases/test_file.rsa4096_sha1.sig View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testcases/test_file.rsa4096_sha256.sig View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testcases/test_file.rsa4096_sha512.sig View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testcases/test_file.rsa8192_sha1.sig View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testcases/test_file.rsa8192_sha256.sig View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testcases/test_file.rsa8192_sha512.sig View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testcases/test_file.sha1.digest View 1 1 chunk +1 line, -1 line 0 comments Download
M tests/testcases/test_file.sha256.digest View 1 1 chunk +1 line, -1 line 0 comments Download
M tests/testcases/test_file.sha512.digest View 1 1 chunk +1 line, -1 line 0 comments Download
tests/testkeys/key_rsa1024.crt View 1 chunk +12 lines, -12 lines 0 comments Download
M tests/testkeys/key_rsa1024.keyb View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testkeys/key_rsa1024.pem View 1 chunk +13 lines, -13 lines 0 comments Download
A tests/testkeys/key_rsa1024.sha1.vbprivk View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testkeys/key_rsa1024.sha1.vbpubk View 0 chunks +-1 lines, --1 lines 0 comments Download
A tests/testkeys/key_rsa1024.sha256.vbprivk View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testkeys/key_rsa1024.sha256.vbpubk View 0 chunks +-1 lines, --1 lines 0 comments Download
A tests/testkeys/key_rsa1024.sha512.vbprivk View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testkeys/key_rsa1024.sha512.vbpubk View 0 chunks +-1 lines, --1 lines 0 comments Download
tests/testkeys/key_rsa2048.crt View 1 chunk +17 lines, -17 lines 0 comments Download
M tests/testkeys/key_rsa2048.keyb View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testkeys/key_rsa2048.pem View 1 chunk +25 lines, -25 lines 0 comments Download
A tests/testkeys/key_rsa2048.sha1.vbprivk View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testkeys/key_rsa2048.sha1.vbpubk View 0 chunks +-1 lines, --1 lines 0 comments Download
A tests/testkeys/key_rsa2048.sha256.vbprivk View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testkeys/key_rsa2048.sha256.vbpubk View 0 chunks +-1 lines, --1 lines 0 comments Download
A tests/testkeys/key_rsa2048.sha512.vbprivk View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testkeys/key_rsa2048.sha512.vbpubk View 0 chunks +-1 lines, --1 lines 0 comments Download
tests/testkeys/key_rsa4096.crt View 1 chunk +28 lines, -28 lines 0 comments Download
M tests/testkeys/key_rsa4096.keyb View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testkeys/key_rsa4096.pem View 1 chunk +49 lines, -49 lines 0 comments Download
A tests/testkeys/key_rsa4096.sha1.vbprivk View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testkeys/key_rsa4096.sha1.vbpubk View 0 chunks +-1 lines, --1 lines 0 comments Download
A tests/testkeys/key_rsa4096.sha256.vbprivk View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testkeys/key_rsa4096.sha256.vbpubk View 0 chunks +-1 lines, --1 lines 0 comments Download
A tests/testkeys/key_rsa4096.sha512.vbprivk View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testkeys/key_rsa4096.sha512.vbpubk View 0 chunks +-1 lines, --1 lines 0 comments Download
tests/testkeys/key_rsa8192.crt View 1 chunk +49 lines, -49 lines 0 comments Download
M tests/testkeys/key_rsa8192.keyb View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testkeys/key_rsa8192.pem View 1 chunk +97 lines, -97 lines 0 comments Download
A tests/testkeys/key_rsa8192.sha1.vbprivk View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testkeys/key_rsa8192.sha1.vbpubk View 0 chunks +-1 lines, --1 lines 0 comments Download
A tests/testkeys/key_rsa8192.sha256.vbprivk View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testkeys/key_rsa8192.sha256.vbpubk View 0 chunks +-1 lines, --1 lines 0 comments Download
A tests/testkeys/key_rsa8192.sha512.vbprivk View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/testkeys/key_rsa8192.sha512.vbpubk View 0 chunks +-1 lines, --1 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
vb
10 years, 2 months ago (2010-09-29 19:37:37 UTC) #1
gauravsh
lgtm http://codereview.chromium.org/3423022/diff/11001/12004 File tests/gen_test_keys.sh (right): http://codereview.chromium.org/3423022/diff/11001/12004#newcode16 tests/gen_test_keys.sh:16: name_indices=( 1 256 512 ) nit: name_indices is ...
10 years, 2 months ago (2010-09-30 02:48:31 UTC) #2
vb
10 years, 2 months ago (2010-09-30 03:24:31 UTC) #3
Thank you for the review, retested, about to commit.

http://codereview.chromium.org/3423022/diff/11001/12004
File tests/gen_test_keys.sh (right):

http://codereview.chromium.org/3423022/diff/11001/12004#newcode16
tests/gen_test_keys.sh:16: name_indices=( 1 256 512 )
On 2010/09/30 02:48:31, gauravsh wrote:
> nit: name_indices is not very descriptive. name_indices for what?  call this
> sha_type of something similar

Done.

Powered by Google App Engine
This is Rietveld 408576698