Skip to content

Commit

Permalink
Improve the process of sr_iov_setup
Browse files Browse the repository at this point in the history
Signed-off-by: Yumei Huang <[email protected]>
  • Loading branch information
huangyum committed Sep 6, 2017
1 parent cfe37e7 commit 4a513f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions virttest/test_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1475,7 +1475,7 @@ def sr_iov_setup(self):
time.sleep(3)
re_probe = False
# If driver not available after modprobe try to remove it and reprobe
if process.system("lsmod | grep %s" % self.driver, ignore_status=True,
if process.system("lsmod | grep -w %s" % self.driver, ignore_status=True,
shell=True):
re_probe = True
# If driver is available then set VFs for ppc64le
Expand All @@ -1496,7 +1496,7 @@ def sr_iov_setup(self):
# Re-probe driver with proper number of VFs once more and raise
# exception
if re_probe:
if not self.remove_driver() and not self.modprobe_driver():
if not self.remove_driver() or not self.modprobe_driver():
return False
if ARCH == 'ppc64le' and self.driver == 'mlx5_core':
set_ip = 0
Expand Down

0 comments on commit 4a513f6

Please sign in to comment.