Commit Graph

6 Commits

Author SHA1 Message Date
Randall Spangler
844bce5747 Run some tests under qemu when cross-compiling
BUG=chromium-os:26317
BRANCH=none
TEST=manual

sudo FEATURES=test emerge vboot_reference
FEATURES=test emerge-link vboot_reference chromeos-u-boot chromeos-installer
FEATURES=test emerge-daisy vboot_reference chromeos-u-boot chromeos-installer
make && make runtests (both inside and outside chroot)

Change-Id: Ie829e375736ce0df46ddd5a3345efb0ca7e33aba
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41317
2013-01-16 11:22:38 -08:00
vbendeb
a222fbc00e 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.

Review URL: http://codereview.chromium.org/3423022
2010-09-29 20:25:29 -07:00
Gaurav Shah
0ec7078d5b Rewrite gen_fuzz_test_cases.sh script to use new signing utilities.
TEST=Generated images verify successfully using right keys.

Review URL: http://codereview.chromium.org/2836036
2010-06-29 19:46:11 -07:00
Bill Richardson
f5db4b86fa Modifying the kernel_utility tool to create our magic blob.
For the --generate operation, the --in <file> option is gone and there are
three new required options:

  --vmlinuz <file>         Embedded kernel image
  --config <file>          Embedded kernel command-line parameters
  --bootloader <file>      Embedded bootloader stub

This takes the specified kernel, extracts the 32-bit component, and combines
that with the configuration file (essentially just the kernel cmdline
string) and the bootstub image . The resulting blob is signed and ready to
put in a kernel partition.

There's also an optional --padding parameter, to specify how much extra
(unsigned) space to leave between the signature header and the kernel blob.
The default is 0x4000, which is about four times as much needed when using
the largest signature size we currently support.

Review URL: http://codereview.chromium.org/2283005
2010-05-27 11:15:14 -07:00
Gaurav Shah
445925fe0f Vboot Reference: Spring cleaning of test scripts.
Moved duplicated code to "common.sh". Make directory detection more robust.

Review URL: http://codereview.chromium.org/1101004
2010-03-19 16:19:09 -07:00
Gaurav Shah
ccaa90f735 Add fuzz testing driver programs for kernel and firmware verification.
The driver programs are useful in quick and dirty fuzz testing of the verification code with blind smartfuzzers like Bunny (http://code.google.com/p/bunny-the-fuzzer/).

Also fixes a bug with image generation in kernel_utility.

Tests: All existing tests still pass. VerifyKernel() and VerifyFirmware() can successfully verify images generated by {firmware|kernel}_utility.

Review URL: http://codereview.chromium.org/975007
2010-03-17 20:40:23 -07:00