Skip to content

Removing the redundant ifup command usage - #3297

Open
PavamanSubramaniyam wants to merge 1 commit into
avocado-framework-tests:masterfrom
PavamanSubramaniyam:removing_ifup_commands
Open

Removing the redundant ifup command usage#3297
PavamanSubramaniyam wants to merge 1 commit into
avocado-framework-tests:masterfrom
PavamanSubramaniyam:removing_ifup_commands

Conversation

@PavamanSubramaniyam

Copy link
Copy Markdown
Contributor

ifup and ifdown commands are deprecated in SLES16 and RHEL releases There are avocado utils network bring up functions already being called to bringup the host intefaces which are sufficient

ifup and ifdown commands are deprecated in SLES16 and RHEL releases
There are avocado utils network bring up functions already being
called to bringup the host intefaces which are sufficient

Signed-off-by: Pavaman Subramaniyam <pavsubra@linux.vnet.ibm.com>
@PavamanSubramaniyam

Copy link
Copy Markdown
Contributor Author

Attaching the execution result logs with ifup commands removed from the scripts:

avocado run --max-parallel-tasks=1 rping.py -m rping.py.data/rping_roce.yaml
/usr/local/lib/python3.13/site-packages/avocado/core/init.py:18: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
import pkg_resources
JOB ID : 5bca05076a9701d8d6acd8548e22328fcab425fe
JOB LOG : /root/avocado-fvt-wrapper/results/job-2026-09-03T00.27-5bca050/job.log
(01/27) rping.py:Rping.test;run-Parameters-Test-options-first-mtu-1500-314d: STARTED
(01/27) rping.py:Rping.test;run-Parameters-Test-options-first-mtu-1500-314d: PASS (52.22 s)
(02/27) rping.py:Rping.test;run-Parameters-Test-options-first-mtu-2000-903b: STARTED
(02/27) rping.py:Rping.test;run-Parameters-Test-options-first-mtu-2000-903b: PASS (53.47 s)
(03/27) rping.py:Rping.test;run-Parameters-Test-options-first-mtu-3000-6da7: STARTED
(03/27) rping.py:Rping.test;run-Parameters-Test-options-first-mtu-3000-6da7: PASS (53.46 s)
(04/27) rping.py:Rping.test;run-Parameters-Test-options-first-mtu-4000-4b00: STARTED
(04/27) rping.py:Rping.test;run-Parameters-Test-options-first-mtu-4000-4b00: PASS (53.54 s)
(05/27) rping.py:Rping.test;run-Parameters-Test-options-first-mtu-5000-1db8: STARTED
(05/27) rping.py:Rping.test;run-Parameters-Test-options-first-mtu-5000-1db8: PASS (53.45 s)
(06/27) rping.py:Rping.test;run-Parameters-Test-options-first-mtu-6000-b9f1: STARTED
(06/27) rping.py:Rping.test;run-Parameters-Test-options-first-mtu-6000-b9f1: PASS (53.43 s)
(07/27) rping.py:Rping.test;run-Parameters-Test-options-first-mtu-7000-e20d: STARTED
(07/27) rping.py:Rping.test;run-Parameters-Test-options-first-mtu-7000-e20d: PASS (53.43 s)
(08/27) rping.py:Rping.test;run-Parameters-Test-options-first-mtu-8000-f77b: STARTED
(08/27) rping.py:Rping.test;run-Parameters-Test-options-first-mtu-8000-f77b: PASS (53.58 s)
(09/27) rping.py:Rping.test;run-Parameters-Test-options-first-mtu-9000-55eb: STARTED
(09/27) rping.py:Rping.test;run-Parameters-Test-options-first-mtu-9000-55eb: PASS (53.49 s)
(10/27) rping.py:Rping.test;run-Parameters-Test-options-second-mtu-1500-38c1: STARTED
(10/27) rping.py:Rping.test;run-Parameters-Test-options-second-mtu-1500-38c1: PASS (52.23 s)
(11/27) rping.py:Rping.test;run-Parameters-Test-options-second-mtu-2000-a8db: STARTED
(11/27) rping.py:Rping.test;run-Parameters-Test-options-second-mtu-2000-a8db: PASS (53.46 s)
(12/27) rping.py:Rping.test;run-Parameters-Test-options-second-mtu-3000-5e52: STARTED
(12/27) rping.py:Rping.test;run-Parameters-Test-options-second-mtu-3000-5e52: PASS (53.51 s)
(13/27) rping.py:Rping.test;run-Parameters-Test-options-second-mtu-4000-5c5f: STARTED
(13/27) rping.py:Rping.test;run-Parameters-Test-options-second-mtu-4000-5c5f: PASS (53.59 s)
(14/27) rping.py:Rping.test;run-Parameters-Test-options-second-mtu-5000-a9ac: STARTED
(14/27) rping.py:Rping.test;run-Parameters-Test-options-second-mtu-5000-a9ac: PASS (53.43 s)
(15/27) rping.py:Rping.test;run-Parameters-Test-options-second-mtu-6000-56d1: STARTED
(15/27) rping.py:Rping.test;run-Parameters-Test-options-second-mtu-6000-56d1: PASS (53.51 s)
(16/27) rping.py:Rping.test;run-Parameters-Test-options-second-mtu-7000-7db9: STARTED
(16/27) rping.py:Rping.test;run-Parameters-Test-options-second-mtu-7000-7db9: PASS (53.43 s)
(17/27) rping.py:Rping.test;run-Parameters-Test-options-second-mtu-8000-46c2: STARTED
(17/27) rping.py:Rping.test;run-Parameters-Test-options-second-mtu-8000-46c2: PASS (53.57 s)
(18/27) rping.py:Rping.test;run-Parameters-Test-options-second-mtu-9000-23d1: STARTED
(18/27) rping.py:Rping.test;run-Parameters-Test-options-second-mtu-9000-23d1: PASS (53.60 s)
(19/27) rping.py:Rping.test;run-Parameters-Test-options-third-mtu-1500-af2a: STARTED
(19/27) rping.py:Rping.test;run-Parameters-Test-options-third-mtu-1500-af2a: PASS (52.39 s)
(20/27) rping.py:Rping.test;run-Parameters-Test-options-third-mtu-2000-6d1d: STARTED
(20/27) rping.py:Rping.test;run-Parameters-Test-options-third-mtu-2000-6d1d: PASS (53.75 s)
(21/27) rping.py:Rping.test;run-Parameters-Test-options-third-mtu-3000-183c: STARTED
(21/27) rping.py:Rping.test;run-Parameters-Test-options-third-mtu-3000-183c: PASS (53.56 s)
(22/27) rping.py:Rping.test;run-Parameters-Test-options-third-mtu-4000-9735: STARTED
(22/27) rping.py:Rping.test;run-Parameters-Test-options-third-mtu-4000-9735: PASS (53.71 s)
(23/27) rping.py:Rping.test;run-Parameters-Test-options-third-mtu-5000-801e: STARTED
(23/27) rping.py:Rping.test;run-Parameters-Test-options-third-mtu-5000-801e: PASS (53.66 s)
(24/27) rping.py:Rping.test;run-Parameters-Test-options-third-mtu-6000-ce9a: STARTED
(24/27) rping.py:Rping.test;run-Parameters-Test-options-third-mtu-6000-ce9a: PASS (53.62 s)
(25/27) rping.py:Rping.test;run-Parameters-Test-options-third-mtu-7000-b18f: STARTED
(25/27) rping.py:Rping.test;run-Parameters-Test-options-third-mtu-7000-b18f: PASS (53.66 s)
(26/27) rping.py:Rping.test;run-Parameters-Test-options-third-mtu-8000-1c48: STARTED
(26/27) rping.py:Rping.test;run-Parameters-Test-options-third-mtu-8000-1c48: PASS (53.75 s)
(27/27) rping.py:Rping.test;run-Parameters-Test-options-third-mtu-9000-46c1: STARTED
(27/27) rping.py:Rping.test;run-Parameters-Test-options-third-mtu-9000-46c1: PASS (53.71 s)
RESULTS : PASS 27 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML : /root/avocado-fvt-wrapper/results/job-2026-09-03T00.27-5bca050/results.html
JOB TIME : 1498.64 s

@PavamanSubramaniyam

Copy link
Copy Markdown
Contributor Author

Complete result logs are attached to the corresponding Jira task.

except Exception:
self.networkinterface.save(self.ipaddr, self.netmask)
self.networkinterface.bring_up()
process.system("ifup %s" % self.iface)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@PavamanSubramaniyam can we add the bring_up validation also here?
we are just running ip link set {self.name} up but not validating this, whether the interface is up or not after running this command.
so can you add one more line here

if not self.networkinterface.is_link_up()
    self.fail("failed to brin_up the interface after <some-operation>")

this validations are needed across all network tests, but please add this for these file as of now,
in both case, after bring_down and bring_up of interface.

@Naresh-ibm Naresh-ibm self-assigned this Sep 4, 2026
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.

2 participants