Skip to content

Commit

Permalink
Updating test case logic to check if netsvc_module exists (#3418)
Browse files Browse the repository at this point in the history
* updating netsvc_module path check to use sudo

* formatting the file as per flake8 recommendations

* removing string formatting for ls.path_exists()
  • Loading branch information
umfranci committed Sep 18, 2024
1 parent a1358de commit ea0f2f1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions microsoft/testsuites/network/networksettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import re
import time
from pathlib import PurePosixPath
from typing import Any, Dict, List, Tuple, Union, cast

from assertpy import assert_that
Expand All @@ -24,7 +23,7 @@
)
from lisa.base_tools import Uname
from lisa.operating_system import BSD, Debian, Redhat, Suse, Ubuntu, Windows
from lisa.tools import Ethtool, Iperf3, KernelConfig, Modinfo, Nm
from lisa.tools import Ethtool, Iperf3, KernelConfig, Ls, Modinfo, Nm
from lisa.util import parse_version
from microsoft.testsuites.network.common import cleanup_iperf3

Expand Down Expand Up @@ -731,10 +730,10 @@ def _check_msg_level_change_supported(self, node: Node) -> None:
cwd=node.working_path,
).stdout

assert node.shell.exists(
PurePosixPath(netvsc_module)
ls = node.tools[Ls]
assert ls.path_exists(
netvsc_module, sudo=True
), f"{netvsc_module} doesn't exist."

nm = node.tools[Nm]
msg_level_symbols = nm.get_symbol_table(netvsc_module)
else:
Expand Down

0 comments on commit ea0f2f1

Please sign in to comment.