Skip to content

Commit

Permalink
Allow (temporarily) exit codes 0 and 1 for regstatus, cvstatus and
Browse files Browse the repository at this point in the history
`add` (with incorrect PCR banks)

Signed-off-by: Marcio Silva <[email protected]>
  • Loading branch information
Marcio Silva authored and kkaarreell committed Jul 5, 2023
1 parent f3d546b commit 8ffd7ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions functional/keylime_tenant-commands-on-localhost/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ rlJournalStart
rlPhaseEnd

rlPhaseStartTest "-c regstatus"
rlRun -s "keylime_tenant -c regstatus"
rlRun -s "keylime_tenant -c regstatus" 0,1
rlAssertGrep "{\"code\": 200, \"status\": \"Agent $AGENT_ID exists on registrar 127.0.0.1 port 8891.\"" $rlRun_LOG
rlPhaseEnd

Expand Down Expand Up @@ -105,14 +105,14 @@ rlJournalStart

rlPhaseStartTest "-c regdelete"
rlRun -s "keylime_tenant -c regdelete"
rlRun -s "keylime_tenant -c regstatus"
rlRun -s "keylime_tenant -c regstatus" 0,1
rlAssertGrep "{\"code\": 404, \"status\": \"Agent $AGENT_ID does not exist on registrar 127.0.0.1 port 8891.\"" $rlRun_LOG
rlPhaseEnd

rlPhaseStartTest "-c delete"
rlRun -s "keylime_tenant -c delete"
rlAssertGrep "(INFO - CV completed deletion of agent $AGENT_ID|INFO - Agent $AGENT_ID deleted from the CV)" $rlRun_LOG -E
rlRun -s "keylime_tenant -c cvstatus"
rlRun -s "keylime_tenant -c cvstatus" 0,1
rlAssertGrep "Verifier at 127.0.0.1 with Port 8881 does not have agent $AGENT_ID" $rlRun_LOG
rlPhaseEnd

Expand Down
2 changes: 1 addition & 1 deletion functional/measured-boot-swtpm-sanity/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ rlJournalStart
# use installed create_mb_refstate from /usr/share/keylime/scripts
rlRun "python3 /usr/share/keylime/scripts/create_mb_refstate /var/tmp/binary_bios_measurements mb_refstate2.txt"
#rlRun "tsseventextend -tpm -if /var/tmp/binary_bios_measurements"
rlRun -s "keylime_tenant -u $AGENT_ID --verify --tpm_policy '{}' --runtime-policy policy.json -f /etc/hostname -c add --mb_refstate mb_refstate2.txt"
rlRun -s "keylime_tenant -u $AGENT_ID --verify --tpm_policy '{}' --runtime-policy policy.json -f /etc/hostname -c add --mb_refstate mb_refstate2.txt" 0,1
rlRun "limeWaitForAgentStatus $AGENT_ID 'Tenant Quote Failed'"
rlAssertGrep "keylime.tpm - ERROR - For PCR 0 and hash sha256 the boot event log has value '.*' but the agent .*returned '.*'" $(limeVerifierLogfile) -E
rlPhaseEnd
Expand Down

0 comments on commit 8ffd7ed

Please sign in to comment.