snaps tests fail because of the new current link
Metadata
Current evaluation
Fixed. Closed without comments after updating the test suite to handle snapd's new current symlink, resolving busybox and mosquitto test failures.
Suggested action: —
No scores available.
Issue body
snapd in zesty now creates a symlink from ~/snap/<name>/current to ~/snap/<name>/<revision>. This is causing the busybox and mosquitto snaps tests fail:
======================================================================
ERROR: demos_tests.test_busybox.BusyBoxTestCase.test_busybox
----------------------------------------------------------------------
output: {{{b"rm: cannot remove '/home/ubuntu/snap/busybox/x1/busybox.test': No such file or directory\n"}}}
Traceback (most recent call last):
File "/tmp/autopkgtest.AovD16/build.Nh9/snapcraft/snaps_tests/__init__.py", line 242, in run_command_in_snappy_testbed
return self.snappy_testbed.run_command(command, cwd)
File "/tmp/autopkgtest.AovD16/build.Nh9/snapcraft/snaps_tests/testbed.py", line 40, in run_command
stderr=subprocess.STDOUT).decode('utf-8')
File "/usr/lib/python3.5/subprocess.py", line 316, in check_output
**kwargs).stdout
File "/usr/lib/python3.5/subprocess.py", line 398, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'rm ~/snap/busybox/*/busybox.test' returned non-zero exit status 1
======================================================================
FAIL: demos_tests.test_mosquitto.MosquittoTestCase.test_mosquitto
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/autopkgtest.AovD16/build.Nh9/snapcraft/snaps_tests/demos_tests/test_mosquitto.py", line 46, in test_mosquitto
'MQTT subscriber connected.\n'
File "/tmp/autopkgtest.AovD16/build.Nh9/snapcraft/snaps_tests/__init__.py", line 231, in assert_command_in_snappy_testbed
self.assertEqual(expected_output, output)
File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 350, in assertEqual
self.assertThat(observed, matcher, message)
File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 435, in assertThat
raise mismatch_error
testtools.matchers._impl.MismatchError: !=:
reference = '''\
MQTT subscriber connected.
test-mosquitto-topic b'test-message'
test-mosquitto-topic b'exit'
'''
actual = '''\
MQTT subscriber connected.
test-mosquitto-topic b'test-message'
test-mosquitto-topic b'exit'
MQTT subscriber connected.
test-mosquitto-topic b'test-message'
test-mosquitto-topic b'exit'
'''
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Fixed. Closed without comments after updating the test suite to handle snapd's new current symlink, resolving busybox and mosquitto test failures. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed. Test failures caused by snapd's new current symlink were resolved by updating testbed glob patterns to exclude symlinks. No additional comments or follow-up PRs were recorded. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. Tests failing due to snapd's new current symlink were not addressed, likely abandoned or superseded by upstream snapd changes. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed. Test failures caused by snapd's new current symlink breaking busybox and mosquitto tests were resolved by updating test commands to handle the symlink structure. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1187 tests: take into account the new current link. | snapcraft | merged | Merged a fix to handle snapd's new symlink behavior in zesty, updating file searches in snap directories to account for the `current` link pointing to revisions. | |
| #1569401 example tests are failing because they call the old snappy command | snapcraft (launchpad) | closed | Closed without a linked fix or comments. Example tests still reference the deprecated snappy command instead of snap. The issue appears abandoned or superseded by later repository updates. |