Replace ifconfig with ip utils#1022
Merged
jleveque merged 1 commit intosonic-net:masterfrom Jul 23, 2019
Merged
Conversation
Signed-off-by: Nazarii Hnydyn <[email protected]>
| ifconfig $i hw ether $mac | ||
| set -e | ||
|
|
||
| for INTF in $(ip -br link show | grep 'eth' | awk '{sub(/@.*/,"",$1); print $1}'); do |
Collaborator
There was a problem hiding this comment.
why using capital letters for a parameter name? i don't think this is the convention used in the different scripts.
Any reason why not keeping the names as before? prefix, suffix, mac, addr, etc.
Beside of that i agree we should not use ifconfig any more but only ip commands.
Contributor
There was a problem hiding this comment.
I believe the codebase is currently inconsistent; you will find usage of both all-caps and all-lowercase variable names. I personally prefer all-caps for variable names in bash.
Contributor
Author
There was a problem hiding this comment.
@jleveque could you please merge this if no more concerns?
jleveque
approved these changes
Jul 23, 2019
fraserg-arista
pushed a commit
to fraserg-arista/sonic-mgmt
that referenced
this pull request
Feb 24, 2026
…onic-net#1022) <!-- Please make sure you've read and understood our contributing guidelines; https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md Please provide following information to help code review process a bit easier: --> ### Description of PR <!-- - Please include a summary of the change and which issue is fixed. - Please also include relevant motivation and context. Where should reviewer start? background context? - List any dependencies that are required for this change. --> Summary: Fix `dns/static_dns/test_static_dns.py` not fully cleaning up the DUT state after tests. There are 2 places where permanent change to the DUT state is done: 1. When `config save -y` is run in `test_static_dns_basic` without backing up the original `/etc/sonic/config_db.json`. - This is fixed by adding the fixture to backup and restore config_db 2. When an instance of `dhclient` is started in `test_dynamic_dns_not_working_when_static_ip_configured`, which permanently changes the mgmt ip address. - This is fixed by running `config_reload` after the test. Note: simply changing via `iptable` commands do not work - a `config_reload` is needed to restore the DUT properly. Fixes sonic-net#22270 ### Type of change <!-- - Fill x for your type of change. - e.g. - [x] Bug fix --> - [ ] Bug fix - [ ] Testbed and Framework(new/improvement) - [ ] New Test case - [ ] Skipped for non-supported platforms - [x] Test case improvement ### Back port request - [ ] 202205 - [ ] 202305 - [ ] 202311 - [ ] 202405 - [ ] 202411 - [x] msft-202412 - [ ] 202505 - [x] 202511 ### Approach #### What is the motivation for this PR? Some tests are failing (`test_configurable_drop_counters.py`) when run after `dns/static_dns/test_static_dns.py`. #### How did you do it? Add clean up steps to ensure the DUT is recovered to the state before `dns/static_dns/test_static_dns.py` is run. #### How did you verify/test it? `test_configurable_drop_counters.py` no longer fails when run after `dns/static_dns/test_static_dns.py`. #### Any platform specific information? #### Supported testbed topology if it's a new test case? ### Documentation <!-- (If it's a new feature, new test case) Did you update documentation/Wiki relevant to your implementation? Link to the wiki page? -->
kazinator-arista
pushed a commit
to kazinator-arista/sonic-mgmt
that referenced
this pull request
Mar 4, 2026
1. remove container feature table 2. do not generate feature entry if the feature is not included in the image 3. rename ENABLE_* to INCLUDE_* for better clarity 4. rename feature status to feature state 5. [submodule]: update sonic-utilities * 9700e45 2020-08-03 | [show/config]: combine feature and container feature cli (sonic-net#1015) (HEAD, origin/master, origin/HEAD) [lguohan] * c9d3550 2020-08-03 | [tests]: fix drops_group_test failure on second run (sonic-net#1023) [lguohan] * dfaae69 2020-08-03 | [lldpshow]: Fix input device is not a TTY error (sonic-net#1016) [Arun Saravanan Balachandran] * 216688e 2020-08-02 | [tests]: rename sonic-utilitie-tests to tests (sonic-net#1022) [lguohan] Signed-off-by: Guohan Lu <[email protected]>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Nazarii Hnydyn [email protected]
Description of PR
Replaced ifconfig with ip utils
Type of change
Approach
How did you do it?
Replaced ifconfig with ip utils
How did you verify/test it?
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation
- A picture of a cute animal (not mandatory but encouraged)