mirror of https://github.com/wolfSSL/wolfTPM.git
tests: Pass test with ibmswtpm2
RC handle number modifier is added to response code.pull/147/head
parent
52f3972d3f
commit
ba75a0b438
|
@ -41,7 +41,7 @@ if [ 0 -ne $? ]; then
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
# start swtpm server
|
# start swtpm server
|
||||||
$SWTPM_EXEC >/dev/null &
|
$SWTPM_EXEC -rm >/dev/null &
|
||||||
swtpm_pid=$!
|
swtpm_pid=$!
|
||||||
ps $swtpm_pid > /dev/null
|
ps $swtpm_pid > /dev/null
|
||||||
if [ 0 -eq $? ]; then
|
if [ 0 -eq $? ]; then
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
#define AssertInt(x, y, op, er) do { \
|
#define AssertInt(x, y, op, er) do { \
|
||||||
int _x = (int)x; \
|
int _x = (int)x; \
|
||||||
int _y = (int)y; \
|
int _y = (int)y; \
|
||||||
Assert(_x op _y, ("%s " #op " %s", #x, #y), ("%d " #er " %d", _x, _y)); \
|
Assert(_x op _y, ("%s " #op " %s", #x, #y), ("%d(0x%x) " #er " %d(0x%x)", _x, _x, _y, _y)); \
|
||||||
} while(0)
|
} while(0)
|
||||||
#define AssertIntEQ(x, y) AssertInt(x, y, ==, !=)
|
#define AssertIntEQ(x, y) AssertInt(x, y, ==, !=)
|
||||||
#define AssertIntNE(x, y) AssertInt(x, y, !=, ==)
|
#define AssertIntNE(x, y) AssertInt(x, y, !=, ==)
|
||||||
|
@ -199,10 +199,9 @@ static void test_wolfTPM2_ReadPublicKey(void)
|
||||||
/* Test success: read storage primary key */
|
/* Test success: read storage primary key */
|
||||||
rc = wolfTPM2_ReadPublicKey(&dev, &storageKey,
|
rc = wolfTPM2_ReadPublicKey(&dev, &storageKey,
|
||||||
TPM2_DEMO_STORAGE_KEY_HANDLE);
|
TPM2_DEMO_STORAGE_KEY_HANDLE);
|
||||||
if (rc == TPM_RC_HANDLE) {
|
if ((rc & RC_MAX_FMT1) == TPM_RC_HANDLE) {
|
||||||
rc = 0; /* okay if not found */
|
rc = 0; /* okay if not found */
|
||||||
}
|
}
|
||||||
|
|
||||||
AssertIntEQ(rc, 0);
|
AssertIntEQ(rc, 0);
|
||||||
wolfTPM2_Cleanup(&dev);
|
wolfTPM2_Cleanup(&dev);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue