Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the nic name issue in image mode #473

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions os_tests/tests/test_network_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,8 @@ def test_tcp_checksum_offload(self):
self.skipTest("2 nodes required, current IP bucket:{}".format(self.params['remote_nodes']))
self.log.info("Current IP bucket:{}".format(self.params['remote_nodes']))
k_ver = utils_lib.run_cmd(self,'uname -r').strip('\n')
utils_lib.run_cmd(self,'sudo ethtool -k eth0|grep checksum')
cmd = "sudo ethtool -k {} | grep checksum".format(self.active_nic)
utils_lib.run_cmd(self, cmd)
if 'not found' in utils_lib.run_cmd(self,'modinfo sch_netem'):
if not 'debug' in k_ver:
utils_lib.is_pkg_installed(self,'kernel-modules-extra-{}'.format(k_ver))
Expand All @@ -1120,7 +1121,7 @@ def test_tcp_checksum_offload(self):
utils_lib.run_cmd(self,cmd,timeout=300,msg='create a 500M file')
if i:
utils_lib.run_cmd(self,'sudo modprobe sch_netem', msg='manually load sch_netem due to RHEL-52279')
cmd = "sudo tc qdisc add dev eth0 root netem corrupt 1%"
cmd = "sudo tc qdisc add dev {} root netem corrupt 1%".format(self.active_nic)
utils_lib.run_cmd(self,cmd,expect_ret=0,msg='Test again with network corrupt 1%')
utils_lib.init_connection(self, timeout=self.ssh_timeout)
nc_cli_cmd = 'nc {} 2233 < {}'.format(srv_ipv4,testfile_c)
Expand All @@ -1134,7 +1135,7 @@ def test_tcp_checksum_offload(self):
self.assertEqual(md5_client, md5_server)
utils_lib.run_cmd(self,'rm -rf {}'.format(testfile_c),msg='delete the test data file')
if i:
cmd = "sudo tc qdisc delete dev eth0 root netem corrupt 1%"
cmd = "sudo tc qdisc delete dev {} root netem corrupt 1%".format(self.active_nic)
utils_lib.run_cmd(self,cmd,msg='remove network corrupt setting')
utils_lib.init_connection(self, timeout=self.ssh_timeout)
self.log.info("test {} tcp corrupt done".format(i and 'with' or 'without'))
Expand Down
Loading