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

tpm2-software / tpm2-tools / 767
0%

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

pending completion
767

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

Jobs
ID Job ID Ran Files Coverage
1 767.1 11 Sep 2017 06:00PM UTC 0
65.44
Travis Job 767.1
Source Files on build 767
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #767
  • 0d4aedd0 on github
  • Prev Build on master (#765)
  • Next Build on master (#772)
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