-
Notifications
You must be signed in to change notification settings - Fork 449
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement automated test framework for the tc backend
First take at implementing the automated testing code for tc backend. In a nutshell, what it's doing is expanding on the already existing run-tc-test.py script. The expansion consists of: - Compiling the generated C files to eBPF bytecode - Extracting a P4TC kernel image from github - Compiling P4TC's version of iproute2 - Spawning a VM using virtme to boot the P4TC kernel - Executing the template script generated by the compiler - Loading the generated eBPF parser and control blocks binaries using a TC P4 filter - Parsing an STF in the samples directory detailing what packets to send/expect and what runtime rules to load - Loading any specified runtime rules - Sending the packets using scapy - Verifying that the sent packets (and eventual received packets from the p4tc pipeline) and correct according to the STF file The commands are sent to the VM using ssh through a bridge that connects the host to the VM After the test is finished both the bridge and the VM are destroyed We also added an example (arp_responder) to exercise the testing framework Signed-off-by: Victor Nogueira <[email protected]>
- Loading branch information
1 parent
8062920
commit cfcb5ed
Showing
30 changed files
with
2,212 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.