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

tpm2-software / tpm2-tools / 745 / 1
0%
master: 0%

Build:
DEFAULT BRANCH: master
Ran 06 Sep 2017 03:21PM UTC
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

06 Sep 2017 03:13PM UTC coverage: 62.684% (-0.04%) from 62.719%
745.1

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

Source Files on job 745.1
  • Tree
  • List 0
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 745
  • Travis Job 745.1
  • b410e7f4 on github
  • Prev Job for on master (#743.1)
  • Next Job for on master (#752.1)
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