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

Add buffer profile test (initial config test) #296

Closed

Conversation

andriymoroz-mlnx
Copy link
Contributor

No description provided.

@lguohan
Copy link
Contributor

lguohan commented Oct 6, 2017

@yxieca , please review.

@andriymoroz-mlnx
Copy link
Contributor Author

One of three test cases currently fails due to recent change in minigraph parser (missing information about neighbor type).

Copy link
Collaborator

@yxieca yxieca left a comment

Choose a reason for hiding this comment

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

  1. The comment on minigraph fileglob is not blocking, Please let me know if you can finish the change with this review?

  2. This test has a targeted devices in mind, can you make it more generic? For the reasons of:
    2.1. if there is new mellanox device not starting with msn27xx, can you include these devices in tests with minimum effort?
    2.2 if there is new other vendor's device and they provide the j2 template, can they use the test infrastructure with minimum effort?

It is ok for comment 2 to come later as an improvement change.


- set_fact:
port_name="Ethernet64"
minigr="[ 'minigraph0.xml', 'minigraph1.xml', 'minigraph2.xml']"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can these 3 files be picked up by fileglob or similar mechanism, instead of explicitly setting them?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

2.1 the test can run on any device but will test msn27xx platform template only. Currently this is the only platform which uses generated buffers config and not static.
2.2 yes, with some updates it can be used for the other platforms

about fileglob: maybe, but in this test the order is important

Copy link
Collaborator

Choose a reason for hiding this comment

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

Andriy,

The ordering part is quite tricky. I am not confident that another developer changing it will understand the constraints clearly.

Do you think you can change the minigr list to a dictionary, you can explicitly name the comparison target in the dictionary?

Cheers,
Ying

@andriymoroz-mlnx
Copy link
Contributor Author

andriymoroz-mlnx commented Nov 2, 2017

Test needs to be updated after sonic-net/sonic-buildimage#1101 is merged
Upd: updated

@lguohan
Copy link
Contributor

lguohan commented Nov 6, 2017

@yxieca , can you review it again? It is updated.


- block:
- name: Copy test files to DUT
copy: src={{ item }} dest=/tmp/
Copy link
Contributor

Choose a reason for hiding this comment

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

why not copy the directory? directory_mode=yes?

- "{{ minigr }}"

- name: Compare generated buffers configuration with the expected
shell: diff /tmp/{{ (item | basename | splitext)[0]}}.json /tmp/{{ (item | basename).split('_')[0] }}.json
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you think you can merge this step with the previous step,execute generation and comparison in the same shell command to reduce number of ssh sessions needed for the test? If you do so, you can always generate target file with a same name and compare it to the right template.

Regards,
Ying

@liatgrozovik
Copy link

This test is no longer relevant as of changes done while this PR was waiting for merge.
As we are planning to change it to dynamic buffer configuration and to support port speed dynamic configuration as well, we should rewrite a test to cover the new mechanism.

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