go-fuzz:Go的随机测试-源码

上传者: 42173205 | 上传时间: 2021-02-02 16:35:45 | 文件大小: 1.45MB | 文件类型: ZIP
go-fuzz:Go的随机测试 Go-fuzz是一种覆盖率指导的测试用于测试Go软件包。 模糊测试主要适用于解析复杂输入(文本和二进制)的程序包,对于强化对可能来自潜在恶意用户(例如,通过网络接受的任何内容)的输入进行解析的系统的加固特别有用。 注意: go-fuzz最近增加了对模糊化的初步支持。 有关更多详细信息,请参见以下。 如果您遇到模块问题,请提出详细信息。 一种解决方法是通过export GO111MODULE=off禁用模块。 用法 首先,您需要编写以下形式的测试函数: func Fuzz ( data [] byte ) int 数据是由模糊测试生成的随机输入,请注意在大多数情况下它是无效的。 如果模糊器在随后的模糊处理中应提高给定输入的优先级,则该函数必须返回1(例如,输入在词法上正确且已成功解析); -1(即使提供新的覆盖范围也不能将输入添加到语料库); 否则为0; 其他值保留供将来使用。 Fuzz函数必须位于go-fuzz可以导入的软件包中。 这意味着您要测试的代码不能在包main 。 但是,支持模糊internal软件包。 Fuzz函数的基本形式只是解析

文件下载

资源详情

[{"title":"( 73 个子文件 1.45MB ) go-fuzz:Go的随机测试-源码","children":[{"title":"go-fuzz-master","children":[{"title":"go-fuzz","children":[{"title":"compare.go <span style='color:#111;'> 280B </span>","children":null,"spread":false},{"title":"bindata_assetfs.go <span style='color:#111;'> 273.17KB </span>","children":null,"spread":false},{"title":"versifier","children":[{"title":"versifier_test.go <span style='color:#111;'> 691B </span>","children":null,"spread":false},{"title":"versifier.go <span style='color:#111;'> 19.53KB </span>","children":null,"spread":false}],"spread":true},{"title":"mutator.go <span style='color:#111;'> 9.56KB </span>","children":null,"spread":false},{"title":"main.go <span style='color:#111;'> 4.18KB </span>","children":null,"spread":false},{"title":"sonar.go <span style='color:#111;'> 10.42KB </span>","children":null,"spread":false},{"title":"compare_amd64.s <span style='color:#111;'> 2.20KB </span>","children":null,"spread":false},{"title":"worker_test.go <span style='color:#111;'> 501B </span>","children":null,"spread":false},{"title":"testee.go <span style='color:#111;'> 7.96KB </span>","children":null,"spread":false},{"title":"cover.go <span style='color:#111;'> 3.30KB </span>","children":null,"spread":false},{"title":"compare_amd64.go <span style='color:#111;'> 481B </span>","children":null,"spread":false},{"title":"internal","children":[{"title":"pcg","children":[{"title":"pcg.go <span style='color:#111;'> 2.61KB </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"assets","children":[{"title":"bootstrap.min.css <span style='color:#111;'> 119.67KB </span>","children":null,"spread":false},{"title":"jquery.min.js <span style='color:#111;'> 93.74KB </span>","children":null,"spread":false},{"title":"bootstrap-theme.min.css <span style='color:#111;'> 22.81KB </span>","children":null,"spread":false},{"title":"stats.html <span style='color:#111;'> 3.78KB </span>","children":null,"spread":false},{"title":"bootstrap.min.js <span style='color:#111;'> 35.95KB </span>","children":null,"spread":false}],"spread":false},{"title":"cpu_amd64.s <span style='color:#111;'> 713B </span>","children":null,"spread":false},{"title":"cover_test.go <span style='color:#111;'> 979B </span>","children":null,"spread":false},{"title":"cpu_amd64.go <span style='color:#111;'> 928B </span>","children":null,"spread":false},{"title":"coordinator.go <span style='color:#111;'> 7.47KB </span>","children":null,"spread":false},{"title":"sys_posix.go <span style='color:#111;'> 1.02KB </span>","children":null,"spread":false},{"title":"worker.go <span style='color:#111;'> 18.39KB </span>","children":null,"spread":false},{"title":"sys_windows.go <span style='color:#111;'> 1.72KB </span>","children":null,"spread":false},{"title":"persistent.go <span style='color:#111;'> 2.66KB </span>","children":null,"spread":false},{"title":"hub.go <span style='color:#111;'> 11.50KB </span>","children":null,"spread":false},{"title":"exectype_string.go <span style='color:#111;'> 528B </span>","children":null,"spread":false},{"title":"vendor","children":[{"title":"github.com","children":[{"title":"elazarl","children":[{"title":"go-bindata-assetfs","children":[{"title":"LICENSE <span style='color:#111;'> 1.27KB </span>","children":null,"spread":false},{"title":"doc.go <span style='color:#111;'> 459B </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 1.26KB </span>","children":null,"spread":false},{"title":"assetfs.go <span style='color:#111;'> 3.52KB </span>","children":null,"spread":false},{"title":"go-bindata-assetfs","children":[{"title":"main.go <span style='color:#111;'> 2.24KB </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":false},{"title":"stephens2424","children":[{"title":"writerset","children":[{"title":"writerset.go <span style='color:#111;'> 2.12KB </span>","children":null,"spread":false},{"title":"readme.md <span style='color:#111;'> 1.27KB </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":false},{"title":"slides","children":[{"title":"regexp.go <span style='color:#111;'> 569B </span>","children":null,"spread":false},{"title":"crash.go <span style='color:#111;'> 155B </span>","children":null,"spread":false},{"title":"go-fuzz.png <span style='color:#111;'> 97.13KB </span>","children":null,"spread":false},{"title":"gob.go <span style='color:#111;'> 831B </span>","children":null,"spread":false},{"title":"algo.png <span style='color:#111;'> 84.37KB </span>","children":null,"spread":false},{"title":"fuzzing.slide <span style='color:#111;'> 9.35KB </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 325B </span>","children":null,"spread":false},{"title":"go-fuzz.slide <span style='color:#111;'> 7.39KB </span>","children":null,"spread":false},{"title":"bugs.png <span style='color:#111;'> 1.01MB </span>","children":null,"spread":false}],"spread":true},{"title":"go-fuzz-build","children":[{"title":"main.go <span style='color:#111;'> 25.92KB </span>","children":null,"spread":false},{"title":"cover.go <span style='color:#111;'> 22.87KB </span>","children":null,"spread":false}],"spread":true},{"title":"go-fuzz-dep","children":[{"title":"main.go <span style='color:#111;'> 2.13KB </span>","children":null,"spread":false},{"title":"sonar.go <span style='color:#111;'> 4.82KB </span>","children":null,"spread":false},{"title":"main_libFuzzer.go <span style='color:#111;'> 479B </span>","children":null,"spread":false},{"title":"cover.go <span style='color:#111;'> 733B </span>","children":null,"spread":false},{"title":"doc.go <span style='color:#111;'> 612B </span>","children":null,"spread":false},{"title":"sys_posix.go <span style='color:#111;'> 798B </span>","children":null,"spread":false},{"title":"sys_windows.go <span style='color:#111;'> 1.30KB </span>","children":null,"spread":false}],"spread":true},{"title":".travis.yml <span style='color:#111;'> 4.71KB </span>","children":null,"spread":false},{"title":"internal","children":[{"title":"go-fuzz-types","children":[{"title":"types.go <span style='color:#111;'> 656B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"LICENSE <span style='color:#111;'> 9.90KB </span>","children":null,"spread":false},{"title":"go-fuzz-defs","children":[{"title":"defs.go <span style='color:#111;'> 891B </span>","children":null,"spread":false}],"spread":true},{"title":"test","children":[{"title":"test.go <span style='color:#111;'> 3.21KB </span>","children":null,"spread":false},{"title":"corpus","children":[{"title":"1 <span style='color:#111;'> 15B </span>","children":null,"spread":false},{"title":"2 <span style='color:#111;'> 593B </span>","children":null,"spread":false},{"title":"0 <span style='color:#111;'> 2B </span>","children":null,"spread":false}],"spread":true},{"title":"internal","children":[{"title":"test","children":[{"title":"test.go <span style='color:#111;'> 261B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"testdep","children":[{"title":"testdep.go <span style='color:#111;'> 240B </span>","children":null,"spread":false}],"spread":true},{"title":"vendor","children":[{"title":"non.existent.com","children":[{"title":"foo","children":[{"title":"foo.go <span style='color:#111;'> 191B </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":true}],"spread":true},{"title":"README.md <span style='color:#111;'> 52.28KB </span>","children":null,"spread":false},{"title":"gen","children":[{"title":"main.go <span style='color:#111;'> 1.17KB </span>","children":null,"spread":false}],"spread":true},{"title":"testscripts","children":[{"title":"fuzz_help.txt <span style='color:#111;'> 385B </span>","children":null,"spread":false},{"title":"mod_outside_gopath.txt <span style='color:#111;'> 3.45KB </span>","children":null,"spread":false},{"title":"mod_vendor.txt <span style='color:#111;'> 4.96KB </span>","children":null,"spread":false},{"title":"mod_inside_gopath.txt <span style='color:#111;'> 2.97KB </span>","children":null,"spread":false},{"title":"mod_go_fuzz_dep.txt <span style='color:#111;'> 2.25KB </span>","children":null,"spread":false},{"title":"mod_v2.txt <span style='color:#111;'> 2.55KB </span>","children":null,"spread":false}],"spread":true},{"title":".gitignore <span style='color:#111;'> 12B </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明