Skip to content

[dhcp-relay] Make mac addresses of ptf interfaces unique#1366

Merged
lguohan merged 4 commits intosonic-net:masterfrom
tahmed-dev:taahme/change-mac-address-b4-test-run
Feb 5, 2020
Merged

[dhcp-relay] Make mac addresses of ptf interfaces unique#1366
lguohan merged 4 commits intosonic-net:masterfrom
tahmed-dev:taahme/change-mac-address-b4-test-run

Conversation

@tahmed-dev
Copy link
Copy Markdown
Contributor

DHCP relay agent uses the mac address to find where the DHCP packet
came from. When having more than one lan, the test fails as all
ptf interfaces use the same mac address. DHCP packet received on
ptf host are not counted as option 82 is not matching expected packets.

signed-of-by: Tamer Ahmed tamer.ahmed@microsoft.com

Description of PR

Summary:
Fixes # (issue)

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?

Any platform specific information?

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

Documentation

DHCP relay agent uses the mac address to find where the DHCP packet
came from. When having more than one lan, the test fails as all
ptf interfaces use the same mac address. DHCP packet received on
ptf host are not counted as option 82 is not matching expected packets.

signed-of-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
Comment thread tests/test_dhcp_relay.py Outdated
@tahmed-dev tahmed-dev changed the title [dhcp-relay] Change mac addresses of ptf interfaces [dhcp-relay] Make mac addresses of ptf interfaces unique Feb 5, 2020
@tahmed-dev tahmed-dev requested a review from jleveque February 5, 2020 01:53
Comment thread tests/test_dhcp_relay.py Outdated
@tahmed-dev tahmed-dev requested a review from jleveque February 5, 2020 02:09
@lguohan lguohan merged commit 9bb5a45 into sonic-net:master Feb 5, 2020
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…et#7487)

* [202012][swss/swss-common/utilities/kernel] Update submodule

sonic-swss:
- [Monitor Vlan] Fix a typo in hostif (sonic-net#1722)
- Update pool sizes during initialization from timer only (sonic-net#1708)
- [SflowMgr] SamplingRate Update by Speed Change Added (sonic-net#1721)

sonic-swss-common:
- [swss-common] Add MUX Metrics Table (sonic-net#482)
- [azp] Purge swss before installing the newly built deb package (sonic-net#472)

sonic-utilities:
- disk_check: Check & mount RO as RW using tmpfs (sonic-net#1569)
- No more IP validation as it is more likely a URL (sonic-net#1555)
- Stop PMON docker before cold and soft reboots (sonic-net#1514)
- Add soft-reboot reboot type (sonic-net#1453)
- [acl] Use a list instead of a comma-separated string for ACL port list (sonic-net#1519)
- sonic-installer: fix py3 issues in bootloader.aboot (sonic-net#1553)
- Fix unsupported fs.squashfs extraction in sonic-installer (sonic-net#1366)
- [show][config] cli support for firmware upgrade on Y-Cable (sonic-net#1528) (sonic-net#1558)

sonic-linux-kernel:
- [Mellanox] backport kernel patches for hw-management 7.0100.2303 (sonic-net#211)

Signed-off-by: Danny Allen <daall@microsoft.com>

* Update utilities w/ build fix
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
 Remove 00-copp.config.json from swss debian package. (sonic-net#1366)
arawat-nexthop pushed a commit to nexthop-ai/sonic-mgmt that referenced this pull request Apr 9, 2026
…out.py failure (sonic-net#1366)

Cherry pick of upstream fix:
sonic-net#23201
This test has been failing on master for since 03/06/2026:
https://qp.sw.internal.nexthop.ai/qp-testresults?org=nexthop-ai&repository=private-sonic-mgmt&branch=main&test=tests/dut_console/test_idle_timeout.py&after=2026/03/06

Fix for this is in latest sync to 202511:
nexthop-ai/private-sonic-mgmt@94cd5ec


The test_timeout function uses duthost_console fixture which depends on
enum_rand_one_per_hwsku_hostname, but the test also declares
enum_supervisor_dut_hostname. These two enum fixtures are mutually
exclusive in pytest_generate_tests (elif chain), so only
enum_supervisor_dut_hostname gets parameterized while
enum_rand_one_per_hwsku_hostname does not, causing:
  AttributeError: SubRequest object has no attribute param

Fix by changing enum_supervisor_dut_hostname to
enum_rand_one_per_hwsku_hostname to match the duthost_console fixture.

<!--
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:
Fixes # (issue)

### Type of change

<!--
- Fill x for your type of change.
- e.g.
- [x] Bug fix
-->

- [x] Bug fix
- [ ] Testbed and Framework(new/improvement)
- [ ] New Test case
    - [ ] Skipped for non-supported platforms
- [ ] Test case improvement

#### Upstream required

- [ ] Yes
- [x] No

#### Upstream requirements (if PR has "Upstream Required" label)

- [ ] PR title is free of sensitive information (customer names, product
codenames, internal references)

#### Which release branch to port
- [ ] master
- [ ] 202511
- [ ] 202505

### Approach
#### What is the motivation for this PR?

#### How did you do it?

#### How did you verify/test it?

Ran test with this change on gold210

```
============================= test session starts ==============================
platform linux -- Python 3.12.3, pytest-9.0.2, pluggy-1.6.0
ansible: 2.18.14
rootdir: /var/AzDevOps/sonic-mgmt/tests
configfile: pytest.ini
plugins: ansible-26.2.0, cov-7.0.0, metadata-3.1.1, repeat-0.9.4, html-4.2.0, xdist-3.8.0, allure-pytest-2.15.3, stress-1.0.1
collecting ... [WARNING]: Found variable using reserved name: serial
[WARNING]: Found variable using reserved name: serial
[WARNING]: Found variable using reserved name: serial
[WARNING]: Found variable using reserved name: serial
[WARNING]: Found variable using reserved name: serial
collected 1 item

dut_console/test_idle_timeout.py::test_timeout[gold210] PASSED           [100%]
```

#### 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?
-->

Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com>
Co-authored-by: Zhaohui Sun <94606222+ZhaohuiS@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants