Skip to content

Symlink glmark2 data directory in snapcraft.yaml (BugFix)#2281

Draft
tomli380576 wants to merge 11 commits intomainfrom
fix-gl-support-on-classic
Draft

Symlink glmark2 data directory in snapcraft.yaml (BugFix)#2281
tomli380576 wants to merge 11 commits intomainfrom
fix-gl-support-on-classic

Conversation

@tomli380576
Copy link
Contributor

@tomli380576 tomli380576 commented Jan 14, 2026

Description

The symlink hack in #1677 and #2087 no longer works in snapd 2.73 when using the strict frontend on ubuntu desktop. This PR adds the layout section to all uc versions of the checkbox snap to fix this issue once and for all. Test scripts no longer have to differentiate between deb/snap when calling glmark2.

This is a pretty huge change that will impact all checkbox snaps, so please let me know if there's a better way to do this.

Note that this only fixes the path issue. Issues with graphics libraries not found will not be fixed by this. Right now the wayland version of glmark2, when invoked from inside the snap on a classic desktop image, will immediately exit with "Error: main: Could not initialize canvas".

Resolved issues

/usr/share/glmark2 being hardcoded in glmark2

Documentation

Using bind in the uc snaps leads to an empty /usr/share/glmark2 directory in snap run --shell checkbox-cli therefore symlink was used.

Tests

Manually tested the snaps built in https://github.com/canonical/checkbox/actions/runs/20984775039 on 24.04 desktop

  1. Install the snaps built by the gh action and connect the checkbox runtime plugs
  2. checkbox.shell
  3. run glmark2, window launches. Wayland and es2 variants are broken because of missing graphics libraries, not the data path.
  4. Inside the shell, ls /usr/share/glmark2 and the path exists

TODO: test the snaps on ubuntu core

C3 submissions: see #2287

@codecov
Copy link

codecov bot commented Jan 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.49%. Comparing base (f8136c5) to head (15bdbdb).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2281   +/-   ##
=======================================
  Coverage   54.49%   54.49%           
=======================================
  Files         409      409           
  Lines       43970    43970           
  Branches     8100     8100           
=======================================
  Hits        23961    23961           
+ Misses      19190    19187    -3     
- Partials      819      822    +3     
Flag Coverage Δ
provider-base 31.41% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tomli380576 tomli380576 changed the title Fix incorrect symlink in gl_support test (BugFix) Symlink glmark2 data directory in snapcraft.yaml instead of in code (BugFix) Jan 14, 2026
@tomli380576 tomli380576 requested a review from Copilot January 14, 2026 08:24
@tomli380576 tomli380576 marked this pull request as ready for review January 14, 2026 08:42
@tomli380576 tomli380576 changed the title Symlink glmark2 data directory in snapcraft.yaml instead of in code (BugFix) Symlink glmark2 data directory in snapcraft.yaml (BugFix) Jan 14, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@tomli380576 tomli380576 requested a review from Copilot January 14, 2026 11:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@tomli380576 tomli380576 marked this pull request as draft January 16, 2026 05:41
@tomli380576 tomli380576 marked this pull request as ready for review January 16, 2026 08:14
@tomli380576 tomli380576 marked this pull request as draft January 27, 2026 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant