util/libreboot-utils: randomisation test

to test the effectiveness of the rand function

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-25 22:20:19 +00:00
parent dc7a02da2d
commit e0319f0116
5 changed files with 79 additions and 10 deletions
+3 -7
View File
@@ -100,17 +100,13 @@ win_lottery(void)
win:
free_if_null(&s1), free_if_null(&s2);
err_no_cleanup(0, ELOTTERY,
"Congratulations! you won the errno lottery");
exit(1);
return -1;
printf("Congratulations! you won the errno lottery!\n");
return 1;
err:
/* the lottery won you */
free_if_null(&s1), free_if_null(&s2);
err_no_cleanup(0, EFAULT, "lottery won you");
exit(1);
return -1;
return 0;
}
char *