论文标题
识别制造和面向JVM的构建中的错误
Identifying Bugs in Make and JVM-Oriented Builds
论文作者
论文摘要
增量和并行构建是现代构建系统的关键特征。并行性通过同时运行独立任务来实现快速构建,而增量性通过处理受特定代码更改影响的构建操作来节省时间并计算资源。编写构建定义,导致无错误的增量和并行构建是一项艰巨的任务。这主要是因为开发人员通常无法预测构建操作对文件系统的影响以及不同的构建操作如何相互作用。故障的构建脚本可能会严重降低自动化构建的可靠性,因为它们会导致构建故障以及非确定性和不正确的构建结果。 为了理解任意构建执行,我们提出了buildfs,这是一个通常可应用的模型,考虑了构建操作的规范(如构建脚本中声明)和实际行为(低级文件系统操作)。然后,我们正式定义了与增量和并行构建相关的不同类型的故障,该条件违反了构建操作规范的条件。我们的测试方法依赖于建议的模型,分析了单个完整构建的执行,将其转化为构建F,并通过检查相应的违规行为来发现故障。 我们通过检查数百个品牌和Gradle项目来评估我们方法的有效性,效率和适用性。值得注意的是,我们的方法是第一个处理面向Java的构建系统的方法。结果表明,我们的方法是(1)能够发现几个重要问题(上游开发人员已经确认并确定了45个开源项目中的245个问题),以及(2)比用于建造构建的最新工具快的速度。
Incremental and parallel builds are crucial features of modern build systems. Parallelism enables fast builds by running independent tasks simultaneously, while incrementality saves time and computing resources by processing the build operations that were affected by a particular code change. Writing build definitions that lead to error-free incremental and parallel builds is a challenging task. This is mainly because developers are often unable to predict the effects of build operations on the file system and how different build operations interact with each other. Faulty build scripts may seriously degrade the reliability of automated builds, as they cause build failures, and non-deterministic and incorrect build results. To reason about arbitrary build executions, we present buildfs, a generally-applicable model that takes into account the specification (as declared in build scripts) and the actual behavior (low-level file system operation) of build operations. We then formally define different types of faults related to incremental and parallel builds in terms of the conditions under which a file system operation violates the specification of a build operation. Our testing approach, which relies on the proposed model, analyzes the execution of single full build, translates it into buildfs, and uncovers faults by checking for corresponding violations. We evaluate the effectiveness, efficiency, and applicability of our approach by examining hundreds of Make and Gradle projects. Notably, our method is the first to handle Java-oriented build systems. The results indicate that our approach is (1) able to uncover several important issues (245 issues found in 45 open-source projects have been confirmed and fixed by the upstream developers), and (2) orders of magnitude faster than a state-of-the-art tool for Make builds.