Skip to content

Commit

Permalink
Merge pull request #1145 from huangyum/vfio_1488321
Browse files Browse the repository at this point in the history
Improve the process of sr_iov_setup
  • Loading branch information
Balamuruhan S authored Sep 8, 2017
2 parents 621ec7d + 4a513f6 commit bf5087b
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 @@ -1467,7 +1467,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 @@ -1488,7 +1488,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 bf5087b

Please sign in to comment.