Lifecycle's test_core_snap environment gets corrupted by something earlier in the suite
Metadata
Current evaluation
Fixed by merged PR canonical/snapcraft#1133 (commit c0b0f9752), eliminating a test's PATH/environment-variable leak that prevented mksquashfs from being found.
Resolution: closed resolved
Reason: PR #1133 was merged as commit c0b0f9752 and fixed the test that leaked environment-variable changes. The earlier hardcoded-PATH workaround in PR #1131 was closed unmerged.
Evaluated by: mr-cal-bot
No scores available.
Issue body
If I run test_core_snap on its own, it works fine. However, when I run it with the rest of the suite, something appears to be corrupting its path:
======================================================================
ERROR: test_core_setup (snapcraft.tests.test_lifecycle.CoreSetupTestCase)
snapcraft.tests.test_lifecycle.CoreSetupTestCase.test_core_setup
----------------------------------------------------------------------
testtools.testresult.real._StringException: Empty attachments:
pythonlogging:''
Traceback (most recent call last):
File "/usr/lib/python3.5/unittest/mock.py", line 1157, in patched
return func(*args, **keywargs)
File "/home/kyrofa/src/snapcraft/snapcraft/tests/test_lifecycle.py", line 664, in test_core_setup
core_snap = self._create_core_snap()
File "/home/kyrofa/src/snapcraft/snapcraft/tests/test_lifecycle.py", line 732, in _create_core_snap
return lifecycle.snap(self.project_options, directory=core_path)
File "/home/kyrofa/src/snapcraft/snapcraft/internal/lifecycle.py", line 385, in snap
stdout=PIPE, stderr=STDOUT) as proc:
File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'mksquashfs'
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR canonical/snapcraft#1133 (commit c0b0f9752), eliminating a test's PATH/environment-variable leak that prevented mksquashfs from being found. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged canonical/snapcraft#1133 (c0b0f9752), fixing the test that leaked PATH environment changes; the #1131 hardcoded-PATH workaround was closed unmerged. | |
| stealth/space-bunny-alpha | — | closed resolved | Resolved by PR #1112, which added core setup support for classic confinement; snapshot tests no longer required mksquashfs in the suite's PATH. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without documented resolution. The environment corruption causing a missing mksquashfs error during full suite execution was not addressed or fixed. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. The test environment corruption causing a missing 'mksquashfs' error during full suite execution was not addressed, likely due to inactivity. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
canonical/snapcraft#1133
(confidence 100%)
Merged fix for the environment-variable leak, referenced by the maintainer as the real fix.
-
Related To:
canonical/snapcraft#1131
(confidence 100%)
Closed-unmerged workaround that hardcoded test_core_snap's PATH; superseded by #1133.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1131 lifecycle: hardcode test_core_snap's PATH. | snapcraft | closed | Closed unmerged: the hardcoded mksquashfs PATH workaround was abandoned; the underlying environment-variable leak was instead fixed by #1133 (c0b0f9752). | |
| #1891 lifecycle: use in-snap mksquashfs if running from snap | snapcraft | merged | PR #1891 merged (commit f3d870e4e) so lifecycle uses the mksquashfs bundled inside the snapcraft snap when running as a snap, instead of relying on $PATH. Later replaced by `snap pack` in #3173. |