一句话:提出 Bonsai Fuzzing,一种基于覆盖引导和文法的模糊测试技术,通过迭代加深按构造生成简洁测试输入语料。
本文关注自动合成简洁测试输入语料的问题,并以教育用编译器为例说明为学生生成有意义测试用例的需求。已有最先进方案结合模糊测试与 delta-debugging 等测试用例缩减技术,先生成复杂输入再最小化。作者提出 Bonsai Fuzzing,其核心洞见是不再缩减模糊器产生的复杂输入,而是借助迭代加深在构造过程中逐步“生长”出简洁测试输入;该方法使用覆盖引导的、基于文法的模糊测试。实验表明,与“先模糊后缩减”相比,Bonsai Fuzzing 生成的测试语料平均输入规模小 16–45%,同时达到大致相同的代码覆盖率和故障检测能力。
This paper presents a coverage-guided grammar-based fuzzing technique for automatically synthesizing a corpus of concise test inputs. We walk-through a case study of a compiler designed for education and the corresponding problem of generating meaningful test cases to provide to students. The prior state-of-the-art solution is a combination of fuzzing and test-case reduction techniques such as variants of delta-debugging. Our key insight is that instead of attempting to minimize convoluted fuzzer-generated test inputs, we can instead grow concise test inputs by construction using a form of iterative deepening. We call this approach bonsai fuzzing. Experimental results show that bonsai fuzzing can generate test corpora having inputs that are 16–45% smaller in size on average as compared to a fuzz-then-reduce approach, while achieving approximately the same code coverage and fault-detection capability.