mirror of
https://github.com/wolfcw/libfaketime.git
synced 2026-05-17 08:36:28 +03:00
We want to make it easier to test a bunch of different functions that might be invoked in constructors of other libraries. It seems conceivable that with these snippets, we could design other tests that also work across a wide range of intercepted functions.
8 lines
231 B
C
8 lines
231 B
C
unsigned int targ;
|
|
ssize_t ret = getrandom(&targ, sizeof(targ), 0);
|
|
if (ret == sizeof(targ)) {
|
|
printf("[%s] getrandom() yielded 0x%08x\n", where, targ);
|
|
} else {
|
|
printf("[%s] getrandom() failed with only %zd\n", where, ret);
|
|
}
|