← Back to issue list

Some tests fail on arm64

View original Github issue

Metadata

Project
craft-archives
Number
#144
Type
issue
State
closed
Author
lengau
Labels
—
Created
Updated
Closed

Current evaluation

Fixed arm64 test failures by deriving expected APT Architectures from the host architecture; PR #145 merged as 8459563.

Resolution: closed resolved

Reason: PR #145 replaced hard-coded amd64 expectations with the detected host architecture, fixing the integration tests on arm64. It merged as commit 8459563 and closed #144.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Bug Description Some tests fail on arm64 due to having the architecture hard-coded into expected values. ### To Reproduce Run tests on arm64 ### part yaml _No response_ ### Relevant log output ```shell =================================== FAILURES =================================== _________________________________ test_install _________________________________ fake_etc_apt = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_install0/etc/apt') all_repo_types = [{'components': ['main'], 'formats': ['deb', 'deb-src'], 'key-id': '78E1918602959B9C59103100F1831DDAFC42E99D', 'priori..., 'suites': ['focal'], 'type': 'apt', ...}, {'cloud': 'antelope', 'pocket': 'updates', 'priority': 123, 'type': 'apt'}] test_keys_dir = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_install0/keys') @pytest.mark.slow def test_install(fake_etc_apt, all_repo_types, test_keys_dir): """Integrated test that checks the configuration of keys, sources and pins.""" assert repo.install(project_repositories=all_repo_types, key_assets=test_keys_dir) check_keyrings(fake_etc_apt) > check_sources(fake_etc_apt, signed_by_location=fake_etc_apt / "keyrings") tests/integration/repo/test_installer.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ etc_apt_dir = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_install0/etc/apt') signed_by_location = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_install0/etc/apt/keyrings') def check_sources(etc_apt_dir: Path, signed_by_location: Path) -> None: sources_dir = etc_apt_dir / "sources.list.d" keyrings_on_fs = etc_apt_dir / "keyrings" if CLOUD_DATA: cloud_name = CLOUD_DATA["cloud"] codename = CLOUD_DATA["codename"] else: cloud_name = codename = None # Must have exactly these sources files, one for each repo source_to_contents = { "http_ppa_launchpad_net_snappy_dev_snapcraft_daily_ubuntu": APT_SOURCES.format( key_location=signed_by_location ), "ppa-deadsnakes_ppa": PPA_SOURCES.format( codename=VERSION_CODENAME, key_location=signed_by_location ), "http_apt_puppet_com": PUPPET_SOURCES.format(key_location=signed_by_location), } if CLOUD_DATA: source_to_contents[f"cloud-{cloud_name}"] = CLOUD_SOURCES.format( cloud=cloud_name, codename=codename, key_location=signed_by_location, ) assert len(list(keyrings_on_fs.iterdir())) == len(source_to_contents) for source_repo, expected_contents in source_to_contents.items(): source_file = sources_dir / f"craft-{source_repo}.sources" assert source_file.is_file() > assert source_file.read_text() == expected_contents E AssertionError: assert 'Types: deb d...C42E99D.gpg\n' == 'Types: deb d...C42E99D.gpg\n' E Types: deb deb-src E URIs: http://ppa.launchpad.net/snappy-dev/snapcraft-daily/ubuntu E Suites: focal E Components: main E - Architectures: amd64 E ? - E + Architectures: arm64 E ? + E Signed-By: /tmp/pytest-of-ubuntu/pytest-0/test_install0/etc/apt/keyrings/craft-FC42E99D.gpg tests/integration/repo/test_installer.py:275: AssertionError _____________________________ test_install_in_root _____________________________ tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_install_in_root0') all_repo_types = [{'components': ['main'], 'formats': ['deb', 'deb-src'], 'key-id': '78E1918602959B9C59103100F1831DDAFC42E99D', 'priori..., 'suites': ['focal'], 'type': 'apt', ...}, {'cloud': 'antelope', 'pocket': 'updates', 'priority': 123, 'type': 'apt'}] test_keys_dir = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_install_in_root0/keys') @pytest.mark.slow def test_install_in_root(tmp_path, all_repo_types, test_keys_dir): """Integrated test that checks the configuration of keys, sources and pins.""" etc_apt = tmp_path / "etc/apt" create_etc_apt_dirs(etc_apt) assert repo.install_in_root( project_repositories=all_repo_types, key_assets=test_keys_dir, root=tmp_path ) check_keyrings(etc_apt) > check_sources(etc_apt, signed_by_location=Path("/etc/apt/keyrings")) tests/integration/repo/test_installer.py:220: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ etc_apt_dir = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_install_in_root0/etc/apt') signed_by_location = PosixPath('/etc/apt/keyrings') def check_sources(etc_apt_dir: Path, signed_by_location: Path) -> None: sources_dir = etc_apt_dir / "sources.list.d" keyrings_on_fs = etc_apt_dir / "keyrings" if CLOUD_DATA: cloud_name = CLOUD_DATA["cloud"] codename = CLOUD_DATA["codename"] else: cloud_name = codename = None # Must have exactly these sources files, one for each repo source_to_contents = { "http_ppa_launchpad_net_snappy_dev_snapcraft_daily_ubuntu": APT_SOURCES.format( key_location=signed_by_location ), "ppa-deadsnakes_ppa": PPA_SOURCES.format( codename=VERSION_CODENAME, key_location=signed_by_location ), "http_apt_puppet_com": PUPPET_SOURCES.format(key_location=signed_by_location), } if CLOUD_DATA: source_to_contents[f"cloud-{cloud_name}"] = CLOUD_SOURCES.format( cloud=cloud_name, codename=codename, key_location=signed_by_location, ) assert len(list(keyrings_on_fs.iterdir())) == len(source_to_contents) for source_repo, expected_contents in source_to_contents.items(): source_file = sources_dir / f"craft-{source_repo}.sources" assert source_file.is_file() > assert source_file.read_text() == expected_contents E AssertionError: assert 'Types: deb d...C42E99D.gpg\n' == 'Types: deb d...C42E99D.gpg\n' E Types: deb deb-src E URIs: http://ppa.launchpad.net/snappy-dev/snapcraft-daily/ubuntu E Suites: focal E Components: main E - Architectures: amd64 E ? - E + Architectures: arm64 E ? + E Signed-By: /etc/apt/keyrings/craft-FC42E99D.gpg tests/integration/repo/test_installer.py:275: AssertionError ================= 2 failed, 1 passed, 218 deselected in 58.70s ================= ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed arm64 test failures by deriving expected APT Architectures from the host architecture; PR #145 merged as 8459563.
stealth/space-bunny-alpha — closed stale ARM64 test failures were closed with no recorded code fix; the only follow-up was automated creation of internal ticket CRAFT-3801.
qwen/qwen3.6-35b-a3b — — Closed without resolution. Tests fail on arm64 due to hard-coded amd64 architecture in expected values. No fix or merge was provided, leaving the issue abandoned.
qwen/qwen3.6-35b-a3b — — Closed without resolution. Tests fail on arm64 due to hardcoded architecture expectations. No fix or pull request was merged, indicating the issue was abandoned.
qwen/qwen3.6-35b-a3b — — Tests failed on arm64 due to hardcoded amd64 architecture values in expected outputs. The issue was closed without a fix or pull request, remaining unresolved after syncing to Jira ticket CRAFT-3801.

Update history

No update history recorded yet.

Related work

Related issues

Issue Project State Summary Similarity
#145 fix: fix tests on arm64 craft-archives merged Merged as commit 8459563, fixing arm64 test expectations after prerequisite #143 and resolving #144.
81%
#1119 tests: skip the tests that can't be run in arm64 snapcraft closed Closed unmerged; PR #1145 superseded it and was merged as b24e70721, changing unsupported arm64 tests to expect failure instead of being skipped.
78%
#1145 tests: expect failures for the tests that can't be run in arm64 snapcraft merged PR #1145 merged as commit b24e70721, setting expectFailure on tests that cannot run on arm64 in two test files (+32/-3). It superseded the earlier skip-only PR #1119, which was closed unmerged.
77%
#971 tests: fix integration tests in armhf snapcraft merged Merged PR #971 as commit a725e69da, fixing armhf integration-test setup with architecture-specific test configuration.
72%
#1030 ci: run Python tests on arm64 craft-application merged Merged #1030 as 944c358f, adding ARM64 Python unit/integration test runners and fixing architecture-specific test failures; residual fetch-service coverage moved to #1032.
70%