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

Some minor fixes and enhances #465

Merged
merged 1 commit into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ os_tests
os-tests will try to install required pkgs from default repo during run, but it would be better to have them if no repo is provided.
List RHEL only because CentOS Stream and Fedora usually have public repo available.

**RHEL-9**: make automake autoconf sysstat gcc unzip wget quota bzip2 iperf3 pciutils fio psmisc expect perf nvme-cli pciutils fio libaio-devel blktrace fio nvme-cli git tar nfs-utils libvirt qemu-kvm python3 dracut-fips kernel-debug python3-pip hostname podman xdp-tools openssl-devel glibc-all-langpacks strace sos acpid mokutil kernel-modules-extra iproute-tc wireshark-cli tcpdump nmap-ncat net-tools
**RHEL-9/10**: make automake autoconf sysstat gcc unzip wget quota bzip2 iperf3 pciutils fio psmisc expect perf nvme-cli pciutils fio libaio-devel blktrace fio nvme-cli git tar nfs-utils libvirt qemu-kvm python3 dracut-fips kernel-debug python3-pip hostname podman xdp-tools openssl-devel glibc-all-langpacks strace sos acpid mokutil kernel-modules-extra iproute-tc wireshark-cli tcpdump nmap-ncat net-tools tpm2-abrmd tpm2-tools

**RHEL-8**: make automake autoconf sysstat gcc unzip wget quota bzip2 iperf3 pciutils fio psmisc expect perf nvme-cli pciutils fio php-cli php-xml php-json libaio-devel blktrace fio nvme-cli git tar nfs-utils libvirt qemu-kvm kernel-debug python3 dracut-fips podman xdp-tools openssl-devel strace sos acpid mokutil kernel-modules-extra iproute-tc wireshark-cli tcpdump nmap-ncat net-tools

Expand Down
2 changes: 1 addition & 1 deletion os_tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = '0.3.0'
__codedate__ = '20241009'
__codedate__ = '20241026'
4 changes: 2 additions & 2 deletions os_tests/data/baseline_log.json
Original file line number Diff line number Diff line change
Expand Up @@ -2024,14 +2024,14 @@
"addedby": "[email protected]"
},
"msg_223": {
"content": ".*unchecked MSR access error: WRMSR to.*amd_pmu_cpu_reset.constprop.0.*",
"content": ".*unchecked MSR access error: WRMSR to.*amd_pmu_cpu.*",
"analyze": "known issue in rhel",
"branch": "rhel",
"status": "active",
"link": "https://issues.redhat.com/browse/RHEL-21709",
"path": "dmesg",
"trigger": "",
"cases": "os_tests.tests.test_general_check.TestGeneralCheck.test_check_dmesg_calltrace",
"cases": "os_tests.tests.test_general_check.TestGeneralCheck.test_check_dmesg_calltrace,os_tests.tests.test_lifecycle.TestLifeCycle.test_boot_debugkernel",
"addedby": "[email protected]"
},
"msg_224": {
Expand Down
1 change: 1 addition & 0 deletions os_tests/libs/resources_aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ def net_bandwidth(self):

@property
def is_secure_boot(self):
LOG.info("return false for now, need to update is_secure_boot() on aws")
return False

@property
Expand Down
67 changes: 31 additions & 36 deletions os_tests/tests/test_network_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1351,13 +1351,13 @@ def test_check_efa_device_driver(self):
"""
if not self.vm or self.vm.provider != "aws":
self.skipTest("Skip test case since instance is not aws vm")
else:
instance_type = self.vm.instance_type
if not self.vm.efa_support:
self.skipTest('EFA is not supported on the instance ' + instance_type)
cmd = 'lspci|grep EFA && lsmod|grep efa'
run_cmd(self, cmd, expect_ret=0, msg='check if EFA device exist and efa module is loaded')
self.log.info('EFA device is found and efa driver is loaded on the instance ' + instance_type)
run_cmd(self, 'modinfo efa', expect_ret=0, msg='get efa module info')
run_cmd(self, 'modinfo ena', expect_ret=0, msg='get efa module info')
if not self.vm.efa_support:
self.skipTest('EFA is not supported on the instance ' + self.vm.instance_type)
cmd = 'lspci|grep EFA && lsmod|grep efa'
run_cmd(self, cmd, expect_ret=0, msg='check if EFA device exist and efa module is loaded')
self.log.info('EFA device is found and efa driver is loaded on the instance ' + self.vm.instance_type)

@unittest.skipUnless(os.getenv('INFRA_PROVIDER') == 'aws', 'aws dedicated feature')
def test_install_libfabric_check_efa_provider(self):
Expand Down Expand Up @@ -1391,15 +1391,13 @@ def test_install_libfabric_check_efa_provider(self):
"""
if not self.vm or self.vm.provider != "aws":
self.skipTest("Skip test case since instance is not vm or aws")
else:
instance_type = self.vm.instance_type
if not self.vm.efa_support:
self.skipTest('EFA is not supported on the instance ' + instance_type)
if utils_lib.is_pkg_installed(self,'libfabric'):
cmd = 'fi_info -p efa'
utils_lib.run_cmd(self, cmd, expect_ret=0, expect_kw="provider: efa", msg='Check the Libfabric EFA interfaces')
cmd = "sudo bash -c 'fi_pingpong -e rdm -p efa -I 100 & sleep 2; fi_pingpong -e rdm -p efa localhost -I 100'"
utils_lib.run_cmd(self, cmd, expect_ret=0, msg='run pingpong test')
if not self.vm.efa_support:
self.skipTest('EFA is not supported on the instance ' + self.vm.instance_type)
if utils_lib.is_pkg_installed(self,'libfabric'):
cmd = 'fi_info -p efa'
utils_lib.run_cmd(self, cmd, expect_ret=0, expect_kw="provider: efa", msg='Check the Libfabric EFA interfaces')
cmd = "sudo bash -c 'fi_pingpong -e rdm -p efa -I 100 & sleep 2; fi_pingpong -e rdm -p efa localhost -I 100'"
utils_lib.run_cmd(self, cmd, expect_ret=0, msg='run pingpong test')

@unittest.skipUnless(os.getenv('INFRA_PROVIDER') == 'aws', 'aws dedicated feature')
def test_load_unload_efa_driver(self):
Expand Down Expand Up @@ -1433,24 +1431,22 @@ def test_load_unload_efa_driver(self):
"""
if not self.vm or self.vm.provider != "aws":
self.skipTest("Skip test case since instance is not vm or aws")
else:
instance_type = self.vm.instance_type
if not self.vm.efa_support:
self.skipTest('EFA is not supported on the instance ' + instance_type)
self.dmesg_cursor = utils_lib.get_cmd_cursor(self, cmd='sudo dmesg -T')
cmd = 'sudo modprobe -r efa'
run_cmd(self, cmd, ret_status=True, msg='unload efa driver')
cmd = 'lsmod|grep efa'
ret = run_cmd(self, cmd, ret_status=True, msg='check if efa driver is unloaded')
if ret == 1:
self.log.info('efa driver is unloaded successfully')
cmd = 'sudo modprobe efa'
run_cmd(self, cmd, ret_status=True, msg='reload efa driver')
cmd = 'lsmod|grep efa'
ret = run_cmd(self, cmd, ret_status=True, msg='check if EFA driver is loaded')
utils_lib.check_log(self, "error,warn,fail,trace,Trace", log_cmd='sudo dmesg -T', cursor=self.dmesg_cursor)
if ret == 0:
self.log.info('efa driver is loaded successfully')
if not self.vm.efa_support:
self.skipTest('EFA is not supported on the instance ' + self.vm.instance_type)
self.dmesg_cursor = utils_lib.get_cmd_cursor(self, cmd='sudo dmesg -T')
cmd = 'sudo modprobe -r efa'
run_cmd(self, cmd, ret_status=True, msg='unload efa driver')
cmd = 'lsmod|grep efa'
ret = run_cmd(self, cmd, ret_status=True, msg='check if efa driver is unloaded')
if ret == 1:
self.log.info('efa driver is unloaded successfully')
cmd = 'sudo modprobe efa'
run_cmd(self, cmd, ret_status=True, msg='reload efa driver')
cmd = 'lsmod|grep efa'
ret = run_cmd(self, cmd, ret_status=True, msg='check if EFA driver is loaded')
utils_lib.check_log(self, "error,warn,fail,trace,Trace", log_cmd='sudo dmesg -T', cursor=self.dmesg_cursor)
if ret == 0:
self.log.info('efa driver is loaded successfully')

@unittest.skipUnless(os.getenv('INFRA_PROVIDER') == 'aws', 'aws dedicated feature')
def test_attach_detach_efa_device(self):
Expand Down Expand Up @@ -1617,9 +1613,8 @@ def test_mpi_app_via_efa_provider(self):
if not self.vm:
self.skipTest("Skip test case since instance is not vm")

instance_type = self.vm.instance_type
if not self.vm.efa_support:
self.skipTest('EFA is not supported on the instance ' + instance_type)
self.skipTest('EFA is not supported on the instance ' + self.vm.instance_type)
if utils_lib.is_pkg_installed(self, 'libfabric'):
if utils_lib.is_pkg_installed(self,'openmpi'):
if utils_lib.is_pkg_installed(self,'git'):
Expand Down
2 changes: 1 addition & 1 deletion os_tests/tests/test_vtpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def test_tpm2_gettime(self):
if ret != 0:
self.skipTest("No tpm device found!")
utils_lib.is_cmd_exist(self, cmd='tpm2_gettime', cancel_case=True)
cmd = 'systemctl enable --now tpm2-abrmd.service'
cmd = 'sudo systemctl enable --now tpm2-abrmd.service'
utils_lib.run_cmd(self, cmd)
cmd = 'systemctl status tpm2-abrmd.service'
utils_lib.run_cmd(self, cmd, expect_ret=0)
Expand Down
Loading