• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tpm2-software / tpm2-tools / 745
0%

Build:
DEFAULT BRANCH: master
Ran 06 Sep 2017 03:21PM UTC
Jobs 1
Files 684
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
745

push

travis-ci

williamcroberts
test: fix tpm2_nv.sh passing a hex number as head command -c argument

The test TPM_PT_NV_INDEX_MAX fixed TPM2 property to know the NV index data
area maximum size:

$ tpm2_dump_capability -c properties-fixed | grep TPM_PT_NV_INDEX_MAX | sed -r -e 's/.*(0x[0-9a-f]+)/\1/g'
0x00000800

And then passes this value to the head command as a -c option argument:

$ base64 /dev/urandom | head -c 0x00000800
head: invalid number of bytes: ‘0x00000800’

This is making the test to fail, but since the exit code for the mentioned
command is not checked, it's still reported as if the test succeed.

$ ./test_tpm2_nv.sh
70 6c 65 61 73 65 31 32 33 61 62 63 0a

000000: e8 5d ca 86 cc 7f 00 00 e8 5d ca 86 cc 7f 00 00  .].......]......
000010: 30 e0 87 5a 79 55 00 00 05 00 00 00 00 00 00 00  0..ZyU..........
  0. NV Index: 0x1500018
release the nv index OK!
head: invalid number of bytes: ‘0x00000800’
ERROR: Failed to read NVRAM area at index 0x1000000 (16777216). Error:0x14a
  0. NV Index: 0x1000000

$ echo $?
0

Fixes: #463

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>

3578 of 5708 relevant lines covered (62.68%)

28.49 hits per line

Jobs
ID Job ID Ran Files Coverage
1 745.1 06 Sep 2017 03:21PM UTC 0
62.68
Travis Job 745.1
Source Files on build 745
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #745
  • b410e7f4 on github
  • Prev Build on master (#743)
  • Next Build on master (#752)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc