Skip to content

Bug fix for iperf test#3198

Open
vaishnavibhat wants to merge 1 commit into
avocado-framework-tests:masterfrom
vaishnavibhat:iperf_bug_fix
Open

Bug fix for iperf test#3198
vaishnavibhat wants to merge 1 commit into
avocado-framework-tests:masterfrom
vaishnavibhat:iperf_bug_fix

Conversation

@vaishnavibhat

@vaishnavibhat vaishnavibhat commented Jun 15, 2026

Copy link
Copy Markdown
Contributor
  • Removed problematic tearDown code: Deleted the unconditional restore_slave_cfg_file() that was causing the FileNotFoundError in the task description
  • Added exception handling for is_vnic() check: Wrapped the is_vnic() call in a try-except block to gracefully handle cases where the sysfs file doesn't exist
  • Used local variable is_vnic: Replaced direct calls to self.networkinterface.is_vnic() with a local boolean variable that defaults to False if the check fails
  • Added default value for iperf_pthread: Set to 1 to ensure it's always defined, even when speed is not 100000 or 25000
  • Fix pycodestyle

@vaishnavibhat

Copy link
Copy Markdown
Contributor Author

Before the patch:

avocado run iperf_test.py -m iperf_test.py.data/iperf_virt_test.yaml --max-parallel-tasks=1

JOB ID : 3dec572a82ac243abfeac63aeadf2105624f6bfb
JOB LOG : /home/OpTest/avocado-fvt-wrapper/results/job-2026-06-15T11.53-3dec572/job.log
(1/2) iperf_test.py:Iperf.test;run-mtu-1500-1a1a: STARTED
(1/2) iperf_test.py:Iperf.test;run-mtu-1500-1a1a: ERROR: Could not restore the config file [Errno 2] No such file or directory: '/etc/NetworkManager/system-connections/enP16389p1s0.nmconnection' (186.28 s)

After patch:

Removed problematic tearDown code:
Deleted the unconditional restore_slave_cfg_file()
that was causing the FileNotFoundError in the task description
Fix pycodestyle

Signed-off-by: Vaishnavi Bhat <vaishnavi@linux.ibm.com>
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.

1 participant