论文标题
P4TestGen:P4的可扩展测试Oracle
P4Testgen: An Extensible Test Oracle For P4
论文作者
论文摘要
我们提出P4TestGen,这是P4 $ _ {16} $语言的测试甲骨文。 P4TESTGEN支持任何P4目标的自动测试生成,并且设计为许多P4目标可扩展。它对目标数据包处理管道的完整语义进行了建模,包括P4语言,体系结构和外部以及特定于目标的扩展。为了处理非确定性的行为和复杂的外部(例如,校验和哈希功能),P4Testgen使用污染跟踪和同意执行。它还提供了路径选择策略,以减少实现全面覆盖所需的测试数量。 我们已经实例化了V1Model,EBPF,PNA和Tofino P4体系结构的P4Testgen。每个扩展所需的努力与目标的复杂性相称。我们通过在整个P4C测试套件中运行P4Testgen生成的测试以及Tofino P4 Studio提供的程序。使用该工具,我们还确认了BMV2和Tofino的成熟生产工具链中的25个错误。
We present P4Testgen, a test oracle for the P4$_{16}$ language. P4Testgen supports automatic test generation for any P4 target and is designed to be extensible to many P4 targets. It models the complete semantics of the target's packet-processing pipeline including the P4 language, architectures and externs, and target-specific extensions. To handle non-deterministic behaviors and complex externs (e.g., checksums and hash functions), P4Testgen uses taint tracking and concolic execution. It also provides path selection strategies that reduce the number of tests required to achieve full coverage. We have instantiated P4Testgen for the V1model, eBPF, PNA, and Tofino P4 architectures. Each extension required effort commensurate with the complexity of the target. We validated the tests generated by P4Testgen by running them across the entire P4C test suite as well as the programs supplied with the Tofino P4 Studio. Using the tool, we have also confirmed 25 bugs in mature, production toolchains for BMv2 and Tofino.