diff options
author | Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com> | 2018-07-10 21:22:31 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-12 15:34:31 -0400 |
commit | cba54f9cf4ec1126dde5576e025691c27f669d85 (patch) | |
tree | 1efc53dba14a089dc2d2c994853a1370c3dcf0bb /tools/testing/selftests/tc-testing | |
parent | f1fbeada1bc07e710d972657ac083fca8db206dc (diff) |
tc-testing: add geneve options in tunnel_key unit tests
Extend tc tunnel_key action unit tests with geneve options. Tests
include testing single and multiple geneve options, as well as
testing geneve options that are expected to fail.
Signed-off-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
Acked-by: Lucas Bates <lucasb@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/tc-testing')
-rw-r--r-- | tools/testing/selftests/tc-testing/tc-tests/actions/tunnel_key.json | 168 |
1 files changed, 168 insertions, 0 deletions
diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions/tunnel_key.json b/tools/testing/selftests/tc-testing/tc-tests/actions/tunnel_key.json index d878ce1c7d08..10b2d894e436 100644 --- a/tools/testing/selftests/tc-testing/tc-tests/actions/tunnel_key.json +++ b/tools/testing/selftests/tc-testing/tc-tests/actions/tunnel_key.json | |||
@@ -641,6 +641,174 @@ | |||
641 | ] | 641 | ] |
642 | }, | 642 | }, |
643 | { | 643 | { |
644 | "id": "4f20", | ||
645 | "name": "Add tunnel_key action with a single geneve option parameter", | ||
646 | "category": [ | ||
647 | "actions", | ||
648 | "tunnel_key" | ||
649 | ], | ||
650 | "setup": [ | ||
651 | [ | ||
652 | "$TC actions flush action tunnel_key", | ||
653 | 0, | ||
654 | 1, | ||
655 | 255 | ||
656 | ] | ||
657 | ], | ||
658 | "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 42 dst_port 6081 geneve_opts 0102:80:00880022 index 1", | ||
659 | "expExitCode": "0", | ||
660 | "verifyCmd": "$TC actions get action tunnel_key index 1", | ||
661 | "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 42.*dst_port 6081.*geneve_opt 0102:80:00880022.*index 1", | ||
662 | "matchCount": "1", | ||
663 | "teardown": [ | ||
664 | "$TC actions flush action tunnel_key" | ||
665 | ] | ||
666 | }, | ||
667 | { | ||
668 | "id": "e33d", | ||
669 | "name": "Add tunnel_key action with multiple geneve options parameter", | ||
670 | "category": [ | ||
671 | "actions", | ||
672 | "tunnel_key" | ||
673 | ], | ||
674 | "setup": [ | ||
675 | [ | ||
676 | "$TC actions flush action tunnel_key", | ||
677 | 0, | ||
678 | 1, | ||
679 | 255 | ||
680 | ] | ||
681 | ], | ||
682 | "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 42 dst_port 6081 geneve_opts 0102:80:00880022,0408:42:0040007611223344,0111:02:1020304011223344 index 1", | ||
683 | "expExitCode": "0", | ||
684 | "verifyCmd": "$TC actions get action tunnel_key index 1", | ||
685 | "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 42.*dst_port 6081.*geneve_opt 0102:80:00880022,0408:42:0040007611223344,0111:02:1020304011223344.*index 1", | ||
686 | "matchCount": "1", | ||
687 | "teardown": [ | ||
688 | "$TC actions flush action tunnel_key" | ||
689 | ] | ||
690 | }, | ||
691 | { | ||
692 | "id": "0778", | ||
693 | "name": "Add tunnel_key action with invalid class geneve option parameter", | ||
694 | "category": [ | ||
695 | "actions", | ||
696 | "tunnel_key" | ||
697 | ], | ||
698 | "setup": [ | ||
699 | [ | ||
700 | "$TC actions flush action tunnel_key", | ||
701 | 0, | ||
702 | 1, | ||
703 | 255 | ||
704 | ] | ||
705 | ], | ||
706 | "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 42 dst_port 6081 geneve_opts 824212:80:00880022 index 1", | ||
707 | "expExitCode": "255", | ||
708 | "verifyCmd": "$TC actions get action tunnel_key index 1", | ||
709 | "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 42.*dst_port 6081.*geneve_opt 824212:80:00880022.*index 1", | ||
710 | "matchCount": "0", | ||
711 | "teardown": [ | ||
712 | "$TC actions flush action tunnel_key" | ||
713 | ] | ||
714 | }, | ||
715 | { | ||
716 | "id": "4ae8", | ||
717 | "name": "Add tunnel_key action with invalid type geneve option parameter", | ||
718 | "category": [ | ||
719 | "actions", | ||
720 | "tunnel_key" | ||
721 | ], | ||
722 | "setup": [ | ||
723 | [ | ||
724 | "$TC actions flush action tunnel_key", | ||
725 | 0, | ||
726 | 1, | ||
727 | 255 | ||
728 | ] | ||
729 | ], | ||
730 | "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 42 dst_port 6081 geneve_opts 0102:4224:00880022 index 1", | ||
731 | "expExitCode": "255", | ||
732 | "verifyCmd": "$TC actions get action tunnel_key index 1", | ||
733 | "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 42.*dst_port 6081.*geneve_opt 0102:4224:00880022.*index 1", | ||
734 | "matchCount": "0", | ||
735 | "teardown": [ | ||
736 | "$TC actions flush action tunnel_key" | ||
737 | ] | ||
738 | }, | ||
739 | { | ||
740 | "id": "4039", | ||
741 | "name": "Add tunnel_key action with short data length geneve option parameter", | ||
742 | "category": [ | ||
743 | "actions", | ||
744 | "tunnel_key" | ||
745 | ], | ||
746 | "setup": [ | ||
747 | [ | ||
748 | "$TC actions flush action tunnel_key", | ||
749 | 0, | ||
750 | 1, | ||
751 | 255 | ||
752 | ] | ||
753 | ], | ||
754 | "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 42 dst_port 6081 geneve_opts 0102:80:4288 index 1", | ||
755 | "expExitCode": "255", | ||
756 | "verifyCmd": "$TC actions get action tunnel_key index 1", | ||
757 | "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 42.*dst_port 6081.*geneve_opt 0102:80:4288.*index 1", | ||
758 | "matchCount": "0", | ||
759 | "teardown": [ | ||
760 | "$TC actions flush action tunnel_key" | ||
761 | ] | ||
762 | }, | ||
763 | { | ||
764 | "id": "26a6", | ||
765 | "name": "Add tunnel_key action with non-multiple of 4 data length geneve option parameter", | ||
766 | "category": [ | ||
767 | "actions", | ||
768 | "tunnel_key" | ||
769 | ], | ||
770 | "setup": [ | ||
771 | [ | ||
772 | "$TC actions flush action tunnel_key", | ||
773 | 0, | ||
774 | 1, | ||
775 | 255 | ||
776 | ] | ||
777 | ], | ||
778 | "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 42 dst_port 6081 geneve_opts 0102:80:4288428822 index 1", | ||
779 | "expExitCode": "255", | ||
780 | "verifyCmd": "$TC actions get action tunnel_key index 1", | ||
781 | "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 42.*dst_port 6081.*geneve_opt 0102:80:4288428822.*index 1", | ||
782 | "matchCount": "0", | ||
783 | "teardown": [ | ||
784 | "$TC actions flush action tunnel_key" | ||
785 | ] | ||
786 | }, | ||
787 | { | ||
788 | "id": "f44d", | ||
789 | "name": "Add tunnel_key action with incomplete geneve options parameter", | ||
790 | "category": [ | ||
791 | "actions", | ||
792 | "tunnel_key" | ||
793 | ], | ||
794 | "setup": [ | ||
795 | [ | ||
796 | "$TC actions flush action tunnel_key", | ||
797 | 0, | ||
798 | 1, | ||
799 | 255 | ||
800 | ] | ||
801 | ], | ||
802 | "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 42 dst_port 6081 geneve_opts 0102:80:00880022,0408:42: index 1", | ||
803 | "expExitCode": "255", | ||
804 | "verifyCmd": "$TC actions get action tunnel_key index 1", | ||
805 | "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 42.*dst_port 6081.*geneve_opt 0102:80:00880022,0408:42:.*index 1", | ||
806 | "matchCount": "0", | ||
807 | "teardown": [ | ||
808 | "$TC actions flush action tunnel_key" | ||
809 | ] | ||
810 | }, | ||
811 | { | ||
644 | "id": "7afc", | 812 | "id": "7afc", |
645 | "name": "Replace tunnel_key set action with all parameters", | 813 | "name": "Replace tunnel_key set action with all parameters", |
646 | "category": [ | 814 | "category": [ |