lxd: fix the unit test for the user id map
Metadata
Current evaluation
Merged as commit e820e119e (#1629), fixing the LXD user ID-map unit test under root execution after #1588 changed ID mapping to use SUDO_UID.
Resolution: closed resolved
Reason: PR snapcraft#1629 was approved and merged as commit e820e119e, correcting the root-only unit-test failure introduced by #1588.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)?
- [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)?
- [x] Have you successfully run `./runtests.sh static`?
- [x] Have you successfully run `./runtests.sh unit`?
-----
#1588 introduced an error in this test when it is executed as root.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged as commit e820e119e (#1629), fixing the LXD user ID-map unit test under root execution after #1588 changed ID mapping to use SUDO_UID. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged as canonical/snapcraft#1629 (e820e119e), correcting the LXD user ID-map unit test failure under root execution introduced by #1588. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged a fix for an LXD unit test failure when run as root, introduced in #1588. Adjusts the user ID map test logic. Approved by two reviewers and passed CI. One remaining test error was noted but did not block the merge. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix for LXD unit test failures in user ID mapping when executed as root. Resolved errors introduced in PR #1588, with one remaining test failure deferred to another contributor. |
Update history
No update history recorded yet.
Related work
-
Caused By:
snapcraft#1588
(confidence 99%)
Its SUDO_UID ID-mapping change caused the test to fail when executed as root.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1588 lxd: use SUDO_UID for ID mapping | snapcraft | merged | Merged PR #1588 as commit 695794f4c, changing LXD ID mapping to use SUDO_UID and fixing Launchpad bug 1719996. | |
| #1385 lxd: Don't assume user ID to 1000 for raw.idmap | snapcraft | merged | Merged PR #1385 as commit e85e0779b, removing LXD raw.idmap's hard-coded UID 1000 assumption for Launchpad bug 1700703; PR #1904 later corrected mapping order. | |
| #780 fix(lxd): set uid map and gid map separately | craft-providers | merged | Merged PR #780 as commit 5717e2c, fixing #769 by configuring LXD UID and GID maps separately; approved by two reviewers. | |
| #18 providers: fix id mapping in lxd project mount | rockcraft | merged | Merged PR #18 fixed LXD project mounts to map the host directory owner rather than the current UID, preventing file-creation failures when their IDs differ. | |
| #769 LXD idmap improperly set for high uids and gids | craft-providers | closed | Fixed by merged PR #98 (76a2d3a): LXD raw.idmap now maps the host UID and GID separately, correcting ownership for high, mismatched IDs. | |
| #98 lxd: pass id for host mount uid mapping | craft-providers | merged | Merged #98 added an application-provided ID for LXD host-mount UID mapping while retaining the running user's UID as the default, resolving #97. | |
| #97 Filesystem uid mapping incorrect in lxd instance | craft-providers | closed | LXD host-mount ID mapping was fixed by #98 (05d4834), then refined by merged #780 (5717e2c), which sets UID and GID maps separately. |