selftests: tpm2: remove redundant ord()
authorTzung-Bi Shih <tzungbi@kernel.org>
Fri, 3 Feb 2023 10:14:30 +0000 (18:14 +0800)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 13 Feb 2023 16:09:46 +0000 (09:09 -0700)
commit787fccb321dd6c1c464bb11d952074edbde5de36
tree38f1fe57e593c6fd44f355481415ad1f7f4be638
parent4ebe33398c40c1118b4d8546978036c0e0032d1b
selftests: tpm2: remove redundant ord()

When testing with FLAG_DEBUG enabled client, it emits the following
error messages:

File "/root/tpm2/tpm2.py", line 347, in hex_dump
    d = [format(ord(x), '02x') for x in d]
File "/root/tpm2/tpm2.py", line 347, in <listcomp>
    d = [format(ord(x), '02x') for x in d]
TypeError: ord() expected string of length 1, but int found

The input of hex_dump() should be packed binary data.  Remove the
ord().

Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/tpm2/tpm2.py