fuzz: allow overriding LWIP_RAND for fuzz tests
Fuzz tests need reproducible code, so we need an "unsafe" version of LWIP_RAND() in this case... Also, to reproduce fuzz tests cases from Linux on Windows, LWIP_RAND_FOR_FUZZ_SIMULATE_GLIBC provides the first 20 random numbers that glibc would have...
This commit is contained in:
@@ -382,6 +382,15 @@ extern "C" {
|
||||
#define LWIP_PROVIDE_ERRNO
|
||||
#endif
|
||||
|
||||
/* Use a special, reproducable version of rand() for fuzz tests? */
|
||||
#ifdef LWIP_RAND_FOR_FUZZ
|
||||
#ifdef LWIP_RAND
|
||||
#undef LWIP_RAND
|
||||
#endif
|
||||
u32_t lwip_fuzz_rand(void);
|
||||
#define LWIP_RAND() lwip_fuzz_rand()
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user