2 * Tests miscellaneous syscalls
10 #include <sys/random.h>
13 #include "../../../config.h"
14 #include "../../memcheck.h"
19 if (-1 == uuidgen(&s
, 1))
21 perror("uuidgen failed:");
25 if (-1 == uuidgen(v
, 10))
27 perror("uuidgen failed:");
30 #if defined(HAVE_GETRANDOM)
33 if (-1 == getrandom(buf
, 100, GRND_NONBLOCK
))
35 perror("getrandom failed:");
41 struct uuid
* ps
= malloc(2*sizeof(struct uuid
));
46 VALGRIND_MAKE_MEM_UNDEFINED(&badint
, sizeof(int));
49 #if defined(HAVE_GETRANDOM)
52 VALGRIND_MAKE_MEM_UNDEFINED(&badint
, sizeof(int));
53 getrandom(buf
, badint
, badint
);
55 char* buf2
= malloc(100);
58 getrandom(buf2
, 100, 0);