enh: simulate random i/o error

This commit is contained in:
kailixu 2024-08-12 13:29:19 +08:00
parent 787715a519
commit 563920eea8
1 changed files with 3 additions and 1 deletions

View File

@ -64,7 +64,9 @@ typedef struct TdFile {
#define FILE_WITH_LOCK 1
#define BUILD_WITH_RAND_IO_ERR BUILD_WITH_RAND_ERR
#ifdef BUILD_WITH_RAND_ERR
#define BUILD_WITH_RAND_IO_ERR
#endif
#define STUB_RAND_IO_ERR(ret) \
if (tsEnableRandErr) { \
uint32_t r = taosRand() % 10001; \