← Back to issue list

snap tests fail when executed in a platform that's not amd64

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1589779
Type
issue
State
closed
Author
~elopio
Labels
verification-done
Created
Updated
Closed

Current evaluation

Fixed by ubuntu-core/snapcraft PR #554 (commit baed96749), making snaps tests architecture-aware; released in snapcraft 2.11 after successful verification.

Resolution: closed resolved

Reason: Commit baed96749 from PR #554 added support for running snaps tests across multiple architectures. Snapcraft 2.11 passed SRU verification and was released to updates.

Evaluated by: mr-cal-bot

No scores available.

Issue body

The snaps test suite hardcodes amd64 in the expected snap name, so when it is run in a different architecture it will fail. ERROR: demos_tests.test_busybox.BusyBoxTestCase.test_busybox ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/adt-run.SFkaMi/build.WRd/real-tree/snaps_tests/demos_tests/test_busybox.py", line 26, in test_busybox self.install_snap(self.snap_content_dir, 'busybox', '1.0') File "/tmp/adt-run.SFkaMi/build.WRd/real-tree/snaps_tests/__init__.py", line 156, in install_snap self.snappy_testbed.copy_file(snap_local_path, '/home/ubuntu') File "/tmp/adt-run.SFkaMi/build.WRd/real-tree/snaps_tests/testbed.py", line 55, in copy_file shutil.copy(src, dst) File "/usr/lib/python3.5/shutil.py", line 235, in copy copyfile(src, dst, follow_symlinks=follow_symlinks) File "/usr/lib/python3.5/shutil.py", line 114, in copyfile with open(src, 'rb') as fsrc: FileNotFoundError: [Errno 2] No such file or directory: 'demos/busybox/busybox_1.0_amd64.snap' [Impact] * No visible impact for users. * Fixing this test will get us closer to have green executions in autopkgtests in all the platforms. [Test Case] * Run the autopkgtests in a platform that's not amd64, [Regression Potential] * This could make fail the tests in amd64. But as it's in an autopkgtest, any regression will block the new version to get to proposed.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed by ubuntu-core/snapcraft PR #554 (commit baed96749), making snaps tests architecture-aware; released in snapcraft 2.11 after successful verification.
stealth/space-bunny-alpha — closed resolved Fixed by canonical/snapcraft#554 (commit baed96749), making snap tests architecture-aware; released in snapcraft 2.11 and verified successfully.
stealth/space-bunny-alpha — closed resolved Fixed by snapcraft PR #554 (LP: #1589779), which replaced the hardcoded amd64 in snap test filenames with runtime architecture detection; released in snapcraft 2.11 and verified in xenial -updates.
stealth/space-bunny-alpha — closed resolved Fixed by detecting the runtime architecture instead of hardcoding amd64 in snap-test filenames. Linked Launchpad bug #1589779 records the fix, successful non-amd64 autopkgtests, and closure after verification.
qwen/qwen3.6-35b-a3b — — Fixed by replacing the hardcoded amd64 architecture in snap filenames with dynamic detection, enabling successful autopkgtest execution on non-amd64 platforms. Closed after verification.
qwen/qwen3.6-35b-a3b — — Fixed snap test failures on non-amd64 platforms by replacing hardcoded architecture references with dynamic detection. The test suite now correctly locates snap files across all architectures, verified and closed.
qwen/qwen3.6-35b-a3b — — Fixed snap test failures on non-amd64 platforms by replacing hardcoded amd64 snap names with architecture-agnostic paths. Verified and closed.

Update history

Date Change
created

Related work

  • Likely Fixed By: ubuntu-core/snapcraft#554 (confidence 100%)

    The PR was committed as baed96749 and explicitly references LP #1589779.

Related issues

Issue Project State Summary Similarity
#1589747 test_cleanbuild unit test fails when executed in a platform that's not amd64 snapcraft (launchpad) closed Fixed by PR ubuntu-core/snapcraft#552 (commit 65c1fac22), making test_cleanbuild architecture-aware; released in snapcraft 2.11 and verified in xenial -updates.
85%
#1589752 unit tests in IsDirtyTestCase fail when executed in a platform that's not amd64 snapcraft (launchpad) closed Fixed by upstream PR ubuntu-core/snapcraft#553 (commit 393c4e201), which made IsDirtyTestCase architecture-agnostic; released in snapcraft 2.11 to xenial -updates, SRU verified.
79%
#1650458 snaps tests fail in armhf snapcraft (launchpad) closed Armhf snap test builds were fixed by snapcore/snapcraft#990, merged as f467e55bc; installation testing remained deferred because runners used LXC.
76%
#1805224 Test infrastructure for snapcraft snap on non amd64 snapcraft (launchpad) closed Request to run autopkgtests against the Snapcraft snap on non-amd64 was fulfilled by snapcore/snapcraft PR #2380, merged as commit 4c5b97a6b "tests: use autopkgtest to leverage snap testing"; maintainer sergiusens posted the PR link in Nov 2018.
73%
#1641123 snapcraft does not properly detect the architecture when kernel is 64 bits but userspace is 32 snapcraft (launchpad) closed Fixed in snapcore/snapcraft#1089 by deriving the build architecture from the compiler target, preventing 32-bit ARM artifacts from being mislabeled arm64.
71%
#1570835 snapcraft 2.8 fails on s390x snapcraft (launchpad) closed Snapcraft 2.8's missing s390x handling was fixed by ubuntu-core/snapcraft PR #461, merged as commit d3c242fa2.
71%
#1569401 example tests are failing because they call the old snappy command snapcraft (launchpad) closed Example tests were updated from snappy to snap, fixing Launchpad #1569401 through merged PR ubuntu-core/snapcraft#439 (commit bce446559).
71%
#2012074 snapcraft cannot build snap by default on aarch64 snapcraft (launchpad) open ARM64 default builds failed on Snapcraft 7.3.1 because core20 selected amd64-only Multipass images; later defaults use core22/LXD on Linux, addressing the reported path.
70%