snap tests fail when executed in a platform that's not amd64
Metadata
Current evaluation
Fixed by replacing the hardcoded amd64 architecture in snap filenames with dynamic detection, enabling successful autopkgtest execution on non-amd64 platforms. Closed after verification.
Suggested action: —
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 |
|---|---|---|---|---|
| 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
No update history recorded yet.
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 test_cleanbuild unit test failure on non-amd64 platforms by replacing the hardcoded amd64 architecture with dynamic detection. Ensures cross-platform compatibility. Resolved and verified. | |
| #1805224 Test infrastructure for snapcraft snap on non amd64 | snapcraft (launchpad) | closed | Abandoned without implementation. The request to extend autopkgtests for the snapcraft snap on non-amd64 architectures was closed after eight days with zero discussion or resolution. |