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

avocado-vt tests fail for AMD hosts #6033

Open
SinadShan opened this issue Sep 19, 2024 · 2 comments
Open

avocado-vt tests fail for AMD hosts #6033

SinadShan opened this issue Sep 19, 2024 · 2 comments
Assignees
Labels

Comments

@SinadShan
Copy link

Describe the bug
Running avocado-vt tests on an Oracle Linux AMD host fails with the error:

JOB ID     : 2d2563d6a1eee8a19d00bdf9297e3ba1a12f5c31
JOB LOG    : /root/avocado/job-results/job-2024-09-19T10.25-2d2563d/job.log
 (1/1) io-github-autotest-qemu.unattended_install.cdrom.extra_cdrom_ks.default_install.aio_native: STARTED
 (1/1) io-github-autotest-qemu.unattended_install.cdrom.extra_cdrom_ks.default_install.aio_native: ERROR: argument of type 'int' is not iterable (0.55 s)
RESULTS    : PASS 0 | ERROR 1 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB TIME   : 10.51 s

More from debug logs:

[stdlog] 2024-09-19 10:25:32,683 avocado.test test             L0314 ERROR| Exception raised during postprocessing: argument of type 'int' is not iterable
[stderr] Traceback (most recent call last):
[stderr]   File "/usr/lib/python3.9/site-packages/avocado_vt/plugins/vt_runner.py", line 74, in runTest
[stderr]     raise self.__status  # pylint: disable-msg=E0702
[stderr]   File "/usr/lib/python3.9/site-packages/avocado_vt/test.py", line 146, in setUp
[stderr]     self._runTest()
[stderr]   File "/usr/lib/python3.9/site-packages/avocado_vt/test.py", line 268, in _runTest
[stderr]     params = env_process.preprocess(self, params, env)
[stderr]   File "/usr/lib/python3.9/site-packages/virttest/error_context.py", line 141, in new_fn
[stderr]     return fn(*args, **kwargs)
[stderr]   File "/usr/lib/python3.9/site-packages/virttest/env_process.py", line 1039, in preprocess
[stderr]     if cpu_family is not None and "power" in cpu_family:
[stderr] TypeError: argument of type 'int' is not iterable
**Steps to reproduce**
Steps to reproduce the behavior with a reproducible whenever possible.

Expected behavior
Tests execute without errors

Current behavior
Error

System information (please complete the following information):

  • OS: Oracle Linux Server release 9.4
  • Avocado version: Avocado 107.0
  • Avocado installation method: Built from release tag 107.0

Additional information

The issue was rooted down to get_family in avocado/utils/cpu.py returning integer type for AMD hosts:

def get_family():
    """Get family name of the cpu like Broadwell, Haswell, power8, power9."""
    family = None
    arch = get_arch()
    if arch == "x86_64" or arch == "i386":
        if get_vendor() == "amd":
            cpu_info = _get_info()
            pattern = r"cpu family\s*:"
            for line in cpu_info:
                line = line.decode("utf-8")
                if re.search(pattern, line):
                    family = int(line.split(":")[1])
                    return family 
@SinadShan SinadShan added the bug label Sep 19, 2024
@mr-avocado mr-avocado bot moved this to Triage in Default project Sep 19, 2024
@richtja
Copy link
Contributor

richtja commented Sep 19, 2024

Hi @SinadShan, thank you for reporting this issue. I agree that we should make better description of return values of get_family() method. But can you please check your avocado-vt version, because it seems to me that this issue has been fixed on latest avocado-vt.

@SinadShan
Copy link
Author

I had used the latest released avocado-vt version 104.0 in which this issue was seen. This issue does seem to be fixed in a recent commit, but a release tag has not been made with these changes. Using the latest source should fix this issue. Thanks!

@richtja richtja self-assigned this Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Short Term (Current Q) Backlog
Development

No branches or pull requests

4 participants
@richtja @SinadShan and others