Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests/acl] rewrite ACL test on pytest #1047

Merged
merged 10 commits into from
Oct 9, 2019

Conversation

stepanblyschak
Copy link
Contributor

@stepanblyschak stepanblyschak commented Aug 1, 2019

Description of PR

Summary: rewrite ACL test on pytest
Fixes # (issue)

TODO:

Type of change

  • [] Bug fix
  • Testbed and Framework(new/improvement)
  • [] Test case(new/improvement)

Approach

How did you do it?

How did you verify/test it?

stepanb@d3f26667453b:/stepanb/sonic-mgmt/tests$ py.test acl/ -k 'not platform and not reboot and not port_toggle' -rsx  --testbed=$SWITCH-t1-lag --testbed_file=testbed.csv --inventory=../ansible/inventory_file
--host-pattern $SWITCH-t1-lag -v --ignore=ptftests
============================================================================================== test session starts ===============================================================================================
platform linux2 -- Python 2.7.12, pytest-4.6.4, py-1.8.0, pluggy-0.12.0 -- /usr/bin/python
cachedir: .pytest_cache
metadata: {'Python': '2.7.12', 'Platform': 'Linux-3.19.0-80-generic-x86_64-with-Ubuntu-16.04-xenial', 'Packages': {'py': '1.8.0', 'pytest': '4.6.4', 'pluggy': '0.12.0'}, 'Plugins': {u'html': u'1.21.1', u'ansibl
e': u'2.0.2', u'metadata': u'1.8.0'}}
ansible: 2.0.0.2
rootdir: /stepanb/sonic-mgmt/tests, inifile: pytest.ini
plugins: metadata-1.8.0, html-1.21.1, ansible-2.0.2
collected 368 items / 184 deselected / 184 selected

acl/test_acl.py::TestBasicAcl::test_unmatched_blocked[ingress-tor->spine] PASSED                                                                                                                           [  0%]
acl/test_acl.py::TestBasicAcl::test_unmatched_blocked[ingress-spine->tor] PASSED                                                                                                                           [  1%]
acl/test_acl.py::TestBasicAcl::test_source_ip_match_forwarded[ingress-tor->spine] PASSED                                                                                                                   [  1%]
acl/test_acl.py::TestBasicAcl::test_source_ip_match_forwarded[ingress-spine->tor] PASSED                                                                                                                   [  2%]
acl/test_acl.py::TestBasicAcl::test_rules_priority_forwarded[ingress-tor->spine] PASSED                                                                                                                    [  2%]
acl/test_acl.py::TestBasicAcl::test_rules_priority_forwarded[ingress-spine->tor] PASSED                                                                                                                    [  3%]
acl/test_acl.py::TestBasicAcl::test_rules_priority_dropped[ingress-tor->spine] PASSED                                                                                                                      [  3%]
acl/test_acl.py::TestBasicAcl::test_rules_priority_dropped[ingress-spine->tor] PASSED                                                                                                                      [  4%]
acl/test_acl.py::TestBasicAcl::test_dest_ip_match_forwarded[ingress-tor->spine] PASSED                                                                                                                     [  4%]
acl/test_acl.py::TestBasicAcl::test_dest_ip_match_forwarded[ingress-spine->tor] PASSED                                                                                                                     [  5%]
acl/test_acl.py::TestBasicAcl::test_dest_ip_match_dropped[ingress-tor->spine] PASSED                                                                                                                       [  5%]
acl/test_acl.py::TestBasicAcl::test_dest_ip_match_dropped[ingress-spine->tor] PASSED                                                                                                                       [  6%]
acl/test_acl.py::TestBasicAcl::test_source_ip_match_dropped[ingress-tor->spine] PASSED                                                                                                                     [  7%]
acl/test_acl.py::TestBasicAcl::test_source_ip_match_dropped[ingress-spine->tor] PASSED                                                                                                                     [  7%]
acl/test_acl.py::TestBasicAcl::test_udp_source_ip_match_forwarded[ingress-tor->spine] PASSED                                                                                                               [  8%]
acl/test_acl.py::TestBasicAcl::test_udp_source_ip_match_forwarded[ingress-spine->tor] PASSED                                                                                                               [  8%]
acl/test_acl.py::TestBasicAcl::test_udp_source_ip_match_dropped[ingress-tor->spine] PASSED                                                                                                                 [  9%]
acl/test_acl.py::TestBasicAcl::test_udp_source_ip_match_dropped[ingress-spine->tor] PASSED                                                                                                                 [  9%]
acl/test_acl.py::TestBasicAcl::test_icmp_source_ip_match_dropped[ingress-tor->spine] PASSED                                                                                                                [ 10%]
acl/test_acl.py::TestBasicAcl::test_icmp_source_ip_match_dropped[ingress-spine->tor] PASSED                                                                                                                [ 10%]
acl/test_acl.py::TestBasicAcl::test_icmp_source_ip_match_forwarded[ingress-tor->spine] PASSED                                                                                                              [ 11%]
acl/test_acl.py::TestBasicAcl::test_icmp_source_ip_match_forwarded[ingress-spine->tor] PASSED                                                                                                              [ 11%]
acl/test_acl.py::TestBasicAcl::test_l4_dport_match_forwarded[ingress-tor->spine] PASSED                                                                                                                    [ 12%]
acl/test_acl.py::TestBasicAcl::test_l4_dport_match_forwarded[ingress-spine->tor] PASSED                                                                                                                    [ 13%]
acl/test_acl.py::TestBasicAcl::test_l4_sport_match_forwarded[ingress-tor->spine] PASSED                                                                                                                    [ 13%]
acl/test_acl.py::TestBasicAcl::test_l4_sport_match_forwarded[ingress-spine->tor] PASSED                                                                                                                    [ 14%]
acl/test_acl.py::TestBasicAcl::test_l4_dport_range_match_forwarded[ingress-tor->spine] PASSED                                                                                                              [ 14%]
acl/test_acl.py::TestBasicAcl::test_l4_dport_range_match_forwarded[ingress-spine->tor] PASSED                                                                                                              [ 15%]
acl/test_acl.py::TestBasicAcl::test_l4_sport_range_match_forwarded[ingress-tor->spine] PASSED                                                                                                              [ 15%]
acl/test_acl.py::TestBasicAcl::test_l4_sport_range_match_forwarded[ingress-spine->tor] PASSED                                                                                                              [ 16%]
acl/test_acl.py::TestBasicAcl::test_l4_dport_range_match_dropped[ingress-tor->spine] PASSED                                                                                                                [ 16%]
acl/test_acl.py::TestBasicAcl::test_l4_dport_range_match_dropped[ingress-spine->tor] PASSED                                                                                                                [ 17%]
acl/test_acl.py::TestBasicAcl::test_l4_sport_range_match_dropped[ingress-tor->spine] PASSED                                                                                                                [ 17%]
acl/test_acl.py::TestBasicAcl::test_l4_sport_range_match_dropped[ingress-spine->tor] PASSED                                                                                                                [ 18%]
acl/test_acl.py::TestBasicAcl::test_ip_proto_match_forwarded[ingress-tor->spine] PASSED                                                                                                                    [ 19%]
acl/test_acl.py::TestBasicAcl::test_ip_proto_match_forwarded[ingress-spine->tor] PASSED                                                                                                                    [ 19%]
acl/test_acl.py::TestBasicAcl::test_tcp_flags_match_forwarded[ingress-tor->spine] PASSED                                                                                                                   [ 20%]
acl/test_acl.py::TestBasicAcl::test_tcp_flags_match_forwarded[ingress-spine->tor] PASSED                                                                                                                   [ 20%]
acl/test_acl.py::TestBasicAcl::test_l4_dport_match_dropped[ingress-tor->spine] PASSED                                                                                                                      [ 21%]
acl/test_acl.py::TestBasicAcl::test_l4_dport_match_dropped[ingress-spine->tor] PASSED                                                                                                                      [ 21%]
acl/test_acl.py::TestBasicAcl::test_l4_sport_match_dropped[ingress-tor->spine] PASSED                                                                                                                      [ 22%]
acl/test_acl.py::TestBasicAcl::test_l4_sport_match_dropped[ingress-spine->tor] PASSED                                                                                                                      [ 22%]
acl/test_acl.py::TestBasicAcl::test_ip_proto_match_dropped[ingress-tor->spine] PASSED                                                                                                                      [ 23%]
acl/test_acl.py::TestBasicAcl::test_ip_proto_match_dropped[ingress-spine->tor] PASSED                                                                                                                      [ 23%]
acl/test_acl.py::TestBasicAcl::test_tcp_flags_match_dropped[ingress-tor->spine] PASSED                                                                                                                     [ 24%]
acl/test_acl.py::TestBasicAcl::test_tcp_flags_match_dropped[ingress-spine->tor] PASSED                                                                                                                     [ 25%]
acl/test_acl.py::TestIncrementalAcl::test_unmatched_blocked[ingress-tor->spine] PASSED                                                                                                                     [ 25%]
acl/test_acl.py::TestIncrementalAcl::test_unmatched_blocked[ingress-spine->tor] PASSED                                                                                                                     [ 26%]
acl/test_acl.py::TestIncrementalAcl::test_source_ip_match_forwarded[ingress-tor->spine] PASSED                                                                                                             [ 26%]
acl/test_acl.py::TestIncrementalAcl::test_source_ip_match_forwarded[ingress-spine->tor] PASSED                                                                                                             [ 27%]
acl/test_acl.py::TestIncrementalAcl::test_rules_priority_forwarded[ingress-tor->spine] PASSED                                                                                                              [ 27%]
acl/test_acl.py::TestIncrementalAcl::test_rules_priority_forwarded[ingress-spine->tor] PASSED                                                                                                              [ 28%]
acl/test_acl.py::TestIncrementalAcl::test_rules_priority_dropped[ingress-tor->spine] PASSED                                                                                                                [ 28%]
acl/test_acl.py::TestIncrementalAcl::test_rules_priority_dropped[ingress-spine->tor] PASSED                                                                                                                [ 29%]
acl/test_acl.py::TestIncrementalAcl::test_dest_ip_match_forwarded[ingress-tor->spine] PASSED                                                                                                               [ 29%]
acl/test_acl.py::TestIncrementalAcl::test_dest_ip_match_forwarded[ingress-spine->tor] PASSED                                                                                                               [ 30%]
acl/test_acl.py::TestIncrementalAcl::test_dest_ip_match_dropped[ingress-tor->spine] PASSED                                                                                                                 [ 30%]
acl/test_acl.py::TestIncrementalAcl::test_dest_ip_match_dropped[ingress-spine->tor] PASSED                                                                                                                 [ 31%]
acl/test_acl.py::TestIncrementalAcl::test_source_ip_match_dropped[ingress-tor->spine] PASSED                                                                                                               [ 32%]
acl/test_acl.py::TestIncrementalAcl::test_source_ip_match_dropped[ingress-spine->tor] PASSED                                                                                                               [ 32%]
acl/test_acl.py::TestIncrementalAcl::test_udp_source_ip_match_forwarded[ingress-tor->spine] PASSED                                                                                                         [ 33%]
acl/test_acl.py::TestIncrementalAcl::test_udp_source_ip_match_forwarded[ingress-spine->tor] PASSED                                                                                                         [ 33%]
acl/test_acl.py::TestIncrementalAcl::test_udp_source_ip_match_dropped[ingress-tor->spine] PASSED                                                                                                           [ 34%]
acl/test_acl.py::TestIncrementalAcl::test_udp_source_ip_match_dropped[ingress-spine->tor] PASSED                                                                                                           [ 34%]
acl/test_acl.py::TestIncrementalAcl::test_icmp_source_ip_match_dropped[ingress-tor->spine] PASSED                                                                                                          [ 35%]
acl/test_acl.py::TestIncrementalAcl::test_icmp_source_ip_match_dropped[ingress-spine->tor] PASSED                                                                                                          [ 35%]
acl/test_acl.py::TestIncrementalAcl::test_icmp_source_ip_match_forwarded[ingress-tor->spine] PASSED                                                                                                        [ 36%]
acl/test_acl.py::TestIncrementalAcl::test_icmp_source_ip_match_forwarded[ingress-spine->tor] PASSED                                                                                                        [ 36%]
acl/test_acl.py::TestIncrementalAcl::test_l4_dport_match_forwarded[ingress-tor->spine] PASSED                                                                                                              [ 37%]
acl/test_acl.py::TestIncrementalAcl::test_l4_dport_match_forwarded[ingress-spine->tor] PASSED                                                                                                              [ 38%]
acl/test_acl.py::TestIncrementalAcl::test_l4_sport_match_forwarded[ingress-tor->spine] PASSED                                                                                                              [ 38%]
acl/test_acl.py::TestIncrementalAcl::test_l4_sport_match_forwarded[ingress-spine->tor] PASSED                                                                                                              [ 39%]
acl/test_acl.py::TestIncrementalAcl::test_l4_dport_range_match_forwarded[ingress-tor->spine] PASSED                                                                                                        [ 39%]
acl/test_acl.py::TestIncrementalAcl::test_l4_dport_range_match_forwarded[ingress-spine->tor] PASSED                                                                                                        [ 40%]
acl/test_acl.py::TestIncrementalAcl::test_l4_sport_range_match_forwarded[ingress-tor->spine] PASSED                                                                                                        [ 40%]
acl/test_acl.py::TestIncrementalAcl::test_l4_sport_range_match_forwarded[ingress-spine->tor] PASSED                                                                                                        [ 41%]
acl/test_acl.py::TestIncrementalAcl::test_l4_dport_range_match_dropped[ingress-tor->spine] PASSED                                                                                                          [ 41%]
acl/test_acl.py::TestIncrementalAcl::test_l4_dport_range_match_dropped[ingress-spine->tor] PASSED                                                                                                          [ 42%]
acl/test_acl.py::TestIncrementalAcl::test_l4_sport_range_match_dropped[ingress-tor->spine] PASSED                                                                                                          [ 42%]
acl/test_acl.py::TestIncrementalAcl::test_l4_sport_range_match_dropped[ingress-spine->tor] PASSED                                                                                                          [ 43%]
acl/test_acl.py::TestIncrementalAcl::test_ip_proto_match_forwarded[ingress-tor->spine] PASSED                                                                                                              [ 44%]
acl/test_acl.py::TestIncrementalAcl::test_ip_proto_match_forwarded[ingress-spine->tor] PASSED                                                                                                              [ 44%]
acl/test_acl.py::TestIncrementalAcl::test_tcp_flags_match_forwarded[ingress-tor->spine] PASSED                                                                                                             [ 45%]
acl/test_acl.py::TestIncrementalAcl::test_tcp_flags_match_forwarded[ingress-spine->tor] PASSED                                                                                                             [ 45%]
acl/test_acl.py::TestIncrementalAcl::test_l4_dport_match_dropped[ingress-tor->spine] PASSED                                                                                                                [ 46%]
acl/test_acl.py::TestIncrementalAcl::test_l4_dport_match_dropped[ingress-spine->tor] PASSED                                                                                                                [ 46%]
acl/test_acl.py::TestIncrementalAcl::test_l4_sport_match_dropped[ingress-tor->spine] PASSED                                                                                                                [ 47%]
acl/test_acl.py::TestIncrementalAcl::test_l4_sport_match_dropped[ingress-spine->tor] PASSED                                                                                                                [ 47%]
acl/test_acl.py::TestIncrementalAcl::test_ip_proto_match_dropped[ingress-tor->spine] PASSED                                                                                                                [ 48%]
acl/test_acl.py::TestIncrementalAcl::test_ip_proto_match_dropped[ingress-spine->tor] PASSED                                                                                                                [ 48%]
acl/test_acl.py::TestIncrementalAcl::test_tcp_flags_match_dropped[ingress-tor->spine] PASSED                                                                                                               [ 49%]
acl/test_acl.py::TestIncrementalAcl::test_tcp_flags_match_dropped[ingress-spine->tor] PASSED                                                                                                               [ 50%]
acl/test_acl.py::TestBasicAcl::test_unmatched_blocked[egress-tor->spine] PASSED                                                                                                                            [ 50%]
acl/test_acl.py::TestBasicAcl::test_unmatched_blocked[egress-spine->tor] PASSED                                                                                                                            [ 51%]
acl/test_acl.py::TestBasicAcl::test_source_ip_match_forwarded[egress-tor->spine] PASSED                                                                                                                    [ 51%]
acl/test_acl.py::TestBasicAcl::test_source_ip_match_forwarded[egress-spine->tor] PASSED                                                                                                                    [ 52%]
acl/test_acl.py::TestBasicAcl::test_rules_priority_forwarded[egress-tor->spine] PASSED                                                                                                                     [ 52%]
acl/test_acl.py::TestBasicAcl::test_rules_priority_forwarded[egress-spine->tor] PASSED                                                                                                                     [ 53%]
acl/test_acl.py::TestBasicAcl::test_rules_priority_dropped[egress-tor->spine] PASSED                                                                                                                       [ 53%]
acl/test_acl.py::TestBasicAcl::test_rules_priority_dropped[egress-spine->tor] PASSED                                                                                                                       [ 54%]
acl/test_acl.py::TestBasicAcl::test_dest_ip_match_forwarded[egress-tor->spine] PASSED                                                                                                                      [ 54%]
acl/test_acl.py::TestBasicAcl::test_dest_ip_match_forwarded[egress-spine->tor] PASSED                                                                                                                      [ 55%]
acl/test_acl.py::TestBasicAcl::test_dest_ip_match_dropped[egress-tor->spine] PASSED                                                                                                                        [ 55%]
acl/test_acl.py::TestBasicAcl::test_dest_ip_match_dropped[egress-spine->tor] PASSED                                                                                                                        [ 56%]
acl/test_acl.py::TestBasicAcl::test_source_ip_match_dropped[egress-tor->spine] PASSED                                                                                                                      [ 57%]
acl/test_acl.py::TestBasicAcl::test_source_ip_match_dropped[egress-spine->tor] PASSED                                                                                                                      [ 57%]
acl/test_acl.py::TestBasicAcl::test_udp_source_ip_match_forwarded[egress-tor->spine] PASSED                                                                                                                [ 58%]
acl/test_acl.py::TestBasicAcl::test_udp_source_ip_match_forwarded[egress-spine->tor] PASSED                                                                                                                [ 58%]
acl/test_acl.py::TestBasicAcl::test_udp_source_ip_match_dropped[egress-tor->spine] PASSED                                                                                                                  [ 59%]
acl/test_acl.py::TestBasicAcl::test_udp_source_ip_match_dropped[egress-spine->tor] PASSED                                                                                                                  [ 59%]
acl/test_acl.py::TestBasicAcl::test_icmp_source_ip_match_dropped[egress-tor->spine] PASSED                                                                                                                 [ 60%]
acl/test_acl.py::TestBasicAcl::test_icmp_source_ip_match_dropped[egress-spine->tor] PASSED                                                                                                                 [ 60%]
acl/test_acl.py::TestBasicAcl::test_icmp_source_ip_match_forwarded[egress-tor->spine] PASSED                                                                                                               [ 61%]
acl/test_acl.py::TestBasicAcl::test_icmp_source_ip_match_forwarded[egress-spine->tor] PASSED                                                                                                               [ 61%]
acl/test_acl.py::TestBasicAcl::test_l4_dport_match_forwarded[egress-tor->spine] PASSED                                                                                                                     [ 62%]
acl/test_acl.py::TestBasicAcl::test_l4_dport_match_forwarded[egress-spine->tor] PASSED                                                                                                                     [ 63%]
acl/test_acl.py::TestBasicAcl::test_l4_sport_match_forwarded[egress-tor->spine] PASSED                                                                                                                     [ 63%]
acl/test_acl.py::TestBasicAcl::test_l4_sport_match_forwarded[egress-spine->tor] PASSED                                                                                                                     [ 64%]
acl/test_acl.py::TestBasicAcl::test_l4_dport_range_match_forwarded[egress-tor->spine] PASSED                                                                                                               [ 64%]
acl/test_acl.py::TestBasicAcl::test_l4_dport_range_match_forwarded[egress-spine->tor] PASSED                                                                                                               [ 65%]
acl/test_acl.py::TestBasicAcl::test_l4_sport_range_match_forwarded[egress-tor->spine] PASSED                                                                                                               [ 65%]
acl/test_acl.py::TestBasicAcl::test_l4_sport_range_match_forwarded[egress-spine->tor] PASSED                                                                                                               [ 66%]
acl/test_acl.py::TestBasicAcl::test_l4_dport_range_match_dropped[egress-tor->spine] PASSED                                                                                                                 [ 66%]
acl/test_acl.py::TestBasicAcl::test_l4_dport_range_match_dropped[egress-spine->tor] PASSED                                                                                                                 [ 67%]
acl/test_acl.py::TestBasicAcl::test_l4_sport_range_match_dropped[egress-tor->spine] PASSED                                                                                                                 [ 67%]
acl/test_acl.py::TestBasicAcl::test_l4_sport_range_match_dropped[egress-spine->tor] PASSED                                                                                                                 [ 68%]
acl/test_acl.py::TestBasicAcl::test_ip_proto_match_forwarded[egress-tor->spine] PASSED                                                                                                                     [ 69%]
acl/test_acl.py::TestBasicAcl::test_ip_proto_match_forwarded[egress-spine->tor] PASSED                                                                                                                     [ 69%]
acl/test_acl.py::TestBasicAcl::test_tcp_flags_match_forwarded[egress-tor->spine] PASSED                                                                                                                    [ 70%]
acl/test_acl.py::TestBasicAcl::test_tcp_flags_match_forwarded[egress-spine->tor] PASSED                                                                                                                    [ 70%]
acl/test_acl.py::TestBasicAcl::test_l4_dport_match_dropped[egress-tor->spine] PASSED                                                                                                                       [ 71%]
acl/test_acl.py::TestBasicAcl::test_l4_dport_match_dropped[egress-spine->tor] PASSED                                                                                                                       [ 71%]
acl/test_acl.py::TestBasicAcl::test_l4_sport_match_dropped[egress-tor->spine] PASSED                                                                                                                       [ 72%]
acl/test_acl.py::TestBasicAcl::test_l4_sport_match_dropped[egress-spine->tor] PASSED                                                                                                                       [ 72%]
acl/test_acl.py::TestBasicAcl::test_ip_proto_match_dropped[egress-tor->spine] PASSED                                                                                                                       [ 73%]
acl/test_acl.py::TestBasicAcl::test_ip_proto_match_dropped[egress-spine->tor] PASSED                                                                                                                       [ 73%]
acl/test_acl.py::TestBasicAcl::test_tcp_flags_match_dropped[egress-tor->spine] PASSED                                                                                                                      [ 74%]
acl/test_acl.py::TestBasicAcl::test_tcp_flags_match_dropped[egress-spine->tor] PASSED                                                                                                                      [ 75%]
acl/test_acl.py::TestIncrementalAcl::test_unmatched_blocked[egress-tor->spine] PASSED                                                                                                                      [ 75%]
acl/test_acl.py::TestIncrementalAcl::test_unmatched_blocked[egress-spine->tor] PASSED                                                                                                                      [ 76%]
acl/test_acl.py::TestIncrementalAcl::test_source_ip_match_forwarded[egress-tor->spine] PASSED                                                                                                              [ 76%]
acl/test_acl.py::TestIncrementalAcl::test_source_ip_match_forwarded[egress-spine->tor] PASSED                                                                                                              [ 77%]
acl/test_acl.py::TestIncrementalAcl::test_rules_priority_forwarded[egress-tor->spine] PASSED                                                                                                               [ 77%]
acl/test_acl.py::TestIncrementalAcl::test_rules_priority_forwarded[egress-spine->tor] PASSED                                                                                                               [ 78%]
acl/test_acl.py::TestIncrementalAcl::test_rules_priority_dropped[egress-tor->spine] PASSED                                                                                                                 [ 78%]
acl/test_acl.py::TestIncrementalAcl::test_rules_priority_dropped[egress-spine->tor] PASSED                                                                                                                 [ 79%]
acl/test_acl.py::TestIncrementalAcl::test_dest_ip_match_forwarded[egress-tor->spine] PASSED                                                                                                                [ 79%]
acl/test_acl.py::TestIncrementalAcl::test_dest_ip_match_forwarded[egress-spine->tor] PASSED                                                                                                                [ 80%]
acl/test_acl.py::TestIncrementalAcl::test_dest_ip_match_dropped[egress-tor->spine] PASSED                                                                                                                  [ 80%]
acl/test_acl.py::TestIncrementalAcl::test_dest_ip_match_dropped[egress-spine->tor] PASSED                                                                                                                  [ 81%]
acl/test_acl.py::TestIncrementalAcl::test_source_ip_match_dropped[egress-tor->spine] PASSED                                                                                                                [ 82%]
acl/test_acl.py::TestIncrementalAcl::test_source_ip_match_dropped[egress-spine->tor] PASSED                                                                                                                [ 82%]
acl/test_acl.py::TestIncrementalAcl::test_udp_source_ip_match_forwarded[egress-tor->spine] PASSED                                                                                                          [ 83%]
acl/test_acl.py::TestIncrementalAcl::test_udp_source_ip_match_forwarded[egress-spine->tor] PASSED                                                                                                          [ 83%]
acl/test_acl.py::TestIncrementalAcl::test_udp_source_ip_match_dropped[egress-tor->spine] PASSED                                                                                                            [ 84%]
acl/test_acl.py::TestIncrementalAcl::test_udp_source_ip_match_dropped[egress-spine->tor] PASSED                                                                                                            [ 84%]
acl/test_acl.py::TestIncrementalAcl::test_icmp_source_ip_match_dropped[egress-tor->spine] PASSED                                                                                                           [ 85%]
acl/test_acl.py::TestIncrementalAcl::test_icmp_source_ip_match_dropped[egress-spine->tor] PASSED                                                                                                           [ 85%]
acl/test_acl.py::TestIncrementalAcl::test_icmp_source_ip_match_forwarded[egress-tor->spine] PASSED                                                                                                         [ 86%]
acl/test_acl.py::TestIncrementalAcl::test_icmp_source_ip_match_forwarded[egress-spine->tor] PASSED                                                                                                         [ 86%]
acl/test_acl.py::TestIncrementalAcl::test_l4_dport_match_forwarded[egress-tor->spine] PASSED                                                                                                               [ 87%]
acl/test_acl.py::TestIncrementalAcl::test_l4_dport_match_forwarded[egress-spine->tor] PASSED                                                                                                               [ 88%]
acl/test_acl.py::TestIncrementalAcl::test_l4_sport_match_forwarded[egress-tor->spine] PASSED                                                                                                               [ 88%]
acl/test_acl.py::TestIncrementalAcl::test_l4_sport_match_forwarded[egress-spine->tor] PASSED                                                                                                               [ 89%]
acl/test_acl.py::TestIncrementalAcl::test_l4_dport_range_match_forwarded[egress-tor->spine] PASSED                                                                                                         [ 89%]
acl/test_acl.py::TestIncrementalAcl::test_l4_dport_range_match_forwarded[egress-spine->tor] PASSED                                                                                                         [ 90%]
acl/test_acl.py::TestIncrementalAcl::test_l4_sport_range_match_forwarded[egress-tor->spine] PASSED                                                                                                         [ 90%]
acl/test_acl.py::TestIncrementalAcl::test_l4_sport_range_match_forwarded[egress-spine->tor] PASSED                                                                                                         [ 91%]
acl/test_acl.py::TestIncrementalAcl::test_l4_dport_range_match_dropped[egress-tor->spine] PASSED                                                                                                           [ 91%]
acl/test_acl.py::TestIncrementalAcl::test_l4_dport_range_match_dropped[egress-spine->tor] PASSED                                                                                                           [ 92%]
acl/test_acl.py::TestIncrementalAcl::test_l4_sport_range_match_dropped[egress-tor->spine] PASSED                                                                                                           [ 92%]
acl/test_acl.py::TestIncrementalAcl::test_l4_sport_range_match_dropped[egress-spine->tor] PASSED                                                                                                           [ 93%]
acl/test_acl.py::TestIncrementalAcl::test_ip_proto_match_forwarded[egress-tor->spine] PASSED                                                                                                               [ 94%]
acl/test_acl.py::TestIncrementalAcl::test_ip_proto_match_forwarded[egress-spine->tor] PASSED                                                                                                               [ 94%]
acl/test_acl.py::TestIncrementalAcl::test_tcp_flags_match_forwarded[egress-tor->spine] PASSED                                                                                                              [ 95%]
acl/test_acl.py::TestIncrementalAcl::test_tcp_flags_match_forwarded[egress-spine->tor] PASSED                                                                                                              [ 95%]
acl/test_acl.py::TestIncrementalAcl::test_l4_dport_match_dropped[egress-tor->spine] PASSED                                                                                                                 [ 96%]
acl/test_acl.py::TestIncrementalAcl::test_l4_dport_match_dropped[egress-spine->tor] PASSED                                                                                                                 [ 96%]
acl/test_acl.py::TestIncrementalAcl::test_l4_sport_match_dropped[egress-tor->spine] PASSED                                                                                                                 [ 97%]
acl/test_acl.py::TestIncrementalAcl::test_l4_sport_match_dropped[egress-spine->tor] PASSED                                                                                                                 [ 97%]
acl/test_acl.py::TestIncrementalAcl::test_ip_proto_match_dropped[egress-tor->spine] PASSED                                                                                                                 [ 98%]
acl/test_acl.py::TestIncrementalAcl::test_ip_proto_match_dropped[egress-spine->tor] PASSED                                                                                                                 [ 98%]
acl/test_acl.py::TestIncrementalAcl::test_tcp_flags_match_dropped[egress-tor->spine] PASSED                                                                                                                [ 99%]
acl/test_acl.py::TestIncrementalAcl::test_tcp_flags_match_dropped[egress-spine->tor] PASSED                                                                                                                [100%]

================================================================================== 184 passed, 184 deselected in 265.92 seconds ==================================================================================

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
Stepan Blyschak added 6 commits August 2, 2019 11:21
Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
…ia pytest_runner.yml

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
@lguohan lguohan requested a review from stcheng August 6, 2019 17:39
Stepan Blyschak added 3 commits August 8, 2019 11:32
Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
@stepanblyschak stepanblyschak marked this pull request as ready for review August 29, 2019 07:48
if 'failed' in res['localhost']:
if reboot_res.ready():
logger.error('reboot result: {}'.format(reboot_res.get()))
raise Exception('DUT did not shutdown')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In recent testing, I found that on some testbed, rebooting happens fast. The wait_for module may not be able to detect the switch down event and timeout eventually. But indeed the switch rebooting was successful. I think it's better to ignore the failure of the wait_for down check and use uptime to verify that the switch was indeeded rebooted. For example:

  1. Get date and time on DUT before the reboot command is issued.
  2. After switch is up again (wait_for up succeeded), run "uptime -s" to get a new datetime. Assert that this new datetime is at least for example 10 seconds later than the previously recorded datetime.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's surprising to me that some SONiC system can reboot so fast.
Note, we execute reboot command in parallel to listening to SSH port. Assuming they start almost at the same time the reboot script itself has some serivces to stop, executes 'sleep 3', etc.
So reboot command definitely takes time (>3sec) by that time I think it is safe to assume wait_for routine has started. Even if reboot command execution time -> 0, the time it takes from grub to kernel to ssh service start is not 0,

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theoretically it is correct. But I suspect there is other issue caused the host executing the wait_for ansible module not able to detect the SSH down status in time. Could you try the code on our testbed "mts-sonic-dut"?

@wangxin
Copy link
Collaborator

wangxin commented Sep 12, 2019

Besides the concern of rebooting, other codes look good to me.

@lguohan lguohan merged commit cc85d36 into sonic-net:master Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants