Skip to content

Add ACL Testbed tests#127

Merged
stcheng merged 6 commits intosonic-net:masterfrom
andriymoroz-mlnx:master
Apr 19, 2017
Merged

Add ACL Testbed tests#127
stcheng merged 6 commits intosonic-net:masterfrom
andriymoroz-mlnx:master

Conversation

@andriymoroz-mlnx
Copy link
Contributor

To execute the test need to do 3 runs of the test playbook on the T1 topology with the tags
acltb_configure, acltb_test and acltb_cleanup

To test resources cleanup, run acltb_configure, acltb_cleanup, acltb_configure, acltb_test and acltb_cleanup

andriymoroz-mlnx and others added 3 commits February 21, 2017 16:11
Added possibility to run ACL tests on spine ports to
test interaction with LAGs.
out_dir: /tmp/ansible-loganalyzer-results
test_match_file: acltb_match_messages.txt
test_ignore_file: acltb_ignore_messages.txt
test_expect_file: acltb_expect_messages.txt
Copy link
Contributor

Choose a reason for hiding this comment

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

what is the usage of test_expect_file? where this is used?

Copy link
Contributor Author

@andriymoroz-mlnx andriymoroz-mlnx Mar 30, 2017

Choose a reason for hiding this comment

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

In some loganalyzer includes
roles/test/files/tools/loganalyzer/loganalyzer_init.yml
roles/test/files/tools/loganalyzer/loganalyzer_analyze.yml

return
#---------------------------------------------------------------------

def verify_packet_any_port(self, pkt, ports=[], device_number=0):
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@andriymoroz-mlnx andriymoroz-mlnx Apr 5, 2017

Choose a reason for hiding this comment

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

It is already there:
https://github.com/p4lang/ptf/blob/master/src/ptf/testutils.py#L2326
I borrowed this function from the fib_test.py; have no idea why the one from the ptf wasn't used...
UPD: returned result is slightly different

Copy link
Contributor

@stcheng stcheng Apr 11, 2017

Choose a reason for hiding this comment

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

the difference here is that the ptf one has this assertion: verify_no_other_packets(test, device_number=device_number) on line 2352. and here it doesn't have this line. the reason is that sometimes LLDP and other random message will fail the test if this assertion exists.

however, a better way to avoid duplicating this function is to add --relax flag when starting ptf. thus this 'verify_no_other_packets' will be ignored.

I will update the FIB test later to use the p4 one and remove the duplication. could you here remove this first and use the --relax flag in the command?

Copy link

@liatgrozovik liatgrozovik Apr 12, 2017

Choose a reason for hiding this comment

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

This is a nice enhancement which we should add to the backlog and handle it when we have the time for it.
As FIB test is also using it and was already merged and used, I suggest we will merge this test mostly as found as working and have it run on testbed daily. Please consider this as a compromise as we would like to move on and handle urgent task while being able to run these tests daily

- block:
- name: copy the test to ptf container
copy: src=roles/test/files/acstests dest=/root
delegate_to: "{{ ptf_host }}"
Copy link
Contributor

Choose a reason for hiding this comment

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

can you use ptf_runner as the template? please check dhcp_relay.yml as an example.

"packet_action" : "drop"
},
"OP": "SET"
},
Copy link
Contributor

Choose a reason for hiding this comment

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

can you separate the supported number of range checkers into a separate test?

@stcheng stcheng merged commit 7ec04dc into sonic-net:master Apr 19, 2017
lguohan pushed a commit that referenced this pull request Aug 3, 2017
* Add ACL Testbed tests

* Verify ACLs on spine ports.
Added possibility to run ACL tests on spine ports to
test interaction with LAGs.

* Used ptf_runner.yml to run the test
* Removed rules for number of ranges test
* Added log analyzer to configure and cleanup tests
nhe-NV pushed a commit to nhe-NV/sonic-mgmt that referenced this pull request May 12, 2025
[202412][PR:16964] Update acl and qos script for topology t1-isolated-d28u1 t0-isolated-d16u16s1 and t0-isolated-d16u16s2
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
following PR's :
Implement cbgpPeer2State in CiscoBgp4MIB (sonic-net#119)
Fix index nodes in LLDP tables whose access right is not-accessible.
(sonic-net#112)
 Fix quagga/FRR parser on IPv6 BGP sessions (sonic-net#122)
 [lint] Fix some syntax errors or warnings (sonic-net#127)
  Update README.md: Add lgtm badges (sonic-net#128)
  [Multi-asic]: Support multi-asic platform (sonic-net#126)
  Simplify test code (sonic-net#132)
  [Multi-asic]: Namespace support for LLDP and Sensor tables (sonic-net#131)
  Fix undefined variable and warning message (sonic-net#134)
  Fix SNMP AgentX socket connection timeout when using
  Namespace.get_all() (sonic-net#140)
  [Namespace] Fix interfaces counters in InterfacesMIB RFC 2863 (sonic-net#141)
   Fix LGTM reported alert of PR#141 (sonic-net#142)
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.

5 participants