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

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

Build:
DEFAULT BRANCH: master
Ran 11 Sep 2017 06:00PM UTC
Files 688
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

11 Sep 2017 05:53PM UTC coverage: 65.441% (+0.02%) from 65.422%
767.1

push

travis-ci

williamcroberts
tpm2_nvread: only print the number of bytes read

The nv_read() function queries the NV index public data size to know how
much bytes have to be read. But the reported size may be bigger than the
actual size read from the NV area.

So instead of using the reported NV area public data size for printing,
use the read NV area size.

For example using the NV are public data size may lead to the following:

$ echo -n foobar > data.txt

$ hexdump -C -v data.txt
00000000  66 6f 6f 62 61 72                                 |foobar|
00000006

$ tpm2_nvwrite -x 0x1500018 -a 0x40000001 -f data.txt
66 6f 6f 62 61 72

$ tpm2_nvread -x 0x1500018 -a 0x40000001 -s 6 -o 0
data_size 32 ctx.size_to_read 0 data_offset 6
000000: 66 6f 6f 62 61 72 00 00 c8 ad 07 91 78 7f 00 00  foobar......x...
000010: 10 60 b2 e9 92 55 00 00 05 00 00 00 00 00 00 00  .`...U..........

But after this patch using the read size, the data is correctly printed:

$ tpm2_nvread -x 0x1500018 -a 0x40000001 -s 6 -o 0
000000: 66 6f 6f 62 61 72                                foobar

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

3488 of 5330 relevant lines covered (65.44%)

33.11 hits per line

Source Files on job 767.1
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 767
  • Travis Job 767.1
  • 0d4aedd0 on github
  • Prev Job for on master (#765.1)
  • Next Job for on master (#772.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