test: Use Fatalf instead of Errorf to prevent segfault

Signed-off-by: Joe Richey <joerichey@google.com>
This commit is contained in:
Joe Richey 2022-03-23 19:32:18 -07:00 committed by Joseph Richey
parent 03018e6828
commit df6b91cbdb

View File

@ -114,12 +114,12 @@ func TestSecureBootBug157(t *testing.T) {
events, err := elr.Verify(pcrs)
if err != nil {
t.Errorf("failed to verify log: %v", err)
t.Fatalf("failed to verify log: %v", err)
}
sbs, err := ParseSecurebootState(events)
if err != nil {
t.Errorf("failed parsing secureboot state: %v", err)
t.Fatalf("failed parsing secureboot state: %v", err)
}
if got, want := len(sbs.PostSeparatorAuthority), 3; got != want {
t.Errorf("len(sbs.PostSeparatorAuthority) = %d, want %d", got, want)