Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow (temporarily) exit codes 0 and 1 for regstatus, cvstatus and add (with incorrect PCR banks) #404

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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