P4Testgen: An Extensible Test Oracle For P4

11/28/2022
by   Fabian Ruffy, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/30/2022

BlueCov: Integrating Test Coverage and Model Checking with JBMC

Automated test case generation tools help businesses to write tests and ...
research
08/16/2021

Systematic Generation of Conformance Tests for JavaScript

JavaScript implementations are tested for conformance to the ECMAScript ...
research
07/28/2023

Towards Automatic Generation of Amplified Regression Test Oracles

Regression testing is crucial in ensuring that pure code refactoring doe...
research
12/12/2022

A Brief Survey on Oracle-based Test Adequacy Metrics

Even though code coverage is a widespread and popular test adequacy metr...
research
11/11/2020

Petr4: Formal Foundations for P4 Data Planes

P4 is a domain-specific language for programming and specifying packet-p...
research
09/05/2023

Mind the Gap: The Difference Between Coverage and Mutation Score Can Guide Testing Efforts

An "adequate" test suite should effectively find all inconsistencies bet...
research
10/18/2022

Towards Task-Specific Modular Gripper Fingers: Automatic Production of Fingertip Mechanics

The number of sequential tasks a single gripper can perform is significa...

Please sign up or login with your details

Forgot password? Click here to reset