Skip to content

test: Check the host driver search paths AppRun hands OBS (#892) - #893

Merged
zackees merged 1 commit into
masterfrom
test/appimage-nixos-egl-paths
Oct 15, 2026
Merged

zackees merged 1 commit into
masterfrom
test/appimage-nixos-egl-paths

Conversation

@zackees

@zackees zackees commented Oct 15, 2026

Copy link
Copy Markdown
Member

Closes #892. Tests only: this adds the packaging test that #722 shipped without (#426). Related: #846.

What

  • New build-aux/appimage/test-apprun-driver-env.sh <AppRun>: wraps an AppRun in a minimal AppDir with a stub obs, then runs three cases, each in its own user and mount namespace with a private /run that has no host /run/opengl-driver. In every case it reads the stub obs process's /proc/<pid>/environ:
    • nixos: a fake /run/opengl-driver tree, including share/egl/egl_external_platform.d/10_nvidia_wayland.json. Each of GBM_BACKENDS_PATH, LIBVA_DRIVERS_PATH, __EGL_VENDOR_LIBRARY_DIRS, __EGL_EXTERNAL_PLATFORM_CONFIG_DIRS and VK_DRIVER_FILES must be exactly the NixOS directory followed by the standard directories that exist.
    • none: no NixOS tree. Each variable must be exactly the standard directories that exist, or unset if none exist.
    • user: each variable is preset by the user and must reach obs unchanged.
    • --check <pid> <nixos|none> runs only the assertion, against a real process.
  • test-appimage.sh:
    • bundle runs the script against the packaged $APPDIR/AppRun when the container allows user namespaces. Otherwise it prints a ::notice::.
    • first-start (as root, with no /run/opengl-driver present) creates the fake NixOS tree before it launches the real AppImage, then runs --check on the real obs PID. The tree only has empty dirs and a JSON file that names a missing library, so Mesa llvmpipe still renders.

RED: pre-#722 AppRun (git show 2fd806db7^:build-aux/appimage/AppRun), run locally on a NixOS host

FAIL [nixos] GBM_BACKENDS_PATH: expected set:/run/opengl-driver/lib/gbm, obs has unset
FAIL [nixos] LIBVA_DRIVERS_PATH: expected set:/run/opengl-driver/lib/dri, obs has unset
FAIL [nixos] __EGL_VENDOR_LIBRARY_DIRS: expected set:/run/opengl-driver/share/glvnd/egl_vendor.d, obs has unset
FAIL [nixos] __EGL_EXTERNAL_PLATFORM_CONFIG_DIRS: expected set:/run/opengl-driver/share/egl/egl_external_platform.d:/etc/egl/egl_external_platform.d, obs has unset
FAIL [nixos] VK_DRIVER_FILES: expected set:/run/opengl-driver/share/vulkan/icd.d, obs has unset
PASS [none] ... (all 5 unset)
PASS [user] ... (all 5 kept)
AppRun does not hand OBS the host driver search paths it should (see FAIL above)
rc=1

GREEN: current AppRun

PASS [nixos] GBM_BACKENDS_PATH: set:/run/opengl-driver/lib/gbm
PASS [nixos] LIBVA_DRIVERS_PATH: set:/run/opengl-driver/lib/dri
PASS [nixos] __EGL_VENDOR_LIBRARY_DIRS: set:/run/opengl-driver/share/glvnd/egl_vendor.d
PASS [nixos] __EGL_EXTERNAL_PLATFORM_CONFIG_DIRS: set:/run/opengl-driver/share/egl/egl_external_platform.d:/etc/egl/egl_external_platform.d
PASS [nixos] VK_DRIVER_FILES: set:/run/opengl-driver/share/vulkan/icd.d
PASS [none] ... (all 5 unset)
PASS [user] ... (all 5 set:/user/selected/<VAR>)
AppRun hands OBS the host driver search paths
rc=0

Not verified locally

I did not build an AppImage or run test-appimage.sh locally. Its bundle and first-start changes run first in this PR's AppImage CI. Two things are untested: whether the CI containers allow unshare -rm (if they don't, bundle prints a notice and first-start still covers the NixOS case), and whether the fake tree leaves first-start rendering intact.

@zackees
zackees enabled auto-merge October 15, 2026 21:20
@zackees
zackees added this pull request to the merge queue Oct 15, 2026
Merged via the queue into master with commit 2c38ec1 Oct 15, 2026
22 checks passed
@zackees
zackees deleted the test/appimage-nixos-egl-paths branch October 26, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

appimage: test coverage for host driver search paths (#722)

1 participant