Changes to steps involved for Tests verify_load_gpu_driver and verify_dhcp_client_timeout for Redhat (#3465)

* Updating gpu package name for Cuda and steps for Redhat dhcp get_timeout()

* using sudo for cat

* Adding support for GPU A10-8Q

* Formatting as per black recommendations
This commit is contained in:
Umang Francis 2024-10-09 07:50:12 +05:30 коммит произвёл GitHub
Родитель 27a57c369a
Коммит a767a8f82b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
3 изменённых файлов: 9 добавлений и 4 удалений

Просмотреть файл

@ -201,7 +201,7 @@ class Gpu(Feature):
"http://developer.download.nvidia.com/compute/cuda/"
f"repos/rhel{release}/x86_64/cuda-rhel{release}.repo"
)
install_packages = ["cuda-drivers"]
install_packages = ["nvidia-driver-cuda"]
if release == "7":
install_packages.append("nvidia-driver-latest-dkms")
self._node.os.install_packages(install_packages, signed=False)

Просмотреть файл

@ -5,7 +5,7 @@ from typing import Any, Optional, Type
from lisa.base_tools import Cat
from lisa.executable import Tool
from lisa.operating_system import Debian, Fedora, Suse
from lisa.operating_system import Debian, Fedora, Redhat, Suse
from lisa.util import LisaException, UnsupportedDistroException, find_group_in_lines
from .ls import Ls
@ -44,7 +44,11 @@ class Dhclient(Tool):
def get_timeout(self) -> int:
is_default_value: bool = True
if isinstance(self.node.os, Debian) or isinstance(self.node.os, Suse):
if (
isinstance(self.node.os, Debian)
or isinstance(self.node.os, Suse)
or isinstance(self.node.os, Redhat)
):
paths_to_check = [
f"/etc/dhcp/{self._command}.conf",
f"/etc/{self._command}.conf",
@ -61,7 +65,7 @@ class Dhclient(Tool):
# the default value in debian is 300
value: int = 300
cat = self.node.tools[Cat]
output = cat.read(config_path)
output = cat.read(config_path, sudo=True)
group = find_group_in_lines(output, self._debian_pattern)
if group and not group["default"]:
value = int(group["number"])

Просмотреть файл

@ -15,6 +15,7 @@ class NvidiaSmi(Tool):
("A100", "44450000", 6),
("H100", "44453233", 0),
("A10-4Q", "56475055", 0),
("A10-8Q", "3e810200", 0),
)
@property