[pytest]: Fail WR ARP test earlier with empty DIP#1986
[pytest]: Fail WR ARP test earlier with empty DIP#1986theasianpianist merged 2 commits intosonic-net:masterfrom
Conversation
* Add assertion to arp/test_wr_arp.py to catch an empty DIP returned from DUT host Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
tests/arp/test_wr_arp.py
Outdated
| @@ -98,6 +99,7 @@ def setupFerret(self, duthost, ptfhost): | |||
| ''' | |||
| ) | |||
| assert len(result['stderr_lines']) == 0, 'Could not obtain DIP' | |||
There was a problem hiding this comment.
Please remove the redundant assert above.
There was a problem hiding this comment.
I'm not sure that this is redundant, it looks like it's checking for the command failing outright rather than just not returning anything. Is it possible for stdout to be contain content when stderr_lines also contains content?
There was a problem hiding this comment.
I suspect the return code will be zero in this case. If it is, the module runner will throw and so the assert is redundant in this case.
There was a problem hiding this comment.
Ok sounds good, will fix.
Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
|
Hi @theasianpianist Error Log:
E Failed: Empty DIP returned duthost = arp/test_wr_arp.py:106: Failed
Version Details: |
4236bc4 [config reload] Fixing config reload when timer based delayed services are disabled (sonic-net#1967) d2514e4 [GCU] Different apply-patch runs should produce same sorted steps (sonic-net#1988) 2878adb [GCU] Using simulated config instead of target config when validating replace operation in NoDependencyMoveValidator (sonic-net#1987) fb8ca98 [GCU] Loading yang-models only once (sonic-net#1981) f88ee92 [GCU] Copying config_db before callding sonic_yang.loadData (sonic-net#1983) 9ed0e91 [GCU] Implementing DryRun by printing patch-sorter steps/imitating config_db (sonic-net#1973) b36b5e3 [GCU] Moving PatchSorter unit-test to json file to make it easier to read/maintain (sonic-net#1977) c0fa28b [generic-config-updater] Improving CreateOnly validator and marking /LOOPBACK_INTERFACE/LOOPBACK#/vrf_name as create-only (sonic-net#1969) 0559d04 [generic-config-updater] Adding non-strict mode (sonic-net#1929) b07f477 [debug dump util] FDB debug dump util changes (sonic-net#1968) 6d8757a [warm/fast-reboot] Fix kexec portion to support platforms based on Device Tree (sonic-net#1966) cc1409e [Auto Techsupport] Event driven Techsupport Bug Fixes (sonic-net#1986) 6c48bd5 Fix wrong help message for cable length setting (sonic-net#1978) c0bbbe3 [breakout] Fix the check when port is not present in BREAKOUT_CFG table (sonic-net#1765) 5bb8cad [doc][DPB] Update DPB related interface breakout command Info (sonic-net#1438) e6fd990 [config] Fix 'config reload -l' command to get filename by default (sonic-net#1611) bd8f7bb Update swss_ready check to check per namespace swss service (sonic-net#1974) 5439f94 [soft-reboot] Add support for platforms based on Device Tree (sonic-net#1963) 7c5810a [config] Add portchannel support for static route (sonic-net#1857) 7cb6a1b preserve old order for config reload (sonic-net#1964) 20bddbd [Auto-Techsupport] Issues related to Multiple Cores crashing handled (sonic-net#1948)
from DUT host
Signed-off-by: Lawrence Lee lawlee@microsoft.com
Description of PR
The WR ARP test case does not fail with a clear/useful error message if it receives an empty DIP from the DUT host.
Summary:
Fixes #1985 (issue)
Type of change
Approach
What is the motivation for this PR?
Provide clearer failure messages for the WR ARP test case
How did you do it?
Add an assertion to check the length of the DIP string
How did you verify/test it?
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation
You should be able to return your DUT to a normal state by restarting the
exabgp*processes on the PTF host and running thetest_announce_routes.pytest case.