Overview of SAI PTF (Packet Testing Framework)
masterSAI PTF is an auto-generated, Python-based dataplane testing framework. It uses Thrift wrapper functions to call C-based SAI functions from Python scripts. The framework's primary goal is to automate the creation of wrapper functions by generating them directly from SAI headers, reducing manual effort when testing new SAI versions.
Key components include:
- Autogeneration framework: Uses existing SAI meta infrastructure to generate code.
- PTF tests: Functional tests for L2, L3, tunnels, and mirroring.
- DASH support: Optimized tests for platforms with limited port counts.