Skip to content

Commit

Permalink
ima_setup.sh: Quit testing when failed to get digest
Browse files Browse the repository at this point in the history
There is no point to continue when get_algorithm_digest() fails.

Fixes: 61852d3 ("IMA: Move ima_check to ima_setup.sh")
Signed-off-by: Petr Vorel <[email protected]>
  • Loading branch information
pevik committed Jan 14, 2025
1 parent afc8d13 commit 48dda81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion testcases/kernel/security/integrity/ima/tests/ima_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ ima_check()
algorithm=$(echo "$tmp" | cut -d'|' -f1)
digest=$(echo "$tmp" | cut -d'|' -f2)
else
tst_res TBROK "failed to get algorithm/digest for '$test_file': $tmp"
tst_brk TBROK "failed to get algorithm/digest for '$test_file': $tmp"
fi

tst_res TINFO "computing digest for $algorithm algorithm"
Expand Down

0 comments on commit 48dda81

Please sign in to comment.