From: Waldemar Kozaczuk <
jwkoz...@gmail.com>
Committer: Waldemar Kozaczuk <
jwkoz...@gmail.com>
Branch: master
aarch64: enable test_net.py and test_tracing.py
This patch modifies both scripts and test.py so that
they can be executed properly on QEMU in TCG mode.
It also forces tests to be executed with 2 CPUs in TCG mode
until the issue #1143 is addressed.
Signed-off-by: Waldemar Kozaczuk <
jwkoz...@gmail.com>
---
diff --git a/scripts/test.py b/scripts/test.py
--- a/scripts/test.py
+++ b/scripts/test.py
@@ -6,8 +6,8 @@
import sys
import os
-import tests.test_net
-import tests.test_tracing
+import tests.test_net as test_net
+import tests.test_tracing as test_tracing
from operator import attrgetter
from tests.testing import *
@@ -46,10 +46,6 @@
#Please see comments on the right side for more details
"tst-elf-permissions.so", # Infinite page fault
"tst-mmap.so", # Infinite page fault
- #These tests fail due to some other shortcomings in the test scripts
- "tracing_smoke_test",
- "tcp_close_without_reading_on_fc",
- "tcp_close_without_reading_on_qemu",
]
add_tests([
@@ -194,11 +190,15 @@ def main():
if cmdargs.arch == 'aarch64':
disabled_list.extend(aarch64_disabled_list)
- #The SMP (#vCPUs >= 2) support on AArch64 is still pretty flaky (see issue #1123), so let us force to single cpu_list)
- run_py_args = run_py_args + ['-c', '1']
+ if host_arch != cmdargs.arch:
+ #Until the issue #1143 is resolved, we need to force running with 2 CPUs in TCG mode
+ run_py_args = run_py_args + ['-c', '2']
if running_with_kvm_on(cmdargs.arch, cmdargs.hypervisor) and cmdargs.arch != 'aarch64':
disabled_list.remove("tst-feexcept.so")
+ test_net.set_arch(cmdargs.arch)
+ test_tracing.set_arch(cmdargs.arch)
+
disabled_list.extend(cmdargs.disabled_list)
main()
diff --git a/scripts/tests/test_net.py b/scripts/tests/test_net.py
--- a/scripts/tests/test_net.py
+++ b/scripts/tests/test_net.py
@@ -1,14 +1,23 @@
from tests.testing import *
import socket
-import errno
+import errno, os
+
+arch = os.uname().machine
+def set_arch(_arch):
+ global arch
+ arch = _arch
def is_broken_pipe_error(e):
return isinstance(e, IOError) and e.errno == errno.EPIPE
def tcp_close_without_reading(hypervisor, host_name):
+ global arch
host_port = 7777
+ run_args = []
+ if os.uname().machine != arch:
+ run_args=['--arch', arch, '-c', '2']
server = run_command_in_guest('/tests/misc-tcp-close-without-reading.so',
- forward=[(host_port, 7777)], hypervisor=hypervisor)
+ forward=[(host_port, 7777)], hypervisor=hypervisor, run_py_args=run_args)
wait_for_line(server, 'listening...')
diff --git a/scripts/tests/test_tracing.py b/scripts/tests/test_tracing.py
--- a/scripts/tests/test_tracing.py
+++ b/scripts/tests/test_tracing.py
@@ -2,11 +2,21 @@
import os
import subprocess
+arch = os.uname().machine
+def set_arch(_arch):
+ global arch
+ arch = _arch
+
@test
def tracing_smoke_test():
+ global arch
+ run_args = []
+ if os.uname().machine != arch:
+ run_args=['--arch', arch, '-c', '2']
path = '/this/path/does/not/exist'
guest = Guest(['--trace=vfs_*,net_packet*,sched_wait*', '--trace-backtrace', '-e', path],
- hold_with_poweroff=True, show_output_on_error=False, scan_for_failed_to_load_object_error=False)
+ hold_with_poweroff=True, show_output_on_error=False, scan_for_failed_to_load_object_error=False,
+ run_py_args=run_args)
try:
wait_for_line(guest, 'Failed to load object: %s. Powering off.' % path)