diff --git a/testcases/kernel/security/integrity/ima/src/ima_boot_aggregate.c b/testcases/kernel/security/integrity/ima/src/ima_boot_aggregate.c index 68d12fc3c2f..420b0c736d3 100644 --- a/testcases/kernel/security/integrity/ima/src/ima_boot_aggregate.c +++ b/testcases/kernel/security/integrity/ima/src/ima_boot_aggregate.c @@ -116,7 +116,8 @@ static void do_test(void) break; } #endif - fread(event.data, event.header.len, 1, fp); + if (fread(event.data, event.header.len, 1, fp) != 1) + tst_brk(TBROK, "failed to read 1 byte"); } SAFE_FCLOSE(fp);