tests: TEST_FAIL() support for os_get_random()

This allows more testing for rarely executed error paths.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2017-01-07 22:15:41 +02:00
parent 7ba94fc4b0
commit 5de6823f7a

View file

@ -80,6 +80,9 @@ int os_get_reltime(struct os_reltime *t)
struct timespec ts;
int res;
if (TEST_FAIL())
return -1;
while (1) {
res = clock_gettime(clock_id, &ts);
if (res == 0) {