Skip to content

ci: add testing on latest #467

ci: add testing on latest

ci: add testing on latest #467

GitHub Actions / Test results failed Aug 15, 2024 in 0s

16 passed, 3 failed and 1 skipped

Tests failed

❌ test-results-mir_test_tools-stable )/home/runner/work/mir-ci/mir-ci/mir-ci/mir_ci/junit-mir_test_tools-.xml

20 tests were completed in 237s with 16 passed, 3 failed and 1 skipped.

Test suite Passed Failed Skipped Time
pytest 16✅ 3❌ 1⚪ 237s

❌ pytest

tests.test_apps_can_run.TestAppsCanRun
  ✅ test_app_can_run[mir_test_tools-wpe-webkit-mir-kiosk]
  ❌ test_app_can_run[mir_test_tools-mir-kiosk-neverputt]
	self = <mir_ci.lib.cgroups.Cgroup object at 0x7f522a3049d0>
  ✅ test_app_can_run[mir_test_tools-mir-kiosk-scummvm]
  ✅ test_app_can_run[mir_test_tools-mir-kiosk-kodi]
  ✅ test_app_can_run[mir_test_tools-pluma]
  ✅ test_app_can_run[mir_test_tools-qterminal]
tests.test_drag_and_drop.TestDragAndDrop
  ✅ test_drag_and_drop[mir_test_tools]
tests.test_mir_flutter_app.TestMirFlutterApp
  ❌ test_mir_flutter_app[mir-test-tools-mir_test_tools]
	self = <test_mir_flutter_app.TestMirFlutterApp object at 0x7f522a72a590>
tests.test_osk.TestOSK
  ✅ test_osk_typing[pluma-ubuntu-frame-osk-mir_test_tools-wayland]
  ⚪ test_osk_typing[pluma-ubuntu-frame-osk-mir_test_tools-zapper]
tests.test_screencopy_bandwidth.TestScreencopyBandwidth
  ✅ test_active_app[asciinema-mir_test_tools]
  ❌ test_active_app[mir-kiosk-neverputt-mir_test_tools]
	self = <test_screencopy_bandwidth.TestScreencopyBandwidth object at 0x7f522a74bfd0>
  ✅ test_compositor_alone[mir_test_tools]
  ✅ test_inactive_app[qterminal-mir_test_tools]
  ✅ test_inactive_app[pluma-mir_test_tools]
  ✅ test_inactive_app[mir-kiosk-kodi-mir_test_tools]
  ✅ test_app_dragged_around[mir_test_tools]
tests.test_server.TestServerCanRun
  ✅ test_server_can_run[mir_test_tools]
tests.test_tests.TestDisplayServer
  ✅ test_can_get_cgroup[mir_test_tools]
tests.test_vnc.TestVnc
  ✅ test_vnc[qterminal-mir_test_tools]

Annotations

Check failure on line 0 in test-results-mir_test_tools-stable )/home/runner/work/mir-ci/mir-ci/mir-ci/mir_ci/junit-mir_test_tools-.xml

See this annotation in the file changed.

@github-actions github-actions / Test results

pytest ► tests.test_apps_can_run.TestAppsCanRun ► test_app_can_run[mir_test_tools-mir-kiosk-neverputt]

Failed test found in:
  test-results-mir_test_tools-stable )/home/runner/work/mir-ci/mir-ci/mir-ci/mir_ci/junit-mir_test_tools-.xml
Error:
  self = <mir_ci.lib.cgroups.Cgroup object at 0x7f522a3049d0>
Raw output
self = <mir_ci.lib.cgroups.Cgroup object at 0x7f522a3049d0>

    def get_cpu_time_microseconds(self) -> int:
        try:
>           for line in self._read_file("cpu.stat"):

lib/cgroups.py:51: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <mir_ci.lib.cgroups.Cgroup object at 0x7f522a3049d0>
file_name = 'cpu.stat'

    def _read_file(self, file_name: str) -> Iterator[str]:
        file_path = f"{self.path}/{file_name}"
>       with open(file_path, "r") as file:
E       FileNotFoundError: [Errno 2] No such file or directory: '/sys/fs/cgroup/user.slice/user-1001.slice/[email protected]/app.slice/snap.mir-kiosk-neverputt.mir-kiosk-neverputt-56ff43d5-c2ad-4e3c-bc17-24fae5c22d50.scope/cpu.stat'

lib/cgroups.py:46: FileNotFoundError

The above exception was the direct cause of the following exception:

self = <mir_ci.lib.benchmarker.CgroupsBackend object at 0x7f522a7f3950>

    async def poll(self) -> None:
        for name, info in self.data_records.items():
            try:
                cgroup = await info.program.get_cgroup()
>               cpu_ms = cgroup.get_cpu_time_microseconds()

lib/benchmarker.py:94: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <mir_ci.lib.cgroups.Cgroup object at 0x7f522a3049d0>

    def get_cpu_time_microseconds(self) -> int:
        try:
            for line in self._read_file("cpu.stat"):
                split_line = line.split(" ")
                if split_line[0] == "usage_usec":
                    return int(split_line[1])
    
            raise RuntimeError("usage_usec line not found")
        except Exception as ex:
>           raise RuntimeError(f"Unable to get the cpu time for cgroup: {self.path}") from ex
E           RuntimeError: Unable to get the cpu time for cgroup: /sys/fs/cgroup/user.slice/user-1001.slice/[email protected]/app.slice/snap.mir-kiosk-neverputt.mir-kiosk-neverputt-56ff43d5-c2ad-4e3c-bc17-24fae5c22d50.scope

lib/cgroups.py:58: RuntimeError

During handling of the above exception, another exception occurred:

self = <mir_ci.lib.benchmarker.Benchmarker object at 0x7f522a7f3910>
args = (None, None, None)
exs = [AssertionError('mir-kiosk-neverputt died without being waited for or killed')]
program = <mir_ci.program.display_server.DisplayServer object at 0x7f522a7f37d0>

    async def __aexit__(self, *args):
        if self.running is False:
            return
    
        self.running = False
        try:
            if self.task:
                self.task.cancel()
                with suppress(asyncio.CancelledError):
                    await self.task
        except Exception as e:
>           raise e

lib/benchmarker.py:56: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
lib/benchmarker.py:54: in __aexit__
    await self.task
lib/benchmarker.py:24: in _run
    await self.backend.poll()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <mir_ci.lib.benchmarker.CgroupsBackend object at 0x7f522a7f3950>

    async def poll(self) -> None:
        for name, info in self.data_records.items():
            try:
                cgroup = await info.program.get_cgroup()
                cpu_ms = cgroup.get_cpu_time_microseconds()
                mem_current = cgroup.get_current_memory()
                try:
                    mem_max = cgroup.get_peak_memory()
                except RuntimeError:
                    mem_max = max(self.data_records[name].mem_bytes_max, mem_current)
            except RuntimeError as ex:
>               warnings.warn(f"Ignoring cgroup read failure: {ex}")
E               UserWarning: Ignoring cgroup read failure: Unable to get the cpu time for cgroup: /sys/fs/cgroup/user.slice/user-1001.slice/[email protected]/app.slice/snap.mir-kiosk-neverputt.mir-kiosk-neverputt-56ff43d5-c2ad-4e3c-bc17-24fae5c22d50.scope

lib/benchmarker.py:101: UserWarning

During handling of the above exception, another exception occurred:

self = <test_apps_can_run.TestAppsCanRun object at 0x7f522a95d310>
any_server = <mir_ci.program.app.App object at 0x7f522a7f3610>
app = <mir_ci.program.app.App object at 0x7f522a93bad0>
record_property = <function record_property.<locals>.append_property at 0x7f522a7f6b60>

    @pytest.mark.smoke
    @pytest.mark.parametrize(
        "app",
        [
            apps.wpe(),
            apps.snap("mir-kiosk-neverputt"),
            apps.snap("mir-kiosk-scummvm"),
            apps.snap("mir-kiosk-kodi"),
            apps.pluma(),
            apps.qterminal(),
        ],
    )
    async def test_app_can_run(self, any_server, app, record_property) -> None:
        server_instance = DisplayServer(any_server)
        program = server_instance.program(app)
        benchmarker = Benchmarker(OrderedDict(compositor=server_instance, client=program), poll_time_seconds=0.1)
>       async with benchmarker:

tests/test_apps_can_run.py:30: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <mir_ci.lib.benchmarker.Benchmarker object at 0x7f522a7f3910>
args = (None, None, None)
exs = [AssertionError('mir-kiosk-neverputt died without being waited for or killed')]
program = <mir_ci.program.display_server.DisplayServer object at 0x7f522a7f37d0>

    async def __aexit__(self, *args):
        if self.running is False:
            return
    
        self.running = False
        try:
            if self.task:
                self.task.cancel()
                with suppress(asyncio.CancelledError):
                    await self.task
        except Exception as e:
            raise e
        finally:
            exs = []
            for program in self.running_programs:
                try:
                    await program.__aexit__()
                except Exception as e:
                    exs.append(e)
            if exs:
>               raise Exception("; ".join(str(ex) for ex in (exs)))
E               Exception: mir-kiosk-neverputt died without being waited for or killed

lib/benchmarker.py:65: Exception

Check failure on line 0 in test-results-mir_test_tools-stable )/home/runner/work/mir-ci/mir-ci/mir-ci/mir_ci/junit-mir_test_tools-.xml

See this annotation in the file changed.

@github-actions github-actions / Test results

pytest ► tests.test_mir_flutter_app.TestMirFlutterApp ► test_mir_flutter_app[mir-test-tools-mir_test_tools]

Failed test found in:
  test-results-mir_test_tools-stable )/home/runner/work/mir-ci/mir-ci/mir-ci/mir_ci/junit-mir_test_tools-.xml
Error:
  self = <test_mir_flutter_app.TestMirFlutterApp object at 0x7f522a72a590>
Raw output
self = <test_mir_flutter_app.TestMirFlutterApp object at 0x7f522a72a590>
robot_log = PosixPath('log.html')
server = <mir_ci.program.app.App object at 0x7f522a728a10>
app = <mir_ci.program.program.Program object at 0x7f522a7f3110>
tmp_path = PosixPath('/tmp/pytest-of-runner/pytest-1/test_mir_flutter_app_mir_test_0')

    async def test_mir_flutter_app(self, robot_log, server, app, tmp_path) -> None:
        extensions = VirtualPointer.required_extensions + ScreencopyTracker.required_extensions
        server_instance = DisplayServer(server, add_extensions=extensions)
        assets = collect_assets("wayland", ["kvm"], "mir_flutter_app")
    
        async with server_instance, server_instance.program(App(app.command[0], app.app_type)) as app:
            tuple((tmp_path / k).symlink_to(v) for k, v in assets.items())
            robot = server_instance.program(App(("robot", "-d", tmp_path, "--log", robot_log, tmp_path)))
            async with robot:
>               await robot.wait(120)

tests/test_mir_flutter_app.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <mir_ci.program.program.Program object at 0x7f522a7f3990>, timeout = 120
term_timeout = 10

    async def wait(self, timeout=default_wait_timeout, term_timeout=default_term_timeout) -> None:
        if self.is_running():
            self.send_signals_task = asyncio.create_task(self.send_kill_signals(timeout, term_timeout))
        if self.process_end is not None:
            await self.process_end
            self.process_end = None
            print("\n" + format_output(self.name, self.output))
            assert self.process
            if self.process.returncode != 0:
                message = self.name
                if self.sigkill_sent:
                    message += " refused to terminate"
                else:
                    message += " closed with exit code " + str(self.process.returncode)
>               raise ProgramError(message)
E               mir_ci.program.program.ProgramError: robot closed with exit code 16

program/program.py:97: ProgramError

Check failure on line 0 in test-results-mir_test_tools-stable )/home/runner/work/mir-ci/mir-ci/mir-ci/mir_ci/junit-mir_test_tools-.xml

See this annotation in the file changed.

@github-actions github-actions / Test results

pytest ► tests.test_screencopy_bandwidth.TestScreencopyBandwidth ► test_active_app[mir-kiosk-neverputt-mir_test_tools]

Failed test found in:
  test-results-mir_test_tools-stable )/home/runner/work/mir-ci/mir-ci/mir-ci/mir_ci/junit-mir_test_tools-.xml
Error:
  self = <test_screencopy_bandwidth.TestScreencopyBandwidth object at 0x7f522a74bfd0>
Raw output
self = <test_screencopy_bandwidth.TestScreencopyBandwidth object at 0x7f522a74bfd0>
record_property = <function record_property.<locals>.append_property at 0x7f522a315580>
server = <mir_ci.program.display_server.DisplayServer object at 0x7f522a34c910>
app = <mir_ci.program.app.App object at 0x7f522a746e90>

    @pytest.mark.parametrize("server", servers.servers(servers.ServerCap.SCREENCOPY))
    @pytest.mark.parametrize(
        "app",
        [
            apps.qterminal(
                "--execute",
                f"python3 -m asciinema play {ASCIINEMA_CAST}",
                pip_pkgs=("asciinema",),
                id="asciinema",
                extra=20 + SLOWDOWN,
            ),
            apps.snap("mir-kiosk-neverputt", extra=False),
        ],
    )
    async def test_active_app(self, record_property, server, app) -> None:
        server = DisplayServer(server, add_extensions=ScreencopyTracker.required_extensions)
        tracker = ScreencopyTracker(server.display_name)
>       async with server as s, tracker, s.program(App(app.command[0], app.app_type)) as p:

tests/test_screencopy_bandwidth.py:45: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <mir_ci.program.program.Program object at 0x7f522a35d490>
args = (None, None, None)

    async def __aexit__(self, *args) -> None:
        if self.cgroups_task:
            self.cgroups_task.cancel()
    
        if self.process_end is not None:
            if not self.is_running():
                await self.process_end
>               raise AssertionError(f"{self.name} died without being waited for or killed")
E               AssertionError: mir-kiosk-neverputt died without being waited for or killed

program/program.py:153: AssertionError