dolthub / fuzzer

Fuzzer for Dolt repositories
3 stars 1 forks source link

Allow fuzzer runs to be reproducible #2333

Open PavelSafronov opened 1 year ago

PavelSafronov commented 1 year ago

Allow fuzzer runs to be reproducible by writing all the random bytes to disk and allowing these to be read in again instead of generating new random bytes.

Testing:

  1. clone repo and switch to branch pavel/seed-files
  2. download seed-out-sample.bin from here (ping me if you're having issues, everyone at dolt should be able to access the file)
  3. put seed-out-sample.bin anywhere you want, get an absolute path to it
  4. run go run . basic --cycles 1 --seed-in-file "/REPLACE_DIR/seed-out-sample.bin"
  5. the fuzzer should fail with the following error
    On table `jPJPfwiimT`, internal data contains ['0b5g7oJ4Bror6nKHFOXx4PaFGzsV25vTBRAb9y3lvGkTXk7wNJMKN7s1VfqtZGheng',203039471010,24,'.T.H%RYR40f=1k3!no51g+j0aV#ZDH2jlimrZ0A-m*D4~Ntqo|=RQU@C=8O1zTu#xCfmdsmONIYFD#_*R|FGE-oY090qP:HQL%@i7YHCM%5_an62YmYhx2NZW=*DApfk2k|EE.JME5+*AzpsC',4444581,'P@hUPrWU3N+_m~B21O@S=1n:3YaTV5KZ sN','-8.5133877482441e+133',39,321051466,15540992765122741661]
    Dolt contains ['_fZTuQif416D9M_22ZZLb9YSkxPKD32CxzxvYGvjnEkcWH03kANw1Bz2dk6Gtwz8uy',134533899673,26,'q~#KwYTURq~479*NRO.p$P!e:0Osc u4Gq.IZT3*2ABX6tl0 %^Net_9JupagDn7-96Rig$Tkz4O2MQ.rqMtzgE wE_.lOnqVDt~HN44$ g_62uYUA1+t=FUsHIgyoJ#5=vd.99lzqg8Z7SBn',7589600,'@O5C^l$f|.@urmKSC-T^vjcF0RtH0wWMeO','3.418390753454234e-25',-26,-1891626247,8682083690239803681]