diff options
author | Joel Kitching <kitching@google.com> | 2019-04-08 15:07:21 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-04-10 09:57:18 -0700 |
commit | b9860af322a4c20a9504879b2a944f26e60be238 (patch) | |
tree | c9c4444064f69d0365678373be01cba88c8d33b9 /tests | |
parent | b720a103b75ac1516736e57930407e2e0e9bb669 (diff) | |
download | vboot-b9860af322a4c20a9504879b2a944f26e60be238.tar.gz |
vboot: fix test_rwsig.sh permissions issue
Copy hammer_dev.bin to temporary file before running
`futility sign` to avoid permissions issue when running
under ebuild environment.
Also correct an indentation issue.
BUG=chromium:950425, chromium:605348
TEST=FEATURES=test USE=cros_host ebuild vboot_reference-9999.ebuild test
BRANCH=none
Change-Id: I689be46d30b7bf78c6643e88a094e4f4ab311e20
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1557662
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/futility/test_rwsig.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/futility/test_rwsig.sh b/tests/futility/test_rwsig.sh index 6a28f029..fccd9ca6 100755 --- a/tests/futility/test_rwsig.sh +++ b/tests/futility/test_rwsig.sh @@ -19,8 +19,11 @@ EC_RW="EC_RW.bin" set -o pipefail infile=${DATADIR}/hammer_dev.bin +outfile=${TMP}.hammer_dev.bin +cp ${infile} ${outfile} # Signing without private key should extract EC_RW.bin -${FUTILITY} sign --type rwsig --version 2 ${infile} +${FUTILITY} sign --type rwsig --version 2 ${outfile} +cmp ${infile} ${outfile} cmp ${EC_RW} ${DATADIR}/${EC_RW} for s in $SIGS; do @@ -45,7 +48,7 @@ for s in $SIGS; do cp ${infile} ${outfile} - # Sign ec.bin with a new private key + # Sign ec.bin with a new private key ${FUTILITY} sign --type rwsig --prikey ${outkeys}.vbprik2 \ --version 2 ${outfile} # Check EC_RW.bin is produced |