ligurio / unreliablefs

A FUSE-based fault injection filesystem.
https://ligurio.github.io/unreliablefs/unreliablefs.1.html
MIT License
174 stars 9 forks source link

Support injections used in sqlite testing #63

Closed ligurio closed 3 years ago

ligurio commented 3 years ago

https://www.sqlite.org/src/doc/trunk/src/test_vfs.c

  TestFaultInject ioerr_err;
  TestFaultInject full_err;
  TestFaultInject cantopen_err;

...

  if( (p->mask&TESTVFS_OPEN_MASK) &&  tvfsInjectIoerr(p) ) return SQLITE_IOERR;
  if( tvfsInjectCantopenerr(p) ) return SQLITE_CANTOPEN;
  if( tvfsInjectFullerr(p) ) return SQLITE_FULL;
ligurio commented 3 years ago

All SQLite error injections could be implemented with existed error injections in unreliablefs.